Submit a ticketCall us

Don’t fall victim to a ransomware attack
Backups are helpful, but sometimes that’s not enough to protect your business against ransomware. At our live webcast we will discuss how to protect against ransomware attacks with SolarWinds® Patch Manager and how to leverage log data to detect ransomware. Register now for our live webcast.

Home > Success Center > Network Performance Monitor (NPM) > How to set SNMP for Linux

How to set SNMP for Linux

Table of contents
Created by Alexander Aguilar, last modified by Con Finucane on Jul 11, 2017

Views: 85 Votes: 3 Revisions: 13


This article describes how to configure SNMP on Linux/UNIX type systems. 


the most common SNMP configuration on Linux/UNIX is by using the net-snmp package maintained 
by  (aka "the nice BSD foks")


installing and configuring net-snmp vary slightly depending on 
the specific Linux/UNIX distribution you are working with. 


keep in mind that as your OS changes over time so does the documentation. if something stops working its always worth to see if there has been changes in the documentation as well as important changes are usually updated  before new packages are release.  



All supported versions of SolarWinds Orion Core / Platform, NPM and SAM, more details here: 



1. first you need to identify what UNIX/LINUX system you are using. To check what unix/linux version you have you can run any of the bellow commands


# cat /etc/*-release


# uname -a


# cat /proc/version

once distribution and version is established you need to check the distribution specific documentation.

bellow is a table of 8 common UNIX and Linux distributions and links to its documentation. 


Distribution Name  Documentation URL
centOS 7  See RedHat 7 documentation
centOS 6 See RedHat 6 Documentation
centOS 5 and older
RedHat (all versions) 
ubuntu (all versions) 
SUSE (all versions) 
ESXi 6 
ESXi 5.5  
AIX 7.2
AIX 7.1 
IBM CMM Modules
HP-UX 11i   
Arch Linux


if you want to see a SNMPv3 configuration example on CentOS 7 click here 


 More Resources 




Simple Configuration Example 


the main configuration file for net-snmp is /etc/snmp/snmpd.conf


some distributions or administrators themselves might choose a different location

for this file but the content and syntax is the same. 


here is a working SNMPv2 example from one of our labs. 


# Map 'idv90we3rnov90wer' community to the 'ConfigUser'
# Map '209ijvfwer0df92jd' community to the 'AllUser'
#        source          community
com2sec ConfigUser      default         idv90we3rnov90wer
com2sec AllUser         default         209ijvfwer0df92jd
# Map 'ConfigUser' to 'ConfigGroup' for SNMP Version 2c
# Map 'AllUser' to 'AllGroup' for SNMP Version 2c
#                       sec.model
group   ConfigGroup     v2c             ConfigUser
group   AllGroup        v2c             AllUser
# Define 'SystemView', which includes everything under . (or .
# Define 'AllView', which includes everything under .1
#                       incl/excl       subtree
view    SystemView      included        .
view    SystemView      included        .
view    AllView         included        .1
# Give 'ConfigGroup' read access to objects in the view 'SystemView'
# Give 'AllGroup' read access to objects in the view 'AllView'
#                       context model   level   prefix  read            write   notify
access  ConfigGroup     ""      any     noauth  exact   SystemView      none    none
access  AllGroup        ""      any     noauth  exact   AllView         none    none

The above text is noted with basic information on the function of each configuration line. In short, we’re creating two scenarios for polling information from SNMP version 2c.


In the first scenario: ConfigUser is assigned to ConfigGroup and may only use SNMP security model 2cConfigGroup can use the SystemViewSystemView is assigned to two OID sub-trees, and all of this is referenced in an SNMP poll by the secret, and unique community string idv90we3rnov90wer.

In the second scenario: AllUser is assigned to AllGroup and may only use SNMP security model 2cAllGroup can use the AllViewAllView is assigned to the entire OID tree, and all of this is referenced in an SNMP poll by the secret, and unique community string 209ijvfwer0df92jd.


( for further information about allowed syntax in this file please see officilal documentation from net-snmp maintainers )


any changes of this file require a restart of the snmpd service 

# service snmpd restart

to ensure net-snmp service is running across restarts 


#' chkconfig snmpd on




Disclaimer: Please note, any content posted herein is provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software or documentation that you purchased from SolarWinds, and the information set forth herein may come from third parties. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment.  You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any.


Last modified
03:02, 11 Jul 2017



Internal Use Only