Ad Widget

Collapse

Zabbix send empty macro on action trigger in some cases since the upgrade to 6.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Yannick Croteau
    Junior Member
    • Sep 2020
    • 8

    #1

    Zabbix send empty macro on action trigger in some cases since the upgrade to 6.0

    Hi,

    I've got a strange situation. On some triggers, I execute a action with variables on macro. But since the upgrade, the macro value same to be empty.

    I can see it with the error message like :

    ['-n', '-z', '1014577', '-s', '1014577 - sitex.com - Down', '-dp', '{}', '-a', '{}', '-c', '{}', '-t', '{}', '-ds', 'Event Details: 1014577 -sitex.com - Down<br />\nTime: 2022.04.05 13:55:40<br />\nSeverity High<br />\nHost: sites-customers<br />\nOP Data:<br />\n1', '-p', 'High']
    No argument set for ticket create: Need department name set

    so the all the '-dp', '{}', '-a', '{}', '-c', '{}', '-t', '{}', is in fact the Macro variables.

    The action script look like :

    /home/zabbix/scripts/sendalert/zabbixalertticket.py -n -z {EVENT.ID} -s "{EVENT.ID} - {EVENT.NAME}" -dp "{$ZOHO_DEP}" -a "{$ZOHO_ACCOUNT}" -c "{$ZOHO_CONTACT}" -t "{$ZOHO_TEAM}" -ds "Event Details: {EVENT.ID} - {EVENT.NAME}<br />
    Time: {EVENT.DATE} {EVENT.TIME}<br />
    Severity {EVENT.SEVERITY}<br />
    Host: {HOST.NAME}<br />
    OP Data:<br />
    {EVENT.OPDATA}" -p "{EVENT.SEVERITY}"


    To validate the fact if is a macro problem bind to the host from template, I did this as test and apply this to the same host trigger :

    echo "'Macro List :' '{$ZOHO_ACCOUNT}' '{$ZOHO_CONTACT}' '{$ZOHO_DEP}' '{$ZOHO_TEAM}'" >> /var/log/zabbix/events/zabbix_test_macro.log

    Once the trigger execute the action, I can see that in my log

    'Macro List :' 'MD.EDGE' '[email protected]' 'MD.SUPPORT' 'MD.SUPPORT.NIV2'

    So the macro is clearly there on the same trigger/host

    Stranger than that, before I made the upgrade in my prod environnement, I tested the same action script, without any issue on Zabbix 6.0 on my dev env. Why it's doesn't works in prod? Don't know


    Thank you for your help!

    Yannick.
Working...