Route the alert notifications based on targets

I found a query

“SELECT average(cpuUsedCores/cpuRequestedCores)10 as ‘CPU Utilization %’ from K8sContainerSample WHERE label.norbert.cerner.com/project = ‘alva’ AND label.norbert.cerner.com/application LIKE ‘mlmobjectslegacy’ AND deploymentName RLIKE 'ml.-production-p[0-9].*’ since 180 minutes ago FACET podName, containerName TIMESERIES auto”

for getting the CPU Utilization. However I wanted to confirm is it the same as what is reported in New Relic APM Alerts for CPU Utilization? I was comparing the graphs which seem to be similar. However I wanted a confirmation on that.

Hi,

Can you please confirm on the above query whether it is the same as what is reported in New Relic APM Alerts for CPU Utilization ?

Hey @annesha.bhattacharya

Sorry for the delay here.

NRQL queries like this can’t exactly match the APM data, since they are looking at different data types, and different data sources. So the data may be roughly the same, but they won’t exactly match.

I took a look at your query and I’m not sure what the 10 in this section is intended for:

SELECT average()10 

I changed that to:

SELECT (average(cpuUsedCores) / average(cpuRequestedCores) ) *100 as 'CPU Utilization %' from K8sContainerSample WHERE label.norbert.cerner.com/project = 'alva' AND label.norbert.cerner.com/application LIKE '%mlmobjectslegacy%' AND deploymentName RLIKE 'ml.-production-p[0-9].*' since 180 minutes ago FACET podName, containerName TIMESERIES auto 

Which appears to show accurate CPU usage data.

More importantly though, is how you see this data. You know your applications and environment better than I can. When you look at those query results, does that line up closely to what you expect for these containers / pods? If so, then yes I’d suggest setting up Alerting on this query. If not, you may need something different, another query or another alerting type.

1 Like