Splunk Cloud Platform

How to detect logs missing from some sources

aiumjw1
Observer

Hi Team,

I have logs coming from certain nodes and clusters. How can I detect if the logs go missing even from one of the clusters. The nodes and clusters are under the field name source. 

For example, I have source = logs/node*c*
node* has 3 to 4 nodes.
c* have 8 to 10 clusters.

I want to create an alert to notify if logs are missing even from one cluster.

Thanks.

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

A classic question! Splunk is good at easily finding things that are there, not so good at easily finding things which aren't there. Basically, you need to tell Splunk what to look for and see if it finds any. For example:

<your search>
| stats count by source
| append
  [| makeresults
  | fields - _time
  | eval source=split("source1,source2,source3",",")
  | mvexpand source
  | eval count = 0]
| stats sum(count) as count by source
| where count == 0

 

0 Karma

aiumjw1
Observer

Thank you. This helps. But I have a question. Above query tells me the sources list and number of logs coming in Splunk from which I can filter the source having zero logs. But let's take below example,

If for 1hour I am not getting logs from a particular source, then I think in the above query it will not be listed at all. How can I find that one source which is missing.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

If you include the "missing" source in the list of sources that are appended with the makeresults, why do you think it wouldn't appear in the list?

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!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...