[trying to post again as my earlier post did not show up]
Hi,
How can I query the current state of an Alert ?
[[
{
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "ALERTS",
"alertname": "MyAlertRule",
"alertstate": "firing",
"monitor": "codelab-monitor",
"severity": "critical",
"test": "rahul"
},
"value": [
1492620446.568,
"1"
]
},
{
"metric": {
"__name__": "ALERTS",
"alertname": "MyAlertRule",
"alertstate": "pending",
"severity": "critical",
"test": "rahul"
},
"value": [
1492620446.568,
"0"
]
},
{
"metric": {
"__name__": "ALERTS",
"alertname": "MyAlertRule",
"alertstate": "firing",
"severity": "critical",
"test": "rahul"
},
"value": [
1492620446.568,
"1"
]
}
]
}
}
]]
Thanks,
Rahul.