SNMP - Simple Network Management Protocol. SNMP is supported by almost all network equipment available. SNMP is a powerful protocol able to configure and request network equipment data remotely.
This document describes howto install and to configure SNMP Read Only access to your equipment. The SNMP version used in this configuration below is SNMP v2c.
The following USE flags are supported by net-analyzer/net-snmp package:
|X||No||Adds support for X11|
|bzip2||No||Use the bzlib compression library|
|doc||No||Adds extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally|
|elf||No||Enable the use of elf utils to check uptime on some systems|
|ipv6||No||Adds support for IP version 6|
|lm_sensors||No||Adds linux lm_sensors (hardware sensors) support|
|mfd-rewrites||No||Use MFD rewrites of mib modules where available|
|minimal||No||Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)|
|perl||No||Adds optional support/bindings for the Perl language|
|python||No||Adds optional support/bindings for the Python language|
|rpm||No||Enable monitoring of app-arch/rpm. This flag requires the bzip2 and zlib flags to be enabled as well.|
|selinux||No||!!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur|
|ssl||No||Adds support for Secure Socket Layer connections|
|tcpd||No||Adds support for TCP wrappers|
|zlib||No||Adds support for zlib (de)compression|
To install SNMP daemon use following command:
For basic Read Only SNMP access there is no specific USE flag needed. It is safe to disable all USE flags which are provided by the net-analyzer/net-snmp package.
Edit the /etc/snmpd/snmpd.conf file and add the community and the IP access list.
- Substitute the SNMP community my-own-SNMP-community with your own SNMP community.
- Substitute the 10.255.255.0/24 network with your own IP network where SNMP access should be allowed from.
- Substitute the syslocation and syscontact with your own valid data.
It is suggested to put valid data into the syslocation and syscontact fields, so in a support case when your hardware is monitored by a NMS (Network Management System) the responsible staff has the data right there where it is needed (in the NMS).
In a large network or enterprise it is not easy to describe for the network staff where particular network equipment has been placed. Sometimes there is a high fluctuation of the network staff, and after some time network equipment gets lost because nobody knows anymore where it has been placed, or whom to contact when a network equipment has failed.
So be aware to put valid data in there, your network staff will be thankful if you do so, it helps them to resolve outages quicker if something fails on a particular component that is monitored with SNMP.
Starting the daemon
To start the snmpd daemon do following
Testing SNMP Access
To test SNMP access, or rather poll SNMP data your SNMP client has to be within the IP range of the previously configured access list (here 10.255.255.0/24), to be allowed to ask for SNMP statistics.
- Substitute the IP 192.168.10.254 with the target host where SNMP access is enabled
- Substitute the SNMP community my-own-SNMP-community with your own SNMP community
Verify the SNMP daemon is running on a particular host:
- SNMP v1 and SNMP v2c uses UDP
- SNMP v3 uses TCP