Page 1 of 1
Op Screen: Hosts up 48/49
Posted: Thu Aug 09, 2012 2:20 am
by cellact
Hi,
I'm having a weird little issue.
All my hosts are up (Host Status Summary = 49 Up) but the Op Screen insists that one of them is Down and shows 48/49 Up.
Any ideas?
Thanks.
Re: Op Screen: Hosts up 48/49
Posted: Thu Aug 09, 2012 11:48 am
by lmiltchev
Usually it takes some time before the tactical overview section is updated (Unhandled Hosts down section gets updated first).
Did you try refreshing the page? Did you try using a different browser? What does "Tactical Overview" menu show?
Re: Op Screen: Hosts up 48/49
Posted: Sun Aug 12, 2012 2:49 am
by cellact
I did try refreshing, logging out and in and from different browers. it comes up the same.
Tactical Overview and Operations Center both show 100% Up.
Re: Op Screen: Hosts up 48/49
Posted: Mon Aug 13, 2012 9:18 am
by scottwilkerson
Can you run the following from the command line and see if it comes back with a result
Code: Select all
echo "SELECT count(*) as total from nagios_hoststatus WHERE last_hard_state='1';" | mysql -pnagiosxi nagios
Re: Op Screen: Hosts up 48/49
Posted: Wed Aug 15, 2012 7:24 am
by cellact
Sure,
Code: Select all
# echo "SELECT count(*) as total from nagios_hoststatus WHERE last_hard_state='1';" | mysql -pnagiosxi nagios
total
1
I think the last host I changed status to was done via 'submit passive check result'. maybe that helps.
Weird stuff - I just submitted a down state and then again an up state and now it shows 47/49 hosts up!
What's happening?
Thanks
Re: Op Screen: Hosts up 48/49
Posted: Wed Aug 15, 2012 9:51 am
by scottwilkerson
In XI can you go to Home -> All Host Problems and see if there are any there
The Opscreen only show unhandled hosts in the host view, but lists the total in the Tactical overview
Re: Op Screen: Hosts up 48/49
Posted: Wed Aug 15, 2012 11:20 am
by scottwilkerson
I am not 100% sure if this is related to your problem but we did find a bug in the code which should display things more accurately.
You can download the new component at
http://assets.nagios.com/downloads/nagi ... screen.zip
Just re-install through Admin -> Manage Components
Re: Op Screen: Hosts up 48/49
Posted: Thu Aug 16, 2012 5:11 am
by cellact
Hi,
Thanks a lot - that helped me find the wrong line (94) in merlin.php
Code: Select all
$query="SELECT count(*) as total from nagios_hoststatus WHERE last_hard_state='1'";
Should be:
Code: Select all
$query="SELECT count(*) as total from nagios_hoststatus WHERE current_state!=0";
And the same for line 140 (Services)
Cheers!
Re: Op Screen: Hosts up 48/49
Posted: Thu Aug 16, 2012 7:59 am
by scottwilkerson
That's correct, that was the changes.