img_req = urllib2.Request(url) png = urllib2.urlopen(img_req).read() file = path + image_name + '.png' with open(file,'wb') as f: f.write(png) host = 'zabbix.example.com' // 你的zabbix服务域名 get_graph(host, 1237, 86400, 'cpu_load') get_graph(host, 1239, 86400, 'ne...
1、通过zabbix的API登录, 2、然后通过hostid和监控名称去获取相对应的graphid, 3、然后通过graphid去zabbix的api去下载图片,并保存 4、配置文件分为config和download两个python文件,具体如下: catconfig.py zbx_host='10.0.0.99' zbx_port='80' zbx_user='Admin' zbx_pwd='zabbix' zbx_url='http://'+zbx...
Component/s:API (A) Labels: api export graphs png Can you please add API function which will return graph as an PNG image ? We would like to integrate graphs to our application but we don't want to draw them from graph items (Zabbix is doing this very fine so i don't see a point...
1item批量添加 我是根据我这边的具体情况来做的,本来想在模板里面添加item,但是看了看API不支持,只是支持在host里面添加,所以我先在一个host里面添加,然后在将item全部移动到模板里。 具体步骤就不说了,直接上代码: 为了快速完成,代码写的有点乱,也没怎么处理异常,算是第一版吧,有时间在优化1#!/usr/bin/env...
graphprototype.update: 更新图形原型 image.png GraphPrototypeCreateTest packagecn.com.yeexun.testzabbix.zabbix4j.example.graphprototype;importstaticorg.junit.Assert.assertNotNull;importorg.junit.Test;importcn.com.yeexun.testzabbix.zabbix4j.common.ZabbixApiTestBase;importcom.zabbix4j.ZabbixApiException;import...
imagename="%s/%s_%s.jpg" % (image_dir, values["graphid"], values["stime"]) f=open(imagename,'wb') f.write(image) return '1' if __name__ == "__main__": graph = Zabbix_api() values = {'width': 800, 'height': 200, 'graphid': '564', 'stime': '20160907090409', 'pe...
Graph API|Graph item API Templates Manage templates and link them to hosts or other templates. Template API Export and import Export and import Zabbix configuration data for configuration backups, migration or large-scale configuration updates. ...
from email.mime.image import MIMEImage import smtplib,sys,os,time,re,requests from smtplib import SMTP user='Admin' #定义zabbix用户名 password='zabbix' #定义zabbix用户密码 graph_path='/usr/lib/zabbix/alertscripts/graph' #定义图片存储路径 ...
3, apiinfo.version 4, application 5, configuration.import/export 6, discovered host dhost/service/check/rule.get 7, event.get 8, graph.get 9, graphitem.get 10, prototype.get 11, history.get 12, host/group/interface/prototype/.get ...
支持高水平API二次开发、脚本监控、自key定义、自动化运维整合调用 Zabbix组件及流程 Zabbix主要由三大部分构成:Zabbix server端、Zabbix proxy、agent客户端,其中Zabbix server端包括Web GUI、database、Zabbix server image.png image.png Zabbix监控完整流程:Agent安装在被监控的主机上,Agent负责定期收集客户端本地各项...