Submit a ticketCall us

Quickly Address Software Vulnerabilities
Patch Manager is an intuitive patch management software which extends the capabilities of WSUS and SCCM to not only patch Windows® servers and workstations, and Microsoft® applications, but also other 3rd-party applications which are commonly exploited by hackers. Learn more about our patch management solution.

 

Home > Success Center > Network Performance Monitor (NPM) > Change the Machine Type other than NET-SNMP for Linux devices

Change the Machine Type other than NET-SNMP for Linux devices

Table of contents
Created by Jennifer Kuvlesky, last modified by MindTouch on Jun 23, 2016

Views: 106 Votes: 1 Revisions: 5

Overview

This articles describes how to change the Machine Type listed for a Linux device to something other than Net-SNMP.

The steps will show how to:

  • set up a script on the target node (ultimately this will exist on ALL your target nodes) that responds to the command "osname" with the actual distribution and version.
  • edit the net-snmp config to run that script when a specific OID is polled, and
  • assign that OID in NPM to replace the existing machine type.

Environment

  • SAM 6.2 and later
  • NPM 11.5 and later

Steps

Note: See the More Net-SNMP Nodes Thwack post for any updates.

Step 1 -  Get Scripting!

  1. Depending on your distribution, you might use uname, or lsb_release, or some other methods. The upshot is that you want the command to output the OS name. For example the two commands I tried out where:
    1. Ubuntu: uname -v | awk '{ print $1 }'
    2. SuSe: lsb_release -d | awk '{ print $2, $4, $5, $6}'
  2. Create a script and roll it out to all systems
    Once you have a script that works (even if it's different for different Unix/Linux flavors), create a script (or scripts) that do that command. For example:
    #!/bin/bash
    uname -v | awk '{ print $1 }'
    then place this script in the SAME DIRECTORY on all systems. 
    So it doesn't matter if the SuSe version does different commands than it's Ubuntu counterpart. It matters that it's always called /usr/bin/osname.sh

 

Step 2 - Update your SNMP configuration

  1. in /etc/snmp/snmpd.conf file, add the following line:
    extend osname /usr/bin/osname.sh
    restart the snmp service each time you make this update.
  2. test test test!
    This is going to involve running "snmpwalk" a lot to make sure you can get SNMP to display this new value. Start with:
    snmpwalk -v2c -c <rocommunity> <hostname> 
    and once you do not get errors, try:
    snmpwalk -v2c -c <rocommunity> <hostname> NET-SNMP-EXTEND-MIB::nsExtendObjects
    and finally:
    snmpwalk -v2c -c <rocommunity> <hostname> NET-SNMP-EXTEND-MIB::nsExtendOutLine.\"osname\".1
  3. test some more
    Once that works, you'll need to get the OID of your new object. While you can use "snmptranslate" for that, you may be better off using the snmpwalk.exe utility built into SolarWinds. That will also verify that you can walk this new object FROM the SolarWinds poller. (it's typically found in C:\program files(x86)\solarwinds\orion\snmpwalk.exe
  4. roll that change out to all systems
    Now that you have the snmpd.conf file working, roll it out to all your other *nix systems as well.

 

Add the poller to NPM

  1. Go to Settings, Manager Pollers, and create a new poller.
    1. Technology is "Node Details"
    2. On the next screen, you'll select "MachineType" and define a new data source
      1. Cancel out of the "Set a constant value"
      2. Click "Select an OID"
      3. Scroll to the bottom and check the "Looking for an OID..." box
      4. Give the OID a name (I like "osname")
      5. Enter the actual OID you discovered in step 4 above. It may take some trial and error since the snmpwalk is going to provide a VERY long number. You will take a portion of it. On my system, I grabbed 1.3.6.1.4.1.8072.1.3.2.3.1.1.
    3. Also note you have to pick a new SysObjectID - which I hard-coded as "Linux-SuSe" (or Linux-Ubuntu)
  2. Did I mention you should test this a few times?
  3. Apply the new poller to the appropriate *nix devices in your environment

 

 

 

Last modified
21:51, 22 Jun 2016

Tags

Classifications

Public