To install the SNMP Plugin, perform the following steps:
Use your package manager to download and install the following packages:
Installs SNMP (Simple Network Management Protocol) applications like snmpget, snmpgetnext, snmptrapd, and so on.
Installs and manages Management Information Base (MIB) files
SNMP (Simple Network Management Protocol) agents
Although the InfoHub SNMP plug-in uses NET-SNMP, NET-SNMP is not FIS software and FIS does not support NET-SNMP. The sample instructions for installing and configuring NET-SNMP are merely provided as a convenience to you.
On Ubuntu, the command to download and install these packages is:
$ sudo aptitude install snmpd snmp snmp-mibs-downloader
For testing the SNMP Plugin on AIX, the FIS GT.M Team built net-snmp 5.7.2 using the following commands:
./configure --disable-shared --without-kmem-usage make make test sudo make install
To start net-snmp, execute the following command:
To stop net-snmp, execute the following commands:
sudo /usr/local/sbin/snmpd $ ps -ef | grep snmpd root 42270958 1 0 13:46:31 - 0:00 /usr/local/sbin/snmpd ... $ sudo kill 42270958
Here is a possible default location of SNMP files:
log file: /var/log/snmpd.log write persistent info: /var/net-snmp library dir: /usr/local/lib executable: /usr/local/sbin/snmpd <-- This is the snmpd executable for NET-SNMP (with the corresponding /usr/local/sbin/snmptrapd) configuration file: /usr/local/share/snmp/snmpd.conf MIBs dir: /usr/local/share/snmp/mibs <-- You need to place the MIB in this location after generating it in step 8. help files: /usr/local/share/man/man[1,3,8]/snmp*
If you have built the binaries from source, proceed to step 2. If you have installed these packages using a package manager, proceed directly to step 3.
Execute the following commands to check whether the shared library dependencies of your SNMP application are available.
$ ldd `which snmpget`|grep snmp
This command produces an output like:
libnetsnmp.so.30 => /usr/lib/libnetsnmp.so.30 (0x00007fc985541000)
Execute the following command to find the location of the shared library libnetsnmp.so:
$ locate libnetsnmp.so
If the command finds shared library dependency version (libnetsnmp.so.30 in this case), proceed directly to step 3. Otherwise, find the directory where libnetsnmp*.so and libsnmp.so are installed on your system.
Change to that directory and make symbolic links to:
libnetsnmp*.so.<ver_snmp_cmds_expect> from libnetsnmp.so.<installed_ver>.
libsnmp.so.<ver_snmp_cmds_expect> from libsnmp.so.<installed_ver>.
Suppose .15 version of the shared library dependencies is installed, but your smnp command line programs expect .30, you might make symbolic links as follows:
$ sudo ln -s libnetsnmp.so.15 libnetsnmp.so.30 $ sudo ln -s libnetsnmpagent.so.15 libnetsnmpagent.so.30 $ sudo ln -s libnetsnmphelpers.so.15 libnetsnmphelpers.so.30 $ sudo ln -s libnetsnmpmibs.so.15 libnetsnmpmibs.so.30 $ sudo ln -s libnetsnmptrapd.so.15 libnetsnmptrapd.so.30 $ sudo ln -s libsnmp.so.15 libsnmp.so.30
Add /usr/local/lib to your LD_LIBRARY_PATH. If LB_LIBRARY_PATH is not defined, set LD_LIBRARY_PATH to point to /usr/local/lib.
Using your favorite editor, open /etc/snmp/snmpd.conf as user root (via sudo) (root-only access is needed to protect the community string) and ensure /etc/snmp/snmpd.conf contains the following lines:
# SNMP daemon listens on default port on localhost agentAddress udp:127.0.0.1:161 # Create a view for the InfoHub view InfoHubonly included .220.127.116.11.4.1.16830.6.2 # Allow read-only access to the InfoHub on the localhost rocommunity <communitystring> 127.0.0.1 -V InfoHubonly # Have snmpd convert agentx notifications into informs informsink 127.0.0.1 <communitystring> #AgentX Sub-agents ## Have snmpd run as a master agent master agentx # Tell snmpd where to listen for Agentx connections agentXSocket tcp:127.0.0.1:705
Replace <communitystring> with an appropriate password. <communitystring> is used to authenticate SNMPv1/v2c transactions.
To allow NET-SNMP and AIX's native snmp to coexist, assign a new port for the NET-SNMP agent by modifying the agentAddress line in snmp.conf:
If NET-SNMP was installed from binaries, please note down what port number was assigned as this will be needed by snmpget, snmpgetnext, etc. For example:
Using your favorite editor, open /etc/snmp/snmptrapd.conf as user root (via sudo), and if /etc/snmp/snmptrapd.conf does not exist, create it with R/W only permission for user root (root-only access is needed to protect the community string). Add the following line to /etc/snmp/snmptrapd.conf:
authCommunity log <communitystring>
Replace <communitystring> with the same password that you used in step 5.
Restart your network management services to apply changes in snmpd.conf and snmptrapd.conf. On Ubuntu, the command is:
$ sudo service snmpd restart
Set up the environment for your InfoHub and execute the following command to generate the MIB module from InfoHub.
$gtm_dist/mumps -r generatemib >INFOHUB-1-MIB
Place INFOHUB-1-MIB in one of the directories in the MIB search path, for example, /usr/local/share/snmp/mibs. This allows both you and snmptrapd (discussed later) to access it.
Congratulations! The SNMP Plugin is now installed on your system. Perform step 8 and 9 every time there is a change to the InfoHub configuration that impacts the structure of InfoHub or the objects available. You do not need to perform these steps if your updates neither impacts the InfoHub structure nor alters the number of objects available, for example updating a subscription condition.