企業(yè)級(jí)監(jiān)控介紹

2017年3月6日23:58:47 發(fā)表評(píng)論 4,187 ℃

企業(yè)級(jí)監(jiān)控

SNMP

RRDTool

cacti

展示

時(shí)間序列數(shù)據(jù)

Nagios

SNMP

net-snmp(Agent) 被監(jiān)控端

net-snmp-utils(NMS:command) 監(jiān)控端

安裝SNMP

#yum install net-snmp net-snmp-utils -y

#service snmpd start

#snmpwalk -v 2c -c public localhost

#snmpget -v 2c -c public localhost

#vim /etc/snmp/snmpd.conf 

添加view    systemview    included   .1.3.6.1.2.1.6

#service snmpd restart

#snmpwalk -v 2c -c public localhost tcp | grep established | wc -l  //查看已建立的鏈接

#vim /etc/snmp/snmpd.conf   

com2sec notConfigUser  default       public 修改為

com2sec notConfigUser  127.0.0.1      mypublic  // 只允許本地獲取信息

#service snmpd restart

#snmpnetstat -v 2c -c mypublic -Can -Cp tcp 127.0.0.1

RRDtool

#yum install rrdtool -y

#rrdtool create test.rrd --step 5 DS:testds:GAUGE:8:0:U RRA:AVERAGE:0.5:1:17280 RRA:AVERAGE:0.5:10:3456 RRA:AVERAGE:0.5:100:1210

#rrdtool info test.rrd //查看

#vim rrd.sh

#!/bin/bash

while true;do

   rrdtool update test.rrd N:$RANDOM

   sleep 5

done

#rrdtool fetch -r 5 test.rrd AVERAGE //查看每隔5秒的平均數(shù)據(jù)

#rrdtool graph a.png --step 5 -s 1486666900 -t Test  -v vtest DEF:vtest=test.rrd:testds:AVERAGE LINE1:vtest#ff0000:testline

#rrdtool graph b.png -s 1486666900 -t Test  -v vtest DEF:vtest=test.rrd:testds:AVERAGE:step=5 DEF:vartest2=test.rrd:testds:AVERAGE:step=50 LINE1:vtest#ff0000:testline LINE1:vartest2#00FF00:testline2

cacti

rrdtool  create

周期性執(zhí)行能夠取得數(shù)據(jù)的命令,并將取回的數(shù)據(jù)保存至rrd文件中

利用rrdtool繪圖并展示

php開發(fā)網(wǎng)頁(yè)程序

LAMP,LNMP

編譯安裝php需啟用--enable-sockets

插件機(jī)制

thold報(bào)警插件

模板

圖形模板

數(shù)據(jù)模板

主機(jī)模板

收集方法:數(shù)據(jù)收集方法

數(shù)據(jù)查詢:xml格式數(shù)據(jù)收集方法

數(shù)據(jù)輸入方法:命令或者腳本

腳本:

只需要指定如何獲取數(shù)據(jù),并且獲取到的數(shù)據(jù)經(jīng)過(guò)處理后要按規(guī)定輸出

TAG:data  TAG:data

input:30   output:40

Nagios

監(jiān)控工具

主機(jī),服務(wù)/資源

OK,AWRNGING,CRITICA,UNKNOWN

比如:CPU:90%(CRITICAL),80%(WARNING), OK ,UNKNOWN

報(bào)警系統(tǒng)

Nagios Core

不做任何監(jiān)控工作

Plugins(scripts)

ssh 、nrpe(遠(yuǎn)程端安裝nrpe進(jìn)程,控制端也要按照nrpe )、snmp(支持windows、打印機(jī))、NSCA(被動(dòng)監(jiān)控)、NSClient++(windows)、xyz(自定義)

幾種對(duì)象實(shí)現(xiàn)監(jiān)控工作

主機(jī)、主機(jī)組

服務(wù)/資源,服務(wù)組

聯(lián)系人

時(shí)段

命令  (模板—>應(yīng)用到么謳歌被監(jiān)控對(duì)象,以實(shí)現(xiàn)具體的監(jiān)控)

安裝

服務(wù)器端 

Nagios Daemon 

Nagios Plugins

【騰訊云】云服務(wù)器、云數(shù)據(jù)庫(kù)、COS、CDN、短信等云產(chǎn)品特惠熱賣中

發(fā)表評(píng)論

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: