yes, the query(A, 10s, now) , means execute query A with time range from: 10s ago, to: now.
When you test the rule you can see the response from your metric query, in your case it returns no series. Try expanding the time range from 10s to 1m, maybe that will help.
Yes, okay
But did you seen that the second Alert rule DOES NOT use a Template Variables in the Metric ?
And nevertheless it did not trigger the alert ?
Yes bu [quote=“skirsten, post:8, topic:858”]
So the result of the TEST Alert button does not correspond to the
result coming from the same Metric seen as chart. A bug ?
[/quote]
Not likely. It probably just a matter of your query and the time range. Looks like you have no data for the last 2 minutes. Try increasing time range.
Your query is missing a group time time, this is very import to have otherwise if you zoom out your query can return millions of data points and hang the browser .
When I check in the influxdb log, I see this query :
SELECT mean(value) FROM mydb."4weeks".BASIC_STATS WHERE cluster = 'fra-prod-cluster-01' AND node = 'fra-prod-cluster-01-2' AND counter_name = 'Total_Ops_s' AND time > 1494396957926ms AND time < 1494411357926ms GROUP BY time(5m)
When I paste this query in the influx command line:
*ERR: unsupported mean iterator type: influxql.stringInterruptIterator
May be this is the reason why I don’t get data points ?
I’ve found the reason.
The datatype was set to STRING, as I changed the type to INTEGER , the influxdb aggregate functions are working and then the alerting was also working.