Linux command
nagios 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Verify configuration
nagios -v [/etc/nagios/nagios.cfg]
Start Nagios daemon
nagios -d [/etc/nagios/nagios.cfg]
Run in foreground
nagios [/etc/nagios/nagios.cfg]
Show version
nagios --version
Test scheduling
nagios -s [/etc/nagios/nagios.cfg]
说明
nagios is an infrastructure monitoring system that tracks hosts, services, and network devices. It alerts administrators when problems occur and when they're resolved. Configuration defines hosts, services, and check commands. Plugins execute checks and return status codes: OK, WARNING, CRITICAL, or UNKNOWN. Notifications alert contacts through email, SMS, or custom methods. The web interface displays current status, trends, and reports. It shows which services are up, which are down, and acknowledgements for known issues. Active checks run on schedule. Passive checks receive results from external sources. Both integrate into the same status view. Escalations route alerts to different people based on problem duration. Dependencies prevent notification storms when parent systems fail. Performance data from checks can feed graphing tools like PNP4Nagios or Grafana for historical trending.
参数
- -v
- Verify configuration file.
- -d
- Run as daemon.
- -s
- Show scheduling information.
- -p _FILE_
- Specify precached objects file.
- -u _FILE_
- Specify precached macros file.
- -x _FILE_
- Dump objects to file.
- --help
- Display help.
- --version
- Show version.
FAQ
What is the nagios command used for?
nagios is an infrastructure monitoring system that tracks hosts, services, and network devices. It alerts administrators when problems occur and when they're resolved. Configuration defines hosts, services, and check commands. Plugins execute checks and return status codes: OK, WARNING, CRITICAL, or UNKNOWN. Notifications alert contacts through email, SMS, or custom methods. The web interface displays current status, trends, and reports. It shows which services are up, which are down, and acknowledgements for known issues. Active checks run on schedule. Passive checks receive results from external sources. Both integrate into the same status view. Escalations route alerts to different people based on problem duration. Dependencies prevent notification storms when parent systems fail. Performance data from checks can feed graphing tools like PNP4Nagios or Grafana for historical trending.
How do I run a basic nagios example?
Run `nagios -v [/etc/nagios/nagios.cfg]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -v do in nagios?
Verify configuration file.