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

cannot send empty string with zabbix_sender if input is from file

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.2.2rc1, 2.3.0
    • 2.2.1
    • Agent (G)

      It is possible to send an empty string when passing it as the argument to -o option:

      $ zabbix_sender -z 127.0.0.1 -s 'Zabbix server' -k trapper.item -o '' -vv
      zabbix_sender [23565]: DEBUG: answer [

      { "response":"success", "info":"processed: 1; failed: 0; total: 1; seconds spent: 0.000094"}

      ]
      info from server: "processed: 1; failed: 0; total: 1; seconds spent: 0.000094"
      sent: 1; skipped: 0; total: 1

      However, when passing input from file it complains about invalid line syntax:

      $ echo '"Zabbix server" trapper.item ""' | zabbix_sender -z 127.0.0.1 -i - -vv
      zabbix_sender [5969]: Warning: [line 1] 'Key value' required
      Sending failed.

            Unassigned Unassigned
            asaveljevs Aleksandrs Saveljevs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: