Difference between revisions of "SNMP"
From Bashlinux
(→How to setup Dell OMSA SNMP monitoring) |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 46: | Line 46: | ||
* On <code>SNMP Properties Window</code> click on <tt>Security</tt> tab |
* On <code>SNMP Properties Window</code> click on <tt>Security</tt> tab |
||
* Click <code>Edit</code> button on <tt>Accepted community names</tt> frame and change <tt>public</tt> for the desired string |
* Click <code>Edit</code> button on <tt>Accepted community names</tt> frame and change <tt>public</tt> for the desired string |
||
+ | |||
+ | == MIBs == |
||
+ | === How to install SNMP MIB Files === |
||
+ | MIBs will be placed on <tt>/usr/share/snmp/mibs/</tt> once the installation is done. |
||
+ | '''Fedora/CentOS'''<br> |
||
+ | # yum install net-snmp-libs |
||
+ | '''Ubuntu/Debian'''<br> |
||
+ | # apt-get install snmp-mibs-downloader |
||
== Custom SNMP monitoring == |
== Custom SNMP monitoring == |
||
=== How to setup Dell OMSA SNMP monitoring === |
=== How to setup Dell OMSA SNMP monitoring === |
||
+ | * Install SNMP |
||
− | Install snmp from Net-SNMP repository, they have an rpm done, it was made thinking in Fedora, but since this is an rpm builded from pure code it will run fine on any rpm distro, like CentOS. |
||
+ | # yum install net-snmp net-snmp-utils |
||
− | |||
− | # wget wget http://superb-east.dl.sourceforge.net/sourceforge/net-snmp/net-snmp-5.4.1-1.fc6.i386.rpm |
||
− | # rpm -Uvh net-snmp-5.4.1-1.fc6.i386.rpm |
||
− | |||
− | When rpm is executed in a system that already have installed OMSA, it will return |
||
− | error: Failed dependencies: |
||
− | net-snmp = 5.0.1-6 conflicts with srvadmin-deng-5.3.0-438.i386 |
||
− | |||
− | But the request command returns |
||
− | # rpm -q --provides net-snmp |
||
− | net-snmp |
||
− | net-snmp-utils |
||
− | libnetsnmp.so.15 |
||
− | libnetsnmpagent.so.15 |
||
− | libnetsnmphelpers.so.15 |
||
− | libnetsnmpmibs.so.15 |
||
− | libnetsnmptrapd.so.15 |
||
− | net-snmp = 5.4.1-1 |
||
− | Then is safe to run |
||
− | # rpm -Uvh --nodeps net-snmp-5.4.1-1.fc6.i386.rpm |
||
− | |||
− | SNMP configuration for OMSA |
||
* Enable SNMP support |
* Enable SNMP support |
||
# service dataeng enablesnmp |
# service dataeng enablesnmp |
||
* Copy Dell mibs to snmp mibs directory |
* Copy Dell mibs to snmp mibs directory |
||
− | # cp /opt/dell/srvadmin/omsa/*.mib |
+ | # cp /opt/dell/srvadmin/omsa/*.mib /usr/share/snmp/mibs |
+ | * Some new versions have the mibs on a different location, so copy them from there |
||
+ | # cp /etc/opt/dell/srvadmin/srvadmin-idrac/*.mib /usr/share/snmp/mibs |
||
+ | # cp /etc/opt/dell/srvadmin/srvadmin-storage/*.mib /usr/share/snmp/mibs |
||
+ | # cp /etc/opt/dell/srvadmin/srvadmin-isvc/mib/*.mib /usr/share/snmp/mibs |
||
* Add Dell mibs to <tt>/etc/snmp/snmp.conf</tt> |
* Add Dell mibs to <tt>/etc/snmp/snmp.conf</tt> |
||
− | + | mibs +MIB-Dell-10892:StorageManagement-MIB |
|
+ | * On '''Ubuntu''' snmpd parameters need to be fixed as |
||
+ | SNMPDOPTS='-LS0-6d -Lf /dev/null -p /var/run/snmpd.pid' |
||
* Restart SNMP Service |
* Restart SNMP Service |
||
− | service snmpd restart |
+ | # service snmpd restart |
+ | * Check the the OIDs are available now from a remote node |
||
+ | # snmpwalk -v 2c -c <my_public> <host_ip> .1.3.6.1.4.1.674.10892.1.700.20.1 |
Latest revision as of 19:46, 24 June 2015
How to setup SNMP on Linux
- Install snmp
Fedora/CentOS
# yum install net-snmp
Ubuntu/Debian
# apt-get install snmpd
- Set string access
# perl -pi -e "s/public$/custom_community/g" /etc/snmp/snmpd.conf
- Open System View
# perl -pi -e "s/\.1\.3\.6\.1\.2\.1\.25\.1\.1/\.1/" /etc/snmp/snmpd.conf
- Restart SNMP
# service snmpd restart
Configuration
- Open and edit the file /etc/snmp/snmpd.conf and set the values:
rocommunity custom_comunity rwcommunity HarD_t0_G3e5_ComMun1ty_5Tr!nG
- Register the service and start it
# chkconfig snmpd on # service snmpd start
How to setup SNMP on MAC OS X
- Open and edit the file /etc/hostconfig and set the value:
SNMPSERVER:=-YES-
- Open and edit the file /etc/snmp/snmpd.conf and set the values:
rocommunity custom_community rwcommunity HarD_t0_G3e5_ComMun1ty_5Tr!nG
- To run snmpd immediately just run the command
snmpd
How to setup SNMP on Windows
The installation is done using the Windows Installation Disk.
- Go to
Start > Settings > Control Panel > Add or Remove Windows Programs
- On left panel click on
Add/Remove Windows Components
- On
Management and Monitoring Tools
click on Details - Check
Simple Network Management Protocol
- Click OK
- Click Nex
- Insert the
"Windows XP Service Pack 2 Disc"
- When the installation finishes will start _SNMP Service_ automatically for _public_ community string
Configuration
- Go to
Start > Settings > Control Panel > Administrative Tools > Services
- Locate SNMP and right click on
SNMP Service
, then selectProperties
- On
SNMP Properties Window
click on Security tab - Click
Edit
button on Accepted community names frame and change public for the desired string
MIBs
How to install SNMP MIB Files
MIBs will be placed on /usr/share/snmp/mibs/ once the installation is done.
Fedora/CentOS
# yum install net-snmp-libs
Ubuntu/Debian
# apt-get install snmp-mibs-downloader
Custom SNMP monitoring
How to setup Dell OMSA SNMP monitoring
- Install SNMP
# yum install net-snmp net-snmp-utils
- Enable SNMP support
# service dataeng enablesnmp
- Copy Dell mibs to snmp mibs directory
# cp /opt/dell/srvadmin/omsa/*.mib /usr/share/snmp/mibs
- Some new versions have the mibs on a different location, so copy them from there
# cp /etc/opt/dell/srvadmin/srvadmin-idrac/*.mib /usr/share/snmp/mibs # cp /etc/opt/dell/srvadmin/srvadmin-storage/*.mib /usr/share/snmp/mibs # cp /etc/opt/dell/srvadmin/srvadmin-isvc/mib/*.mib /usr/share/snmp/mibs
- Add Dell mibs to /etc/snmp/snmp.conf
mibs +MIB-Dell-10892:StorageManagement-MIB
- On Ubuntu snmpd parameters need to be fixed as
SNMPDOPTS='-LS0-6d -Lf /dev/null -p /var/run/snmpd.pid'
- Restart SNMP Service
# service snmpd restart
- Check the the OIDs are available now from a remote node
# snmpwalk -v 2c -c <my_public> <host_ip> .1.3.6.1.4.1.674.10892.1.700.20.1