Host Detail not showing Hosts in XI 2.1

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
dworthcsl
Posts: 95
Joined: Wed Jan 11, 2012 4:00 pm

Host Detail not showing Hosts in XI 2.1

Post by dworthcsl »

Hi,

I just completed a full install of XI 2.1 on a fresh RHEL 6.2 server, 64bit. I am configuring XI through the the advance core config. I have been using nagios core for years, so I am very familiar with how all of the configurations interact. My user accounts has been set up as an admin user with the ability to see all hosts and services. As the nagios admin account as well as my account I can not even see the the localhost, i.e. the auto configured server that nagios is running on. Is there something that I am missing? Is there an easy way to debug XI?

I am not sure where to go next before manually editing the config files to try to trace through the issue. Any help would be appreciated,

Thanks,
David
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Host Detail not showing Hosts in XI 2.1

Post by mguthrie »

Can you access the host details page while running:

Code: Select all

tail -f /var/log/httpd/error_log
And see if you get any clues from apache log?
dworthcsl
Posts: 95
Joined: Wed Jan 11, 2012 4:00 pm

Re: Host Detail not showing Hosts in XI 2.1

Post by dworthcsl »

Hi,

I am seeing a lot of errors regarding to timezone not being set correctly. I ran the system-config-date and it is set to New York and we are also connecting to an ntp server for time sync. I am not sure if there is somewhere with in XI that needs to be set or if this is even the cause. Here are the logs I caught.

Code: Select all


[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utilsl.inc.php on line 657, referer: http://nagios01/nagiosxi/
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utilsl.inc.php on line 658, referer: http://nagios01/nagiosxi/
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utilsl.inc.php on line 657, referer: http://nagios01/nagiosxi/
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utilsl.inc.php on line 658, referer: http://nagios01/nagiosxi/
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utilsl.inc.php on line 380, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utilsl.inc.php on line 380, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts
[Mon Feb 13 16:36:30 2012] [error] [client 10.65.78.74] PHP Warning:  strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utilsl.inc.php on line 380, referer: http://nagios01/nagiosxi/includes/components/xicore/status.php?show=hosts

Thanks,
David
dworthcsl
Posts: 95
Joined: Wed Jan 11, 2012 4:00 pm

Re: Host Detail not showing Hosts in XI 2.1

Post by dworthcsl »

Also at the top, it is showing that hosts, servics, and notifications are disabled. Here is a dump from system info.

Code: Select all

Date/Time
PHP Timezone: Not set
PHP Time: Mon, 13 Feb 2012 16:47:00 -0500
System Time: Mon, 13 Feb 2012 16:47:00 -0500
Nagios XI Data
nagios (pid 29531) is running...
NPCD running (pid 29814).
ndo2db (pid 29748) is running...
CPU Load 15: 0.07
Total Hosts: 0
Total Services: 0
Function 'get_base_uri' returns: http://nagios01/nagiosxi/
Function 'get_base_url' returns: http://nagios01/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://nagios01/nagiosxi/includes/components/profile/profile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
Ping Test localhost
Running:

/bin/ping -c 3 localhost 2>&1 

PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.024 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.016 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.022 ms

--- localhost ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.016/0.020/0.024/0.006 ms
Test wget To locahost
WGET From URL: http://localhost/nagiosql/index.php
Running:

/usr/bin/wget http://localhost/nagiosql/index.php 

--2012-02-13 16:47:02-- http://localhost/nagiosql/index.php
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `/tmp/nagiosql_index.tmp'

0K ..... 100% 411M=0s

2012-02-13 16:47:02 (411 MB/s) - `/tmp/nagiosql_index.tmp' saved [5259/5259]

Its showing hosts=0. There are no services configured yet. I configured my own host template, host group, and contact group. Is there a specific group or template that needs to be there in order for it to be displayed?
dworthcsl
Posts: 95
Joined: Wed Jan 11, 2012 4:00 pm

Re: Host Detail not showing Hosts in XI 2.1

Post by dworthcsl »

Hi,

I was able to fix the time errors in the apache error logs by updating the php.ini. However, I am unable to see any of the hosts. I created a new host with out any templates and assigning it to my user. Still nothing is showing up. The number of hosts still shows 0 and the icon on top left still showing active host checks are disabled. Can someone from the nagios team please provide some suggestions?

Thanks for your help.
dworthcsl
Posts: 95
Joined: Wed Jan 11, 2012 4:00 pm

Re: Host Detail not showing Hosts in XI 2.1

Post by dworthcsl »

After some further digging, I am wondering if there is an issue with how updates are being pulled in to XI. I am also not sure what the interaction of the DB's and config files. I believe QL retains data in mysql, but also seems like nagios reads from config files, but also the DB?

I was looking through the nagios.cfg file and saw that a lot of the expected files were not there. i.e. contactgroups, hosttemplates, hosts dir, serverices dir, etc. I added them in and when I ran a check, I was getting dup errors for all of the standard configurations. I was not getting dup errors on any of the hosts, groups, templates that I added. So the is XI not reading the additional data I am putting in? Is this a bug with 2.1?

At this point I am dead in the water. Should I be using an older version XI or just stick with core until everything has been fully tested. Please let me know if you need additional info or if you have suggestions.

Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Host Detail not showing Hosts in XI 2.1

Post by scottwilkerson »

Any cfg files you find the need to manually update in core need to go in the static directory.

Nagios XI creates new cfg files every time you "Apply Configuration". It pulls the information that it has stored on the host/service/contact in MySQL and creates the cfg files.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
dworthcsl
Posts: 95
Joined: Wed Jan 11, 2012 4:00 pm

Re: Host Detail not showing Hosts in XI 2.1

Post by dworthcsl »

scottwilkerson wrote:Any cfg files you find the need to manually update in core need to go in the static directory.

Nagios XI creates new cfg files every time you "Apply Configuration". It pulls the information that it has stored on the host/service/contact in MySQL and creates the cfg files.

I am not sure how this is going to help with troubleshooting why hosts are not showing up or that nagios is not seeing new hosts. Not to sound harsh here, but I would really like to continue down the XI path, but it seems I am spending more time troubleshooting something that should work out of the box. I have been using Nagios for years and would like to bring in the enterprise version, but it does not seem like it is ready. I do not mind tweeking here and there, but I do not seem to be getting anywhere.

Thanks,
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Host Detail not showing Hosts in XI 2.1

Post by lmiltchev »

Do you have any issues with the XI System Component Status?

Do you have multiple nagios processes running?

Code: Select all

#  ps aux | grep /usr/local/nagios/bin/nagios
Can you run the Write Config Tool to check your configuration for errors?

http://assets.nagios.com/downloads/nagi ... tabase.pdf

After you click on the four "Go" buttons, post the output.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dworthcsl
Posts: 95
Joined: Wed Jan 11, 2012 4:00 pm

Re: Host Detail not showing Hosts in XI 2.1

Post by dworthcsl »

Hi,

All system XI components are in the green.

There is only a single instance of nagios running.

Code: Select all

nagios    1870  0.0  0.0  21764  1132 ?        Ssl  14:33   0:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

I am writing both monitoring and additional files with out issues. I do not see the files in hosts.

Code: Select all

Write host configurations ...
Configuration file successfully written!

Write service configurations ...
Configuration file successfully written!

Write hostgroups.cfg ...
Configuration file successfully written!
Write servicegroups.cfg ...
Configuration file successfully written!
Write hosttemplates.cfg ...
Configuration file successfully written!
Write servicetemplates.cfg ...
Configuration file successfully written!

Write timeperiods.cfg ...
Configuration file successfully written!
Write commands.cfg ...
Configuration file successfully written!
Write contacts.cfg ...
Configuration file successfully written!
Write contactgroups.cfg ...
Configuration file successfully written!
Write contacttemplates.cfg ...
Configuration file successfully written!
Write servicedependencies.cfg ...
Configuration file successfully written!
Write hostdependencies.cfg ...
Configuration file successfully written!
Write serviceescalations.cfg ...
Configuration file successfully written!
Write hostescalations.cfg ...
Configuration file successfully written!
Write serviceextinfo.cfg ...
Configuration file successfully written!
Write hostextinfo.cfg ...
Configuration file successfully written!

When I run check configs, It does not seem to be seeing the hosts and non-default configs.

Code: Select all

Total Warnings: 0
Total Errors: 0


Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
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



Written configuration files are valid. Nagios can be restarted!
I followed the doc and then applied the configs. Still the same result.

Thanks
Locked