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.
Log exceptions from .NET application to zabbix
Question
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
OTHER TIPS
Not sure I understood the problem. I would split it into 2:
1. Intercepting exceptions
2. Sending using Zabbix
I cannot help with the 2
, since I'm not familiar with the "Zabbix". But if you need to intercept either all or unhandled exceptions you can register to the following AppDomain events:
AppDomain.UnhandledException
AppDomain.FirstChanceException
You can perform the registration in your initialization code (e.g. Global.asax
):
AppDomain.Current.UnhandledException += (s, args) => ... // Send using Zabbix