HowTo Enable SNMP Server (snmpd) on Linux

Version 3

    This post shows how to enable SNMP Server (snmpd) on Linux servers.

     

    References

     

    All Linux distributions arrives with net-snmp in-box.

    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   .1.3.6.1.2.1.1

    view   systemonly  included   .1.3.6.1.2.1.25.1

     

    - Give Full access to specific host:

    #  Full access from the local host

    rocommunity public  localhost

    rocommunity public  10.137.210.1

    - Give Full access to a range or hosts using the community string "secret"

    #rocommunity secret  10.0.0.0/16

     

    2. (Optional) edit system information such as:

    sysLocation    my-lab

    sysContact     my-admin

     

    3. Refer to snmpd.conf Linux man page for more advance configuration options

     

     

    4. Restart the server

    In most Linux versions the command will be:

    #/etc/init.d/snmpd restart

    In RHEL7:

    # service snmpd restart