PyZabbixObj Documentation Release 0.1 Fabio Toscano Aug 26, 2017
Contents Python Module Index 3 i
ii
PyZabbixObj Documentation, Release 0.1 PyZabbixObj is a Python module for working with Zabbix API, using a complete OO implementation This module is the main module of the PyZabbixObj project class PyZabbixObj.GenericZabbixObject(response, name_or_id, server, **kwargs) Generic Zabbix object class. Implements some base methods class PyZabbixObj.Host(response, hostname_or_id, server, **kwargs) Host Class response (String) JSON string to be sent or received from the Zabbix Server hostname_or_id (String) hostname or id of the object server (ZabbixServer) ZabbixServer instance Interfaces (Interface or list of Interface) Not implemented yet! (optional) Interface instance HostGroups (optional) HostGroup instance Template (Template or list of Template) (optional) Template instance class PyZabbixObj.Hostgroup(response, name_or_id, server) Host Group Class response (String) JSON string to be sent or received from the Zabbix Server name_or_id (String) name or id of the object server (ZabbixServer) Zabbix server class PyZabbixObj.Template(response, name_or_id, server, **kwargs) Template Class response (String) JSON string to be sent or received from the Zabbix Server name_or_id (String) name or id of the object server (ZabbixServer) Zabbix server class PyZabbixObj.Trigger(response, name_or_id, server) Trigger Class response (String) JSON string to be sent or received from the Zabbix Server name_or_id (String) name or id of the object server (ZabbixServer) Zabbix server Contents 1
PyZabbixObj Documentation, Release 0.1 exception PyZabbixObj.ZabbixRequestError(value, code, message) Custom Zabbix Exception Class class PyZabbixObj.ZabbixServer(server=u http://localhost/zabbix ) Zabbix Server Class Handle a zabbix Server. Get or write objects (not all implemented) do(operation, object_type, **kwargs) Main executing method for the server operation Type of operation to be done. Must be in allowed_operations Must be in al- object_type Type of the object where the operation is done. lowed_objects Returns Instantiated class of the object or None if the object does not exist and the method does not provide creation Return type Class of the object (Host, Hostname, Template, ecc.) login(user, pw) Routine login. - Username/password pair will be sent once. After the returning auth code will be used genindex modindex search username (String) Username for the Zabbix Server password (String) Password for the Zabbix Server Returns True if already logged, else False Return type bool 2 Contents
Python Module Index p PyZabbixObj, 1 3
PyZabbixObj Documentation, Release 0.1 4 Python Module Index
Index D do() (PyZabbixObj.ZabbixServer method), 2 G GenericZabbixObject (class in PyZabbixObj), 1 H Host (class in PyZabbixObj), 1 Hostgroup (class in PyZabbixObj), 1 L login() (PyZabbixObj.ZabbixServer method), 2 P PyZabbixObj (module), 1 T Template (class in PyZabbixObj), 1 Trigger (class in PyZabbixObj), 1 Z ZabbixRequestError, 2 ZabbixServer (class in PyZabbixObj), 2 5