I am new to the Nagios tool. Having Nagios core(v4.4.3) along with NRPE(v3.4.1).
I would like to monitor the check_disk plugin of host machine in the Nagios server, but it is giving error. Below is the configuration added in the host-file.
Code: Select all
define service {
host_name system005
service_description Check Disk
check_command check_disk
max_check_attempts 2
check_interval 2
retry_interval 2
check_period 24x7
check_freshness 1
notification_interval 2
notification_period 24x7
notifications_enabled 1
register 1
}Code: Select all
user01@server001:/usr/local/nagios/etc$ sudo service nagios restart
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.Code: Select all
● nagios.service - Nagios Core 4.4.3
Loaded: loaded (/lib/systemd/system/nagios.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-02-05 16:59:32 IST; 20s ago
Docs: https://www.nagios.org/documentation
Process: 17093 ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
Process: 17088 ExecStop=/bin/kill -s TERM ${MAINPID} (code=exited, status=0/SUCCESS)
Process: 24921 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 17097 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=1/FAILURE)
Main PID: 24923 (code=exited, status=0/SUCCESS)
Feb 05 16:59:32 server001 nagios[17097]: Check your configuration file(s) to ensure that they contain valid
Feb 05 16:59:32 server001 nagios[17097]: directives and data definitions. If you are upgrading from a previous
Feb 05 16:59:32 server001 nagios[17097]: version of Nagios, you should be aware that some variables/definitions
Feb 05 16:59:32 server001 nagios[17097]: may have been removed or modified in this version. Make sure to read
Feb 05 16:59:32 server001 nagios[17097]: the HTML documentation regarding the config files, as well as the
Feb 05 16:59:32 server001 nagios[17097]: 'Whats New' section to find out what has changed.
Feb 05 16:59:32 server001 systemd[1]: nagios.service: Control process exited, code=exited status=1
Feb 05 16:59:32 server001 systemd[1]: Failed to start Nagios Core 4.4.3.
Feb 05 16:59:32 server001 systemd[1]: nagios.service: Unit entered failed state.
Feb 05 16:59:32 server001 systemd[1]: nagios.service: Failed with result 'exit-code'.Thank you in advanced.
Regards,
Kaushik Karan