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

Not possible to ignore exit codes of scripts which may result in unsupported state

XMLWordPrintable

    • Sprint 17, Sprint 18
    • 1

      Since 3.4 exit code for scripts is checked, it means that some scripts will now become unsupported, for example grep:

      "Normally the exit status is 0 if a line is selected, 1 if no lines were selected, and 2 if an error occurred."

      So it is expected that some commands should not become unsupported on some error codes.

      UserParameter examples are also broken.

      Current workaround to make default example work is to change following user parameter:

      mailq

      UserParameter=unix_mail.queue,mailq | grep -v "Mail queue is empty" | grep -c '^[0-9A-Z]'
      

      To:

      UserParameter=unix_mail.queue,mailq | grep -v "Mail queue is empty" | grep -c '^[0-9A-Z]' || true
      

      MySQL

      UserParameter=mysql.ping,mysqladmin -uroot ping | grep -c alive
      

      To:

      UserParameter=mysql.ping,mysqladmin -uroot ping | grep alive | wc -l
      

            vso Vladislavs Sokurenko
            sles sles
            Team A
            Votes:
            5 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: