@lekshmi279 following Simple XML option for visualization shows preview of percent completion of search. However, it just shows the progress bar by default and percent is displayed only on hover over the Search progress bar.
In order to show percent completion you can use the
<progress> search event handler and set the token based on the built in
$job.doneProgress$. Following is an example:
<progress> <eval token="tokCompletionPerc">round($job.doneProgress$*100,1)</eval> </progress>
Please try the following Run anywhere dashboard example:
<dashboard> <label>Query Progress Bar</label> <row> <panel> <chart> <title>$tokCompletionPerc$ % event scanned!</title> <search> <progress> <eval token="tokCompletionPerc">round($job.doneProgress$*100,1)</eval> </progress> <query>index=_internal sourcetype=splunkd log_level!=INFO component=* | timechart count by component limit=10 useother=f usenull=f</query> <earliest>-30d@d</earliest> <latest>now</latest> <sampleRatio>1</sampleRatio> </search> <option name="charting.chart">line</option> <option name="charting.drilldown">all</option> <option name="refresh.display">preview</option> </chart> </panel> </row> </dashboard>
I tried the above option to show percentage, but the value is changing for the same numbers if the environment is changed. (eg: my count is same but percent value changes from Dev(71%) to Test(98%) env). What can I do to make the percentage consistent across environments.