# AlertHandler Post alerts to ASP.net web api

**URL:** <https://community.influxdata.com/t/alerthandler-post-alerts-to-asp-net-web-api/6262>\
**Category:** Kapacitor\
**Tags:** kapacitor, chronograf\
**Created:** [August 16, 2018, 2:19pm UTC](https://community.influxdata.com/t/alerthandler-post-alerts-to-asp-net-web-api/6262 "2018-08-16T14:19:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashish\_Sikarwar](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ashish_sikarwar/32/2074_2.png) [@Ashish\_Sikarwar](https://community.influxdata.com/u/Ashish_Sikarwar)\
**Post date:** [August 16, 2018, 2:19pm UTC](https://community.influxdata.com/t/alerthandler-post-alerts-to-asp-net-web-api/6262/1 "2018-08-16T14:19:00Z")

</div>

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](http://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](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}}

---

<div class="post-metadata">

**Author:** ![Ashish\_Sikarwar](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ashish_sikarwar/32/2074_2.png) [@Ashish\_Sikarwar](https://community.influxdata.com/u/Ashish_Sikarwar)\
**Post date:** [September 20, 2018, 12:17pm UTC](https://community.influxdata.com/t/alerthandler-post-alerts-to-asp-net-web-api/6262/2 "2018-09-20T12:17:37Z")

</div>

I fixed the issue by changing the property of body of the message in the [asp.net](http://asp.net) code.

it should be like this:  
{""message“: "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”}
