Knowing Kapacitor Alert State

Hi,

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?

Regards,

Advait Deo

Hi @Advait_Deo, welcome back

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.

You can add the taskname ( hardcoded ) in the measurement using tag in influxDBout ,
is that an option for you ?

In the kapacitor logfile the task name is logged …

ts=2019-06-20T10:52:00.008+02:00 lvl=info msg=“batch point” service=kapacitor task_master=main task=health node=log4 prefix= name=mem group=host=myhost,service= tag_host=mytaghost tag_service= field_last=35.549647085827964 time=2019-06-20T08:51:00.001Z

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.

Do you mean the deleteNode

Great. Thanks I will use that.

Ok ! Have a nice weekend :slight_smile: