I have a query that works fine to plot graph. But when i enable Alert, the condition always returns ‘No Data’. I enabled debug log in grafana and captured the InfluxDB query that is sent when Test Rule is clicked. It is as below
Same query succeeds to return output via web browser as below.
{“results”:[{“statement_id”:0,“series”:[{“name”:“Cisco-IOS-XR-pmengine-oper:performance-management/ethernet/ethernet-ports/ethernet-port/ethernet-current/ethernet-second30/second30-ethers/second30-ether”,“columns”:[“time”,“rx-util__data”],“values”:[[1590004269,“100.00”],[1590004279,“100.00”],[1590004289,“100.00”],[1590004299,“100.00”],[1590004309,“100.00”],[1590004319,“100.00”]]}]}]}
But the output from Alert page is as below
firing:false
state:“no_data”
conditionEvals:“false = false”
timeMs:“1.016ms”
logs:Array[2]
0:Object
message:“Condition[0]: Query Result”
data:Array[1]
0:Object
name:“Cisco-IOS-XR-pmengine-oper:performance-management/ethernet/ethernet-ports/ethernet-port/ethernet-current/ethernet-second30/second30-ethers/second30-ether.rx-util__data”
points:Array[6]
0:Array[null,1590005939]
1:Array[null,1590005949]
2:Array[null,1590005959]
3:Array[null,1590005969]
4:Array[null,1590005979]
5:Array[null,1590005989]
1:Object
message:“Condition[0]: Eval: false, Metric: Cisco-IOS-XR-pmengine-oper:performance-management/ethernet/ethernet-ports/ethernet-port/ethernet-current/ethernet-second30/second30-ethers/second30-ether.rx-util__data, Value: null”
data:null
Pasting output from query inspector:
xhrStatus:“complete”
request:Object
method:“GET”
url:“api/datasources/proxy/1/query”
params:Object
db:“mydb”
q:“SELECT “rx-util__data” FROM “Cisco-IOS-XR-pmengine-oper:performance-management/ethernet/ethernet-ports/ethernet-port/ethernet-current/ethernet-second30/second30-ethers/second30-ether” WHERE (“Producer” = ‘cvt-one-guru’ AND “name” = ‘HundredGigECtrlr0/0/0/2’) AND time >= now() - 15m”
epoch:“ms”
data:null
precision:“ms”
response:Object
results:Array[1]
0:Object
statement_id:0
series:Array[1]
0:Object
name:“Cisco-IOS-XR-pmengine-oper:performance-management/ethernet/ethernet-ports/ethernet-port/ethernet-current/ethernet-second30/second30-ethers/second30-ether”
columns:Array[2]
values:Array[90]
0:Array[1590005319427,100.00]
1:Array[1590005329427,100.00]
2:Array[1590005339451,100.00]
3:Array[1590005349426,100.00]
4:Array[1590005359429,100.00]
5:Array[1590005369423,100.00]
6:Array[1590005379457,100.00]
7:Array[1590005389411,100.00]
8:Array[1590005399405,100.00]
9:Array[1590005409432,100.00]
10:Array[1590005419422,100.00]
11:Array[1590005429444,100.00]
12:Array[1590005439414,100.00]
13:Array[1590005449440,100.00]
14:Array[1590005459418,100.00]
15:Array[1590005469407,100.00]
16:Array[1590005479465,100.00]
17:Array[1590005489421,100.00]
18:Array[1590005499430,100.00]
19:Array[1590005509410,100.00]
20:Array[1590005519413,100.00]
21:Array[1590005529424,100.00]
22:Array[1590005539424,100.00]
23:Array[1590005549455,100.00]
24:Array[1590005559420,100.00]
25:Array[1590005569426,100.00]
26:Array[1590005579425,100.00]
27:Array[1590005589448,100.00]
28:Array[1590005599432,100.00]
29:Array[1590005609436,100.00]
30:Array[1590005619435,100.00]
31:Array[1590005629411,100.00]
32:Array[1590005639431,100.00]
33:Array[1590005649424,100.00]
34:Array[1590005659458,100.00]
35:Array[1590005669425,100.00]
36:Array[1590005679423,100.00]
37:Array[1590005689433,100.00]
38:Array[1590005699423,100.00]
39:Array[1590005709463,100.00]
40:Array[1590005719440,100.00]
41:Array[1590005729445,100.00]
42:Array[1590005739424,100.00]
43:Array[1590005749440,100.00]
44:Array[1590005759444,100.00]
45:Array[1590005769426,100.00]
46:Array[1590005779465,100.00]
47:Array[1590005789429,100.00]
48:Array[1590005799454,100.00]
49:Array[1590005809420,100.00]
50:Array[1590005819420,100.00]
51:Array[1590005829412,100.00]
52:Array[1590005839435,100.00]
53:Array[1590005849445,100.00]
54:Array[1590005859449,100.00]
55:Array[1590005869455,100.00]
56:Array[1590005879418,100.00]
57:Array[1590005889441,100.00]
58:Array[1590005899447,100.00]
59:Array[1590005909437,100.00]
60:Array[1590005919470,100.00]
61:Array[1590005929428,100.00]
62:Array[1590005939444,100.00]
63:Array[1590005949428,100.00]
64:Array[1590005959441,100.00]
65:Array[1590005969439,100.00]
66:Array[1590005979435,100.00]
67:Array[1590005989445,100.00]
68:Array[1590005999435,100.00]
69:Array[1590006009444,100.00]
70:Array[1590006019443,100.00]
71:Array[1590006029451,100.00]
72:Array[1590006039420,100.00]
73:Array[1590006049436,100.00]
74:Array[1590006059450,100.00]
75:Array[1590006069439,100.00]
76:Array[1590006079476,100.00]
77:Array[1590006089422,100.00]
78:Array[1590006099430,100.00]
79:Array[1590006109434,100.00]
80:Array[1590006119432,100.00]
81:Array[1590006129422,100.00]
82:Array[1590006139441,100.00]
83:Array[1590006149453,100.00]
84:Array[1590006159417,100.00]
85:Array[1590006169464,100.00]
86:Array[1590006179431,100.00]
87:Array[1590006189443,100.00]
88:Array[1590006199430,100.00]
89:Array[1590006209439,100.00]