ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-7668

cannot send empty string with zabbix_sender if input is from file

    Details

    • Type: Incident report Incident report
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.2rc1, 2.3.0
    • Component/s: Agent (G)
    • Labels:

      Description

      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.

        Activity

        Hide
        Juris Miščenko (Inactive) added a comment -

        Fixed in svn://svn.zabbix.com/branches/dev/ZBX-7668

        Show
        Juris Miščenko (Inactive) added a comment - Fixed in svn://svn.zabbix.com/branches/dev/ZBX-7668
        Hide
        richlv added a comment - - edited

        (2) empty value quoting requirements should be documented in the manpage

        Juris Miščenko
        Example of sending an empty value has been added to the manpage. Usage of double quotes to enclose the empty value has been mentioned.

        Alexander Vladishev REOPENED

        Incorrect example in man page. Double quotes should be escaped.

        echo '"Zabbix server" trapper.item ' | zabbix_sender -z 192.168.1.113 -p 10000 -i -

        Juris Miščenko RESOLVED

        Added quotation mark escaping in manpage.

        Alexander Vladishev CLOSED

        Show
        richlv added a comment - - edited (2) empty value quoting requirements should be documented in the manpage Juris Miščenko Example of sending an empty value has been added to the manpage. Usage of double quotes to enclose the empty value has been mentioned. Alexander Vladishev REOPENED Incorrect example in man page. Double quotes should be escaped. echo '"Zabbix server" trapper.item ' | zabbix_sender -z 192.168.1.113 -p 10000 -i - Juris Miščenko RESOLVED Added quotation mark escaping in manpage. Alexander Vladishev CLOSED
        Hide
        Juris Miščenko (Inactive) added a comment -

        Fixed in pre-2.2.2 r42143, pre-2.3.0 (trunk) r42144.

        Show
        Juris Miščenko (Inactive) added a comment - Fixed in pre-2.2.2 r42143, pre-2.3.0 (trunk) r42144.

          People

          • Assignee:
            Unassigned
            Reporter:
            Aleksandrs Saveljevs
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: