SNMP: Difference between revisions

From DWIKI
mNo edit summary
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
*[http://www.net-snmp.org/wiki/index.php/Tutorials Tutorials]
 
*http://www.debianhelp.co.uk/snmp.htm
 
*[http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094aa4.shtml How to Configure SNMP Community Strings]
 
*[http://www.debianadmin.com/linux-snmp-oids-for-cpumemory-and-disk-statistics.html Linux SNMP OID’s for CPU,Memory and Disk Statistics]
= Links =
 
*[http://www.net-snmp.org/wiki/index.php/Tutorials Tutorials]  
*[https://net-snmp.sourceforge.io/tutorial/tutorial-5/commands/snmptranslate.html Tutorial: snmptranslate]
*[https://net-snmp.sourceforge.io/wiki/index.php/ https://net-snmp.sourceforge.io/wiki/index.php/]
*[https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/snmp/mibs Zabbix and SNMP]
*[http://www.debianhelp.co.uk/snmp.htm http://www.debianhelp.co.uk/snmp.htm]
*[http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094aa4.shtml How to Configure SNMP Community Strings]  
*[http://www.debianadmin.com/linux-snmp-oids-for-cpumemory-and-disk-statistics.html Linux SNMP OIDs for CPU,Memory and Disk Statistics]
*[http://www.circitor.fr/Mibs/Mibs.php The MIBs list]
 
=Documentation=
==OID==
https://www.dpstele.com/snmp/what-does-oid-network-elements.php
 
=HOWTO=
==snmpd on Ubuntu==
 
In '''/etc/snmp/snmpd.conf''':
view  systemonly  included  .1
 
 
== Using snmpd as snmp proxy ==
*[https://www.linkedin.com/pulse/using-snmp-proxy-debian-ronald-bartels Using SNMP proxy on Debian]
*[https://docs.librenms.org/Extensions/SNMP-Proxy/ SNMP Proxy]
 
 
IP range to call from: 192.168.0.0/16
Hosts to monitor: swa and swb ( 10.1.0.1x )
 
On your the host used as proxy:
view all included .1
group ACCSRV v2c notConfigUser
com2sec -Cn wasrv notConfigUser 192.168.0.0/16 swa
com2sec -Cn wbsrv notConfigUser 192.168.0.0/16 swb
access ACCSRV wasrv any noauth prefix all none none
access ACCSRV wbsrv any noauth prefix all none none
proxy -Cn wasrv -v 2c -c public 10.1.0.11 .1.3
proxy -Cn wbsrv -v 2c -c public 10.1.0.12 .1.3
 
Then from your 192.168.0.0/16 network:
snmpwalk -v 2c -c swa yoursnmpproxyserver
 
= FAQ =
 
 
== Install MIB ==
 
*[http://www.net-snmp.org/wiki/index.php/TUT:Using_and_loading_MIBS Installing and loading MIBs]
*[https://l3net.wordpress.com/2013/05/12/installing-net-snmp-mibs-on-ubuntu-and-debian/ https://l3net.wordpress.com/2013/05/12/
installing-net-snmp-mibs-on-ubuntu-and-debian/]
 
apt install snmp-mibs-downloader
 
===Locations===
*/usr/share/snmp/mib
*/var/lib/snmp/mibs/
*/usr/share/snmp/mibs/
 
== snmpwalk ==
 
snmpwalk -v 2c  -c public yourhost system(?)
 
or to show all OIDs
 
  snmpwalk -v 2c  -c public yourhost
 
==Error messages==
===Bad operator (INTEGER): At line 73 in /usr/share/snmp/mibs/ietf/SNMPv2-PDU===
See https://serverfault.com/questions/936119/snmp-mibs-on-ubuntu-error-in-mibs
 
 
 
[[Category:Monitoring]]

Latest revision as of 08:40, 26 July 2024


Links

Documentation

OID

https://www.dpstele.com/snmp/what-does-oid-network-elements.php

HOWTO

snmpd on Ubuntu

In /etc/snmp/snmpd.conf:

view   systemonly  included   .1


Using snmpd as snmp proxy


IP range to call from: 192.168.0.0/16 Hosts to monitor: swa and swb ( 10.1.0.1x )

On your the host used as proxy:

view all included .1
group ACCSRV v2c notConfigUser
com2sec -Cn wasrv notConfigUser 192.168.0.0/16 swa
com2sec -Cn wbsrv notConfigUser 192.168.0.0/16 swb
access ACCSRV wasrv any noauth prefix all none none
access ACCSRV wbsrv any noauth prefix all none none
proxy -Cn wasrv -v 2c -c public 10.1.0.11 .1.3
proxy -Cn wbsrv -v 2c -c public 10.1.0.12 .1.3

Then from your 192.168.0.0/16 network:

snmpwalk -v 2c -c swa yoursnmpproxyserver

FAQ

Install MIB

installing-net-snmp-mibs-on-ubuntu-and-debian/]

apt install snmp-mibs-downloader

Locations

  • /usr/share/snmp/mib
  • /var/lib/snmp/mibs/
  • /usr/share/snmp/mibs/

snmpwalk

snmpwalk -v 2c  -c public yourhost system(?)

or to show all OIDs

 snmpwalk -v 2c  -c public yourhost

Error messages

Bad operator (INTEGER): At line 73 in /usr/share/snmp/mibs/ietf/SNMPv2-PDU

See https://serverfault.com/questions/936119/snmp-mibs-on-ubuntu-error-in-mibs