Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-13453

Doesnt not handle escape in key system.run

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Major Major
    • None
    • 3.0.14
    • Agent (G), Server (S)
    • None

      When zabbix_get is executed, there is no problem as it will result in an error.

      [root@localhost tmp]# zabbix_get -s 127.0.0.1 -k system.run["echo 'test",wait]
      sh: -c: line 0: unexpected EOF while looking for matching `''
      sh: -c: line 1: syntax error: unexpected end of file
      

      However, Actions remote command is not noticed because parameter of "nowait".

      {ITEM.VALUE} ... "Haven't message ........"
      Actions -> Operations -> Operation type ... Remote command
      -> Execute on ... Zabbix agent
      -> Commands ... echo {ITEM.VALUE} >> /tmp/test.log

      zabbix_agentd.log
        3103:20180209:020642.032 __zbx_zbx_setproctitle() title:'listener #3 [processing request]'
        3103:20180209:020642.032 Requested [system.run[echo Error ... Haven't message >> /tmp/test.log,nowait]]
        3103:20180209:020642.032 Executing command 'echo Error ... Haven't message >> /tmp/test.log'
        3103:20180209:020642.033 Sending back [1]
      

      thank you.

            Unassigned Unassigned
            hayato.watanabe Hayato Watanabe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: