Test of multiple item keys does not work

XMLWordPrintable

    • Type: Incident report
    • Resolution: Won't Do
    • Priority: Trivial
    • None
    • Affects Version/s: 8.0.0beta1 (master)
    • Component/s: Agent2 (G)
    • None
    • Environment:
      Linux

      Steps to reproduce:

      1. On Linux, Execute from command line without specifying a particular key:
        sbin/zabbix_agent2 -t

      Result:
      Error:

      sbin/zabbix_agent2 -t 
      Usage of Zabbix agent 2:
        zabbix_agent2 [-c config-file]
        zabbix_agent2 [-c config-file] [-v] -p
        zabbix_agent2 [-c config-file] [-v] -t item-key
        zabbix_agent2 [-c config-file] -T
        zabbix_agent2 [-c config-file] -R runtime-option
        zabbix_agent2 -h
        zabbix_agent2 -V
      zabbix_agent2 [143349]: ERROR: flag needs an argument: -t
      

      Expected:
      All keys listed for current operating system here should be retrieved: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/cmd/zabbix_agent2/testrun_linux.go

      I expect it to work because it works is validation is removed in src/go/cmd/zabbix_agent2/zabbix_agent2.go for test like so:

      		// if args.test != "" {
      		// 	checkMetric(m, args.test)
      		// } else if args.print {
      		// 	checkMetrics(m)
      		// }
      
      		checkMetrics(m)
      

      Also, item key is documented as optional parameter: https://www.zabbix.com/documentation/7.4/en/manual/concepts/agent?hl=Agent%2Cagent#options

            Assignee:
            Zabbix Support Team
            Reporter:
            Mihails Prihodko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: