I’m working with a group who wants to be alerted when a threshold is zero, meaning transactions stop for a certain period of time. Here’s my NRQL:
SELECT count(*) from Transaction WHERE appName = '<appname>' AND name like '%/<call> (POST)' WITH TIMEZONE 'America/Chicago' WHERE hourOf(timestamp) in ('06:00','07:00','08:00','09:00','10:00','11:00','12:00','13:00','14:00','15:00','16:00','17:00','18:00','19:00','20:00')
I realized, that anything outside of the timestamp will report as zero and set off the alert. I have also noticed that my timestamp seems to move the data outside of the hours I’m searching for by +2 hours. We are in Texas so I assume Chicago represents CST.