Zabbix::API::User -- Zabbix user objects
use Zabbix::API::User; # fetch a single user by login ("alias") my $user = $zabbix->fetch('User', params => { filter => { alias => 'luser' } })->[0]; # and delete it $user->delete;
Handles CRUD for Zabbix user objects.
This is a subclass of Zabbix::API::CRUDE; see there for inherited methods.
Zabbix::API::CRUDE
Returns an arrayref of the user's usergroups (possibly empty) as Zabbix::API::UserGroup objects.
Takes a Zabbix::API::UserGroup instance or a valid usergroup name, and adds the current user to the group. Returns $self.
$self
Takes a list of Zabbix::API::UserGroup instances or valid usergroup names, and sets the user/usergroup relationship appropriately. Returns $self.
Sets the user's password. The modified user is not pushed automatically to the server.
Accessor for the user's name (the "alias" attribute).
This method returns a list of users colliding (i.e. matching) this one. If there if more than one colliding user found the implementation can not know on which one to perform updates and will bail out.
User types are implemented as constants:
USER_TYPE_USER USER_TYPE_ADMIN USER_TYPE_SUPERADMIN
Promote (or demote) users by setting their $user-data->{type}> attribute to one of these.
$user-
Nothing is exported by default; you can use the tag :user_types (or import by name).
:user_types
Apparently when logging in via the web page Zabbix does not care about the case of your username (e.g. "admin", "Admin" and "ADMIN" will all work). I have not tested this for filtering/searching/colliding users.
This is where it is.
Zabbix::API::CRUDE.
Fabrice Gabolde <fabrice.gabolde@uperto.com>
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 Zabbix::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Zabbix::API
CPAN shell
perl -MCPAN -e shell install Zabbix::API
For more information on module installation, please visit the detailed CPAN module installation guide.