For snmp. conf, It is a configuration file. In the description of the SNMP protocol, we also have some simple knowledge. Here we will perform a specific analysis on this content. Let's see how to create this file.
Create an snmp. conf configuration file
All cluster nodes use the same snmp. conf configuration file. You can enter the following content in/etc/snmp. conf to create it:
Syslocation "Room 133" [1] syscontact alert@domain.com Community [2] rwcommunity private community [3] rocommunity public community [4] authtrapenable 1 Community [5] trapcommunity trapServ Community [6] trapsink localhost category [7] trap2sink localhost category [8] disk/100000 category [9] disk/var 100000 category [9]
[1] → reference string.
[2] → who is responsible for this system?
[3] → the community name is a real password.
[4] → password for read-only information.
[5] → report SNMP authentication failure.
[6] → password used to send a trap.
[7] → SNMP Trap sending destination.
[8] → SNMP v2 trap.
[9] → disk partition and minimum free space.
Note: If you already have a/etc/snmp. conf configuration file, you can back it up and remove all the content except the content listed here.
In this file, the Community read-write name and read-only name rwcommunity and rcommunity are actually "passwords" used to access and write snmp mib information. Do not use these regular names, unless your system is behind the firewall.
The last two lines tell SNMP that an alarm is sent when the disk partition/AND/var have less than MB of space.