Zabbix Documentation 1.8

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

api:script

Script

Methods

Class containing methods for operations with Scripts.

MethodsDescription
get() Get script details
execute() Check if script exists
create() Create scripts
update() Update script details
delete() Delete scripts

Object details

The table contains complete list of Script attributes.

ParameterTypeDescriptionDetails
scriptidintScript ID
namestringScript description
commandstringCommand to execute
host_accessintegerNeeded host access for script execution
usrgrpidintegerUser group ID
groupidintegerHost group ID

Common tasks

The table contains list of common script-related tasks and possible implementation using Zabbix API

TaskHOWTO
Add an script Use method script.create
Add a bunch of new scripts Use method script.create with array of Script objects
Retrieve script details by Script IDs Use method script.get with parameter scriptids
Retrieve scripts details by Host name Use method script.get with parameter filter, specify “name”: [“<your script>”]