Posted by on October 8, 2013

After deploying Oberservium around my home infrastructure, clearly a dull evening. I wondered if it was possible to monitor my vCenter instance, at the end of the day it’s still a linux instance. Logging into the VCSA with ssh and looking around revealed that net-snmp wasn’t installed and obviously this is a requirement for snmp monitoring of a host.

1. Pre-requirements:

  • libsensors4-3.2.0-9.12.1.x86_64.rpm
  • perl-TermReadKey-2.30-277.1.x86_64.rpm

These two rpms need to be downloaded and installed first as a requirement for net-snmp.

2. SLES 11 SP2:

To install net-snmp the correct repository needs adding to YaST2.

  1. ssh into the vcenter instance
  2. start yast2 and select Software -> Software Repositories
  3. Add the following URL: http://download.opensuse.org/repositories/net-snmp:/factory/SLE_11_SP2/ http://ftp.twaren.net/Linux/OpenSuSE/repositories/net-snmp:/factory/SLE_11_SP2/  (thanks Joan)
  4. Go back to the main menu and select Software -> Software Management
  5. Search for net-snmp, select it with the space bar and then choose Accept.

3. Post-install configuration:

/etc/snmp/snmpd.conf

This file will be installed by default, and ideally should be moved/backed up and replaced with a simple version 2c config containing the following:

rocommunity <community name> 
syslocation <location> 
syscontact <contact details>

System startup details:

chkconfing on snmpd
/etc/init.d/snmpd start

4. Firewall / Host access

At this point the snmpd daemon will be running and this can be tested by looking at what ports are listening on VCSA host e.g:

netstat -an | grep 161

However nothing external will be able to connect to this host until the tcpwrappers configuration is modified (this took me about 40 minutes of fiddling to notice (who uses tcpwrappers anymore 😐 )). The following line (WARNING: this allows all hosts access) will need adding to /etc/hosts.allow

snmpd: ALL : ALLOW

5. External testing

From another host preferably on the same network/subnet (avoiding any other firewalls in this instance) test access with snmpwalk e.g:

snmpwalk -v 2c -c <community name> <vcsa host address/IP>

Posted in: Computers

Comments

  1. Jake
    March 25, 2014

    Hi Dan

    Thanks for enlightening us!

    Can you perhaps expand on where you got libsensors4-3.2.0-9.12.1.x86_64.rpm and perl-TermReadKey-2.30-277.1.x86_64.rpm from please?

    Thanks
    J

  2. Joe
    October 25, 2014

    This repo also needs to be added (it contains the remaining dependencies for net-snmp):

    zypper addrepo -f http://download.opensuse.org/distribution/11.2/repo/oss/ opensuse

  3. Sean
    February 19, 2015

    I got libsensors from opensuse 11.4 distro
    http://ftp5.gwdg.de/pub/opensuse/discontinued/distribution/11.4/repo/oss/suse/x86_64/libsensors4-3.2.0-9.12.1.x86_64.rpm
    I couldn’t find the perl_termReadKey-2.30-277 but found the 2.30-149 ver. But this requires perl be updated to 5.12. Perl 5.10 is installed in 11.2 . So I used the 2.30-138 version.
    I found if you don’t have internet access, you only need the follwong packages in one directory.
    libsensors4-3.2.0-9.12.1.x86_64.rpm, libsnmp30-5.7.3-117.1.x86_64.rpm, net-snmp-5.7.3-117.1.x86_64.rpm, perl-SNMP-5.7.3-117.1.x86_64.rpm, perl-TermReadKey-2.30-138.2.x86_64.rpm,snmp-mibs-5.7.3-117.1.x86_64.rpm
    Then running rpm -i *.rpm inside the directory will install snmpd. Then “chkconfig snmpd on” will make sure it autstarts on reboot. Just don’t forget to alter the config as above.

  4. Joan
    October 22, 2015

    Unfortunately the version of suse used for VCSA5.5 has been discontinued, instead of the link you pasted I had to use this one http://ftp.twaren.net/Linux/OpenSuSE/repositories/net-snmp:/factory/SLE_11_SP2/
    Other than that it works great 🙂

  5. dan
    October 22, 2015

    Thanks.. i’ll update accordingly !

  6. Martyn T. Keigher
    November 11, 2015

    Hey Dan,

    Just came across this article via the google search term “snmp vcsa 5.5”. Your article was the FIRST result and rightfully so man… flawless walk-through indeed!!

    Huge +1 man!! Thank you VERY MUCH for sharing!

    Regards,

    ://mk

  7. James
    July 5, 2016

    Bummer. The folder: /SLE_11_SP2/ has been removed from the URL you provided.

    Anyone else have an alternative URL?

  8. 90Frances
    November 29, 2016

    Hi blogger ! I read your content everyday and i must
    say you have very interesting content here. Your website deserves to go viral.

    You need initial boost only. How to go viral fast? Search for:
    forbesden’s tools

Leave a Reply


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*