Could you please tell me how can I create an alarm from a Python script in a Zabbix system?
I have a Python script in which a certain function is processed, and at a certain point I would like to create an alarm in the Zabbix system when a certain condition is created in the script. I also have a mail server. I was thinking of creating a separate mailbox for Zabbix, to this email address I will send a letter from Python, and the Zabbix system will receive this letter, process and create a Problem. Is such functionality possible?
Easiest is to use zabbix for this. To do that you feed values to an item in zabbix in one of the many ways and create a trigger that fires when you want it.
If a script is needed to generate the values you can implement the script as a user parameter if it is short running. If it takes more than a few seconds using zabbix sender might be smarter.
From Python to create an alarm in Zabbix