Ad Widget

Collapse

Parsing {ALERT.MESSAGE} when used as a parameter in a media type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jonpangburn
    Junior Member
    • Oct 2017
    • 3

    #1

    Parsing {ALERT.MESSAGE} when used as a parameter in a media type

    I have a python script defined in a media type and am using the {ALERT.MESSAGE} macro to pass arguments for the script.

    When this is triggered in zabbix it sends the entire string of arguments as one argument to the script.

    Contents of message are:
    -H "{HOST.NAME}" -a "{HOST.IP}" -n "{TRIGGER.STATUS}" -o "{ITEM.NAME} {ITEM.VALUE}" -T "{TRIGGER.SEVERITY}" -L "{EVENT.ID}"

    The script doesn't see this as delimited arguments, rather one argument for -H

    The python script is using import sys to import the arguments.

    My python is novice at best.

    Thanks in advance
Working...