Page 4 of 5

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 5:36 pm
by druid
There does now appear to be some service alerts. Nagios.log:

Code: Select all

[1444166797] Nagios 3.5.1 starting... (PID=995)
[1444166797] Local time is Tue Oct 06 16:26:37 CDT 2015
[1444166797] LOG VERSION: 2.0
[1444166797] Finished daemonizing... (New PID=1105)
[1444167232] Caught SIGTERM, shutting down...
[1444167232] Successfully shutdown... (PID=1105)
[1444167232] Nagios 3.5.1 starting... (PID=2112)
[1444167232] Local time is Tue Oct 06 16:33:52 CDT 2015
[1444167232] LOG VERSION: 2.0
[1444167232] Finished daemonizing... (New PID=2113)
[1444167312] SERVICE ALERT: localhost;HTTP;OK;HARD;4;HTTP OK: HTTP/1.1 200 OK - 353 bytes in 0.001 second response time
[1444167658] Caught SIGTERM, shutting down...
[1444167658] Successfully shutdown... (PID=2113)
[1444167658] Nagios 3.5.1 starting... (PID=2252)
[1444167658] Local time is Tue Oct 06 16:40:58 CDT 2015
[1444167658] LOG VERSION: 2.0
[1444167658] Finished daemonizing... (New PID=2253)
[1444167664] Caught SIGTERM, shutting down...
[1444167664] Successfully shutdown... (PID=2253)
[1444167681] Nagios 3.5.1 starting... (PID=898)
[1444167681] Local time is Tue Oct 06 16:41:21 CDT 2015
[1444167681] LOG VERSION: 2.0
[1444167681] Finished daemonizing... (New PID=1029)
[1444167911] SERVICE ALERT: localhost;HTTP;WARNING;SOFT;1;HTTP WARNING: HTTP/1.1 403 Forbidden - 5179 bytes in 0.009 second response time
[1444167971] SERVICE ALERT: localhost;HTTP;WARNING;SOFT;2;HTTP WARNING: HTTP/1.1 403 Forbidden - 5179 bytes in 0.001 second response time
[1444168031] SERVICE ALERT: localhost;HTTP;WARNING;SOFT;3;HTTP WARNING: HTTP/1.1 403 Forbidden - 5179 bytes in 0.001 second response time
[1444168091] SERVICE ALERT: localhost;HTTP;WARNING;HARD;4;HTTP WARNING: HTTP/1.1 403 Forbidden - 5179 bytes in 0.001 second response time
[1444168391] SERVICE ALERT: localhost;HTTP;OK;HARD;4;HTTP OK: HTTP/1.1 200 OK - 350 bytes in 0.001 second response time
[1444168748] Caught SIGTERM, shutting down...
[1444168748] Successfully shutdown... (PID=1029)
[1444168748] Nagios 3.5.1 starting... (PID=2196)
[1444168748] Local time is Tue Oct 06 16:59:08 CDT 2015
[1444168748] LOG VERSION: 2.0
[1444168749] Finished daemonizing... (New PID=2197)
[1444169951] Caught SIGTERM, shutting down...
[1444169951] Successfully shutdown... (PID=2197)
[1444169967] Nagios 3.5.1 starting... (PID=965)
[1444169967] Local time is Tue Oct 06 17:19:27 CDT 2015
[1444169967] LOG VERSION: 2.0
[1444169967] Finished daemonizing... (New PID=1176)
[1444170497] SERVICE ALERT: localhost;HTTP;WARNING;SOFT;1;HTTP WARNING: HTTP/1.1 403 Forbidden - 5179 bytes in 0.013 second response time
[1444170557] SERVICE ALERT: localhost;HTTP;WARNING;SOFT;2;HTTP WARNING: HTTP/1.1 403 Forbidden - 5179 bytes in 0.001 second response time
[1444170617] SERVICE ALERT: localhost;HTTP;OK;SOFT;3;HTTP OK: HTTP/1.1 200 OK - 338 bytes in 0.001 second response time

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 5:40 pm
by rhassing
Just some warnings about you http service. Thats why there were entries in your error.log file. Nagios was trying to go to the default webpage.
So now you created the index.html file the service check should be ok.

Could you post a screenshot of your nagios webpage to show us what goes wrong now?

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 5:47 pm
by druid
This is what I'm seeing on my homepage:
nagios1.PNG
If I click a link on the left side bar, say Technical Overview, I get this:
nagios2.PNG

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 5:54 pm
by rhassing
please provide the following:

Code: Select all

ps -ef | grep nagios
and

Code: Select all

nagios -v /usr/local/nagios/etc/nagios.conf

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 6:06 pm
by druid
ps -ef | grep nagios:

Code: Select all

nagios    1176     1  0 17:19 ?        00:00:00 /usr/sbin/nagios -d /etc/nagios/nagios.cfg
root      2317  1966  0 17:58 pts/0    00:00:00 grep --color=auto nagios
nagios -v /usr/local/nagios/etc/nagios.conf (this file doesn't exist, however there is a nagios.cfg file)

Code: Select all

Nagios Core 3.5.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-30-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Error: Cannot open main configuration file '/usr/local/nagios/etc/nagios.conf' for reading!
   Error processing main config file!



***> The name of the main configuration file looks suspicious...

     Make sure you are specifying the name of the MAIN configuration file on
     the command line and not the name of another configuration file.  The
     main configuration file is typically '/usr/local/nagios/etc/nagios.cfg'

***> 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 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.
Interesting that this is saying it's nagios core 3.5.1 when I downloaded nagios-4.1.1...

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 6:18 pm
by rhassing
please do:

Code: Select all

/usr/sbin/nagios -v /etc/nagios/nagios.cfg
and

Code: Select all

type nagios

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 6:23 pm
by rhassing
It looks like you have two installations mixed up.

Nagios 3.51 (probably package) and 4.1.1 (source?)

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 6:34 pm
by druid
/usr/sbin/nagios -v /etc/nagios/nagios.cfg

Code: Select all

Nagios Core 3.5.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-30-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config file '/etc/nagios/objects/commands.cfg'...
Processing object config file '/etc/nagios/objects/contacts.cfg'...
Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
Processing object config file '/etc/nagios/objects/templates.cfg'...
Processing object config file '/etc/nagios/objects/localhost.cfg'...
Processing object config directory '/etc/nagios/conf.d'...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
       Checked 8 services.
Checking hosts...
       Checked 1 hosts.
Checking host groups...
       Checked 1 host groups.
Checking service groups...
       Checked 0 service groups.
Checking contacts...
       Checked 1 contacts.
Checking contact groups...
       Checked 1 contact groups.
Checking service escalations...
       Checked 0 service escalations.
Checking service dependencies...
       Checked 0 service dependencies.
Checking host escalations...
       Checked 0 host escalations.
Checking host dependencies...
       Checked 0 host dependencies.
Checking commands...
       Checked 24 commands.
Checking time periods...
       Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
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

type nagios

Code: Select all

nagios is hashed (/usr/sbin/nagios)

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 6:37 pm
by rhassing

Code: Select all

ls -l /bin/nagios
and

Code: Select all

/bin/nagios -v /etc/nagios/nagios.conf

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 7:09 pm
by druid
/bin/nagios does not exist. Only thing close I see is /bin/nagiostats