zabbix api

Alibabacloud.com offers a wide variety of articles about zabbix api, easily find your zabbix api information here online.

Python calls the Zabbix API for querying host information, outputting all host IPs

previously found that the search for host calls Zabbix API information is not so clear, and then through the Zabbix official documents to find the desired API information, and then write an article of their own this project used in the API.#!/usr/bin/env python#Coding:utf8Im

Estimating server disk space availability using the Zabbix API

for an average if decrease is a positive number for more than half days.#if The decrease if more than increase, maybe they has a crontab to relase space. #like this 5 4 5 4 5 4 The current remaining space/average to get the final result. Objective: Master the use of Python to access the Zabbix API. In order to more "realistic" to do capacity planning. Reference:#base from Http://wangwe

Zabbix API Settings Maintenance mode

Setup of Maintenance mode with API provided by Zabbix #!/usr/bin/env python#-*-coding:utf-8-*-import urllibimport urllib2import jsonimport sysimport platformimport Time def Auth (uid, username, password, api_url): "" "Zabbix Authentication:p Aram UID::p Aram Username::p Aram Password:: Retu RN: "" "Dict_data = {} dict_data[' method '] = ' user.login ' # meth

Manage __zabbix using the Zabbix API

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 functio

16. Create a screen using the Zabbix API

Zabbix's screen function allows graph to be aggregated and displayed uniformly,Our requirement is to aggregate the same item of the same host group, such as a screen showing the memory usage of all hosts in the same set, to achieve a similar ganglia effect,Because of the large number of servers, we call the Zabbix API to create them.The reference address is as follows: Thank you, Daniel.Https://www.zabbix.o

zabbix-2.0.8 quickly add filters using groups and key values (API actions)

Quickly add filters with the Zabbix API Function Description: The script can quickly generate a filter using the group name and key contained in the host in the group Usage Prerequisites: You need to set a graphic on key Applicable version: Zabbix 2.0.8 (actual test), Theory support 2.0~2.4 series (not

Zabbix API Delete Host

The script reads as follows:#!/usr/bin/python#-*-coding:utf8-*-importjson,sys,argparsefromzabbix_apiimport ZabbixAPIserver= "Http://172.16.206.128/zabbix" username= "Admin" password= "Zabbix" Zapi=zabbixapi (server=server,path= "", log_level=0) Zapi.login (username, password) Defget_args (): parser=argparse. Argumentparser () parser.add_argument ("-H", "--host", help= "Hostname") # parse the parameters pas

Zabbix 2.2 < 3.0.3-rce with API Json-rpc

Vulnerability Source: https://www.exploit-db.com/exploits/39937/Attack cost: HighHazard level: Low (password required for this hole)Conditions of use: high-privileged User login requiredImpact Range:2.2 TipsThis hole requires you to get a high-privileged account password, when you get the account password, into the background can also execute commands, using the API Json-rpc for the second scenario.This exp is not perfect because HostID is not autom

Zabbix adding web monitoring in bulk via API

' reason: ',e.reason elifhasattr (e, ' code '): print ' theservercould Notfulfilltherequest. ' print ' errorcode: ',e.code return0else: response=json.loads (Result.read ()) result.close () returnresponsedefhost_create (self): NBSP;NBsp;data=json.dumps ( { "JSONRPC": "2.0", "Method": "Httptest.create", "params":{ " HostID ":" 10788 ", "Name": "homepage", "Steps":[ { "Name": "1", "url": "http://mycompany.com", "No":1 } ] }, "Auth":self.authid, "id":1, }) res=self.get_data (

Creating hosts with the Zabbix API

#!/usr/bin/envpython2.7#coding=utf-8fromzabbix_apiimportzabbixapiimport urllib2importsys## #get visible_nameinet_ip=sys.argv[1]url= ' http://10.47.102.185/api/ecs /?ip={0} '. Format (inet_ip) response=urllib2.urlopen (URL) result=response.read () info =eval (result[1:-1]) visible_name=info[' name ']## #login zabbixserver= "Http://ip/zabbix" Username= "zabbix_username" password= "password" Zapi=zabbixapi (se

Get the values of all hosts using the Zabbix API with group ID and monitoring item key values

", " Params ":{ "Output":[ "description", ], "Filter":{ "HostID": "10108", }, "Selectitems": ", "SortField": "hostname", "SortOrder": "DESC" }, ' auth ' :auth, ' id ': ' 1 ' } Output=requeStjson (url,values) returnoutputdefchaxun (groupid,items_value): host=hosts (auth,groupid) # #获取所有主机 host_name =[]host_id=[]foriin Host:host_id.append (i[' HostID ')) host_name.append (i[' name ']) hostall=dict (Zip (host_id, host_name)) ## all hosts ' 10118 ': ' Cloud Host: 10.8.8.65 ', ' 10119 ': '

Original: Batch add Web monitoring with Zabbix API

']defcreate_ Web_scenario (Auth,url,hostid,applicationid): request=zabbixapi.do_request (auth, ' Httptest.get ',params={ "filter": {"name": url}}) ifrequest[' result ']: print (' The Web Monitor has been added ' ' else:try: zabbixapi.do_rEquest (auth, ' httptest.create ', params={"name": url, "HostID": hostid, "ApplicationID": applicationid, "delay": ' $ ', "retries": ' 3 ', "steps":[{ ' name ': url, ' url ':url, ' no ': ' 1 '}]}) exceptexception ase:print (e) Defcreate_trigger (Auth,HOSTNAME

Zabbix API gets all host names, IP

The main added 1 Selectinterfaces records, the essence is that the database is the join this table. The Perl code is as follows:#!/usr/bin/perl UseStrict; Usewarnings; UseJSON::RPC::Client; UseData::dumper; UseJSON; UseUTF8; UseParallel::Forkmanager;my $pm= Parallel::forkmanager->new ( -); #define the number of open processes$| =1;Binmode(STDIN,': Encoding (UTF8)' );Binmode(STDOUT,': Encoding (UTF8)' ); #Three rowsBinmode(STDERR,': Encoding (UTF8)' ); #for normal output Chinese # Authenticate yo

(iii) Python calls the Zabbix API from the beginning to the abort--Starting from this section

":{ "Output": "Itemid", "Hostids":host_id, "Search": {"Key_":item_name} }, "Auth": token.request (), "id": 2}try: nbSp;returnzbxhttp.request (__req) [' Result '][0][' itemid '] exceptException: return0#-*-coding:utf-8-*-classaction: @classmethod defget_cpu_data (CLS):summary= Basicdata.get_summary () ip=summary[0] host=summary[1] hostid=summary[2]groupid=summary [3]count=len (summary[0]) forindexinrange (count): itemid=itemsid.request (hostid[index],cpuitem.item_cpu_used) print ({ ' IP ':

Developer Linux: CentOS7 installation configuration IT equipment monitoring system Zabbix

/defines.inc.phpAt this point, the Chinese garbled problem solved, as shown in:5.3 Adding a hostFirst install the corresponding agent client on the monitored host and configure the agentd.conf file (refer to the configuration on Zabbix server).Then through "Configuration"-"host"-"Create host" can open the Create Host page, to fill in the information as shown in:Set the template that needs to be associated in the next action, by setting the association

Enterprise-class open source monitoring software Zabbix

control the immune network and communication.0 MaintenanceIn the enterprise environment there will be aging systems, can not easily replace or upgrade a lot. Forcing a monitoring agent to upgrade only because the upgrade of the primary monitoring system is unacceptable-so the newest and best Zabbix servers support all previous agent versions returned by the first version, dating more than 10 years ago.Zabbix the boundaries of the major version upgrad

Zabbix server installation and deployment of enterprise-level monitoring software zabbix

Zabbix server installation and deployment of enterprise-level monitoring software zabbix Zabbix has been applied online for more than half a year. I want to write down my experiences on zabbix's use in the production environment and some experiences, so that you can learn from them without detours! Environment:Server: CentOS6.3 _ X86.64Zabbix:

Zabbix plug-in Grafana-zabbix implementation Cool chart

Grafana-zabbix is a plugin for Zabbix that renders cool charts by invoking API interfacesSystem: Centos6.1, installation Grafana[Email protected] ~]# wget https://grafanarel.s3.amazonaws.com/builds/grafana-2.0.2-1.x86_64.rpm[Email protected] ~]# yum–y install grafana-2.0.2-1.x86_64.rpmAfter installation there will be the following filesbinary file /usr/sbin/grafa

Zabbix monitoring practice in rhel6.3

: #Grep 'basedir = '/etc/init. d/zabbix_agentd Basedir =/usr/local/zabbix #Grep 'basedir = '/etc/init. d/zabbix_server Basedir =/usr/local/zabbix # #Chkconfig zabbix_server on #Chkconfig zabbix_agentd on #Chkconfig -- list | grep zabbix Zabbix_agentd 0: Disable 1: Disable 2: Enable 3: Enable 4: Enable 5: Enable 6: Disable Zabbix_server 0: Di

CENTOS installation and deployment zabbix and centos deployment zabbix

CENTOS installation and deployment zabbix and centos deployment zabbix Http://www.showerlee.com/archives/13 () The rhce email has been sent, so I am free to update the previous documents. The content I updated is mainly to add my current understanding to the configuration and tell you some ideas and ideas at that time. Instead of posting a lot of commands as many documents on the Internet, many friends who

Total Pages: 15 1 2 3 4 5 6 .... 15 Go to: Go

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.