How to setup monitoring using BangDB for SNMP V3

RedHat / CentOS

  1. Install RPM
  2. // For RedHat
    sudo yum install net-snmp-utils net-snmp
    
    // For CentOS
    yum install net-snmp-utils net-snmp-libs
  3. Open Port 161
  4. Ensure that port 161 is open and snmp service is added.

    sudo firewall-cmd --zone=public --add-service snmp
  5. Stop snmpd service
  6. sudo service snmpd stop
  7. Create snmp v3 user
  8. sudo net-snmp-create-v3-user -ro -A myauthpass -X myprivpass -a SHA -x AES bangdbuser
  9. Start the service
  10. sudo service snmpd start
    
    // Or you may use these as well
    sudo systemctl restart snmpd
    sudo systemctl enable snmpd
  11. Test locally
  12. snmpwalk -v3 -u bangdbuser -A myauthpass -a SHA -X myprivpass -x AES -l authPriv 127.0.0.1
  13. Test remotely
  14. Now using the right IP address of the server where we just configured the snmp, if you get Timeout then it means the port 161 is not open.

    snmpwalk -v3 -u bangdbuser -A myauthpass -a SHA -X myprivpass -x AES -l authPriv 34.12.34.98

Ubuntu / Debian

  1. Install libraries
  2. sudo apt-get install snmp snmpd libsnmp-dev
  3. Stop the services
  4. sudo service snmpd stop
  5. Add v3 user
  6. sudo net-snmp-create-v3-user -ro -A myauthpass -X myprivpass -a SHA -x AES bangdbuser

    Edit the file /etc/snmp/snmpd.conf and comment out as shown, then add the line as highlighted below

    sudo vim /etc/snmp/snmpd.conf
    
    #  Listen for connections from the local system only - COMMENT THIS
       agentAddress  udp:127.0.0.1:161
    
    #  Listen for connections on all interfaces (both IPv4 *and* IPv6)
       agentAddress udp:161,udp6:[::1]:161,tcp:161,tcp6:[::1]:161
  7. Install necessary MIBs
  8. sudo apt-get install snmp-mibs-downloader
    sudo download-mibs
    sudo sed -i 's/mibs :/# mibs :/g' /etc/snmp/snmp.conf

    Edit the snmpd.conf file and add following [ sudo vim /e etc/snmp/snmpd.conf] includeAllDisks 10% for all partitions and disks

  9. Start the service
  10. sudo service snmpd start
    
    # Or you may use these as well
    
    sudo systemctl restart snmpd
    sudo systemctl enable snmpd
  11. Test locally
  12. snmpwalk -v3 -u bangdbuser -A myauthpass -a SHA -X myprivpass -x AES -l authPriv 127.0.0.1
  13. Test remotely
  14. Now using the right IP address of the server where we just configured the snmp, if you get Timeout then it means the port 161 is not open

    snmpwalk -v3 -u bangdbuser -A myauthpass -a SHA -X myprivpass -x AES -l authPriv 34.12.34.98

How to setup monitoring using BangDB for SNMP V1/2

RedHat/ CentOS

  1. Install snmp
  2. // For RedHat
    sudo yum install net-snmp-utils net-snmp
    
    // For CentOS
    yum install net-snmp-utils net-snmp-libs

    Edit the /etc/snmp/snmpd.conf and add following

    rocommunity bangdb
    mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.old
    rocommunity <CommunityString>

  3. Start the service
  4. sudo service snmpd start
    
    # Or you may use these as well
    
    sudo systemctl restart snmpd
    sudo systemctl enable snmpd

Ubuntu / Debian

  1. Install snmp
  2. sudo apt-get install snmpd

    Edit the /etc/snmp/snmpd.conf and add following

    rocommunity bangdb
    mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.old
    rocommunity <CommunityString>

  3. Edit the snmpd file and do following :
  4. Comment out following line or similar

    SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -p /var/run/snmpd.pid'

    Add the following like

    SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'
  5. Install necessary MIBs
  6. sudo apt-get install snmp-mibs-downloader
    sudo download-mibs
    sudo sed -i 's/mibs :/# mibs :/g' /etc/snmp/snmp.conf

    Edit snmpd.conf file and add

    includeAllDisks 10% for all partitions and disks
  7. Start the service
  8. sudo service snmpd start
    
    # Or you may use these as well
    
    sudo systemctl restart snmpd
    sudo systemctl enable snmpd