Installation

Need help to add progress bar for a column in my panel

lekshmi279
New Member

Hi,

I am looking for a way to add a progress bar to one of my panels that show a percentage value. V7.3.1

If you look at the attached image, it shows 2%. So basically when it adds it needs to fill up. Can you point me in the right direction?

Tags (2)
0 Karma

niketn
Legend

@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.

<option name="refresh.display">preview</option>

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>

alt text

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>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

abbijagare
Loves-to-Learn

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.

0 Karma
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...