Splunk Enterprise

help on trend indicator

jip31
Motivator

hi

 

I use the code below in order to display a single panel value count on the last 7 days

index=mesures sourcetype=sign  
| fields sig_id
| stats dc(sig_id)

Now, I need to change it by a trend indicator in order to  have the single panel count but also in order to have the trend for the week before the last 7 days

So you can see the code in my xml file, but I have "0" displayed in my count and obviously "0" for my trend

    <panel>
      <single>
        <search>
          <query>`index=mesures sourcetype=sign
| fields sig_id
| timechart dc(sig_id)</query>
          <earliest>-7d@d</earliest>
          <latest>now</latest>
        </search>
        <option name="colorBy">trend</option>
        <option name="colorMode">none</option>
        <option name="drilldown">none</option>
        <option name="height">200</option>
        <option name="numberPrecision">0</option>
        <option name="rangeColors">["0x53a051","0xf8be34","0xf1813f","0xdc4e41"]</option>
        <option name="rangeValues">[0,5,10]</option>
        <option name="refresh.display">progressbar</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendInterval">-7d</option>
        <option name="underLabel">Compared to last week</option>
        <option name="useColors">1</option>
      </single>
    </panel>

So what is wrong please?

 

 

Tags (1)
0 Karma
1 Solution

ashvinpandey
Contributor

@jip31 Try using below search string:

index=mesures sourcetype=sign  
| timechart span=7d dc(sig_id)

you can change the timespan as per your need.

Also, If this reply helps you, an upvote would be appreciated.

View solution in original post

0 Karma

ashvinpandey
Contributor

@jip31 Try using below search string:

index=mesures sourcetype=sign  
| timechart span=7d dc(sig_id)

you can change the timespan as per your need.

Also, If this reply helps you, an upvote would be appreciated.

0 Karma

jip31
Motivator

hi

thanks

I understand better why I thought my count was wrong

its a misunderstanding

as my time range is on the "last 7 days", I thought that my count will be on the "last 7 days" I can see that the count correspond to the count of the current day and the trend indicator is just the difference between the current day count and the count on the last 7 days

so I wonder if its possible to have a count on the last 7 days and a trend indicator which is the difference between this count and the count corresponding to the whole time range (30 days for example)?

because there is a logical that I dont understand. What is the interest to display a trend that compare the count done on the current day with a count done on the last7 days?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...