Ad Widget

Collapse

Auto Registration Custom Alert Script with built-in MACROs not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • E2ESystems
    Junior Member
    • Jun 2021
    • 2

    #1

    Auto Registration Custom Alert Script with built-in MACROs not working

    I'm currently working on a Media Type (custom python script) that is used to send information to another system as a trigger when a new host gets created by the auto-registration rules. I have the script working, permissions set, and current have the python script to just write the parameters to a local file on the Zabbix Server for testing. The part I'm not getting to work quite right is that the {HOST.NAME} and {HOST.ID} don't seem to resolve. The output in the file displays "{HOST.NAME}" in the file, rather than the actual hostname of the device that just got added. The {ALERT.SENDTO}, {ALERT.SUBJECT}, and {ALERT.MESSAGE} macros seem to work just fine. IMO, the documentation https://www.zabbix.com/documentation...ed_by_location isn't perhaps as clear as to which macros could be used like this. Anyone else get this to work? Anyone have a different method I should consider to get this type of behavior where a custom script is kicked off when a new host is added?
Working...