티스토리 뷰
리눅스 SNMP 도표
CPU 사용자 CPU 시간(%): .1.3.6.1.4.1.2021.11.9.0 메모리 전체 Swap 메모리 크기: .1.3.6.1.4.1.2021.4.3.0 디스크 The snmpd.conf needs to be edited. Add the following (assuming a machine with a single ‘/’ partition): disk / 100000 (or) includeAllDisks 10% for all partitions and disks The OIDs are as follows Path where the disk is mounted: .1.3.6.1.4.1.2021.9.1.2.1 System Uptime: .1.3.6.1.2.1.1.3.0 참고1: http://www.debianadmin.com/linux-snmp-oids-for-cpumemory-and-disk-statistics.html 참고2: http://coolx.net/cboard/read.jsp?db=computer&num=76 2. 디스크 관련 추가 설정 정보 기본적으로 Net-SNMP를 설치하면 /(root) 에 대한 SNMP 정보만 표시된다. 루트 이외의 파티션 정보를 SNMP로 노출하려면 아래의 설정을 수정해야 한다. - snmpd.conf 파일에 디스크 파티션 정보를 수정/추가해야 한다. - datacollection-config.xml 파일에 디스크 파티션 정보를 수정/추가해야 한다. 참고: http://www.opennms.org/index.php/Monitoring_disk_space_with_Net-SNMP |
퍼옴 : http://blog.daum.net/thermidor/7346820
ex) [root@SMC_73 ~]# snmpwalk -v2c -c managed_snmp 27.255.85.32 mem -On
.1.3.6.1.4.1.2021.4.1.0 = INTEGER: 0 .1.3.6.1.4.1.2021.4.2.0 = STRING: swap .1.3.6.1.4.1.2021.4.3.0 = INTEGER: 18873648 .1.3.6.1.4.1.2021.4.4.0 = INTEGER: 18823060 .1.3.6.1.4.1.2021.4.5.0 = INTEGER: 12464968 .1.3.6.1.4.1.2021.4.6.0 = INTEGER: 781312 .1.3.6.1.4.1.2021.4.11.0 = INTEGER: 19604372 .1.3.6.1.4.1.2021.4.12.0 = INTEGER: 16000 .1.3.6.1.4.1.2021.4.13.0 = INTEGER: 0 .1.3.6.1.4.1.2021.4.14.0 = INTEGER: 20904 .1.3.6.1.4.1.2021.4.15.0 = INTEGER: 3392024 .1.3.6.1.4.1.2021.4.100.0 = INTEGER: 0 : SWAP 메모리 사용량 값 .1.3.6.1.4.1.2021.4.101.0 = STRING: |
SNMP 버그 관련?
vim /etc/snmp/snmpd.conf
OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"
→ OPTIonS="-LS 2 d -Lf /dev/null -p /var/run/snmpd.pid -a"
Dec 30 04:15:10 localhost snmpd[8178]: Received SNMP packet(s) from UDP: [192.168.0.29]:53894 Dec 30 04:15:10 localhost snmpd[8178]: Connection from UDP: [192.168.0.29]:34686 |
ifHCInOctets (RX bytes) .1.3.6.1.2.1.31.1.1.1.6.2 ifHCOutOctets (RX bytes) .1.3.6.1.2.1.31.1.1.1.10.2
|
정리
ifHCInOctets: 1.3.6.1.2.1.31.1.1.1.6 (64-bit Octets in counter) ifHCOutOctets: 1.3.6.1.2.1.31.1.1.1.10 (64-bit Octets out counter) ifHCInUcastPkts: 1.3.6.1.2.1.31.1.1.1.7 (64-bit Packets in counter) ifHCOutUcastPkts: 1.3.6.1.2.1.31.1.1.1.11 (64-bit Packets out counter) ifHighSpeed: 1.3.6.1.2.1.31.1.1.1.15 (An estimate of the interface's current bandwidth in units of 1Mbps) Low Speed interfaces Lower speed interfaces can get by with 32-bit counters. If you use 32-bit counters on high-speed interfaces, they can wrap quickly; a 10 Mbps stream of back-to-back, full-size packets causes ifInOctets to wrap in just over 57 minutes. At 100 Mbps, the minimum wrap time is 5.7 minutes, and at 1 Gbps, the minimum is 34 seconds Note 1 ifInOctets: 1.3.6.1.2.1.2.2.1.10 (32-bit Octets in counter) ifOutOctets: 1.3.6.1.2.1.2.2.1.16 (32-bit Octets out counter) ifInUcastPkts: 1.3.6.1.2.1.2.2.1.11 (32-bit Packets in counter) ifOutUcastPkts: 1.3.6.1.2.1.2.2.1.17 (32-bit Packets out counter) ifSpeed: 1.3.6.1.2.1.2.2.1.5 (Currently negotiated speed of the interface - Max: 4.294 Gbps)
|
네트워크 | ||
분류 | 항목 | SNMP MIB |
네트워크 카드 | 네트워크 카드 장치명 | ifDescr |
MAC | ifPhysAddress | |
트래픽 BPS | ifInOctets / ifOutOctets | |
트래픽 PPS | ifInUcastPkt / ifOutUcastPkt | |
네트워크 카드 error | ifInErrors / ifOutErrors | |
네트워크 카드 dropped | ifInDiscards / ifOutDiscards | |
시스템 | ||
분류 | 항목 | SNMP MIB |
기본정보 | Hostname | sysName |
Uptime | sysUpTimeInstance | |
시스템 시간 | versionCDate | |
CPU | 사용자 CPU 사용률 | ssCpuUser |
시스템 CPU 사용률 | ssCpuSystem | |
CPU Idle | ssCpuIdle | |
시스템 LOAD | laLoad | |
MEMORY | 메모리 전체 스왑공간 | memTotalSwap |
메모리 사용가능 스왑공간 | memAvailSwap | |
물리적인 전체 메모리 공간 | memTotalReal | |
물리적인 메모리중 이용가능한 공간 | memAvailReal | |
전체 사용가능한 메모리 | memTotalFree | |
전체 공유메모리 크기 | memShared | |
버퍼링된 메모리크기 | memBuffer | |
캐싱된 메모리크기 | memCached | |
HDD | 라벨명 | dskPath |
장치명 | dskDevice | |
파티션별 사용률 % | dskPercent | |
서비스 | ||
분류 | 항목 | SNMP MIB |
TCP | 현재 접속자수(established) | tcpCurrEstab |
접속패킷 | tcpInSegs / tcpOutSegs | |
LISTEN포트 / established 아이피 | tcpConnState | |
UDP | 접속패킷 | udpInDatagrams / udpOutDatagrams |
ICMP | 수신메세지 | icmpInMsgs / icmpOutMsgs |
응답메세지 | icmpInMsgs / icmpOutMsgs |
'Linux' 카테고리의 다른 글
MRTG 자원 모니터링 (0) | 2015.06.11 |
---|---|
L2 스위치 / 리눅스 서버 SNMP 비교 (0) | 2015.06.11 |
THRESHOLD MRTG (0) | 2015.06.11 |
snmpwalk 명령어 (0) | 2015.06.11 |
rrdtool 설치 (0) | 2015.06.11 |
- Total
- Today
- Yesterday
- centOS7
- 인증서
- SSL
- NGINX
- glusterfs
- L2TP
- centos8
- cURL
- IPSEC
- GeoIP
- kvm
- iptables
- mod_security
- php
- WAF
- mariadb
- yum
- pptp
- gitlab
- Apache
- 베이어다이나믹
- OpenVPN
- ntp
- 리눅스
- HAProxy
- galera
- ssh
- MySQL
- virtualbox
- softether
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |