Nagios 4 : Set Thresholds2026/03/27 |
|
This is the Threshold settings section. |
|
| [1] | The thresholds are set in configuration file by default. For example, the item for monitoring disk usage of root partition is set like follows. |
|
[root@dlp ~]#
vi /etc/nagios/objects/localhost.cfg ..... ..... # Define a service to check the disk space of the root partition # on the local machine. Warning if < 20% free, critical if # < 10% free space on partition. # the thresholds are set as Warning if > 20% free, critical if 10% > 10% free # change these values if you'd like to change them
define service {
use local-service ; Name of service template to use
host_name localhost
service_description Root Partition
check_command check_local_disk!20%!10%!/
}
.....
.....
[root@dlp ~]# systemctl reload nagios |
| [2] | If you want to configure the new threshold setting, the process would be as follows. |
|
[root@dlp ~]#
vi /etc/nagios/objects/localhost.cfg # add to last line # for example, if the free space on the /run partition falls below 20%, # it will be marked as Warning, and if it falls below 10%, it will be marked as Critical define service{ use local-service host_name localhost service_description RUN Partition check_command check_local_disk!20%!10%!/run }[root@dlp ~]# systemctl reload nagios
|
| [3] | If the threshold is exceeded, an alert will be generated. |
|
| Sponsored Link |
|
|