Host Status Summary not returning results

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
daveinvb
Posts: 67
Joined: Tue Jun 02, 2015 9:06 am

Host Status Summary not returning results

Post by daveinvb »

When I click on one of the numbers listed in the Host Status Summary; up, down, unreachable, pending, it does not return any results. The only host listed is localhost, even though it lists the appropriate numbers for up and down. This is also the same for the BBmap and the Minemap.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Host Status Summary not returning results

Post by tmcdonald »

What XI version are you on? Had you previously searched for "localhost" in the quick search bar? Are any other filters in place?
Former Nagios employee
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Host Status Summary not returning results

Post by abrist »

First, lets check for crashed tables:

Code: Select all

tail -25 /var/log/mysqld.log
Next, check for query errors in system messages:

Code: Select all

grep "ndo" /var/log/messages | tail -25
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.
daveinvb
Posts: 67
Joined: Tue Jun 02, 2015 9:06 am

Re: Host Status Summary not returning results

Post by daveinvb »

Nagios XI 2014R2.7

I have not searched for anything that I can tell. I am clicking directly on the number in the dashlet.
Image

If I click on the 36 Down, it takes me to */nagiosxi/includes/components/xicore/status.php?&show=services&hoststatustypes=4&servicestatustypes=0 and does not display any results.
If I click on the 975 under Up, it only displays localhost and nothing else.


If I click on any of the numbers under the Status Summary For All Host Groups, it functions correctly.
Image

Code: Select all

tail -25 /var/log/mysqld.log
tail: cannot open ‘/var/log/mysqld.log’ for reading: No such file or directory
I'm using AWS RDS if that makes any difference.

Code: Select all

 sudo grep "ndo" /var/log/messages | tail -25
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod: Successfully connected to data sink.  0 queued items to flush.
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for process data
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for log data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for system command data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for event handler data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for notification data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for comment data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for downtime data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for flapping data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for program status data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for host status data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for service status data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for adaptive program data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for adaptive host data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for adaptive service data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for external command data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for aggregated status data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for retention data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for contact data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for contact notification data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for acknowledgement data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for state change data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for contact status data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: ndomod registered for adaptive contact data'
Jun 29 10:54:36 ip-10-222-2-32 nagios: Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Host Status Summary not returning results

Post by jolson »

The mysql log will be defined in /etc/my.cnf - please run the following to find out where your mysqld log might be:

Code: Select all

grep log-error /etc/my.cnf
After you know where the log is, run a tail as abrist has suggested:

Code: Select all

tail -25 <mysql log location>
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
daveinvb
Posts: 67
Joined: Tue Jun 02, 2015 9:06 am

Re: Host Status Summary not returning results

Post by daveinvb »

Code: Select all

$ sudo tail -25 /var/log/mariadb/mariadb.log
150618 14:54:32 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.41-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
150625 10:00:14 [Note] /usr/libexec/mysqld: Normal shutdown

150625 10:00:14 [Note] Event Scheduler: Purging the queue. 0 events
150625 10:00:14  InnoDB: Starting shutdown...
150625 10:00:15  InnoDB: Shutdown completed; log sequence number 1597945
150625 10:00:15 [Note] /usr/libexec/mysqld: Shutdown complete

150625 10:00:15 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
150625 10:01:25 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150625 10:01:25 InnoDB: The InnoDB memory heap is disabled
150625 10:01:25 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150625 10:01:25 InnoDB: Compressed tables use zlib 1.2.7
150625 10:01:25 InnoDB: Using Linux native AIO
150625 10:01:25 InnoDB: Initializing buffer pool, size = 128.0M
150625 10:01:25 InnoDB: Completed initialization of buffer pool
150625 10:01:25 InnoDB: highest supported file format is Barracuda.
150625 10:01:25  InnoDB: Waiting for the background threads to start
150625 10:01:26 Percona XtraDB (http://www.percona.com) 5.5.40-MariaDB-36.1 started; log sequence number 1597945
150625 10:01:26 [Note] Plugin 'FEEDBACK' is disabled.
150625 10:01:26 [Note] Server socket created on IP: '0.0.0.0'.
150625 10:01:26 [Note] Event Scheduler: Loaded 0 events
150625 10:01:26 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.41-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Host Status Summary not returning results

Post by lmiltchev »

Can you run the following commands and show us the output in code wraps?

Code: Select all

date
echo 'select now();' | mysql -t -u root -pnagiosxi
echo 'select count(*) from nagios_hosts;' | mysql -t -u root -pnagiosxi nagios
echo 'select count(*) from nagios_services;' | mysql -t -u root -pnagiosxi nagios
su nagios
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Be sure to check out our Knowledgebase for helpful articles and solutions!
daveinvb
Posts: 67
Joined: Tue Jun 02, 2015 9:06 am

Re: Host Status Summary not returning results

Post by daveinvb »

Code: Select all

$ date
Mon Jun 29 16:09:37 EDT 2015

Code: Select all


$ echo 'select now();' | mysql -t -u root -pnagiosxi
+---------------------+
| now()               |
+---------------------+
| 2015-06-29 16:09:43 |
+---------------------+

Code: Select all

$ echo 'select count(*) from nagios_hosts;' | mysql -t -u root -pnagiosxi nagios
+----------+
| count(*) |
+----------+
|       25 |
+----------+

Code: Select all

$ echo 'select count(*) from nagios_services;' | mysql -t -u root -pnagiosxi nagio                         s
+----------+
| count(*) |
+----------+
|      102 |
+----------+

Code: Select all

$ sudo su nagios

Code: Select all


$ cd /usr/local/nagiosxi/scripts
[nagios@ip-10-222-2-32 scripts]$ ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/compone                         nts/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&pa                         ssword=n@gweb' -O nagiosql.login--2015-06-29 16:11:32--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’

    [ <=>                                                                  ] 10,379      --.-K/s   in 0.006s

2015-06-29 16:11:33 (1.68 MB/s) - ‘nagiosql.login’ saved [10379]

LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
SETUID ROOT OK
RESETTING PERMS
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/compone                         nts/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&pa                         ssword=n@gweb' -O nagiosql.login--2015-06-29 16:11:33--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’

    [ <=>                                                                  ] 10,379      --.-K/s   in 0.006s

2015-06-29 16:11:33 (1.64 MB/s) - ‘nagiosql.login’ saved [10379]

LOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-cer                         tificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2015-06-29 16:11:33--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.export.monitoring’

    [  <=>                                                                                          ] 15,813      2.32KB/s   in 6.7s

2015-06-29 16:11:40 (2.32 KB/s) - ‘nagiosql.export.monitoring’ saved [15813]

WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
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 8 services.
        Checked 1026 hosts.
        Checked 55 host groups.
        Checked 3 service groups.
        Checked 11 contacts.
        Checked 7 contact groups.
        Checked 124 commands.
        Checked 12 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 1026 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 12 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
RET: 0

User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Host Status Summary not returning results

Post by tgriep »

Is your MYSQL database off loaded to another system?
Can you post this file so we can review it?

Code: Select all

/usr/local/nagios/etc/ndo2db.cfg
Can you run the following on your XI system to see if it solves the issue?

Code: Select all

service ndo2db stop
service nagios stop
killall nagios
service ndo2db start
service nagios start
Be sure to check out our Knowledgebase for helpful articles and solutions!
daveinvb
Posts: 67
Joined: Tue Jun 02, 2015 9:06 am

Re: Host Status Summary not returning results

Post by daveinvb »

Yes, I am running the database in AWS RDS.

Code: Select all

#####################################################################
# NDO2DB DAEMON CONFIG FILE
#####################################################################


lock_file=/usr/local/nagios/var/ndo2db.lock

ndo2db_user=nagios
ndo2db_group=nagios

socket_type=unix

socket_name=/usr/local/nagios/var/ndo.sock

tcp_port=5668


db_servertype=mysql
db_host=***********
db_port=3306

db_name=nagios
db_prefix=nagios_

db_user=*********
db_pass=*********



## TABLE TRIMMING OPTIONS
# Several database tables containing Nagios event data can become quite large
# over time.  Most admins will want to trim these tables and keep only a
# certain amount of data in them.  The options below are used to specify the
# age (in MINUTES) that data should be allowd to remain in various tables
# before it is deleted.  Using a value of zero (0) for any value means that
# that particular table should NOT be automatically trimmed.

# Keep timed events for 24 hours
max_timedevents_age=1440

# Keep system commands for 1 week
max_systemcommands_age=10080

# Keep service checks for 1 week
max_servicechecks_age=10080

# Keep host checks for 1 week
max_hostchecks_age=10080

# Keep event handlers for 31 days
max_eventhandlers_age=44640


# DEBUG LEVEL
# This option determines how much (if any) debugging information will
# be written to the debug file.  OR values together to log multiple
# types of information.
# Values: -1 = Everything
#          0 = Nothing
#          1 = Process info
#          2 = SQL queries

debug_level=0



# DEBUG VERBOSITY
# This option determines how verbose the debug log out will be.
# Values: 0 = Brief output
#         1 = More detailed
#         2 = Very detailed

debug_verbosity=1

# DEBUG FILE
# This option determines where the daemon should write debugging information.

debug_file=/usr/local/nagios/var/ndo2db.debug



# MAX DEBUG FILE SIZE
# This option determines the maximum size (in bytes) of the debug file.  If
# the file grows larger than this size, it will be renamed with a .old
# extension.  If a file already exists with a .old extension it will
# automatically be deleted.  This helps ensure your disk space usage doesn't
# get out of control when debugging.

max_debug_file_size=1000000


Code: Select all

[root@ip-10-222-2-32 ~]# service ndo2db stop
Stopping ndo2db (via systemctl):                           [  OK  ]
[root@ip-10-222-2-32 ~]# service nagios stop
Stopping nagios (via systemctl):                           [  OK  ]
[root@ip-10-222-2-32 ~]# killall nagios
nagios: no process found
[root@ip-10-222-2-32 ~]# service ndo2db start
Starting ndo2db (via systemctl):                           [  OK  ]
[root@ip-10-222-2-32 ~]# service nagios start
Starting nagios (via systemctl):                           [  OK  ]
[root@ip-10-222-2-32 ~]#
Locked