-
Problem report
-
Resolution: Fixed
-
Trivial
-
7.0.0
-
None
-
Zabbix server 7.0.0
Zabbix proxy 7.0.0
Zabbix agent 7.0.0 on Linux
-
S24-W32/33
-
0.25
Idea of the steps: Have an agent monitored by a proxy, item and trigger, have a remote script run on the proxy on a trigger, observe where the script is run.
Steps to reproduce:
- Create a host "Zabbix70-agent" that is monitored by a proxy
- Create an item on the host: key "actiontest", type Zabbix trapper
- Create a trigger "Actiontest is 1" for the item: last(/Zabbix70-agent/actiontest) = 1
- In Alerts - Scripts, create script:
- Name: Actiontest script
- Scope: Action operation
- Type: Script
- Execute on: Zabbix proxy or server
- Commands: (date; hostname) >> /tmp/hostname
- In Alerts - Actions - Trigger actions, create action:
- Name: Actiontest
- Conditions: Trigger equals Zabbix70-agent: Actiontest is 1
- Operations: Add, select "Actiontest script", target list = Current host
- Enable remote commands on the Zabbix server and proxy configurations: EnableGlobalScripts=1 (server) and EnableRemoteCommands=1 (proxy)
- Use Zabbix sender on the agent host to send the value 1 for the key "actiontest" to the proxy
- See that the problem is generated in the Problems list
- Observe where the /tmp/hostname file is created.
Result:
On the Zabbix server there is now /tmp/hostname that has the problem date+time and the server hostname.
Expected:
Since the script was configured with "Execute on: Zabbix proxy or server" it is expected that the /tmp/hostname file was created (= script run) on the proxy because the host was monitored by proxy.
Documentation:
https://www.zabbix.com/documentation/7.0/en/manual/web_interface/frontend_sections/alerts/scripts says about the "Execute on" setting:
"Zabbix proxy or server - the script will be executed by Zabbix proxy or server - depending on whether the host is monitored by proxy or server."
Other comments:
If EnableGlobalScripts is disabled on the server, then the remote command execution fails: "Global script execution on Zabbix server is disabled by server configuration"