nagios xi not displaying correct information

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
btmikkelsen
Posts: 38
Joined: Wed Feb 23, 2011 10:29 am

nagios xi not displaying correct information

Post by btmikkelsen »

Having a problem with naigos xi user interface. I've looked through the host and service definitions for non-normal characters, but found nothing obvious.
/nagiosxi/backend/?cmd=getservicestatus returns a valid XML, but <recordcount>2448</recordcount> while nagios core reports the correct count at 14716
the hosts are also incorrect - xi reporting <recordcount>352</recordcount> with a gethoststatus and the UI while core is correctly reporting 1033

can't find any errors in the log files in the normal places. core, pnp, ql are all working just fine.




Nagios xi Installation Profile
mine 2.6.18-308.8.1.el5 x86_64
CentOS release 5.8 (Final)
Gnome is not installed
Apache Information

PHP Version: 5.1.6
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5
Server Name: mine
Server Address: ffff
Server Port: 80
Date/Time

PHP Timezone: America/Los_Angeles
PHP Time: Sun, 03 Jun 2012 05:22:49 -0700
System Time: Sun, 03 Jun 2012 05:22:49 -0700
Nagios xi Data

nagios (pid 14732) is running...
NPCD running (pid 30328).
ndo2db (pid 24357) is running...
CPU Load 15: 8.58
Total Hosts: 0
Total Services: 0
Function 'get_base_uri' returns: http://mine/nagiosxi/
Function 'get_base_url' returns: http://mine/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://mine/nagiosxi/includes/component ... rofile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: nagios xi not displaying correct information

Post by scottwilkerson »

When accessing the backend API are you using a user that has access to all of the services?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
btmikkelsen
Posts: 38
Joined: Wed Feb 23, 2011 10:29 am

Re: nagios xi not displaying correct information

Post by btmikkelsen »

backend and frontend are with the same user, yes.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: nagios xi not displaying correct information

Post by scottwilkerson »

What version of xi are you using?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
btmikkelsen
Posts: 38
Joined: Wed Feb 23, 2011 10:29 am

Re: nagios xi not displaying correct information

Post by btmikkelsen »

Installed Version: 2011R2.4
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: nagios xi not displaying correct information

Post by scottwilkerson »

Other than the username and ticket, is there anything else on the url with /nagiosxi/backend/?cmd=getservicestatus

I ask because the backend api can and does filter down results...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
btmikkelsen
Posts: 38
Joined: Wed Feb 23, 2011 10:29 am

Re: nagios xi not displaying correct information

Post by btmikkelsen »

No - Seeing where you were going, I created another user. Same symptoms, but different values for the hosts/services (69/721)
Interesting - under the Monitoring performance, the correct values are displayed:

Monitoring Performance
Service Check Execution Time: 0.00 / 54.17 / 0.719 sec
Service Check Latency: 0.00 / 6.50 / 1.202 sec
Host Check Execution Time: 0.00 / 10.31 / 0.646 sec
Host Check Latency: 0.00 / 85.86 / 2.351 sec
# Active Host / Service Checks: 1034 / 14790
# Passive Host / Service Checks: 0 / 0


The XML does seem to be complete (with end tags).
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: nagios xi not displaying correct information

Post by mguthrie »

Have you made any recent changes to the system? Particularly updating ndoutils?

I'd check for database corruption first:
http://library.nagios.com/library/produ ... i-database

And then also make sure you don't have multiple instances of Nagios running.

Code: Select all

service nagios stop
service ndo2db stop
killall -9 nagios
service ndo2db start
service nagios start
Anything interesting showing up in /usr/local/nagios/var/nagios.log?
btmikkelsen
Posts: 38
Joined: Wed Feb 23, 2011 10:29 am

Re: nagios xi not displaying correct information

Post by btmikkelsen »

nothing significant, but the database was corrupt on Saturday. The nagios_logentries table gets corrupt if there is any interruption in the ndo2db process. No redundant nagios, ndo2db processes.

I did have a situation last week where nagios would 'hang', and I traced it to ndoutils - I recompiled it from the lastest xi distribution, and it went away. I currently have it set pretty high on debugging to watch for this problem again, but everything other than the xi UI is working ok.

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=mydbhost
db_port=3306

db_name=nagios
db_prefix=nagios_

db_user=ndoutils
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_level=-1



# 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=2


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

#debug_file=/usr/local/nagios/var/ndo2db.debug
debug_file=/var/nagiosramdisk/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=100000000
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: nagios xi not displaying correct information

Post by scottwilkerson »

btmikkelsen wrote: but everything other than the xi UI is working ok.
Are you saying your xi UI isn't working or just the backend API?

Also, you might want to run the repair on the whole nagios database as it sounds like you may still have a corrupt table or 2 in there.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart