码迷,mamicode.com
首页 > 其他好文 > 详细

使用zabbix_sender收集监控信息

时间:2015-04-27 23:57:53      阅读:368      评论:0      收藏:0      [点我收藏+]

标签:zabbix_sender


1.zabbix_sender的使用

zabbix_sender程序主要用于那些执行时间比较长的自定义脚本间隔发送状态或性能数据到zabbix server.

$ /usr/local/zabbix/bin/zabbix_sender --help
Zabbix Sender v2.2.3 (revision 44105) (7 April 2014)

usage: zabbix_sender [-Vhv] {[-zpsI] -ko | [-zpI] -T -i <file> -r} [-c <file>]

Options:
  -c --config <file>                   Absolute path to the configuration file

  -z --zabbix-server <server>          Hostname or IP address of Zabbix server
  -p --port <server port>              Specify port number of server trapper running on the server. Default is 10051
  -s --host <hostname>                 Specify host name. Host IP address and DNS name will not work
  -I --source-address <IP address>     Specify source IP address

  -k --key <key>                       Specify item key
  -o --value <key value>               Specify value

  -i --input-file <input file>         Load values from input file. Specify - for standard input
                                       Each line of file contains whitespace delimited: <hostname> <key> <value>
                                       Specify - in <hostname> to use hostname from configuration file or --host argument
  -T --with-timestamps                 Each line of file contains whitespace delimited: <hostname> <key> <timestamp> <value>
                                       This can be used with --input-file option
                                       Timestamp should be specified in Unix timestamp format
  -r --real-time                       Send metrics one by one as soon as they are received
                                       This can be used when reading from standard input

  -v --verbose                         Verbose mode, -vv for more details

Other options:
  -h --help                            Give this help
  -V --version                         Display version number


$ /usr/local/zabbix/bin/zabbix_sender   -s "xxxxx"   -z xxxx -k MongoDB.Status[version] -o 2.4.6
info from server: "processed: 1; failed: 0; total: 1; seconds spent: 0.000054"
sent: 1; skipped: 0; total: 1

-s 指定zabbix_sender发送的主机名称

-k 指定的KEY是通过配置文件指定的



2.Trapper Items

Trapper Items接收来源数据而不是查询它。用于将需要的数据推送给zabbix

技术分享



技术分享








参考文档:

https://www.zabbix.com/documentation/2.2/manual/concepts/sender

https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/trapper



本文出自 “Linux SA John” 博客,请务必保留此出处http://john88wang.blog.51cto.com/2165294/1639412

使用zabbix_sender收集监控信息

标签:zabbix_sender

原文地址:http://john88wang.blog.51cto.com/2165294/1639412

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!