Skip to content

davidbj/pyzbx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

介绍

pyzbx 使用python开发获取zabbix 源数据的API Application.

###版本### 0.0.4

###功能### 目前该APP提供一些获取zabbix 数据的interface,具体功能如下:

###安装###

$ pip install pyzbx

###实例###

$ response = pyzbx.ZbxAPI(zabbix_url="http://zabbix_server[:port]/zabbix/api_jsonrpc.php", user='user', password='password')
$ auth = response.getAuthCode()                                                                      #获取登入用户的Auth摘要
$ hostid = response.getHostid(monitor_hostname='x.x.x.x')                                            #获取item 监控主机的hostid
$ itemid = response.getItemid(monitor_item_key='system.cpu.util[,steal]')                            #获取item 监控项的itemid
$ historyData = response.getHistoryData(monitor_item_key='system.cpu.util[,steal]', 
                                        history=3, 
                                        output='extend', 
                                        limit=10)                                                    #获取zabbix Server的历史记录

###关于作者@shaozhi.zhang###

function author(){
    Email='davidbjhd@gmail.com';
    Blog='http://www.pydevops.com';
}

About

python get zabbix data api interface.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages