Zabbix sometimes a time-out when fetching data, if some data need to take a long time to obtain, then Zabbix will appear exception, considering this situation, Zabbix added trapper function, the client submits data to Zabbix.
Trapper is to be monitored host actively send data to Zabbix server, and the difference between active mode is not to install the client, trapper way to send data is host name processing, not IP address, so the hostname to be unique. When configuring the monitoring item type of information item to select text, no person will report not a support error.
In tapper operation mode, using the Zabbix monitoring type Zabbix trapper (which can be called a Zabbix trap), you must have a capture item on the Zabbix server, and then you need to push the data to the Zabbix_sender server with Zabbix. The program by the Zabbix release, the source package decompression in the bin directory, with Crontab regularly send data to Zabbix server.
Zabbix_sender is a command-line tool that can be used to send Zabbix servers to handle performance data. This tool is typically used for long-running user scripts to periodically send availability and performance data.
Zabbix_sender command:
[[Email protected] ~]# cd /app/zabbix/bin/[[email protected] bin]# ./zabbix _sender usage: zabbix_sender [-vhv] {[-zpsi] -ko | [-zpi] -t -i &NBSP;<FILE>&NBSP;-R}&NBSP;[-C&NBSP;<FILE>] Parameter Description: -c --config <file> configuration file Absolute path IP address of-z --zabbix-server <server> zabbix server -p --port <server port> Zabbix server Port. Default 10051 -s --host
Monitoring item configuration:
configuration-hosts-Select (new) one host-items-create item
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8D/49/wKioL1iWkCKzE9gZAACgcPNhvGM989.jpg "style=" width : 750px;height:431px; "title=" qq20170205103631.jpg "width=" "" height= "431" border= "0" hspace= "0" vspace= "0" alt= " Wkiol1iwkckze9gzaacgcpnhvgm989.jpg "/>
650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M02/8D/49/wKioL1iWkCKgpaYaAACyO52uD_c340.jpg "style=" float: none; "title=" qq20170205103725.jpg "alt=" Wkiol1iwkckgpayaaacyo52ud_c340.jpg "/>
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/8D/4C/wKiom1iWkCOgKhmeAACg6TE37ec616.jpg "style=" float: none; "title=" qq20170205103528.jpg "alt=" Wkiom1iwkcogkhmeaacg6te37ec616.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8D/4C/wKiom1iWkH2DdoVZAABNqNKyfJA830.jpg "title=" Qq20170205103912.jpg "width=" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:750px;height:60px; "alt=" Wkiom1iwkh2ddovzaabnqnkyfja830.jpg "/>
Client sends data using Zabbix_sender
Client
[Email protected] ~]# Cd/usr/local/zabbix/bin/[[email protected] bin]#./zabbix_sender-s 10.15.98.98-z 192.168.100.17 6-k Ityunwei2017-o testsending failed. Use OPTION-VV to more detailed output. [Email protected] bin]#/zabbix_sender-s 10.15.98.98-z 192.168.100.176-k ityunwei2017-o test-vvzabbix_sender [1986] : Debug:send value Error:cannot connect to [[192.168.100.176]:10051]: [111] Connection refusedsending failed. [Email protected] bin]#
-VV can display specific information, which prompts you to connect to port 10051 of Zabbix Server
server:
[[email protected] logs]# netstat -anop|grep -i zabbixtcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 6938/zabbix_agentd off (0.00/0/0) tcp 0 0 127.0.0.1:10051 0.0.0.0:* LISTEN 15925/zabbix_server off (0.00/0/0) tcp 0 0 :::10050 :::* listen 6938/zabbix_agentd off (0.00/0/0)
10051 port for open extranet
[[Email protected] etc]# vim zabbix_server.conflistenip=127.0.0.1,192.168.100.176[[email protected] etc]# service zabbix_server restart[[email protected] etc]# netstat -anop|grep zabbixtcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 6938/zabbix_agentd off (0.00/0/0) tcp 0 0 192.168.100.176:10051 0.0.0.0:* LISTEN 8892/zabbix_server off (0.00/0/0) tcp 0 0 127.0.0.1:10051 0.0.0.0:* listen 8892/zabbix_server off (0.00/0/0)
Client
[Email protected] bin]#/zabbix_sender-s 10.15.98.98-z 192.168.100.176-k ityunwei2017-o test-vvzabbix_sender [2528] : Debug:answer [{"Response": "Success", "info": "PROCESSED:1; failed:0; Total:1; Seconds spent:0.000188 "}]info from server:" PROCESSED:1; failed:0; Total:1; Seconds spent:0.000188 "SENT:1; skipped:0; Total:1[[email protected] bin]#
Here just send a data to test, the actual environment needs to write a script or scheduled tasks to send data on a regular basis.
Zabbix web-side search See
Monitoring-latest data
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/8D/4C/wKiom1iWooOA9oeuAACu6WnDOOo005.jpg "title=" Qq20170205115542.jpg "width=" "height=" 272 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:750PX;HEIGHT:272PX; "alt = "Wkiom1iwoooa9oeuaacu6wndooo005.jpg"/> can see that the client sender has received the data, the following can be based on the graphical configuration of the data and create a trigger to complete the relevant alarm operation.
Zabbix_sender Bulk delivery of key values
By Zabbix_sender you can pass a key value in bulk, you can create a text that defines a key value for each line, with a different hostname and key and key values.
Client
[email protected] bin]# cat a.txt10.15.98.98 ityunwei2017 10010.15.98.98 ityunwei2017 20010.15.98.98 ityunwei2017 30010.15.98.98 ityunwei2017 40010.15.98.98 ityunwei2017 500[[email protected] bin]#./zabbix_sender-z 192.168.100.176- I a.txt-vvzabbix_sender [+]: debug:answer [{"Response": "Success", "info": "PROCESSED:5; failed:0; Total:5; Seconds spent:0.000247 "}]info from server:" PROCESSED:5; failed:0; Total:5; Seconds spent:0.000247 "SENT:5; skipped:0; Total:5[[email protected] bin]#
Zabbix web-side
650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/8D/4A/wKioL1iWq7WTCEhZAACyVof2lC8234.jpg "style=" float: none; "title=" 2.jpg "alt=" Wkiol1iwq7wtcehzaacyvof2lc8234.jpg "/>
650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/8D/4A/wKioL1iWq7Ww_4t4AACEBJ2WDjk124.jpg "style=" float: none; "title=" 3.jpg "alt=" Wkiol1iwq7ww_4t4aacebj2wdjk124.jpg "/>
This article is from "I am not a rookie" blog, please be sure to keep this source http://ityunwei2017.blog.51cto.com/7662323/1895003
Zabbix Trapper Mode Monitoring