Search code examples
c#.netzabbix

Log exceptions from .NET application to zabbix


I`m trying to accomplish this:

When an exception is generated on a webapp, i want to log the exception to zabbix via it`s api.

Browsing the api and the internet, i didn't found anything that could be helpful.

I do not want to use zabbix_sender, i just want to make POST calls to the api.


Solution

  • You can't use zabbix API to submit monitoring data. You need to use the same protocol used by zabbix_sender. If I remember correctly it is json based only in the latest versions of zabbix sever but you'd better off with zabbix 2.0 as minimum anyway. The protocol is TCP socket based sending, I can't say anything about .net but there are numerous implementations. For me the most useful one was this one in python.