Alerting

cron schedule on past 7 days search

kokanne
Communicator

Hello,

I applied a scheduled search to one of my reports that counts the MB usage of the past 7 days, and compares it to the 7 days prior to that.

It was indicating around 6000 with a trendline of +120%
After applying the schedule, it is indicating 413 with a decrease of -83%

Now this is weird, how is it possible that the cron schedule altered the outcome?

It is schedule to refresh every 30 minutes

0 Karma

ypeng_splunk
Splunk Employee
Splunk Employee

Pls post the savedsearches.conf

0 Karma

damiensurat
Contributor

Could you please share the cron expression and time range for the scheduled search?

0 Karma

kokanne
Communicator

Dont have access to this

0 Karma

ypeng_splunk
Splunk Employee
Splunk Employee

then post the search.

0 Karma

somesoni2
Revered Legend

Along with time range used.

0 Karma

kokanne
Communicator

search:

index="network" sourcetype="network:proxy" 
| timechart span=1h eval(sum(bytes)/1024/1024) as totMBs

Time range 7 days
Visual is single value compared to 7 days before

0 Karma

Richfez
SplunkTrust
SplunkTrust

I think those settings might make a single-value visualization (lol, which has two values on it!) compare the most recent hour with the previous hour? Your results would seem to sort of possibly fit with that.

So try this:

index="network" sourcetype="network:proxy" earliest=-2w@w 
| timechart span=1w eval(sum(bytes)/1024/1024) as totMBs

Keep in mind that compares the last full week's data to this week so far, which could be only the first days's worth of data from this week.

Better, perhaps, may be to press timewrap into service? The Usage and Basic Example section is pretty close to what you need, just that you have a slightly different base search.

0 Karma
Get Updates on the Splunk Community!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...