-
Problem report
-
Resolution: Fixed
-
Minor
-
6.0.17, 6.4.2
-
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.