成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

zabbix中snmp-traps設置解析

運維 系統運維
在知道Zabbix 是一個提供 Web 管理界面的開源系統/網絡監控服務器后,我們就得設置他,而snmp-traps設置在zabbix中是比較重要的一環!

zabbixsnmp-traps設置解析如下:

  It works something like this:

  (SNMP Trap) -> snmptrapd -> snmptrap.sh -> zabbix_sender -> (Zabbix)

  Basically, the point of snmptrap.sh is to translate a SNMP trap into a Zabbix trap

  在/etc/snmp/snmptrapd.conf文件添加

  traphandle default /bin/bash /path/to/zabbix/bin/snmptrap.sh

  啟動snmptrapd服務:

  snmptrapd -C -c /etc/snmp/snmptrapd.conf -Lf /var/log/net-snmptrap.log

  Now edit /path/to/zabbix/bin/snmptrap.sh. If not found, check the zabbix source tree, and

  copy it to the zabbix/bin directory. For my application the following lines work great:

  ####### Begin snmptrap.sh #########

  ## GENERAL CONFIGURATION

  ZABBIX_SERVER="zabbix-host"; # hostname of zabbix server

  ZABBIX_PORT="nnnn"; # nnnn=same as 'Listen Port' in zabbix_server.conf

  ZABBIX_SENDER="/path/to/zabbix/bin/zabbix_sender"; # insert you path

  ## END OF GENERAL CONFIGURATION

  #According to the snmpdtrapd.conf man page, these

  # fields should be received in the following order:

  read hostname

  read ip

  read uptime

  read trapoid

  read payload

  # there may be several more payload fields, but one is all I need.

  # read more if it suits you.

  hostname=`echo $hostname|cut -f1 -d'.'` # trim off the fluff

  trapoid=`echo $trapoid|cut -f3 -d' '` # ditto

  # I don't need uptime or ip right now ...

  payload=`echo $payload1|cut -f3- -d' '` # ditto ditto

  ### This section records all traps under a 'dummy' host in zabbix, for debugging

  ### Delete if you don't need to do this.

  ### I use it to verify the OID of traps before using them as keys on specific hosts

  # create a string to send to zabbix.

  str="HOST=$hostname TRAP OID=$trapoid PAYLOAD=$payload"

  # now set the key and host name for zabbix

  KEY="alltraps";

  HOST="trapperjohn";

  #now call the zabbix_sender program with all parameters.

  $ZABBIX_SENDER $ZABBIX_SERVER $ZABBIX_PORT $HOST $KEY "$str"

  ### End dummy host section

  ### This section records traps for specific for specific hosts.

  ### Edit as needed for you situation.

  KEY="$trapoid";

  HOST="$hostname";

  str="$payload";

  $ZABBIX_SENDER $ZABBIX_SERVER $ZABBIX_PORT $HOST $KEY "$str"

  ######### End snmptrap.sh ###########

#p#

  調試可:

  echo $ZABBIX_SENDER $ZABBIX_SERVER $ZABBIX_PORT $HOST:$KEY "$str" > /tmp/testtrap.txt

  測試:

  snmptrap -v1 -cpublic localhost .1.3.6.1.6.3.1.1.5.2 0 0 "" "" .1.3.6.1.4.1 s "aaa"

  在zabbix服務器端:

  1. Added host:

  name=snmpTraps

  ip address = (didn't enter an ip address)

  port = 10005 (port which zabbix server is on) - do i need to set this to 162?

  Set status to monitored....didn't add anything else eg IP address, group etc

  2. Added item to host (i.e to snmpTraps)

  key=snmpTraps

  type=zabbix trapper

  type of info=numeric

  store value=As is

  Allowed host= (i have left this line blank)

手動起來完成了zabbix中snmp-traps設置環節,我們就可以配置其他zabbix了!

【編輯推薦】

  1. Zabbix 1.8 安裝詳解
  2. 分布式監控zabbix 漢化工作
  3. zabbix應用之proxy分布式部署
  4. zabbix應用之使用自動注冊action批量添加主機
  5. CentOS 5.5下安裝配置zabbix客戶端
  6. CentOS下zabbix的安裝指導
責任編輯:趙鵬 來源: 網絡轉載
相關推薦

2011-03-30 10:07:05

Zabbixsnmp

2010-07-01 14:05:43

SNMPMIB

2010-06-29 16:53:08

2010-07-01 12:30:42

SNMP trap

2010-07-13 14:44:11

SNMP服務設置

2011-03-31 11:12:37

CACTINet-SNMP

2010-07-09 12:11:31

SNMP服務

2010-05-24 15:57:05

Linux SNMP

2011-03-29 16:07:32

CACTISNMP

2011-03-31 11:29:24

CACTISNMP服務

2010-07-09 12:08:36

設置SNMP協議

2011-05-27 17:28:01

Android

2011-04-02 15:30:20

Cacti安裝

2011-04-01 16:24:39

zabbix報警

2009-07-13 15:55:36

SNMP網管軟件

2010-06-29 13:58:17

SNMPMIB

2010-01-08 14:29:58

華為交換機snmp

2011-03-29 15:30:20

ZABBIXWEB

2012-04-09 11:23:20

ibmdw

2014-12-29 12:27:43

ZabbixSNMP
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: av不卡一区 | 夜夜艹天天干 | 国产99久久 | 国内自拍视频在线观看 | 91精品国产综合久久福利软件 | 国产视频一区二区三区四区五区 | 亚洲三区视频 | 亚洲啪啪 | 91精品国产综合久久婷婷香蕉 | 日韩视频在线免费观看 | 91视频a | 精品伦精品一区二区三区视频 | 青青草原综合久久大伊人精品 | 国产精品中文字幕在线观看 | 人人看人人搞 | 亚洲精品一 | 成人影院在线视频 | 日日射夜夜骑 | 国产激情精品视频 | 日韩精品一区二区三区在线播放 | 亚洲一区二区av在线 | 精品国产欧美 | 国产精品久久久久久久白浊 | 午夜在线观看视频 | 色吧综合网 | 一级毛片大全免费播放 | 亚洲国产在 | 狠狠视频 | 免费观看毛片 | av在线影院 | 超碰av免费 | 日韩欧美一区二区三区四区 | 一级黄色短片 | 亚洲国产精品第一区二区 | 欧美国产激情 | 午夜视频网| 国产在线观看网站 | 精品欧美一区二区中文字幕视频 | 狠狠操狠狠操 | 成人免费区一区二区三区 | 午夜免费福利片 |