I am trying to create an alert that will query all host that match my agent custom attribute (test-stephen-attribute and my custom metric set httpcheck (metrics collected, 0/1 as IsAlive and latency in ms.
I am able to query SystemState for the agent attribute. I am able to query my custom metrics from the entity/metric name of httpcheck. What I can’t seem to do is create a query where I count customMetric.latency against all agent attributes with test-stephen-attribute.
The query for my custom integration metrics
- SELECT average(serverProcessingLatencyms) FROM httpcheck
Returns the avg latency from all servers and graphs it.
The query for hosts with my custom attributes
- SELECT count(*) FROM SystemSample WHERE
Returns a value of 1 because there is only 1 host.
What I want to do is query all host that has the ‘test-stephen-attribute’ and collect all httpcheck metrics (IsAlive(0/1), ServerProcessingLatencyms. This seems like the data is in 2 separate tables SystemSample and httpcheck. There is no JOIN in NRQL so how can I query using both data sets?