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

Misleading output of agentd and agent2 for runtime commands execution.

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Minor Minor
    • 7.0.4rc1, 7.2.0alpha1
    • 6.0.17, 6.4.2
    • Agent (G)
    • None
    • Prev.Sprint, S24-W34/35
    • 1

      Runtime command execution triggers different output streams for agent2 and agentd.
      All Zabbix agentd output goes to stderr:

      zabbix_agentd -R log_level_decrease
      
      # Fail
              "stderr": "zabbix_agentd [1429]: cannot open PID file [/run/zabbix/zabbix_agentd.pid]: [2] No such file or directory",
              "stdout": ""
      # Success
              "stderr": "zabbix_agentd [2382]: command sent successfully",
              "stdout": ""
      

      All Zabbix agent2 output goes to stdout:

      zabbix_agent2 -R userparameter_reload
      # Fail
              "stderr": "",
              "stdout": "2023/05/03 13:04:43.411422 Cannot send remote command: dial unix /run/zabbix/agent.sock: connect: no such file or directory"
      # Success
              "stderr": "",
              "stdout": "2023/05/03 12:53:08.268940 User parameters reloaded",
      

      Consider changing the output to the datastream, accordingly to the output type. Or at least share the same behavior.

      Could simplify scripting/automation over agents.

            rzvejs Rudolfs Zvejs
            atocko Andrey Tocko (Inactive)
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 4h
                4h