Dashboards & Visualizations

Dashboard for a 1 week search only between core working hours

jacqu3sy
Path Finder

Hi,

Is there a way of returning alerts from a search query but only for between core working hours over a period of 7 days?

Essentially, I need a dashboard to return results for when Critical severity alerts have not been closed within 2 hours, but only for between the hours of 08:00 - 17:00. So basicly just a gauge to show a percentage of those alerts which missed the KPI.

Currently I have the following which appears to work, but I'm not sure how to only make it applicable for between 8 - 5.

| incident_review | where like(status_label,"Assigned-%") OR like(status_label,"Closed-%") | transaction rule_id | where eventcount>1 | fields time, duration, eventcount, owner, reviewer, rule_id, status, urgency | join rule_id [ search notable | rex field=eventtype "(?P\w+\\w+)-" | search NOT SpStatus="notable_suppression" | rename urgency as NT_urgency | fields rule_id, status, status_label, NT_urgency] | eval FinalUrgency=if(isnull(urgency),NT_urgency,urgency) | eval RTimeTaken=duration/60 | where status="2" AND (status="3" OR status="4" OR status="5") | eval TimeTaken=duration | search FinalUrgency=critical | eval QueueStatus=if(RTimeTaken<120,"Yes", "No") | stats count by QueueStatus | eventstats sum(count) as total | eval percent= round ( count*100/total,1) |where match(QueueStatus,"Yes") | gauge percent 0 80 90 100

I'd really appreciate any help with this!

Thanks.

0 Karma
1 Solution

omuelle1
Communicator

If you want this as an alert and just during working hours why not use the crontab function and there define the hours you need?

View solution in original post

0 Karma

omuelle1
Communicator

If you want this as an alert and just during working hours why not use the crontab function and there define the hours you need?

0 Karma

jacqu3sy
Path Finder

I dont really need it as an alert. It's purpose is not to fire an alert when somebody hasnt acknowledged an alert of a particular severity within a given timeframe, more as a dashboard to display a percentage of those alerts that have been missed.

0 Karma

omuelle1
Communicator

Got you, check out this. Seems like they had a similar problem as you have right now:

https://answers.splunk.com/answers/69820/search-to-only-include-business-hours-and-exclude-weekends....

0 Karma

jacqu3sy
Path Finder

Perfect, just what I was looking for. Many thanks.

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...