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: Unresolved
    • Icon: Minor Minor
    • None
    • 6.0.17, 6.4.2
    • Agent (G)
    • None
    • Sprint 104 (Sep 2023), Sprint 105 (Oct 2023), Sprint 106 (Nov 2023), Sprint 107 (Dec 2023), Sprint candidates, S2401
    • 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
            Team INT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: