See for the official Zabbix site.

Docs/protocols/global scripts/3.4

Jump to: navigation, search

Zabbix global scripts


Zabbix global scripts are executed by the Zabbix server. When they are invoked from the frontend, frontend sends the following request to the server:

Note: This approach is used since Zabbix 1.6.8 - older versions sent actual command to be executed. See ZBX-1030 for more detail.
Note: "sid" parameter is ID of session (authentication token in frontend) and it is used to check the user permissions to execute scripts.

Successful response

        "value":"PING ( 56(84) bytes of data
64 bytes from icmp_seq=1 ttl=64 time=0.280 ms
64 bytes from icmp_seq=2 ttl=64 time=0.354 ms
64 bytes from icmp_seq=3 ttl=64 time=0.349 ms

--- ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min\/avg\/max\/mdev = 0 280\/0.327\/0.354\/0.039 ms


Note: As of Zabbix 2.0.5, non-numeric symbols in any ID and incorrect values are silently discarded. See ZBX-6227 for more detail.
Note: As of Zabbix 2.0.5, if any of nodeid, scriptid or hostid is missing, connection is immediately closed without any message. See ZBX-6227 for more detail.
Note: As of Zabbix 2.4.0, nodeid is not used anymore.
Note: As of Zabbix 3.4.0, sid is required. See ZBX-9425 for more detail.

If the host with that ID does not exist:

        "value":"Unknown Host ID [10094]"}

If the script with that ID does not exist:

        "value":"Unknown Script ID [111]"}

If provided sid is not valid:

        "value":"Active session identifier is missing."}

If sid is not provided:

        "value":"Failed to parse command request tag: sid."}