Installing, Configuring and Enabling SNMP on Turbonomic and Linux VMs

Document created by marc.jenkins@turbonomic.com Expert on Jul 18, 2018Last modified by marc.jenkins@turbonomic.com Expert on Jul 18, 2018
Version 4Show Document
  • View in full screen mode

Overview

This tutorial outlines how to Install, Configure and Enable SNMP on a Turbonomic instance and Linux Virtual Machines.

The instructions cover how to setup Linux-based VMs that are under Turbonomic's control including those running in the Public Cloud.  This process has been used when unable to use Public Cloud providers tools when gathering Memory metrics.

 


 

I have split this document into the following sections:

  • Turbonomic SNMP Installation and Configuration
  • Target Linux Virtual Machine Installation and Configuration
  • Turbonomic SNMP Target configuration
  • Cloud configuration considerations and screenshots
  • Basic vi commands
  • Links

 

Turbonomic SNMP Installation and Configuration process:

  1.  Login to the Turbo Instance with root credentials
  2. To Install SNMP agent and Utils, run the following command:

yum -y install net-snmp net-snmp-utils

 

   3. To configure the SNMP agent type:

 

snmpconf -i

 

   4. For the following prompts, enter the responses highlighted in Bold:

         - Valid answer examples: "all", "none","3","1,2,5"
         Read in which (default = all): all
         - Select the file type you wish to create:
         (you can create more than one as you run this program)
            1:snmptrapd.conf
            2:snmp.conf
            
3:snmpd.conf
         Select File: select snmpd.conf

 

         - Select a configuration section for snmpd.conf that you wish to create:
            1:Extending the Agent
            2:Trap Destinations
            3:Agent Operating Mode
            4:Monitor Various Aspects of the Running Host
            
5:System Information Setup
            6:Access Control Setup
         
Select section: select Access Control Setup

         - This section defines who is allowed to talk to your running snmp agent. Select from:
            1:a SNMPv3 read-write user
            2:a SNMPv3 read-only user
            3:a SNMPv1/SNMPv2c read-only access community name
            4:a SNMPv1/SNMPv2c read-write access community name
         Select section: 3

         - The community name to add read-only access for: turbonomic
(or choose your own community name, this needs to be the same across VMs and when added as a Target in Turbo)

         - The hostname or network address to accept this community name from [RETURN for all]:<RETURN>

         - The OID that this community should be restricted to [RETURN for no-restriction]:<RETURN>

         - For the next 3 prompts, type the following responses:
            finished
            finished
            quit

 

NOTE:  We have found that sometimes the Community String entered does not stay in the snmpd.conf file after running the snmpconf -I command.  We will need to manually add this.

 

   5. To do this type:

 

   sudo vi /etc/snmp/snmpd.conf

 

   6. Scroll down to the section where the Community string is entered. If this state’s turbonomic (Or whatever you entered for the       Community string) you can quit out of this.  If not, change the word public to your Community (in this example it is Turbonomic) and       Write out the file

 

NOTE: See section on basic VI commands for assistance with this

 

   7. Restart theSNMP daemon

 

   snmpd restart

 

Target Linux Virtual Machine Installation and Configuration process:

 In this example I am using a CentOS Linux Virtual Machines, however the process will be similar for other flavours of Linux, but you will need to use APT or Zypper etc for the installation.

 

  1. Login to the Linux Instance with root credentials (Or use Sudo)
  2. To Install SNMP agent and Utils, run the following command:

yum -y install net-snmp net-snmp-utils

 

NOTE:  As there are a few additional lines which need to be added/amended in the Conf file, I have attached a version to this Doc which I know works.

 

   3. Delete the contents of the current snmpd.conf file and replace with the contents of the Txt file attached. Exit and Write the file

   4. Restart theSNMP daemon

 

snmpd restart

 

Turbonomic Target SNMP Configuration

 

All SNMP enabled workloads need to be in a Group, currently Turbonomic recommends that a single scope contain no more than 500 virtual machines. Multiple targets should be used for environments exceeding this limit.

 

Once the relevant Group/s have been created, we can go ahead and add the SNMP Target.

 

  1. Navigate to Settings > Target Configuration > Add Target
  2. Select Guest OS Processes and SNMP

   3. Enter: Target Name, Scope and Community details and select Add

 

 

 

Cloud configuration considerations and screenshots

  • SNMP will by default use Port 161  (UDP) and as such this will need to be opened on Internal / External Firewalls and needs to be taken into consideration
  • AWS: Security Groups need to be created or amended to allow these Ports
  • Azure: Allow ports directly to the VM or create Network Security Groups/Rules (The following is an Example)

 

SNMP Testing

 

To test Connectivity from Turbo to the CentOS:

snmpwalk -Os -v 2c -c <Community> <IP> iso.3.6.1.2.1.1.1

Expected Output should show Kernel Version:

 

 

To test Memory Metrics are returning:

snmpwalk -v 2c -c <Community> <ip> 1.3.6.1.4.1.2021.4

Expected Output should show some Memory stats:

 

Basic vi commands

/ <text>                       Perform search for Text entered

i                                   Insert Mode to edit the file

<esc>                           Quit Insert Mode

:q!                                Close file without savings

:wq!                             Close file and Write Changes

dG                               Delete all lines

gg                                Move cursor to first line of file

 

Links

Turbonomic 6.1 Target Configuration Guide

Turbonomic SNMP Documentation

Basic vi Commands

 

Coming Soon.....a similar document outlying the process for Windows Operating Systems

 

linuxsnmp

 

Thanks to anson.mccook for the original SNMP Doc

1 person found this helpful

Attachments

Outcomes