is there a way where we can know the current state of alert in kapacitor?
I see that kapacitor provide details about how many alerts it has fired and we can see number of warns_triggered, crits_triggered and oks_triggered.
But looking at the alert output from kapacitor, I don’t see anything which tells me whether an alert is currently in alarm state or OK state.
Also, number of warns_triggered, crits_triggered and oks_triggered does not add up every time. In case if alert changes and we disable/enable alert, everything is reset to 0.
Any idea on how we can know if kapacitor alert is in alarm state or OK state?
You can send the alert to a measurement in the database and then you can find the last alert in the measurement to know the state ,
Hope this helps ,
Best regards
Thanks @MarcV. We are doing that but problem is we cannot set taskname with influxdbOut
Also, even if we send that alert data to measurement, it also sends all the tags and fields that are used in all the alerts which make it difficult to process the measurement and show the output in GUI. Because we have too many tags and fields in that measurement. We are not using Chronograf in our setup.
I think I can workaround that and get the tag name hardcoded.
Do we have a way to exclude all other tags and fields when writing to measurement using influxdbOut?
I want to send only specific tags and field to this measurement.