Installing and Configuring an SNMP Agent on Linux
1.
Install the LSI SAS SNMP Agent using the rpm -ivh <sas rpm> command.
NOTE After installation, find the SAS MIB file LSI-AdapterSAS.mib under the /etc/lsi_mrdsnmp/sas directory. RPM makes the necessary modification needed in the snmpd.conf file to run the agent.
The snmpd.conf file structure should be the same as the file structure lsi_mrdsnmpd.conf. For reference, a sample configuration file (lsi_mrdsnmpd.conf) is in the /etc/lsi_mrdsnmp directory.
2.
To run an SNMP query from a remote machine, add the IP address of that machine in the snmpd.conf file, as in this example:
com2sec snmpclient 172.28.136.112 public
Here, the IP address of the remote machine is 172.28.136.112.
3.
To receive an SNMP trap to a particular machine, add the IP address of that machine in the com2sec section of the snmpd.conf file.
For example, to get a trap in 10.0.0.144, add the following to snmpd.conf.
# sec.name source community
com2sec snmpclient 10.0.0.144 publicTrapsink HOST [community [port] ]
Specify the custom port number; otherwise, the default SNMP trap port, 162, is used to send traps.
/etc/init.d/snmpd start
/etc/init.d/snmpd stop
6.
To start/stop the SAS SNMP Agent daemon before issuing a SNMP query, enter the following command:
/etc/init.d/lsi_mrdsnmpd start
/etc/init.d/lsi_mrdsnmpd stopYou can check the status of the SAS SNMP Agent daemon by checked by entering the following command:
/etc/init.d/lsi_mrdsnmpd status
snmpwalk -v1 -c public localhost .1.3.6.1.4.1.3582
snmptrapd -P -F "%02.2h:%02.2j TRAP%w.%q from %A %v\n"
NOTE To receive a trap in a local machine with Net-SNMP version 5.3, you must modify the snmptrapd.conf, file (generally located at /var/net-snmp/snmptrapd.conf). Add disableAuthorization yes in snmptrapd.conf and then run sudo snmptrapd -P -F "%02.2h:%02.2j TRAP%w.%q from %A %v\n.
NOTE It is assumed that snmpd.conf is located in/etc/snmp for the Red Hat operating system and /etc for the SLES operating system. You can change the file location from the /etc/init.d/lsi_mrdsnmpd file.
You can install SNMP without the trap functionality. To do so, set the TRAPIND environment variable to "N" before running RPM.
Before you install a new version, you must uninstall all previous versions.
For the SLES 10 operating system, perform the following steps to run SNMP:
1.
Copy /etc/snmp/snmpd.conf to /etc/snmpd.conf.
2.
Modify the /etc/init.d/snmpd file, and change SNMPDCONF=/etc/snmp/snmpd.conf entry to SNMPDCONF=/etc/snmpd.conf.
3.
Run LSI SNMP rpm.
DB09 000202 -15 37857 -02, Rev P, June, 2013 |
Copyright© 2013 by LSI Corporation. All rights reserved. |