Hi
I would like to calculate peak TPS per 30 minute by host.
I have this search.
some search| timechart span=1s count as TPS | timechart span=30m max(TPS) as PEAK
I have this, but if I add by host
, it won't show any result.
Is there any way I can solve this problem?
Thanks!
Typically you shouldnt chain together timecharts like this...
You can manipulate you time buckets with the bin/bucket command..
search | bucket span=1s _time | timechart xxxx
But im not sure why you are looking at one second here and then a 30 minute span. This effectively causes double processing and for no good reason. Is your events per second? If youre looking for the max, per host:
... search | bucket span=1s | stats avg(TPS) as avg1s by _time host | bin span=30m | timechar max(avg1s) as PEAK by host
That would generally be a way to do it. The first stats is looking at the per second avg split by time and host. The second groups it into 30mins, and groups the max by host.
Typically you shouldnt chain together timecharts like this...
You can manipulate you time buckets with the bin/bucket command..
search | bucket span=1s _time | timechart xxxx
But im not sure why you are looking at one second here and then a 30 minute span. This effectively causes double processing and for no good reason. Is your events per second? If youre looking for the max, per host:
... search | bucket span=1s | stats avg(TPS) as avg1s by _time host | bin span=30m | timechar max(avg1s) as PEAK by host
That would generally be a way to do it. The first stats is looking at the per second avg split by time and host. The second groups it into 30mins, and groups the max by host.
Thanks! It works!
Try like this
some search | bucket span=1s | stats count TPS by _time host | timechart span=30m max(TPS) by host