Remote command fails if it uses {TRIGGER.NAME} and the trigger name contains a comma (",")

XMLWordPrintable

    • Type: Incident report
    • Resolution: Fixed
    • Priority: Major
    • 1.8.3
    • Affects Version/s: 1.6.6
    • Component/s: None
    • None
    • Environment:
      Linux, both server and agent are running in Linux.

      There's a problem with remote command where the remote command contains commas.

      How to reproduce:

      • Create trigger which name has a comma (like "Hello, World")
      • Create an Action which has a remote command and the remote command used {TRIGGER.NAME}

        Example remote command: "my.host.net:/usr/bin/send_message ZABBIX Has found a problem: {TRIGGER.NAME}

        "

      Zabbix does not escape the commas in the remote command so the actual key will be something like this:
      "system.run[/usr/bin/send_message ZABBIX Has found a problem: Hello, World,nowait]"

      The comma in the middle will break the remote command and zabbix_agentd returns ZBX_NOT_SUPPORTED

      Suggestion: Zabbix should escape all commands in the remote command so that a remote command can contain commas, macros (like

      {TRIGGER.NAME}

      ) which contains commands etc.

      There's also a related bug: https://support.zabbix.com/browse/ZBX-403

            Assignee:
            Unassigned
            Reporter:
            Juho Mäkinen
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: