Dashboards & Visualizations

How to check if all expected logs are getting indexed in Splunk and trigger an email alert if any data is not received?

SathyaNarayanan
Path Finder

I have more than 5000+ servers and 10,000+ logs coming to Splunk daily. How do I check whether all the logs are coming into Splunk properly by using a dashboard or report.

If any of the logs not received, I need to be alerted through an email alert.

0 Karma

sundareshr
Legend

We use the following search... runs for over 2 mins in our environment (not perfect, but works for us). We have it scheduled to run periodically. You can adjust the timing to meet your need.

index=* earliest=-30m@m | eval when=if(_time>relative_time(now(), "-15m@m"), "now", "earlier") | eval h=host." - ".source | chart count over h by when | where earlier>0 AND now=0

PS: This will take a while to run. Depending on how long it runs in your environment, you may want to consider SI for this.

0 Karma

craigv_splunk
Splunk Employee
Splunk Employee

There are a variety of reasons why logs might not be coming into Splunk properly. If you are looking for Splunk internal ingest failures then the splunkd log in the _internal index can be used to build an alert for Splunk failing to index because of blocked queues, etc. However, this would not cover a failure outside of Splunk.

My idea would be to create a time window where you would expect at least one log to come in and alert on when that search returns no results.
For example, if you expect at least 1 event to be sent over from your syslog server every minute, build an alert:
"source=$syslogserver" for a rolling time window of 1 minute. Fire an alert if number of results==0

0 Karma

SathyaNarayanan
Path Finder

am getting logs through syslog. for example: if 10 logs coming from syslog to splunk, if any of this logs are not forwarded, I need to be notified.

0 Karma

craigv_splunk
Splunk Employee
Splunk Employee

So for each discrete source you could generate a time window search that could tell you whether any logs have been indexed within the set time period. Absence of results would mean that something might be wrong.

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!

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...