FortiSIEM
FortiSIEM provides Security Information and Event Management (SIEM) and User and Entity Behavior Analytics (UEBA)
mbenvenuti
Staff
Staff
Article Id 314841
Description This article describes how to monitor a Linux machine with SNMPv2.
Scope FortiSIEM.
Solution

The next steps show how to configure the monitoring on a Linux device with SNMPv2.

The following configuration is basic and has to be customized to the needs.

 

  1. Make sure that SNMP packages are installed.

From Red-hat Linux-based machines as root:

yum install -y net-snmp net-snmp-libs net-snmp-utils

From Debian Linux based machines as root:

apt-get install snmpd snmp

 

  1. Make a copy of the default configuration.

cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak

  1. Create a specific SNMP configuration.

The suggested configuration is basic but can obviously be customized, change 'myCommunity' with the desired community name.

echo 'com2sec allConfig default myCommunity' > /etc/snmp/snmpd.conf
echo 'group allConfigGroup v2c allConfig' >> /etc/snmp/snmpd.conf
echo 'view allView included .1' >> /etc/snmp/snmpd.conf
echo 'access allConfigGroup "" any noauth exact allView none none' >> /etc/snmp/snmpd.conf

 

  1. Activate snmpd service.

systemctl restart snmpd
systemctl enable snmpd

  1. Check snmpd service.

Now it is possible to check that snmpd is running properly and retrieve some data:

  • For memory info :

    snmpwalk -v 2c -c myCommunity -O e localhost UCD-SNMP-MIB::memory

  • For CPU info:

    snmpwalk -v 2c -c myCommunity -O e localhost UCD-SNMP-MIB::systemStats

 

  1. Monitor the node.

Run the discovery on the node.

  • Go to Admin -> Setup -> Credentials -> 'Step 1: Enter Credentials' -> New and set Access Protocol: SNMP and previous community name chosen then save.

  • Then associate the IP in 'Step 2: Enter IP Range to Credential Associations'.

  • Create a new entry at Admin -> Setup -> Discovery and run the discovery.

  • Finally, in Admin -> Setup -> Monitoring Performance, it is possible to edit the desired type of information to monitor.

    2024_05_15_09_14_33_Window.png

    2024_05_15_09_14_33_Window.png

     

     

  • Tip: To see the events collected, it is possible to run a query in analytics with filter 'Event Type' containing PH_DEV_MON and reporting ip = ip_of_your_machine.