Hey, I have a Zabbix instance and would like to import problems from there into Checkmk via API. The data export from Zabbix is ready and the basic authentication has also worked with Checkmk.
I have seen that I can add hosts via API. But how can I display a new problem entry in the CheckMk dashboard? Do I have to create a rule first? What would the specific endpoint be called?
Iâm not going to question why you want to use Zabbix and Checkmk in parallel. You probably have your reasonsâŚ
If I understand you correctly, you are trying to use Checkmk a bit like Grafana, as a dashboarding tool that displays information from other systems. Hereâs how I understood your setup and what you would like to achieve:
You are monitoring a host in Zabbix
If a host has a problem, this will show up in Zabbix first.
You then take the information that this host has a problem (I donât know what Zabbix calls this - a state? notification? alert?) and put it into some kind of structured data export (JSON, âŚ)
You want Checkmk to import this information and âdisplay a new problem entry in the CheckMk dashboardâ
First of all: There is not âTHE Checkmk dashboardâ, there are many. Letâs assume you mean the âHost and Service Problemsâ dashboard.
For a problem to show up there, the host in question first would need to exist in Checkmk. So in a first step the host in question would need to be created in Checkmk. As you rightly pointed out, that can be done by the Rest API. So in theory, you could create a sort of mirror image of the entire infrastructure you are monitoring in Zabbix in Checkmk. That would work.
But now about importing a host problem - thatâs where you lost meâŚ
The whole purpose of Checkmk is to detect if a host has a problem. Setting a host state through the API would lead this function âad absurdumâ. That would be kind of like taking a Sharpie and writing Pulse: 68 on a heart rate monitor when in reality the patient is flatlining. This is also why there is no API endpoint for this, because this is the whole purpose of a tool like Checkmk to find that out.
Or am I completely misunderstanding what you are trying to do?
Thank you very much for your quick reply. Letâs assume I want to push events to the Event Console. I have a Python script that pulls the data from Zabbix, how can I generate new Event Console entries in Checkmk using Python? I have seen that there are probably UDP port and SNMP for this. Is it correct that there is no REST-API endpoint?
Thank you