Splunk Search

Service logs count very less to a particular host

kgaurav
Observer

I'm having trouble writing a query which displays the action and host count where log count is below average on any host.

The output would look something like this:

 

actionhost1host2host3host4host5host6
getdata234042260022592882251222244
Labels (1)
0 Karma

manjunathmeti
Champion

hi @kgaurav ,

Try this:

index=index 
| stats count by action, host 
| eventstats avg(count) as avg by action 
| eval count=if(count>=avg, count, "(".count.")") 
| fields action, host, count 
| xyseries action, host, count

 

If this reply helps you, an upvote/like would be appreciated.

0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...