CentOS errors
Re: CentOS errors
It's been my experience that it's best to avoid trying to make a distinction between configuration errors and warnings. I have 1,500 hosts and 14,000 service checks, so a clean preflight is essential for every change I make.
Re: CentOS errors
Wise words. The line between warning and error is thin.cbeattie wrote:It's been my experience that it's best to avoid trying to make a distinction between configuration errors and warnings. I have 1,500 hosts and 14,000 service checks, so a clean preflight is essential for every change I make.
MPIvan, is everything working fine now that you fixed the warning?
Former Nagios employee
Re: CentOS errors
Hi,
Yes it is all aright ... but warning is still different from error ... and i dont know way this is happening ..
Yes it is all aright ... but warning is still different from error ... and i dont know way this is happening ..
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: CentOS errors
Warnings are simply letting you know that something non crucial to the reading and writing of your configuration file "or use of it for monitoring" is not present or is incorrectly defined.
Re: CentOS errors
OK we know what warning is ... as I say and you it is not crucial. When i using Nagios on Ubuntu, when i have warnings (no errors) i can still run, or i can still restart the nagios and nagios working just fine with this warnings, even there is warnings it still running. Now im using Nagios on CentOS and if i have one warnings, for example about contact not defined in one of the Host ... nagios cant start or restart ...
Re: CentOS errors
Warnings will not cause nagios to not restart. Can you post the full output of the verification?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: CentOS errors
That is the problem, here i turn off/i comment the "contact" in one of the routers hosts ...
here is the configuration of the router
And here is what iv got when i try to restart the nagios service
The thing here is that nagios wont stop and if i force to stop i canot start again till i fix the warnings
here is the configuration of the router
here is the verification ...define host{
use zgrada-rt
host_name RouterCiscoT
alias Test Cisco SNMP
address 172.25.0.55
_SNMPCOMMUNITY TestCisco
# contacts Ivan
}
Code: Select all
[root@mpnagios objects]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.0.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-15-2013
License: GPL
Website: http://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...
Checked 932 services.
Warning: Host 'RouterCiscoT' has no default contacts or contactgroups defined!
Checked 138 hosts.
Checked 3 host groups.
Checked 0 service groups.
Checked 12 contacts.
Checked 1 contact groups.
Checked 26 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 138 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: 1
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
[root@mpnagios objects]#
Code: Select all
[root@mpnagios objects]# /etc/init.d/nagios restart
Nagios Core 4.0.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-15-2013
License: GPL
Website: http://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...
Checked 932 services.
Warning: Host 'RouterCiscoT' has no default contacts or contactgroups defined!
Checked 138 hosts.
Checked 3 host groups.
Checked 0 service groups.
Checked 12 contacts.
Checked 1 contact groups.
Checked 26 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 138 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: 1
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
Object precache file created:
/usr/local/nagios/var/objects.precache
[root@mpnagios objects]#
Re: CentOS errors
Have you modified the "/etc/init.d/nagios"? Please, post it for a review. Are you using a precache file?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: CentOS errors
No i have not modified ... here it is
- Attachments
-
nagios.txt- Nagios init file
- (3.2 KiB) Downloaded 302 times
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: CentOS errors
That init script is definitely not something that would seem standard for a nagios install. Specifically looking, if any warning or errors are found when checking the configuration it immediately exits. On a standard init, this would proceed through fine. Try using the attached init instead and see how it works for you, or just altering line 54 to look like this:
This will avoid exiting on warnings, and only exit on error when checking the configs.
Code: Select all
if test "${ERR}" = "0"; then- Attachments
-
nagios.txt- (3.18 KiB) Downloaded 279 times
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.