Zabbix2::API::Script -- Zabbix script objects
use Zabbix2::API::Script; # Create a script use Zabbix2::API::Script qw/:script_hostperms/; my $script = Zabbix2::API::Script->new( root => $zabbix, data => { name => 'nmap', command => '/usr/bin/nmap {HOST.CONN}', host_access => SCRIPT_HOSTPERM_READ, }, ); $script->create;
Handles CRUD for Zabbix script objects.
This is a subclass of Zabbix2::API::CRUDE; see there for inherited methods.
Zabbix2::API::CRUDE
Mutator for the script's name (the "name" attribute); returns the empty string if no description is set, for instance if the script has not been created on the server yet.
Mutator for the command to be run by the Zabbix server; returns the empty string if no command is set, for instance if the script has not been created on the server yet.
Some constants:
SCRIPT_HOSTPERM_READ SCRIPT_HOSTPERM_READWRITE
They are not exported by default, only on request; or you could import the :script_hostperms tag.
:script_hostperms
Zabbix2::API::CRUDE.
Ray Link; maintained by Fabrice Gabolde <fga@cpan.org>
Copyright (C) 2013 SFR
This library is free software; you can redistribute it and/or modify it under the terms of the GPLv3.
To install Zabbix2::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Zabbix2::API
CPAN shell
perl -MCPAN -e shell install Zabbix2::API
For more information on module installation, please visit the detailed CPAN module installation guide.