index=abc cf_space_name=prod-ad0000123 cf_app_name IN (RED,Blue,Green) "Initiating " OR "Protobuf message received" OR "Event Qualification Determined"
| bucket _time span=1m
| stats
count(eval(cf_app_name == "RED)) as RedVolume
count(eval(cf_app_name == "blue")) as BlueVolume
count(eval(cf_app_name == "Green")) as GreenVolume
avg(GreenVolume) as AvgGVolume
| eval estimate = (RED + Blue - Green) / AvgGVolume
This is not a question, is it? Here are some basics of asking an answerable question.
Hi @sivaranjani ,
let me understand:
you want to calculate the average per minute in a period and then display the count and the average per minute for each app, is it correct?
if this is your requirement, please, try something like this:
index=abc cf_space_name=prod-ad0000123 cf_app_name IN (RED,Blue,Green) "Initiating " OR "Protobuf message received" OR "Event Qualification Determined"
| bucket _time span=1m
| stats
count(eval(cf_app_name == "RED)) AS RedVolume_by_min
count(eval(cf_app_name == "blue")) AS BlueVolume_by_min
count(eval(cf_app_name == "Green")) AS GreenVolume_by_min
avg(GreenVolume) as AvgGVolume
BY _time
| stats
sum(RedVolume_by_min) AS RedVolume
sum(BlueVolume_by_min) AS BlueVolume
sum(GreenVolume_by_min) AS GreenVolume
avg(RedVolume_by_min) AS RedVolume_avg
avg(BlueVolume_by_min) AS BlueVolume_avg
avg(BlueVolume_by_min) AS BlueVolume_avg
BY _time
| eval
estimate = (RED + Blue - Green) / AvgGVolume
Ciao.
Giuseppe
Thanks this is perfect. Exactly what i needed.
Hi @sivaranjani ,
good for you, see next time!
Ciao and happy splunking
Giuseppe
P.S.: Karma Points are appreciated by all the contributors 😉
This is not a question, is it? Here are some basics of asking an answerable question.