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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...