Use NRQL in alert to check CPU only in case if transaction exists

Hello,

I need help to create alert. I’m checking CPU for an app.

SELECT rate(sum(apm.service.cpu.usertime.utilization), 1 second) * 100 as cpuUsage FROM Metric FACET host WHERE appName = '$APP_NAME'

How I can add condition to check CPU only in case if specific transaction occurs?

Hi @kyrylo.moroziuk

That’s not currently possible using the Metric data type - neither is it possible using Transaction (since that doesn’t show CPU data)

I’m curious though about your end goal / use case?

It seems like a very specific requirement to alert on just the CPU time contributed to by a single transaction. So, I’m hoping we can help you to widen the net and be a little less specific but still achieve your goals, or close to your goals.

1 Like