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?

 

 

Labels (1)
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
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...