Installing SNMP on the SOAR Platform

Use the net-snmp package to install the SNMP agent.

Before you start, make sure that the optional packages are downloaded as described in Installing optional packages for the SOAR Platform.

Complete the following steps to install SNMP.
  1. If not already done, install the net-snmp package:
    sudo yum --noplugins install -y net-snmp
  2. Create the /var/lib/net-snmp/snmpd.conf SNMP configuration file with the following contents.
    createUser res-snmp MD5 sample_password DES

    Continue to use res-snmp as the username, but replace sample_password with your chosen password. Make sure to note the username and password since the user details are obfuscated after the SNMP service is started. You must use the exact same username and password when you create the SNMP user on the monitoring server.

  3. Create the /usr/share/snmp/snmpd.local.conf file with the following contents:
    rouser res-snmp
    disk /
    disk /var/log
    disk /usr/share/co3
    If you want to generate alerts based on minimum space, you must add the percentage of minimum disk space. For example, if you want an alert if the disk space on these folders falls less than 10%, enter the following command:
    rouser res-snmp
    disk / 10%
    disk /var/log 10%
    disk /usr/share/co3 10%
  4. Enable SNMP so that it automatically starts when the SOAR Platform starts.
    sudo systemctl enable snmpd
  5. Start SNMP, as follows:
    sudo systemctl start snmpd
  6. Open SNMP port 161 for external monitoring.
    1. Create the /etc/firewalld/services/snmpd.xml file with the following contents. It adds a firewall service for SNMP.
      <?xml version="1.0" encoding="utf-8"?> 
      <service>
        <short>SNMPD</short>
        <description>SNMP daemon</description>
        <port protocol="udp" port="161"/>
      </service>
    2. Add the new service to the firewall as follows:
      sudo firewall-cmd --zone=public --add-service snmpd --permanent
    3. Reload the firewall, as follows:
      sudo firewall-cmd --reload