Chronograf> Kapacitor> Alert Task> Add a Handler
I am using “Send this Alert to” feature and selected Post as a handler on Windows.
I am not able to send Alert messages to ASP.net web API endpoint i created.
I know the API is working because i can post the json data using Postman
Example:
To endpoint http://localhost:12345/api/Alert/abc
Body:
{“alert_name”:“Memory”,“alert_metrics”:“Memory_Pages_PerSec”,“alert_severity”:“CRITICAL”,“Memory_Pages_Per_Second”:243,"alert_time ":“2018-08-13 14:34:50 +0000 UTC”}
But for my endpoint every time i receive null values, it is clear no data has been sent from kapacitor.
Am i missing anything? Does kapacitor sends a direct string?
Below is the message i formatted to be sent as:
alert_name = {{.Name}}; alert_metrics = Percent_Processor_Time; alert_severity = {{.Level}}; Percent_Processor_Time = {{ index .Fields “value” }}; alert_time = {{.Time}}