Manage __zabbix using the Zabbix API

Source: Internet
Author: User

Zabbix is so popular now that personal feelings have a lot to do with Zabbix's powerful APIs, and using APIs can help us accomplish many things:

1, get related groups, host information.

2, for example, someone like to get the historical data back out of the picture.

3, add delete host, bind delete template.

4. Add Delete maintenance cycle


Here I use the pipy provided by the Zabbix_client module, so that we do not have to write the login function, as long as the module began to specify the username password can be:


1, installation zabbix_client:

Pip Install Zabbxi_client


2, the API management script, replaces the user name password to be able to:

1 2 3 4 5 6 7 8 9 10 11 12 13 14-15 16 #coding: Utf-8 import time from zabbix_client import Zabbixserverproxy class Zabbix (): Def __init__ (self): Self. ZB = Zabbixserverproxy ("Http://192.168.10.100/zabbix")

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.