Can't restart nagios
Posted: Fri Mar 11, 2016 3:49 pm
I could use some help getting nagios to start on our Core 4.1.1 CentOS 7 vm. Below is what I can provide you now and more if needed. Thanks much for any help!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When I attempt to start nagios, using systemctl start nagios, I get the following:
[root:/usr/local/nagios/bin]$ systemctl start nagios
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details
When i do a systemctl status nagios -l, I get the following
[root:/usr/local/nagios/bin]$ systemctl status nagios -l
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios)
Active: failed (Result: exit-code) since Fri 2016-03-11 15:17:50 EST; 3min 8s ago
Docs: man:systemd-sysv-generator(8)
Process: 20940 ExecStop=/etc/rc.d/init.d/nagios stop (code=exited, status=0/SUCCESS)
Process: 21821 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=8)
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu nagios[21821]: Check your configuration file(s) to ensure that they contain valid
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu nagios[21821]: directives and data defintions. If you are upgrading from a previous
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu nagios[21821]: version of Nagios, you should be aware that some variables/definitions
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu nagios[21821]: may have been removed or modified in this version. Make sure to read
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu nagios[21821]: the HTML documentation regarding the config files, as well as the
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu nagios[21821]: 'Whats New' section to find out what has changed.
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu systemd[1]: nagios.service: control process exited, code=exited status=8
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu systemd[1]: Unit nagios.service entered failed state.
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu systemd[1]: nagios.service failed.
Below are the results of running /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Error: Service check command 'check_swap' specified in service 'Swap Usage' for host 'harveywptest' not defined anywhere!
Checked 368 services.
Checked 60 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 14 contacts.
Checked 9 contact groups.
Checked 29 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 60 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 1
***> One or more problems was encountered while running the pre-flight check...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
[root:/usr/local/nagios/bin]$ journalctl -xe
-- Unit session-1727.scope has begun starting up.
Mar 11 15:42:01 ccvwin-ccvit.ccv.edu CROND[21996]: (root) CMD (/usr/local/etc/logcheck/logcheck.sh)
Mar 11 15:42:01 ccvwin-ccvit.ccv.edu postfix/pickup[21547]: 7C3C6C082A55: uid=0 from=<root>
Mar 11 15:42:01 ccvwin-ccvit.ccv.edu postfix/cleanup[21993]: 7C3C6C082A55: message-id=<20160311204201.7C3C6C082A55
Mar 11 15:42:01 ccvwin-ccvit.ccv.edu postfix/qmgr[2033]: 7C3C6C082A55: from=<[email protected]>, size=841,
Mar 11 15:42:02 ccvwin-ccvit.ccv.edu postfix/smtp[21948]: 7C3C6C082A55: to=<[email protected]>, relay=fsl-fe
Mar 11 15:42:02 ccvwin-ccvit.ccv.edu postfix/qmgr[2033]: 7C3C6C082A55: removed
Mar 11 15:42:45 ccvwin-ccvit.ccv.edu postfix/smtpd[21986]: connect from andromeda.ccv.vsc.edu[155.42.51.13]
Mar 11 15:42:45 ccvwin-ccvit.ccv.edu postfix/smtpd[21986]: F18E3C082A55: client=andromeda.ccv.vsc.edu[155.42.51.13
Mar 11 15:42:45 ccvwin-ccvit.ccv.edu postfix/cleanup[21993]: F18E3C082A55: message-id=<1103198836.2003.14577289659
Mar 11 15:42:45 ccvwin-ccvit.ccv.edu postfix/qmgr[2033]: F18E3C082A55: from=<[email protected]>, size=1231, nrcpt=1
Mar 11 15:42:46 ccvwin-ccvit.ccv.edu postfix/smtp[21948]: F18E3C082A55: to=<[email protected]>, relay=fsl-fe1.v
Mar 11 15:42:46 ccvwin-ccvit.ccv.edu postfix/qmgr[2033]: F18E3C082A55: removed
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu systemd[1]: Started Session 1728 of user root.
-- Subject: Unit session-1728.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-1728.scope has finished starting up.
--
-- The start-up result is done.
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu systemd[1]: Starting Session 1728 of user root.
-- Subject: Unit session-1728.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-1728.scope has begun starting up.
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu CROND[22002]: (root) CMD (/usr/local/etc/logcheck/logcheck.sh)
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu postfix/pickup[21547]: 83210C082A55: uid=0 from=<root>
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu postfix/cleanup[21993]: 83210C082A55: message-id=<20160311204301.83210C082A55
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu postfix/qmgr[2033]: 83210C082A55: from=<[email protected]>, size=841,
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu postfix/smtp[21948]: 83210C082A55: to=<[email protected]>, relay=fsl-fe
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu postfix/qmgr[2033]: 83210C082A55: removed
Mar 11 15:44:00 ccvwin-ccvit.ccv.edu postfix/smtpd[21986]: disconnect from andromeda.ccv.vsc.edu[155.42.51.13]
Mar 11 15:44:01 ccvwin-ccvit.ccv.edu systemd[1]: Started Session 1729 of user root.
-- Subject: Unit session-1729.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-1729.scope has finished starting up.
--
-- The start-up result is done.
Mar 11 15:44:01 ccvwin-ccvit.ccv.edu systemd[1]: Starting Session 1729 of user root.
-- Subject: Unit session-1729.scope has begun start-up
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When I attempt to start nagios, using systemctl start nagios, I get the following:
[root:/usr/local/nagios/bin]$ systemctl start nagios
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details
When i do a systemctl status nagios -l, I get the following
[root:/usr/local/nagios/bin]$ systemctl status nagios -l
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios)
Active: failed (Result: exit-code) since Fri 2016-03-11 15:17:50 EST; 3min 8s ago
Docs: man:systemd-sysv-generator(8)
Process: 20940 ExecStop=/etc/rc.d/init.d/nagios stop (code=exited, status=0/SUCCESS)
Process: 21821 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=8)
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu nagios[21821]: Check your configuration file(s) to ensure that they contain valid
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu nagios[21821]: directives and data defintions. If you are upgrading from a previous
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu nagios[21821]: version of Nagios, you should be aware that some variables/definitions
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu nagios[21821]: may have been removed or modified in this version. Make sure to read
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu nagios[21821]: the HTML documentation regarding the config files, as well as the
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu nagios[21821]: 'Whats New' section to find out what has changed.
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu systemd[1]: nagios.service: control process exited, code=exited status=8
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu systemd[1]: Unit nagios.service entered failed state.
Mar 11 15:17:50 ccvwin-ccvit.ccv.edu systemd[1]: nagios.service failed.
Below are the results of running /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Error: Service check command 'check_swap' specified in service 'Swap Usage' for host 'harveywptest' not defined anywhere!
Checked 368 services.
Checked 60 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 14 contacts.
Checked 9 contact groups.
Checked 29 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 60 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 1
***> One or more problems was encountered while running the pre-flight check...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
[root:/usr/local/nagios/bin]$ journalctl -xe
-- Unit session-1727.scope has begun starting up.
Mar 11 15:42:01 ccvwin-ccvit.ccv.edu CROND[21996]: (root) CMD (/usr/local/etc/logcheck/logcheck.sh)
Mar 11 15:42:01 ccvwin-ccvit.ccv.edu postfix/pickup[21547]: 7C3C6C082A55: uid=0 from=<root>
Mar 11 15:42:01 ccvwin-ccvit.ccv.edu postfix/cleanup[21993]: 7C3C6C082A55: message-id=<20160311204201.7C3C6C082A55
Mar 11 15:42:01 ccvwin-ccvit.ccv.edu postfix/qmgr[2033]: 7C3C6C082A55: from=<[email protected]>, size=841,
Mar 11 15:42:02 ccvwin-ccvit.ccv.edu postfix/smtp[21948]: 7C3C6C082A55: to=<[email protected]>, relay=fsl-fe
Mar 11 15:42:02 ccvwin-ccvit.ccv.edu postfix/qmgr[2033]: 7C3C6C082A55: removed
Mar 11 15:42:45 ccvwin-ccvit.ccv.edu postfix/smtpd[21986]: connect from andromeda.ccv.vsc.edu[155.42.51.13]
Mar 11 15:42:45 ccvwin-ccvit.ccv.edu postfix/smtpd[21986]: F18E3C082A55: client=andromeda.ccv.vsc.edu[155.42.51.13
Mar 11 15:42:45 ccvwin-ccvit.ccv.edu postfix/cleanup[21993]: F18E3C082A55: message-id=<1103198836.2003.14577289659
Mar 11 15:42:45 ccvwin-ccvit.ccv.edu postfix/qmgr[2033]: F18E3C082A55: from=<[email protected]>, size=1231, nrcpt=1
Mar 11 15:42:46 ccvwin-ccvit.ccv.edu postfix/smtp[21948]: F18E3C082A55: to=<[email protected]>, relay=fsl-fe1.v
Mar 11 15:42:46 ccvwin-ccvit.ccv.edu postfix/qmgr[2033]: F18E3C082A55: removed
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu systemd[1]: Started Session 1728 of user root.
-- Subject: Unit session-1728.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-1728.scope has finished starting up.
--
-- The start-up result is done.
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu systemd[1]: Starting Session 1728 of user root.
-- Subject: Unit session-1728.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-1728.scope has begun starting up.
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu CROND[22002]: (root) CMD (/usr/local/etc/logcheck/logcheck.sh)
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu postfix/pickup[21547]: 83210C082A55: uid=0 from=<root>
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu postfix/cleanup[21993]: 83210C082A55: message-id=<20160311204301.83210C082A55
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu postfix/qmgr[2033]: 83210C082A55: from=<[email protected]>, size=841,
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu postfix/smtp[21948]: 83210C082A55: to=<[email protected]>, relay=fsl-fe
Mar 11 15:43:01 ccvwin-ccvit.ccv.edu postfix/qmgr[2033]: 83210C082A55: removed
Mar 11 15:44:00 ccvwin-ccvit.ccv.edu postfix/smtpd[21986]: disconnect from andromeda.ccv.vsc.edu[155.42.51.13]
Mar 11 15:44:01 ccvwin-ccvit.ccv.edu systemd[1]: Started Session 1729 of user root.
-- Subject: Unit session-1729.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-1729.scope has finished starting up.
--
-- The start-up result is done.
Mar 11 15:44:01 ccvwin-ccvit.ccv.edu systemd[1]: Starting Session 1729 of user root.
-- Subject: Unit session-1729.scope has begun start-up