Formatting code for LinuxSNMP
{{parent page="Linux"}}
Read http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch22_:_Monitoring_Server_Performance
===SNMPD setup===
%%
com2sec poller1 10.210.2.55 cN0w
com2sec poller2 10.1.11.210 cN0w
group pollerGroup v2c poller1
group pollerGroup v2c poller2
access pollerGroup "" any noauth exact systemview none none
syscontact snmpadmin@company.tld
syslocation "Mars"
%%
===Quick test of SNMP===
==snmpwalk==
%%
root@lambo:~# snmpwalk -Os -c public -v2c localhost system
%%
==snmpget==
%%
root@lambo:~# snmpget -Oqv -v2c -cpublic localhost sysUpTimeInstance
18:21:52:50.72
%%
===Send trap message===
Use trapgen is the easiest
%%
trapgen -d 1.2.3.4
%%
Yse snmptrap should work too
%%
# -v 2 TRAP-PARAMETERS:
# uptime trapoid [OID TYPE VALUE] ...
snmptrap -cpublic -ubob 172.28.25.18 -v2 0 1.3.6.1.4.1.19746.1.6.1.1.1.5 s "IGNORE ME"
%%
Read http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch22_:_Monitoring_Server_Performance
===SNMPD setup===
%%
com2sec poller1 10.210.2.55 cN0w
com2sec poller2 10.1.11.210 cN0w
group pollerGroup v2c poller1
group pollerGroup v2c poller2
access pollerGroup "" any noauth exact systemview none none
syscontact snmpadmin@company.tld
syslocation "Mars"
%%
===Quick test of SNMP===
==snmpwalk==
%%
root@lambo:~# snmpwalk -Os -c public -v2c localhost system
%%
==snmpget==
%%
root@lambo:~# snmpget -Oqv -v2c -cpublic localhost sysUpTimeInstance
18:21:52:50.72
%%
===Send trap message===
Use trapgen is the easiest
%%
trapgen -d 1.2.3.4
%%
Yse snmptrap should work too
%%
# -v 2 TRAP-PARAMETERS:
# uptime trapoid [OID TYPE VALUE] ...
snmptrap -cpublic -ubob 172.28.25.18 -v2 0 1.3.6.1.4.1.19746.1.6.1.1.1.5 s "IGNORE ME"
%%