Hi Team,
Can you please check and help with this?
------------------------------------------------------------------------------------------------------------------------------------
service nagios status
Redirecting to /bin/systemctl status nagios.service
● nagios.service - Nagios Core 4.4.5
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2020-01-21 21:30:17 AEDT; 6h ago
Docs: https://www.nagios.org/documentation
Process: 10292 ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
Process: 10289 ExecStop=/bin/kill -s TERM ${MAINPID} (code=exited, status=0/SUCCESS)
Process: 12023 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 17617 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=1/FAILURE)
Main PID: 12025 (code=exited, status=0/SUCCESS)
Jan 21 21:30:17 $hostaddress nagios[17617]: Check your configuration file(s) to ensure that they contain valid
Jan 21 21:30:17 $hostaddress nagios[17617]: directives and data definitions. If you are upgrading from a previous
Jan 21 21:30:17 $hostaddress nagios[17617]: version of Nagios, you should be aware that some variables/definitions
Jan 21 21:30:17 $hostaddress nagios[17617]: may have been removed or modified in this version. Make sure to read
Jan 21 21:30:17 $hostaddress nagios[17617]: the HTML documentation regarding the config files, as well as the
Jan 21 21:30:17 $hostaddress nagios[17617]: 'Whats New' section to find out what has changed.
Jan 21 21:30:17 $hostaddress systemd[1]: nagios.service: control process exited, code=exited status=1
Jan 21 21:30:17 $hostaddress systemd[1]: Failed to start Nagios Core 4.4.5.
Jan 21 21:30:17 $hostaddress systemd[1]: Unit nagios.service entered failed state.
Jan 21 21:30:17 $hostaddress systemd[1]: nagios.service failed.
Failed to start Nagios Core 4.4.5.
-
RebeccaIlene
- Posts: 164
- Joined: Tue Apr 02, 2019 8:38 pm
Failed to start Nagios Core 4.4.5.
Last edited by RebeccaIlene on Thu Jan 23, 2020 8:24 pm, edited 1 time in total.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Failed to start Nagios Core 4.4.5.
Looks like you configuration cannot validate
Can you show the full output of the following?
Can you show the full output of the following?
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg-
RebeccaIlene
- Posts: 164
- Joined: Tue Apr 02, 2019 8:38 pm
Re: Failed to start Nagios Core 4.4.5.
[root@dc1uat382 hosts]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.4.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-08-20
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Invalid contact object directive 'hos'.
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 3147.
Error: Service notification period '24x7' specified for contact '[email protected]' is not defined anywhere!
Error: Could not register contact (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 16)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data definitions. 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.
Nagios Core 4.4.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-08-20
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Invalid contact object directive 'hos'.
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 3147.
Error: Service notification period '24x7' specified for contact '[email protected]' is not defined anywhere!
Error: Could not register contact (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 16)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data definitions. 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.
Last edited by RebeccaIlene on Thu Jan 23, 2020 8:25 pm, edited 1 time in total.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Failed to start Nagios Core 4.4.5.
So it looks like you have some invalid config options in your contact.cfg file
I have to is this an XI system? If so, did you Apply the configuration through the GUI?
I have to is this an XI system? If so, did you Apply the configuration through the GUI?
-
RebeccaIlene
- Posts: 164
- Joined: Tue Apr 02, 2019 8:38 pm
Re: Failed to start Nagios Core 4.4.5.
Yes, this is a XI system and we applied the configurations using GUI. However, there was a problem with the login and the team then ran the database repair to fix this. This caused issues with the configurations. The config files were not written properly to the server causing this issue. Also, because of this we are unable to login to GUI. Please suggest what we can do to fix this.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Failed to start Nagios Core 4.4.5.
I'm worried that something isn't fixed yet, can you try resetting the nagiosadmin password following this doc
https://support.nagios.com/kb/article.php?id=146
Once logged in you should be able to apply configuration again.
If that sill doesn't work, you may need to look into restoring a full backup
see page 12 here
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://support.nagios.com/kb/article.php?id=146
Once logged in you should be able to apply configuration again.
If that sill doesn't work, you may need to look into restoring a full backup
see page 12 here
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
-
RebeccaIlene
- Posts: 164
- Joined: Tue Apr 02, 2019 8:38 pm
Re: Failed to start Nagios Core 4.4.5.
Thanks for your help with this.
The disk was full on the server causing this issue.
The issue is fixed now. Please close this case.
The disk was full on the server causing this issue.
The issue is fixed now. Please close this case.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Failed to start Nagios Core 4.4.5.
Great!RebeccaIlene wrote:Thanks for your help with this.
The disk was full on the server causing this issue.
The issue is fixed now. Please close this case.
Locking thread