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

Fix Zabbix Agent 2 help message

XMLWordPrintable

    • S2401-1, S2401-2
    • 1

      Based on Zabbix documentation agent 2 has a valid command line argument -h or --help. If an invalid argument is used to start agent 2 same message with just first additional line appears as with -h or --help. It is not the case with the C based agent.

      1)

      ./install/sbin/zabbix_agent2 --help
      Usage of ./install/sbin/zabbix_agent2:
        -R string
          	Perform administrative functions (send 'help' for available commands)
        -V	Print program version and exit (shorthand)
        -c string
          	Path to the configuration file (shorthand) (default "/home/viktors/zabbix-git/feature/ZBXNEXT-5646-4.4/install/etc/zabbix_agent2.conf")
        -config string
          	Path to the configuration file (default "/home/viktors/zabbix-git/feature/ZBXNEXT-5646-4.4/install/etc/zabbix_agent2.conf")
        -f	Run Zabbix agent in foreground (shorthand) (default true)
        -foreground
          	Run Zabbix agent in foreground (default true)
        -p	Print known items and exit (shorthand)
        -print
          	Print known items and exit
        -t string
          	Test specified item and exit (shorthand)
        -test string
          	Test specified item and exit
        -version
          	Print program version and exit
      

      2)

      ./install/sbin/zabbix_agent2 --qwerty
      

      Identical output is shown except with additional first line:

      flag provided but not defined: -qwerty
      

      Expected:
      Use short help message with incorrect invalid command line arguments and long help message when -h or --help is used.

      Additionally since Zabbix agent 2 only option is to start it in foreground remove option -f --foreground from help message.

            rzvejs Rudolfs Zvejs
            viktors.tjarve Viktors Tjarve
            Team INT
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: