Update to 4.0.0

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Update to 4.0.0

Post by MPIvan »

Hi all

I just update the new version ... and i did by the book .... configure make make install .... and it was ok ... i can see every host, services and etc. ... after i chenge something in the main page ( add the logo of my company next to Nagios logo just to make i good :))) ) and i restart the nagios as /etc/init.d/nagios restart and when i refresh the page the first page was ok but when i go to host group or services or other places i have got this error ... also i notes that when i do restart the nagios i have the following ....
root@mpnagios:/usr/local/nagios/var# /etc/init.d/nagios restart
Running configuration check...done.
Stopping nagios: /etc/init.d/nagios: 72: kill: No such process

done.
Starting nagios:No directory, logging in with HOME=/
done.
root@mpnagios:/usr/local/nagios/var#


and this is the error on the page when i go to hosts
Whoops!

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:

Check the Nagios log file for messages relating to startup or status data errors.
Always verify configuration options using the -v command-line option before starting or restarting Nagios!
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.
also i have the following when i check the configuration of my files ..... -v command
root@mpnagios:/usr/local/nagios/var# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.0.0
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-20-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Warning: use_embedded_perl_implicitly is deprecated and will be removed.
Warning: enable_embedded_perl is deprecated and will be removed.
Warning: p1_file is deprecated and will be removed.
Warning: sleep_time is deprecated and will be removed.
Warning: external_command_buffer_slots is deprecated and will be removed. All commands are always processed upon arrival
Warning: command_check_interval is deprecated and will be removed. Commands are always handled on arrival
Read main config file okay...
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/templates.cfg', starting at line 50)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/templates.cfg', starting at line 280)
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 1008 services.
Checked 156 hosts.
Checked 11 host groups.
Checked 1 service groups.
Checked 12 contacts.
Checked 2 contact groups.
Checked 29 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 156 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: 0

Things look okay - No serious problems were detected during the pre-flight check
root@mpnagios:/usr/local/nagios/var#


so what is the problem here ?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Update to 4.0.0

Post by slansing »

Is nagios running?:

Code: Select all

/etc/init.d/nagios status
What distro is this on?

If it is, or is not, please grab your nagios.log and PM it to myself or another tech.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: Update to 4.0.0

Post by MPIvan »

Iv send you a private message and here is what iv got when im trying to restart ....
root@mpnagios:~# /etc/init.d/nagios restart
Running configuration check...done.
Stopping nagios: No lock file found in /usr/local/nagios/var/nagios.lock
Starting nagios:No directory, logging in with HOME=/
done.
root@mpnagios:~# /etc/init.d/nagios restart
Running configuration check...done.
Stopping nagios: /etc/init.d/nagios: 72: kill: No such process

done.
Starting nagios:No directory, logging in with HOME=/
done.
root@mpnagios:~#
root@mpnagios:~# ps aux | grep nagios
nagios 1115 0.0 0.0 25428 1140 ? Ss Sep23 0:07 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
root 7327 0.0 0.0 8104 924 pts/0 S+ 14:14 0:00 grep --color=auto nagios
root@mpnagios:~#
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Update to 4.0.0

Post by slansing »

To clear up this error with a little Google-Fu, take a read into this article:

http://hyper-choi.blogspot.com/2013/08/ ... iosno.html
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: Update to 4.0.0

Post by MPIvan »

After reading the Google-Fu article i still got this error:
root@mpnagios:~# service nagios restart
Running configuration check...done.
Stopping nagios: /etc/init.d/nagios: 72: kill: No such process

done.
Starting nagios: done.
root@mpnagios:~#
and still got the error on the nagios page when i go to host or services or other places ..
Whoops!

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:

Check the Nagios log file for messages relating to startup or status data errors.
Always verify configuration options using the -v command-line option before starting or restarting Nagios!
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.
Also i try upgrading again, and i notes this in make all part when i execute:
config.c:855:13: warning: ignoring return value of Б-?asprintfБ-?, declared with attribute warn_unused_result [-Wunused-result]
config.c:866:13: warning: ignoring return value of Б-?asprintfБ-?, declared with attribute warn_unused_result [-Wunused-result]
config.c:878:13: warning: ignoring return value of Б-?asprintfБ-?, declared with attribute warn_unused_result [-Wunused-result]
config.c:888:13: warning: ignoring return value of Б-?asprintfБ-?, declared with attribute warn_unused_result [-Wunused-result]
config.c:896:13: warning: ignoring return value of Б-?asprintfБ-?, declared with attribute warn_unused_result [-Wunused-result]
config.c:908:13: warning: ignoring return value of Б-?asprintfБ-?, declared with attribute warn_unused_result [-Wunused-result]
config.c:918:13: warning: ignoring return value of Б-?asprintfБ-?, declared with attribute warn_unused_result [-Wunused-result]
config.c:928:13: warning: ignoring return value of Б-?asprintfБ-?, declared with attribute warn_unused_result [-Wunused-result]
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Update to 4.0.0

Post by abrist »

MPIvan - what distro are you running?
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.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: Update to 4.0.0

Post by MPIvan »

abrist, im running Nagios on Ubuntu Server 12.04 ...
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Update to 4.0.0

Post by abrist »

There have been reported issues with core 4, ubuntu/debian, and the init scripts. Kill all nagios porcesses and try running nagios indaemon mode from the cli (outside of the init system):

Code: Select all

service nagios stop 
killall -9 nagios
/usr/local/nagios/bin/nagios -d / usr/local/nagios/etc/nagios.cfg
Now try the web frontend again . . .
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.
Locked