Metrics with livestatus

OK.

OMD[prod2]:~/var/check_mk/rrd/ESX1$ grep METRICS CPU_utilization.info
METRICS util

GET services
Filter: host_name = ESX1
Filter: service_description = CPU utilization
Columns: rrddata:m1:util.max,1,*:$(date +%s -d"a month ago"):$(date +%s):1"

Now i’m getting info.

So, can you confirm 4 things?

  1. grep METRICS xxxx.info, and i get the rrd attribute

  2. Values are: max, min and average (not avg)

  3. What’s the difference between:

for i in $(lq “GET services\nFilter: host_name = ESX1\nFilter: service_description ~ CPU utilization\nColumns: rrddata:m1:util.average,1,*:$(date +%s -d"a month ago”):$(date +%s):1" | sed -e ‘s/,/ /g’); do echo $i; done | sort -n | grep “.” |tail -1

And…

GET services
Filter: description = CPU utilization
Filter: host_name = ESX1
Filter: time > $(date +%s -d"a month ago")
Filter: time = $(date +%s)
Stats: sum perf_data

  1. With the first (rrddata column), I’m getting a lot of data, not the maximum value, not the min, not the avg. I guess im getting maximum values, same for min and average. What’s the logic of that? i’m asking for the maximum value in the last 30 days.

Thanks for your time!