Nagios Thresholds Configuration: A Complete Guide
Nagios thresholds are essential for effective system monitoring. By setting thresholds for metrics like disk usage and NTP time, you can receive alerts when your system starts to experience issues. Proper configuration of Nagios thresholds helps you prevent system failures before they happen, ensuring that your infrastructure remains stable and operational.

Understanding Nagios Thresholds
Nagios thresholds are predefined limits that trigger alerts based on system conditions. When a monitored metric crosses a threshold, Nagios will send a warning or critical alert depending on how the value compares to the predefined limit. These thresholds are vital for proactive monitoring and quick response to potential issues.
Configuring Nagios Thresholds for Disk Usage
Monitoring disk space is one of the most common uses for Nagios thresholds. Here’s how to configure Nagios to alert you when disk space on a server is low:
- Edit the Configuration File:
Start by editing thelocalhost.cfgfile to define the disk usage service:# vi /etc/nagios/objects/localhost.cfg - Define the Disk Usage Service:
Set the warning threshold at 20% free space and the critical threshold at 10% free space:define service{ use local-service host_name localhost service_description Root Partition check_command check_local_disk!20%!10%!/ } - Reload Nagios:
After modifying the configuration, reload Nagios to apply the new settings:# /etc/rc.d/init.d/nagios reload
By doing this, Nagios will monitor your disk space and send alerts when it crosses the specified thresholds.
Configuring Nagios Thresholds for NTP Time
In addition to monitoring disk space, you can also configure thresholds for monitoring NTP time. This is particularly useful for ensuring that your servers are synchronized with the correct time. Here’s how to configure Nagios to monitor NTP time:
- Check the Plugin’s Command Options:
First, examine the command-line options for thecheck_ntp_timeplugin:# /usr/lib64/nagios/plugins/check_ntp_time -h - Define the Command:
Add the following entry to thecommands.cfgfile to define the NTP time check:# vi /etc/nagios/objects/commands.cfg define command{ command_name check_ntp_time command_line $USER1$/check_ntp_time -H $ARG1$ -w $ARG2$ -c $ARG3$ } - Configure the NTP Time Service:
Now, add the NTP time service configuration inlocalhost.cfg:# vi /etc/nagios/objects/localhost.cfg define service{ use local-service host_name localhost service_description NTP_TIME check_command check_ntp_time!ntp1.jst.mfeed.ad.jp!1!2 notifications_enabled 1 }
With this configuration, Nagios will monitor NTP time and alert you if the time difference exceeds the defined thresholds.
The Importance of Thresholds for Proactive Monitoring
By configuring Nagios thresholds correctly, you ensure that your monitoring system can alert you to potential issues before they become critical. Setting up thresholds for key metrics like disk usage, NTP time, and more allows you to address problems early and avoid costly downtime.
ZippyOPS provides expert consulting and managed services in areas like DevOps, Cloud, AIOps, and more. Their solutions help you optimize your system’s performance, including advanced threshold configurations for monitoring critical infrastructure. Visit ZippyOPS Services to learn more about how they can enhance your monitoring strategy.
Conclusion
Nagios thresholds are a powerful tool for proactive system monitoring. Proper configuration helps you stay on top of system performance, reducing the risk of unexpected issues. Whether you’re monitoring disk usage or NTP time, setting the right thresholds ensures your infrastructure remains healthy and operational. If you need assistance with advanced Nagios configurations or ongoing monitoring, reach out to ZippyOPS at sales@zippyops.com.



