net -snmp monitoring policy

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

vim /etc/snmp/snmpd.conf

Last added: rocommunity nmap 192.168.1.0/24

In the "rocommunity" indicates that this is a read-only access to
nmap is a group name, a password and a lot of platforms prefer to use "public" the default string.
192.168.1.0/24 designated representative monitoring point IP, which is the only use of this acquisition.

[root@localhost ~]# /etc/rc.d/init.d/snmpd restart

OID server can be used to obtain some of the current performance indicators

. 1
2
. 3
. 4
. 5
. 6
. 7
. 8
. 9
[the root-Linux @ node1 ~] # nmap the snmpget the -v2c -C 192.168.58.11 1.3.6.1.4.1.2021.10.1.3.1
the UCD-the SNMP-laLoad.1 the MIB :: = STRING : 0.00
[the root-Linux @ node1 ~] # nmap the snmpget the -v2c -C 192.168.58.11 1.3.6.1.4.1.2021.10.1.3.2
the UCD-the SNMP-laLoad.2 the MIB :: = STRING: 0.01
[the root @ Linux- ~ node1] # nmap the snmpget the -v2c -C 192.168.58.11 1.3.6.1.4.1.2021.10.1.3.3
the UCD-the SNMP-laLoad.3 the MIB :: = STRING: 0.05
[the root-Linux @ node1 ~] Uptime #
13 is: up 1:17 50:02, User. 1, Load Average: 0.00, 0.01, 0.05
[the root-Linux @ node1 ~] #
such memory can also obtain

1
2
3
4
5
6
7
[root@linux-node1 ~]# snmpget -v2c -c nmap 192.168.58.11 1.3.6.1.2.1.25.2.2.0
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 4033636 KBytes
[root@linux-node1 ~]# free -k
total used free shared buff/cache available
Mem: 4033636 128248 3150580 8688 754808 3670732
Swap: 3905532 0 3905532
[root@linux-node1 ~]#
  

Some servers may search for the remaining indicators of common OID snmp

http://blog.csdn.net/buster2014/article/details/46925633

Guess you like

Origin www.cnblogs.com/csnd/p/12015946.html