Problem Hostgroups in Nagiosxi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
roccoss
Posts: 25
Joined: Tue Sep 02, 2014 11:47 am

Re: Problem Hostgroups in Nagiosxi

Post by roccoss »

Hi @tgriep

I have not explained well. The Nagios servers are in the same net, but the hosts services are seeing in all servers except in this.
send PM whit capture

Thank you
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem Hostgroups in Nagiosxi

Post by tgriep »

Try this, remove the "show=services&" from the URL, does the Host and it services show up?
If you go to the Home > Host or Service Status menus, does the host show up there?
Be sure to check out our Knowledgebase for helpful articles and solutions!
roccoss
Posts: 25
Joined: Tue Sep 02, 2014 11:47 am

Re: Problem Hostgroups in Nagiosxi

Post by roccoss »

Hi @tgriep

I remove the "show=services&" from the URL,but the hosts services dont show.
If i go to the Home > Service Status menu I can see the services.

Send PM with images

Thank you
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem Hostgroups in Nagiosxi

Post by tgriep »

It is probably caused by the tunneling not allowing the Web page from redirecting correctly.

Try this, login to the server as root and run the following tail command to get the Apache logs while you try and access the page.

Code: Select all

tail -f /var/log/httpd/*_log
Then try and access the page and post the output of the tail command.
Be sure to check out our Knowledgebase for helpful articles and solutions!
roccoss
Posts: 25
Joined: Tue Sep 02, 2014 11:47 am

Re: Problem Hostgroups in Nagiosxi

Post by roccoss »

Hi @tgriep

I get direct access to the server. without SSH tunnel. but the hosts services dont show. Send PM with image.

Ejecute tail command to get the Apache logs while you try and access the page. This is the result:

127.0.0.1 - - [08/Feb/2019:19:39:00 +0100] "POST /nagiosxi/backend/ HTTP/1.1" 200 1593 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
127.0.0.1 - - [08/Feb/2019:19:39:00 +0100] "POST /nagiosxi/backend/ HTTP/1.1" 200 1593 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
10.141.244.214 - - [08/Feb/2019:19:39:00 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_tray_alert_html%22%2C%22args%22%3A%22%22%7D&nsp=e63700f827a3beb1f6f3b9eb9123ddae HTTP/1.1" 200 666 "http://ih88a/nagiosxi/index.php" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
10.141.244.214 - - [08/Feb/2019:19:39:00 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=e63700f827a3beb1f6f3b9eb9123ddae HTTP/1.1" 200 967 "http://ih88a/nagiosxi/index.php" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
10.142.119.10 - - [08/Feb/2019:19:39:01 +0100] "GET /nagiosxi/includes/components/xicore/status.php?show=services&host=ah1g HTTP/1.1" 200 14933 "http://localhost:9999/nagiosxi/includes ... show=hosts" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0"
127.0.0.1 - - [08/Feb/2019:19:39:01 +0100] "POST /nagiosxi/backend/ HTTP/1.1" 200 815 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
10.142.119.10 - - [08/Feb/2019:19:39:02 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_servicestatus_table%22%2C%22args%22%3A%7B%22host%22%3A%22ah1g%22%2C%22hostgroup%22%3A%22%22%2C%22servicegroup%22%3A%22%22%2C%22sortby%22%3A%22%22%2C%22sortorder%22%3A%22asc%22%2C%22records%22%3A%221000%22%2C%22page%22%3A%221%22%2C%22search%22%3A%22%22%2C%22hostattr%22%3A%220%22%2C%22serviceattr%22%3A%220%22%2C%22hoststatustypes%22%3A%220%22%2C%22servicestatustypes%22%3A%220%22%7D%7D&nsp=cffa0c16ea06fcb02ac5cf092b7cb432 HTTP/1.1" 200 6312 "http://localhost:9999/nagiosxi/includes ... &host=ah1g" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0"
10.142.119.10 - - [08/Feb/2019:19:39:02 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_service_status_summary_html%22%2C%22args%22%3A%7B%22host%22%3A%22ah1g%22%2C%22hostgroup%22%3A%22%22%2C%22servicegroup%22%3A%22%22%2C%22hostattr%22%3A%220%22%2C%22serviceattr%22%3A%220%22%2C%22hoststatustypes%22%3A%220%22%2C%22servicestatustypes%22%3A%220%22%2C%22show%22%3A%22services%22%7D%7D&nsp=cffa0c16ea06fcb02ac5cf092b7cb432 HTTP/1.1" 200 2006 "http://localhost:9999/nagiosxi/includes ... &host=ah1g" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0"
10.142.119.10 - - [08/Feb/2019:19:39:02 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_host_status_summary_html%22%2C%22args%22%3A%7B%22host%22%3A%22ah1g%22%2C%22hostgroup%22%3A%22%22%2C%22servicegroup%22%3A%22%22%2C%22hostattr%22%3A%220%22%2C%22serviceattr%22%3A%220%22%2C%22hoststatustypes%22%3A%220%22%2C%22servicestatustypes%22%3A%220%22%2C%22show%22%3A%22services%22%7D%7D&nsp=cffa0c16ea06fcb02ac5cf092b7cb432 HTTP/1.1" 200 1750 "http://localhost:9999/nagiosxi/includes ... &host=ah1g" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0"
10.141.244.214 - - [08/Feb/2019:19:39:02 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_host_status_detailed_info_html%22%2C%22args%22%3A%7B%22hostname%22%3A%22no1t%22%2C%22host_id%22%3A%22-1%22%2C%22display%22%3A%22simple%22%7D%7D&nsp=e63700f827a3beb1f6f3b9eb9123ddae HTTP/1.1" 200 847 "http://ih88a/nagiosxi/includes/componen ... &host=no1t" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
10.141.244.214 - - [08/Feb/2019:19:39:02 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_host_status_state_summary_html%22%2C%22args%22%3A%7B%22hostname%22%3A%22no1t%22%2C%22host_id%22%3A%22-1%22%2C%22display%22%3A%22simple%22%7D%7D&nsp=e63700f827a3beb1f6f3b9eb9123ddae HTTP/1.1" 200 322 "http://ih88a/nagiosxi/includes/componen ... &host=no1t" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
10.141.244.214 - - [08/Feb/2019:19:39:04 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_host_status_detailed_info_html%22%2C%22args%22%3A%7B%22hostname%22%3A%22no1t%22%2C%22host_id%22%3A%22-1%22%2C%22display%22%3A%22advanced%22%7D%7D&nsp=e63700f827a3beb1f6f3b9eb9123ddae HTTP/1.1" 200 1283 "http://ih88a/nagiosxi/includes/componen ... &host=no1t" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
10.141.244.214 - - [08/Feb/2019:19:39:04 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_host_comments_html%22%2C%22args%22%3A%7B%22hostname%22%3A%22no1t%22%2C%22host_id%22%3A%22-1%22%2C%22display%22%3A%22simple%22%7D%7D&nsp=e63700f827a3beb1f6f3b9eb9123ddae HTTP/1.1" 200 96 "http://ih88a/nagiosxi/includes/componen ... &host=no1t" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
10.141.244.214 - - [08/Feb/2019:19:39:04 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_host_status_attributes_html%22%2C%22args%22%3A%7B%22hostname%22%3A%22no1t%22%2C%22host_id%22%3A%22-1%22%2C%22display%22%3A%22all%22%7D%7D&nsp=e63700f827a3beb1f6f3b9eb9123ddae HTTP/1.1" 200 2385 "http://ih88a/nagiosxi/includes/componen ... &host=no1t" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"

Thank you
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem Hostgroups in Nagiosxi

Post by tgriep »

The screen shots show that the Host has never ran the host check so make sure it is setup to run.
Also, verify that Active checks are enabled for that host by going to the Advanced Tab for that host and also check the that Active Checks are enabled globally by going to the Admin > Monitoring Engine Status menu.
They should be enabled there as well.
Be sure to check out our Knowledgebase for helpful articles and solutions!
roccoss
Posts: 25
Joined: Tue Sep 02, 2014 11:47 am

Re: Problem Hostgroups in Nagiosxi

Post by roccoss »

Hi @tgriep,

In Nagios Core the checks are executed ok and the services are seen. However, in Nagios XI in Advanced Tab the checked are disabled but I cannot enabled it. I click to enabled but don't active it.
In Admin > Monitoring Engine Status Menu are active. Attache the image in PM.

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

Re: Problem Hostgroups in Nagiosxi

Post by tgriep »

Can you run the following as root and post the /tmp/mysql.txt file here?

Code: Select all

echo 'select * from nagios_hoststatus;' |mysql -t -u root -pnagiosxi nagios >/tmp/mysql.txt
echo 'select * from nagios_hoststatus;' |mysql -t -u root -pnagiosxi nagios >>/tmp/mysql.txt
echo 'select * from nagios_programstatus;' |mysql -t -u root -pnagiosxi nagios >>/tmp/mysql.txt
ps -ef >>/tmp/mysql.txt
Also, get the /usr/local/nagiosxi/html/config.inc.php file and upload it to the post.

It also looks like the Event Queue is not running.

Get these files from the Nagios server and upload them to the post.

Code: Select all

/usr/local/nagiosxi/var/eventman.log
/usr/local/nagiosxi/var/cmdsubsys.log
/usr/local/nagiosxi/var/sysstat.log
/usr/local/nagiosxi/var/feedproc.log
Next time you screen capture something, can you show the whole screen" There may be data that I need to see that is cut off.
Be sure to check out our Knowledgebase for helpful articles and solutions!
roccoss
Posts: 25
Joined: Tue Sep 02, 2014 11:47 am

Re: Problem Hostgroups in Nagiosxi

Post by roccoss »

Hi @tgriep

I run the commands, and send the log files in PM
The next image i show the whole screen

Thank you
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem Hostgroups in Nagiosxi

Post by tgriep »

An unrelated issue, I found a permission problem with the SNMP Traps application. Run the following as root to fix that.

Code: Select all

chown -R nagios.nagios /var/lib/net-snmp
chmod ugo+rw /var/lib/net-snmp/snmpapp.conf
The scheduler is not running so lets change some settings in the /usr/local/nagios/etc/nagios.cfg file.

Open the file and change these settings from

Code: Select all

auto_reschedule_checks=0
auto_rescheduling_window=180
to

Code: Select all

auto_reschedule_checks=1
auto_rescheduling_window=45
Save the change and restart nagios by running

Code: Select all

service nagios restart
Let the system run for about 5 to 10 minutes and see if the data starts to populate the XI GUI.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked