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!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...