NAME

Zabbix2::API::Script -- Zabbix script objects

SYNOPSIS

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;

DESCRIPTION

Handles CRUD for Zabbix script objects.

This is a subclass of Zabbix2::API::CRUDE; see there for inherited methods.

METHODS

name()

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.

command()

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.

EXPORTS

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.

SEE ALSO

Zabbix2::API::CRUDE.

AUTHOR

Ray Link; maintained by Fabrice Gabolde <fga@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2013 SFR

This library is free software; you can redistribute it and/or modify it under the terms of the GPLv3.