Hi all,
we’re currently testing script execution through system.run[], and we’re running into a strange issue.
Setup:
Problem:
When executing a script from the frontend (“Execute on agent”), we get the following error in the server log:
In zbx_agent_get_value() host:'<uuid>' addr:'127.0.0.1' key:'system.run[Write-Output "Test"]' conn:'unencrypted' Sending [{"request":"passive checks","data":[{"key":"system.run[Write-Output "Test"]","timeout":30}]}] "script.error":["add","Unsupported item key."]
It looks like Zabbix tries to use a passive check, even though the agent is active-only.
Because no passive connection exists, the server reports “Unsupported item key.”
Questions:
The documentation doesn’t clearly state whether system.run[] is limited to passive agents.
Thanks a lot for any clarification and help!
Best regards,
Peter
we’re currently testing script execution through system.run[], and we’re running into a strange issue.
Setup:
- Zabbix Server: 7.0.x
- Zabbix Agent: Windows, active mode only
- Script: Write-Output "Test" (PowerShell)
- The script is located on the agent host itself and should be executed locally
- AllowKey=system.run
- is configured
- Also tried EnableGlobalScripts=1, no effect
Problem:
When executing a script from the frontend (“Execute on agent”), we get the following error in the server log:
In zbx_agent_get_value() host:'<uuid>' addr:'127.0.0.1' key:'system.run[Write-Output "Test"]' conn:'unencrypted' Sending [{"request":"passive checks","data":[{"key":"system.run[Write-Output "Test"]","timeout":30}]}] "script.error":["add","Unsupported item key."]
It looks like Zabbix tries to use a passive check, even though the agent is active-only.
Because no passive connection exists, the server reports “Unsupported item key.”
Questions:
- Is system.run[] officially supported for active agents?
- If yes, how can we make frontend script execution work with an active-only agent?
- If not, is there any recommended workaround (e.g. using remote commands, Zabbix sender, or a custom check)?
The documentation doesn’t clearly state whether system.run[] is limited to passive agents.
Thanks a lot for any clarification and help!
Best regards,
Peter