Where are the hosts gone


#1

After lots of trying I managed to setup nagios.
Most manuals I read manage to monitor more than 1 server. I am trying too.
I defined two hosts in loacalhost.cfg like this:

define host(
use linux-server
host_name localhost
alias vmware
address 192.168.0.250
}

And did exactly the same for server noirix at 192.168.0.6
The only service I activated is PING.
Nagios is installed on FC4 running on vmware on Ubuntu Edgy.
Noirix is FC3.
Both localhost and noirix can be pinged from command line.
Nagios -v /usr/local/nagios/etc/nagios.cfg gives me no troubles
Nagios -d starts the daemon.

No problem so far, but when starting the web interface I only see one server (localhost).
Noirix has disapeared in all off the screens, except when I look at Configuration / View Config / Hosts I see them both.
What have I configured wrong or doing wrong? Is there anyone who can give me a clue?

Thanks,

Franklin


#2

Dont start nagios like that. Kill all nagios procs and start it up via init.d
/etc/rc.d/init.d/nagios start


#3

Thanks for answering so quick.
Tried nagios daemon to start with /etc/rc.d/initd/nagios start and this went good.
But… the problem still remains. Localhost can be seen, no problem, other hosts on my LAN do’nt show.
But they do in Configuration / View Config / Hosts.
Do you have more solutions?


#4

Just a bit trying…
I am able now to add hosts.
This was because the chown of the files in libexec were all root:root.
When I changed them to nagios:nagios this went better.
Will I ever learn…:wink:
Many other things are not working still but this problem seems to be solved.
Thanks again for answering.
I think I will be back (and I am not even close to being governor of California…)


#5

I’m having the same issue and double checked ownership in /libexec program is ran via /etc/initd/nagios

Some hosts are showing up and some are not in hosts details. Also, under the Tac overview, only 2-3 hosts are showing up intermidiately (sp).then from time to time I get the dreaded “It appears as though you do not have permission to view information for any of the hosts you requested… If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI and check the authorization options in your CGI configuration file.”

I’ve double checked my httpd.conf file and have a valid .htaccess. Also, I changed cgi.cfg authentication to 0 from 1. I want to go back to 1 on cgi.cfg and for all my hosts to report in and stay active on the screen. Any suggestions?


#6

In relation to the same question thought this was interesting. Ran the command within 30 seconds of each other. Why am I getting a report of different hosts / service numbers?

Nagios Stats 2.7
Copyright © 2003-2007 Ethan Galstad (www.nagios.org)
Last Modified: 01-19-2007
License: GPL

CURRENT STATUS DATA

Status File: /usr/local/nagios/var/status.dat
Status File Age: 0d 0h 0m 0s
Status File Version: 2.7

Program Running Time: 0d 1h 47m 45s
Nagios PID: 4311
Used/High/Total Command Buffers: 0 / 0 / 4096
Used/High/Total Check Result Buffers: 0 / 2 / 4096

Total Services: 9
Services Checked: 9
Services Scheduled: 9
Active Service Checks: 9
Passive Service Checks: 0
Total Service State Change: 0.000 / 13.360 / 1.484 %
Active Service Latency: 0.006 / 0.227 / 0.114 sec
Active Service Execution Time: 0.029 / 5.440 / 2.548 sec
Active Service State Change: 0.000 / 13.360 / 1.484 %
Active Services Last 1/5/15/60 min: 1 / 9 / 9 / 9
Passive Service State Change: 0.000 / 0.000 / 0.000 %
Passive Services Last 1/5/15/60 min: 0 / 0 / 0 / 0
Services Ok/Warn/Unk/Crit: 9 / 0 / 0 / 0
Services Flapping: 0
Services In Downtime: 0

Total Hosts: 5
Hosts Checked: 5
Hosts Scheduled: 0
Active Host Checks: 5
Passive Host Checks: 0
Total Host State Change: 0.000 / 0.000 / 0.000 %
Active Host Latency: 0.000 / 0.000 / 0.000 sec
Active Host Execution Time: 0.028 / 2.679 / 0.670 sec
Active Host State Change: 0.000 / 0.000 / 0.000 %
Active Hosts Last 1/5/15/60 min: 0 / 0 / 1 / 2
Passive Host State Change: 0.000 / 0.000 / 0.000 %
Passive Hosts Last 1/5/15/60 min: 0 / 0 / 0 / 0
Hosts Up/Down/Unreach: 5 / 0 / 0
Hosts Flapping: 0
Hosts In Downtime: 0

[root@ektor bin]# ./nagiostats

Nagios Stats 2.7
Copyright © 2003-2007 Ethan Galstad (www.nagios.org)
Last Modified: 01-19-2007
License: GPL

CURRENT STATUS DATA

Status File: /usr/local/nagios/var/status.dat
Status File Age: 0d 0h 0m 0s
Status File Version: 2.7

Program Running Time: 0d 20h 33m 30s
Nagios PID: 15247
Used/High/Total Command Buffers: 0 / 0 / 4096
Used/High/Total Check Result Buffers: 0 / 2 / 4096

Total Services: 7
Services Checked: 7
Services Scheduled: 7
Active Service Checks: 7
Passive Service Checks: 0
Total Service State Change: 0.000 / 17.500 / 2.500 %
Active Service Latency: 0.034 / 0.240 / 0.127 sec
Active Service Execution Time: 0.022 / 4.316 / 2.068 sec
Active Service State Change: 0.000 / 17.500 / 2.500 %
Active Services Last 1/5/15/60 min: 2 / 7 / 7 / 7
Passive Service State Change: 0.000 / 0.000 / 0.000 %
Passive Services Last 1/5/15/60 min: 0 / 0 / 0 / 0
Services Ok/Warn/Unk/Crit: 7 / 0 / 0 / 0
Services Flapping: 0
Services In Downtime: 0

Total Hosts: 3
Hosts Checked: 3
Hosts Scheduled: 0
Active Host Checks: 3
Passive Host Checks: 0
Total Host State Change: 0.000 / 0.000 / 0.000 %
Active Host Latency: 0.000 / 0.000 / 0.000 sec
Active Host Execution Time: 0.028 / 0.163 / 0.081 sec
Active Host State Change: 0.000 / 0.000 / 0.000 %
Active Hosts Last 1/5/15/60 min: 0 / 0 / 1 / 1
Passive Host State Change: 0.000 / 0.000 / 0.000 %
Passive Hosts Last 1/5/15/60 min: 0 / 0 / 0 / 0
Hosts Up/Down/Unreach: 3 / 0 / 0
Hosts Flapping: 0
Hosts In Downtime: 0


#7

Figured out my problem and jakkedup had answered the issue without me even knowing it. I had nagios running several times due to my stupidity. I stopped all processes and just ran via /etc/rc.d/init.d/nagios restart this created the only copy running and runs just like it should. Now on to the configuring / fine tuning.