snmpd an SNMP Agent

snmpd is an SNMP agent for collecting, monitoring, and managing information from managed devices on IP network equipments.

This post will guide you how to enable and configure SNMP Server (snmpd) on Linux servers.

How to enable SNMP server on Linux

All Linux distributions arrives with net-snmp in-box. So, you only need to configure it with your needs.

Edit the file in /etc/snmp/snmpd.conf as follows:

  1. Make sure the MIBs are open, for example:

Open specific MIBs only:

### system + hrSystem groups only ###view systemonly included . systemonly included .

Give Full access to specific host:

### Full access from the local host ###rocommunity public localhostrocommunity public

Give Full access to a range or hosts using the community string “secret”

### rocommunitysecret

2. (Optional) edit system information such as:

sysLocation my-labsysContact my-admin

Refer to snmpd.conf Linux man page for more advance configuration options snmpd.conf(5) - Linux man page from references below.

3. Restart the server

In most Linux versions the command will be:

#/etc/init.d/snmpd restart 


# service snmpd restart 

References: - Linux man page -

How to let snmpd know where to send a trap

If you start to use and begin to learn how snmpd works around snmpd.conf file in order to  begin managing SNMP with puppet.  The existing file has several alarms  setup for things like excessive disk space, load, etc.  Assuming  that when these conditions are reached an snmp trap is sent to the  manager.  However, the snmpd.conf file does not contain any manager  setup or information.  In other words there is no mention of a host or  port where the manager runs.  Thus, how does it know where to send  traps?

See also  tmux Tutorial

At a minimum, you need to define trapsink, trap2sink or informsink in /etc/snmp/snmpd.conf to specify the host to send SNMP traps to. You can also specify the  community string and an alternate port number (if not using 162).

You can also set a trapcommunity for a default community string to be used when sending traps. If other options above there are no something defined to specify where traps are sent, then they aren’t going to be sent anywhere.

For sending v3 traps, use trapsess.


Originally posted 2019-03-12 00:45:34.

About wahyuway

Check Also

How to install and configure Anaconda on CentOS 7

How to install and configure Anaconda on CentOS 7

Anaconda is the most popular machine learning and data science tool used in large scale …

Leave a Reply