net-snmp + net-snmp-devel + net-snmp-utils + rrdtool + rrdexec
olibc 안녕 기본설치
안녕 1.2 기준입니다 설정은 서버마다 다릅니다
rrd.conf
메모리 + 하드 용량 + 랜 설정만 하시면 될것입니다
snmp.conf
www.oops.org/rrdexec/config
cpu session 스크립트를 설치하세요
싱글인경우 구 cpu 스크립트를 받아 설치 하니 돼네요
듀얼 인경우 안녕 텍스트로 하셔야 할것입니다
게시판 작성자 : 이지성님,전유진님 검색하시면
아래 내용 보면서 충분히 설치 하실거라 믿습니다
저는 둔해서 2일 밤 꼬박세우고 반나절 걸렸습니다
제가 즐겨하는 말 선배님 틀리면 리플요

/etc/rrdexec/rrd.conf

SERVICE: cpu
TITLE: CPU Usage percent of rmcobol.co.kr
IMGTITLE: % of CPU Usage
IMGTYPE: png
GRAPH1: system
GRAPH2: user
GRAPH3: idle
CDEFS1: System=system,AREA,#EE6666
CDEFS2: User=user,STACK,#BBBBFF
TYPE: GAUGE
CHECKTYPE: LAST
MIN: 0
MAX: 100
SCALE: none
SIZEOPT: 1000
DATA1: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.2
DATA2: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.1
DATA3: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.3
DTYPE: none
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
TEMPLATE: /usr/include/rrdexec/template.guide
END: cpu

SERVICE: cpu0
TITLE: CPU0 Usage percent of rmcobol.co.kr
IMGTITLE: % of CPU Usage
IMGTYPE: png
GRAPH1: system
GRAPH2: user
GRAPH3: idle
CDEFS1: System=system,AREA,#EE6666
CDEFS2: User=user,STACK,#BBBBFF
TYPE: GAUGE
CHECKTYPE: LAST
MIN: 0
MAX: 100
SCALE: none
SIZEOPT: 1000
DATA1: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.2
DATA2: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.1
DATA3: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.3
DTYPE: none
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
TEMPLATE: /usr/include/rrdexec/template.guide
END: cpu0

SERVICE: cpu1
TITLE: CPU1 Usage percent of rmcobol.co.kr
IMGTITLE: % of CPU Usage
IMGTYPE: png
GRAPH1: system
GRAPH2: user
GRAPH3: idle
CDEFS1: System=system,AREA,#EE6666
CDEFS2: User=user,STACK,#BBBBFF
TYPE: GAUGE
CHECKTYPE: LAST
MIN: 0
MAX: 100
SCALE: none
SIZEOPT: 1000
DATA1: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.2
DATA2: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.1
DATA3: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.3
DTYPE: none
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
TEMPLATE: /usr/include/rrdexec/template.guide
END: cpu1

SERVICE: ethernet
TITLE: Network Transfer of oops.org
IMGTITLE: bit per second
IMGTYPE: png
GRAPH1: rx,AREA,#EE6666
GRAPH2: tx,LINE3,#CDCDCD
MIN: 0
MAX: 100000000
TYPE: COUNTER
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:interfaces.ifTable.ifEntry.ifInOctets.2
DATA2:
SNMP,pcharley@192.168.123.3:interfaces.ifTable.ifEntry.ifOutOctets.2
DTYPE: *8
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: ethernet

SERVICE: loadaverage
TITLE: System Load Average of oops.org
IMGTITLE: Load Average
IMGTYPE: png
GRAPH1: 1min,AREA,#CDCDCD
GRAPH2: 5min,LINE2,#737373
GRAPH3: 15min,LINE2,#D2734A
MIN: 0
MAX: 1000000000
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.laTable.laEntry.laLoad.1
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.laTable.laEntry.laLoad.2
DATA3:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.laTable.laEntry.laLoad.3
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: loadaverage

SERVICE: process
TITLE: Process Information of oops.org
IMGTITLE: no of process
IMGTYPE: png
GRAPH1: ohttpd
GRAPH2: omysql
GRAPH3: osendmail
GRAPH4: oftp
GRAPH5: ossh
GRAPH6: oimaps
GRAPH7: obash
CDEFS1: httpd=ohttpd,AREA,#EE6666
CDEFS2: mysql=omysql,STACK,#BBBBFF
CDEFS3: sendmail=osendmail,STACK,#737373
CDEFS4: ftp=oftp,STACK,#39A254
CDEFS5: ssh=ossh,STACK,#CEBF4F
CDEFS6: imaps=oimaps,STACK,#D2734A
CDEFS7: bash=obash,STACK,#D84575
CDEFS8:
total=ohttpd:omysql:osendmail:oftp:ossh:oimaps:obash:+:+:+:+:+:+,LINE1,#F
FFFFF
MIN: 0
MAX: 1000
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.1
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.2
DATA3:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.3
DATA4:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.4
DATA5:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.5
DATA6:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.6
DATA7:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.7
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: process

SERVICE: session
TITLE: Session Information of oops.org
IMGTITLE: no of session
IMGTYPE: png
GRAPH1: ohttpd
GRAPH2: omysql
GRAPH3: osendmail
GRAPH4: oftp
GRAPH5: ossh
GRAPH6: oimaps
CDEFS1: httpd=ohttpd,AREA,#EE6666
CDEFS2: mysql=omysql,STACK,#BBBBFF
CDEFS3: sendmail=osendmail,STACK,#737373
CDEFS4: ftp=oftp,STACK,#39A254
CDEFS5: ssh=ossh,STACK,#CEBF4F
CDEFS6: imaps=oimaps,STACK,#D2734A
CDEFS7:
total=ohttpd:omysql:osendmail:oftp:ossh:oimaps:+:+:+:+:+,LINE1,#FFFFFF
MIN: 0
MAX: 1000
TYPE: GAUGE
SIZEOPT: 1000
DATA1: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.53.101.1
DATA2: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.53.101.2
DATA3: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.53.101.3
DATA4: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.53.101.4
DATA5: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.53.101.5
DATA6: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.53.101.6
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: process

SERVICE: hda1
TITLE: Disk usage for ROOT
IMGTITLE: Root Usage
IMGTYPE: png
GRAPH1: Usage
GRAPH2: Total
CDEFS1: usage=Usage:1000:*,AREA,#BBBBFF
CDEFS2: free=Total:Usage:-:1000:*,STACK,#CDCDCD
CDEFS3: total=Total:1000:*,LINE1,#EE6666
MIN: 0
MAX: 3028080
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskUsed
.1
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskTota
l.1
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: hda1

SERVICE: hdb3
TITLE: Disk usage for /usr
IMGTITLE: Root Usage
IMGTYPE: png
GRAPH1: Usage
GRAPH2: Total
CDEFS1: usage=Usage:1000:*,AREA,#BBBBFF
CDEFS2: free=Total:Usage:-:1000:*,STACK,#CDCDCD
CDEFS3: total=Total:1000:*,LINE1,#EE6666
MIN: 0
MAX: 7060308
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskUsed
.2
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskTota
l.2
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: hda3

SERVICE: hdb5
TITLE: Disk usage for /usr/local
IMGTITLE: Root Usage
IMGTYPE: png
GRAPH1: Usage
GRAPH2: Total
CDEFS1: usage=Usage:1000:*,AREA,#BBBBFF
CDEFS2: free=Total:Usage:-:1000:*,STACK,#CDCDCD
CDEFS3: total=Total:1000:*,LINE1,#EE6666
MIN: 0
MAX: 7060276
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskUsed
.3
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskTota
l.3
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: hda5

SERVICE: hda2
TITLE: Disk usage for /var
IMGTITLE: Root Usage
IMGTYPE: png
GRAPH1: Usage
GRAPH2: Total
CDEFS1: usage=Usage:1000:*,AREA,#BBBBFF
CDEFS2: free=Total:Usage:-:1000:*,STACK,#CDCDCD
CDEFS3: total=Total:1000:*,LINE1,#EE6666
MIN: 0
MAX: 5091584
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskUsed
.4
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskTota
l.4
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: hda2

SERVICE: hdb2
TITLE: Disk usage for /var/log
IMGTITLE: Root Usage
IMGTYPE: png
GRAPH1: Usage
GRAPH2: Total
CDEFS1: usage=Usage:1000:*,AREA,#BBBBFF
CDEFS2: free=Total:Usage:-:1000:*,STACK,#CDCDCD
CDEFS3: total=Total:1000:*,LINE1,#EE6666
MIN: 0
MAX: 7060276
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskUsed
.5
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskTota
l.5
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: hda2

SERVICE: hdb1
TITLE: Disk usage for /web
IMGTITLE: Root Usage
IMGTYPE: png
GRAPH1: Usage
GRAPH2: Total
CDEFS1: usage=Usage:1000:*,AREA,#BBBBFF
CDEFS2: free=Total:Usage:-:1000:*,STACK,#CDCDCD
CDEFS3: total=Total:1000:*,LINE1,#EE6666
MIN: 0
MAX: 11321884
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskUsed
.6
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskTota
l.6
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: hdb1

SERVICE: memory
TITLE: Memory usage for oops.org
IMGTITLE: Memory Usage
IMGTYPE: png
GRAPH1: treal
GRAPH2: areal
GRAPH3: buffer
GRAPH4: cache
CDEFS1: Usage=treal:areal:-:buffer:-:cache:-:1024:*,AREA,#EE6666
CDEFS2: Buffer=buffer:0:+:1024:*,STACK,#39A254
CDEFS3: Cache=cache:0:+:1024:*,STACK,#BBBBFF
CDEFS4: total=Usage:Buffer:+:Cache:+,LINE1,#737373
MIN: 0
MAX: 255584
TYPE: GAUGE
SIZEOPT: 1024
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.memory.memTotalReal.0
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.memory.memAvailReal.0
DATA3: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.memory.memBuffer.0
DATA4: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.memory.memCached.0
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: memory

SERVICE: swap
TITLE: System Swap Usage of oops.org
IMGTITLE: Swap Usage
IMGTYPE: png
GRAPH1: in,AREA,#CDCDCD
GRAPH2: out,LINE2,#737373
MIN: 0
MAX: 1000
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.systemStats.ssSwapIn.0
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.systemStats.ssSwapOut.0
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: swap

SERVICE: io
TITLE: System I/O Usage of oops.org
IMGTITLE: I/O Usage
IMGTYPE: png
GRAPH1: sent,AREA,#CDCDCD
GRAPH2: recieve,LINE2,#737373
MIN: 0
MAX: 1000
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.systemStats.ssIOSent.0
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.systemStats.ssIOReceive.0
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: io

/etc/snmp/snmp.conf
#########################################################################
######
#
# snmpd.conf:
# net-snmp snmpd 에이전트를 설정하기 위한 설정 파일 예제
#
#########################################################################
######
#
# 이 파일은 처음 시작을 위한 예제이다. 더 많은 설정 지시자들이 있으며,
자세한
# 적용을 위해서는 snmpd.conf(5)를 참고한다.
#
# '#' 로 시작하는 라인은 주석으로 간주되며 그 외의 라인들은 설정 명령으
로 간주
# 된다.

#########################################################################
######
# 접속 설정
#########################################################################
######

# snmpd 데몬은 보안 목적에 의해여 수정되거나 대체 파일로 지정이 되지 않는
한 시
# 스템 의 mib 그룹에 대한 질의에만 응답을 할 것이다. 예를들어 아래와 같
은 설정
# 에 의해서 접근에 대한 레벨을 증가 할 수 있다.

# 이 파일을 수정 없이 사용한다면, 기본적으로 snmpd 는 "public" 커뮤니티
에 대해
# 서 읽기 전용으로 응답을 한다.

# 아래의 예는 커뮤니티 이름을 변경하고, mib 트리에 대하여 쓰기 접속을 할
수 있
# 도록 수정하는 방법을 보여준다.

# 더 많은 정보를 얻기 위해서는 FAQ 나 snmpd.conf(5) 메뉴얼 페이지를 참조
한다.

####
# 먼저, "security name" 에 "public" 커뮤니티를 매핑한다:

# sec.name source
community
#com2sec notConfigUser default public
com2sec private localhost pcharley
com2sec private 192.168.123.3 pcharley
#com2sec paranoid 192.168.123.1/24 public
#com2sec readonly 192.168.123.1/24 public

####
# 두번째로, 그룹 이름에 security 이름을 매핑한다:

# groupName securityModel
securityName
#group notConfigGroup v1
notConfigUser
#group notConfigGroup v2c
notConfigUser
#group MyROSystem v1 paranoid
#group MyROSystem v2c paranoid
#group MyROSystem usm paranoid
group MyRWGroup v1 private
group MyRWGroup v2c private
group MyRWGroup usm private
#group MyROGroup v1 readonly
#group MyROGroup v2c readonly
#group MyROGroup usm readonly


####
# 세번째, 그룹이 권한을 가지도록 view 를 설정한다.

# name incl/excl
subtree
mask(optional)
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1

####
# 마지막으로, systemview view 에 읽기 전용 권한을 준다.

# group context

sec.model sec.level prefix read
write notif
#access notConfigGroup ""
any
noauth exact
systemview none none
#access MyROSystem "" any noauth exact system none none
#access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none

# -----------------------------------------------------------------------
------

# 아래는 제한적인 접근을 위한 설정 예제이다.

# "COMMUNITY" 는 오직 이 사이트에서만 알 수 있는 알려지지 않은 키워드로
변경을
# 해야 한다. NETWORK 토큰 역시 정확하게 지정을 하도록 한다.

## sec.name source
community
#com2sec local localhost COMMUNITY
#com2sec mynetwork 192.168.123.1/24 COMMUNITY

## group.name sec.model sec.name
#group MyRWGroup any
local
#group MyROGroup any
mynetwork
#
#group MyRWGroup any
otherv3user
#...

## incl/excl
subtree
mask
view all included
.1
80

## - 또는 mib2 트리만 -

view mib2 included .iso.org.dod.internet.mgmt.mib-2
fc


## context sec.model
sec.level prefix
read write notif
#access MyROGroup "" any
noauth
0 all none none
#access MyRWGroup "" any
noauth
0 all all
all

#########################################################################
######
# 시스템 접속 정보
#

# snmpd.conf 파일을 통하여 sysContact와 sysLocation 시스템 변수를 설정할
수 있
# 다.

syslocation "rmcobol.co.kr"
syscontact "Root "

# snmpwalk 을 출력 예제:
# % snmpwalk -c public -v 1 localhost system
# system.sysDescr.0 = "SunOS name sun4c"
# system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.sunos4
# system.sysUpTime.0 = Timeticks: (595637548) 68 days, 22:32:55
# system.sysContact.0 = "Me "
# system.sysName.0 = "name"
# system.sysLocation.0 = "Right here, right now."
# system.sysServices.0 = 72


# -----------------------------------------------------------------------
------


#########################################################################
######
# 프로세스 체크
#
# 아래의 예제는 호스트에서 실행 중인 프로세스를 어떻게 체크하는가를 보여
준다.
# 문법은 다음과 같다:
#
# proc NAME [MAX=0] [MIN=0]
#
# NAME: 체크를 위한 프로세스의 이름. 이름은 정확해야 한다. (예를들어
http 는
# httpd process 를 찾지 못한다. httpd 또는 현재 실행중인 프로세
스 이름
# 을 정확하게 지정해야 한다.)
# MAX: 실행을 허락할 최대 숫자를 지정한다. 기본값은 0 이다. 이는 물리
적으로
# 제한을 하는 것은 아니다. (trap 설정을 위한 값이다.)
# MIN: 프로세스의 최소 숫자를 지정한다. 이 숫자 보다 낮을 경우 trap
을 사용
# 할 수 있다. 기본값은 0 이다.

#
# 예제 (commented out by default):
#


proc httpd 50 5
proc mysqld 30 2
proc sendmail 30 1
proc in.proftpd 100 0
proc opensshd 100 1
proc imapd 30 1
proc bash 100 0
proc named 10 1

# 현재 실행 중인 mountd daemon
#proc mountd

# 4 개 이상의 ntalkd 데몬이 실행되지 않도록. 0 역시 사용할 수 있다. (역
자 주:
# 역시 기본적으로 snmpd 가 제한을 하지는 않으며, trap 을 이용해서 제한
을 해야
# 한다.)
#proc ntalkd 4

# 적어도 한개 이상의 sendmail process 가 있어야 하며, 10 개 이상 실행
이 되지
# 않게 하기 위하여.
#proc sendmail 10 1

# 프로세스 mib 트리에 대한 snmpwalk 는 아래와 같다:
#
# % snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.2
# enterprises.ucdavis.procTable.prEntry.prIndex.1 = 1
# enterprises.ucdavis.procTable.prEntry.prIndex.2 = 2
# enterprises.ucdavis.procTable.prEntry.prIndex.3 = 3
# enterprises.ucdavis.procTable.prEntry.prNames.1 = "mountd"
# enterprises.ucdavis.procTable.prEntry.prNames.2 = "ntalkd"
# enterprises.ucdavis.procTable.prEntry.prNames.3 = "sendmail"
# enterprises.ucdavis.procTable.prEntry.prMin.1 = 0
# enterprises.ucdavis.procTable.prEntry.prMin.2 = 0
# enterprises.ucdavis.procTable.prEntry.prMin.3 = 1
# enterprises.ucdavis.procTable.prEntry.prMax.1 = 0
# enterprises.ucdavis.procTable.prEntry.prMax.2 = 4
# enterprises.ucdavis.procTable.prEntry.prMax.3 = 10
# enterprises.ucdavis.procTable.prEntry.prCount.1 = 0
# enterprises.ucdavis.procTable.prEntry.prCount.2 = 0
# enterprises.ucdavis.procTable.prEntry.prCount.3 = 1
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.1 = 1
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.2 = 0
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.3 = 0
# enterprises.ucdavis.procTable.prEntry.prErrMessage.1 = "No mountd
process running."
# enterprises.ucdavis.procTable.prEntry.prErrMessage.2 = ""
# enterprises.ucdavis.procTable.prEntry.prErrMessage.3 = ""
# enterprises.ucdavis.procTable.prEntry.prErrFix.1 = 0
# enterprises.ucdavis.procTable.prEntry.prErrFix.2 = 0
# enterprises.ucdavis.procTable.prEntry.prErrFix.3 = 0
#
# mountd 에 대한 errorFlag 가 1개도 실행이 되고 있지 않기 때문에, 1 로
설정이
# 되어 있는 것을 주의해야 한다. 이 errorFlag 가 1 이고, ErrMessage 가
무엇이
# 문제인지를 알려 주고 있다.
#
# 참고 사항: min 과 max 가 모두 0 이면, min 은 자동으로 1 로 설정 된다.
#


# -----------------------------------------------------------------------
------


#########################################################################
######
# 실행/스크립트
#

#
# 한줄 짜리 명령어와 종료 코드를 등록할 수 있다. 다므ㅇ 2개의 예를 참조
하라.
#
# exec NAME PROGRAM [ARGS ...]
#
# NAME: 유니크한 이름 (판단을 위한 이름)
# PROGRAM: 실행할 프로그램 이름. 경로가 포함되어야 한다.
# ARGS: 프로그램에 전달할 옵션 인자

# 간단한 hello world

#exec echotest /bin/echo hello world

# 스크립트를 등록하여 사용하는 예제:
#
# #!/bin/sh
# echo hello world
# echo hi there
# exit 35
#
# 주의: 이 방법은 보안에 치명적일 수 있으며, 의도하지 않은 보안 구멍을
만들어
# 줄 수가 있다. 왠만하면 사용하지 않는 것이 좋으며, 또한 쓰기 같은 기능
이 있게
# 만들어서는 안된다.
#
#exec shelltest /bin/sh /tmp/shtest

# 결과는,
# % snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.8
# enterprises.ucdavis.extTable.extEntry.extIndex.1 = 1
# enterprises.ucdavis.extTable.extEntry.extIndex.2 = 2
# enterprises.ucdavis.extTable.extEntry.extNames.1 = "echotest"
# enterprises.ucdavis.extTable.extEntry.extNames.2 = "shelltest"
# enterprises.ucdavis.extTable.extEntry.extCommand.1 = "/bin/echo hello
world"
# enterprises.ucdavis.extTable.extEntry.extCommand.2
= "/bin/sh /tmp/shtest"
# enterprises.ucdavis.extTable.extEntry.extResult.1 = 0
# enterprises.ucdavis.extTable.extEntry.extResult.2 = 35
# enterprises.ucdavis.extTable.extEntry.extOutput.1 = "hello world."
# enterprises.ucdavis.extTable.extEntry.extOutput.2 = "hello world."
# enterprises.ucdavis.extTable.extEntry.extErrFix.1 = 0
# enterprises.ucdavis.extTable.extEntry.extErrFix.2 = 0

# -----------------------------------------------------------------------
------


#########################################################################
######
# 디스크 체크
#

# 디스트 스페이스를 체크하기 할 수 있으며, 제한을 할 수 있다.

# disk PATH [MIN=100000]
#
# PATH: 디스크가 마운트 되어 있는 경로
# MIN: 지정한 크기보다 작은 공간을 가진 디스크는 Mib의 errorFlag 가 설
정된다.
# 기본값은 100000 이다.

# / 파티션을 설정하고, 이에 따른 결과값

#disk / 10000
disk / 10%
disk /usr 10%
disk /usr/local 10%
disk /var 10%
disk /var/log 10%
disk /web 10%

# % snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.9
# enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0
# enterprises.ucdavis.diskTable.dskEntry.diskPath.1 = "/" Hex: 2F
# enterprises.ucdavis.diskTable.dskEntry.diskDevice.1
= "/dev/dsk/c201d6s0"
# enterprises.ucdavis.diskTable.dskEntry.diskMinimum.1 = 10000
# enterprises.ucdavis.diskTable.dskEntry.diskTotal.1 = 837130
# enterprises.ucdavis.diskTable.dskEntry.diskAvail.1 = 316325
# enterprises.ucdavis.diskTable.dskEntry.diskUsed.1 = 437092
# enterprises.ucdavis.diskTable.dskEntry.diskPercent.1 = 58
# enterprises.ucdavis.diskTable.dskEntry.diskErrorFlag.1 = 0
# enterprises.ucdavis.diskTable.dskEntry.diskErrorMsg.1 = ""

# -----------------------------------------------------------------------
------


#########################################################################
######
# load average 체크
#

# load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
#
# 1MAX: 1분 평균값이 지정한 값보다 높아지면 errorFlag 가 설정됨
# 5MAX: 1MAX 와 유사하며, 5분 평균값
# 15MAX: 1MAX 와 유사하며, 15분 평균값

# 체크 load:
load 12 14 14

# % snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.10
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.2 = 2
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.3 = 3
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.1 = "Load-1"
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.2 = "Load-5"
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.3 = "Load-15"
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30
2E 34 39
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30
2E 33 31
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30
2E 32 36
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.1 = "12.00"
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.2 = "14.00"
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.3 = "14.00"
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.1 = 0
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.2 = 0
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.3 = 0
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.1 = ""
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.2 = ""
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.3 = ""

# -----------------------------------------------------------------------
------


#########################################################################
######
# 확장 섹션
#

# 이 섹션은 실행 mib 가 한줄 라인의 결과 밖에 처리하지 못하는 것을 해결한
다:

# 실행할 shell script:
#
# #!/bin/sh
# echo hello world
# echo hi there
# exit 35
#
# exec .1.3.6.1.4.1.2021.50 shelltest /bin/sh /tmp/shtest

# % snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.50
# enterprises.ucdavis.50.1.1 = 1
# enterprises.ucdavis.50.2.1 = "shelltest"
# enterprises.ucdavis.50.3.1 = "/bin/sh /tmp/shtest"
# enterprises.ucdavis.50.100.1 = 35
# enterprises.ucdavis.50.101.1 = "hello world."
# enterprises.ucdavis.50.101.2 = "hi there."
# enterprises.ucdavis.50.102.1 = 0

# 이제 출력은 2줄이 되었으며 'hi there' 을 볼 수 있을 것이다. 이는 스크
립트의
# 2번째 출력 라인이다.
#
# mib.txt 를 수정하면, .50.* 의 출력을 문자열 description 으로 변경할 수
있다.

# Other ideas:
#
# exec .1.3.6.1.4.1.2021.51 ps /bin/ps
# exec .1.3.6.1.4.1.2021.52 top /usr/local/bin/top
# exec .1.3.6.1.4.1.2021.53 mailq /usr/bin/mailq
exec .1.3.6.1.4.1.2021.50 CpuUsage /usr/bin/cpucheck.pl single
exec .1.3.6.1.4.1.2021.53 Session /usr/bin/session.pl

# -----------------------------------------------------------------------
------


#########################################################################
######
# Pass through control.
#

# 사용법:
# pass MIBOID EXEC-COMMAND
#
# This will pass total control of the mib underneath the MIBOID
# portion of the mib to the EXEC-COMMAND.
#
# Note: You'll have to change the path of the passtest script to your
# source directory or install it in the given location.
#
# Example: (see the script for details)
# (commented out here since it requires that you place the
# script in the right location. (its not installed by default))

# pass .1.3.6.1.4.1.2021.255 /bin/sh /usr/local/local/passtest

# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.255
# enterprises.ucdavis.255.1 = "life the universe and everything"
# enterprises.ucdavis.255.2.1 = 42
# enterprises.ucdavis.255.2.2 = OID: 42.42.42
# enterprises.ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42
# enterprises.ucdavis.255.4 = IpAddress: 127.0.0.1
# enterprises.ucdavis.255.5 = 42
# enterprises.ucdavis.255.6 = Gauge: 42
#
# % snmpget -v 1 localhost public .1.3.6.1.4.1.2021.255.5
# enterprises.ucdavis.255.5 = 42
#
# % snmpset -v 1 localhost public .1.3.6.1.4.1.2021.255.1 s "New string"
# enterprises.ucdavis.255.1 = "New string"
#

# For specific usage information, see the man/snmpd.conf.5 manual page
# as well as the local/passtest script used in the above example.

# Added for support of bcm5820 cards.
#pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

#########################################################################
######
# 더 많은 정보
#
# snmpd.conf(5) 메뉴얼을 이용하거나 또는 snmpd -H 의 출력을 참조하라.


# Local variables:
# tab-width: 4
# c-basic-offset: 4
# End:
# vim600: noet sw=4 ts=4 fdm=marker
# vim<600: noet sw=4 ts=4



snmp 테스트
[root@ns snmp]# snmpwalk -c pcharley -v 1 192.168.123.3
interfaces.ifTable.ifEntry.ifInOctets.2
IF-MIB::ifInOctets.2 = Counter32: 4487237
You have new mail in /var/spool/mail/root
[root@ns snmp]# snmpwalk -c pcharley -v 1 192.168.123.3
enterprises.ucdavis.50.101.2
UCD-SNMP-MIB::ucdavis.50.101.2 = STRING: "1.2"
[root@ns snmp]# snmpwalk -c pcharley -v 1 192.168.123.3
interfaces.ifTable.ifEntry.ifInOctets.2
IF-MIB::ifInOctets.2 = Counter32: 4505039
[root@ns snmp]# snmpwalk -c pcharley -v 1 192.168.123.3
enterprises.ucdavis.53.101.1
UCD-SNMP-MIB::ucdavis.53.101.1 = STRING: "0"


*내부 에러는 snmp 설정 틀리면 에러 나요

rrdexec 인텍스 생성
rrdindex -w /home/rmcobol/html/rrdtool \
-s /home/rmcobol/html/rrdtool/index.html \
-c /etc/rrdexec/rrd.conf -C


rrdexec -g log
2005/12/20 14:47 2005/12/20 14:47

트랙백 주소 :: 이 글에는 트랙백을 보낼 수 없습니다