nagios XI report and dashlets not showing newly added hosts
-
sandeepspan
- Posts: 9
- Joined: Tue Dec 30, 2014 4:55 am
nagios XI report and dashlets not showing newly added hosts
Dear Team,
I am trying the NAGIOS XI for first time, till now i have worked with Nagios Core. I did got the setup functional with some hosts in it but somehow the summary on dashboard and reports are not able to show me newly added hosts to the dropdown list. Need help on what part is missing in the setup.
What i did so far is as below,
1) done a compiled installation of NAGIOS XI using the instructions provided in installation document.
2) then i imported configuration files of the existing Nagios Core setup with me using core config file import documented steps
3) post that i can see the host and services from Nagios core setup are getting reflected in tactical and traditional report sections but not in dashlets and other reports provided in nagios XI.
4) All host are getting properly checked from NAgios but status of those appears to be not getting reflected in NAGIOS XI
Please let me know what is missing ? did i missed any step ?
Regards,
Sandeep
I am trying the NAGIOS XI for first time, till now i have worked with Nagios Core. I did got the setup functional with some hosts in it but somehow the summary on dashboard and reports are not able to show me newly added hosts to the dropdown list. Need help on what part is missing in the setup.
What i did so far is as below,
1) done a compiled installation of NAGIOS XI using the instructions provided in installation document.
2) then i imported configuration files of the existing Nagios Core setup with me using core config file import documented steps
3) post that i can see the host and services from Nagios core setup are getting reflected in tactical and traditional report sections but not in dashlets and other reports provided in nagios XI.
4) All host are getting properly checked from NAgios but status of those appears to be not getting reflected in NAGIOS XI
Please let me know what is missing ? did i missed any step ?
Regards,
Sandeep
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: nagios XI report and dashlets not showing newly added ho
Lets verify we do not have any DB errors
Code: Select all
tail /var/log/mysqld.log-
sandeepspan
- Posts: 9
- Joined: Tue Dec 30, 2014 4:55 am
Re: nagios XI report and dashlets not showing newly added ho
good to see your reply, due to weekend it will take me some time to give you the output.
you just need output oflog file correct?
regards,
Sandeep.
you just need output oflog file correct?
regards,
Sandeep.
-
sandeepspan
- Posts: 9
- Joined: Tue Dec 30, 2014 4:55 am
Re: nagios XI report and dashlets not showing newly added ho
I had a look on database logs but no error in those. Below is the requested log output,
# tail /var/log/mysqld.log
150102 13:32:27 InnoDB: Starting shutdown...
150102 13:32:28 InnoDB: Shutdown completed; log sequence number 0 22343375
150102 13:32:28 [Note] /usr/libexec/mysqld: Shutdown complete
150102 13:32:28 mysqld ended
150102 13:32:33 mysqld started
150102 13:32:33 InnoDB: Started; log sequence number 0 22343375
150102 13:32:33 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.95' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
I also tried looking on the Nagios logs but could not find anything conclusive. What are other things that can lead to this.
Regards,
Sandeep
# tail /var/log/mysqld.log
150102 13:32:27 InnoDB: Starting shutdown...
150102 13:32:28 InnoDB: Shutdown completed; log sequence number 0 22343375
150102 13:32:28 [Note] /usr/libexec/mysqld: Shutdown complete
150102 13:32:28 mysqld ended
150102 13:32:33 mysqld started
150102 13:32:33 InnoDB: Started; log sequence number 0 22343375
150102 13:32:33 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.95' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
I also tried looking on the Nagios logs but could not find anything conclusive. What are other things that can lead to this.
Regards,
Sandeep
Re: nagios XI report and dashlets not showing newly added ho
How many hosts/services do you see in the profile?
Admin->System Profile
You should see something like this?
Total Hosts: xxx
Total Services: xxx
How many hosts/services do you actually have? What is the output of the following commands?
Have you tried stopping/starting services?
Admin->System Profile
You should see something like this?
Total Hosts: xxx
Total Services: xxx
How many hosts/services do you actually have? What is the output of the following commands?
Code: Select all
echo 'select count(*) from nagios.nagios_hosts;' | mysql -s -pnagiosxi
echo 'select count(*) from nagios.nagios_services;' | mysql -s -pnagiosxiCode: Select all
service nagios stop
service ndo2db stop
service ndo2db start
service nagios start
service mysqld restart
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
sandeepspan
- Posts: 9
- Joined: Tue Dec 30, 2014 4:55 am
Re: nagios XI report and dashlets not showing newly added ho
Hi,
Here is the inputs for respective question,
System Profile shows only 1 host and 8 services i.e. localhost, complete output as below,
Output of database queries is also 1 host and 8 services,
I also done service restart multiple time but still its same.
In addition to that i want to provide below inputs,
1) Hosts and services are present in the config files on path
2) Host Files Count from the backend files
3) Services Files count from the backend files
4) here is the sample file (i have removed some IP details from it)
5) also below is the sample service file (I have removed some details from this as well)
6) We also receiving the email alerts for the hosts in addition to localhost
7) Not sure what was missed in the core configuration import steps, help me rectify the same or suggest some other options. Recreation of 200-300 hosts and related services has hugh efforts.
Regards,
Sandeep S Panchal.
Here is the inputs for respective question,
System Profile shows only 1 host and 8 services i.e. localhost, complete output as below,
Code: Select all
System:
Nagios XI Version : 2014R2.3
Nagios02.localdomain 2.6.18-400.1.1.el5 x86_64
CentOS release 5.11 (Final)
Gnome is not installed
Apache Information
PHP Version: 5.1.6
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Server Name: 10.130.8.164
Server Address: 10.130.8.164
Server Port: 80
Date/Time
PHP Timezone: Asia/Kolkata
PHP Time: Tue, 06 Jan 2015 09:41:29 +0530
System Time: Tue, 06 Jan 2015 09:41:29 +0530
Nagios XI Data
License ends in:
Days left in Trial: 54
nagios (pid 3481) is running...
NPCD running (pid 19826).
ndo2db (pid 3463) is running...
CPU Load 15: 1.44
Total Hosts: 1
Total Services: 8
Function 'get_base_uri' returns: http://10.130.8.164/nagiosxi/
Function 'get_base_url' returns: http://10.130.8.164/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://10.130.8.164/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.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.034 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=3 ttl=64 time=0.038 ms
--- localhost.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.027/0.033/0.038/0.004 ms
Test wget To localhost
WGET From URL: http://localhost/nagiosxi/includes/components/ccm/
Running:
/usr/bin/wget http://localhost/nagiosxi/includes/components/ccm/
--2015-01-06 09:41:31-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `/usr/local/nagiosxi/tmp/ccm_index.tmp'
0K ......... 1.01M=0.009s
2015-01-06 09:41:31 (1.01 MB/s) - `/usr/local/nagiosxi/tmp/ccm_index.tmp' saved [9624]
Code: Select all
# echo 'select count(*) from nagios.nagios_hosts;' | mysql -s -pnagiosxi
1
# echo 'select count(*) from nagios.nagios_services;' | mysql -s -pnagiosxi
8
In addition to that i want to provide below inputs,
1) Hosts and services are present in the config files on path
Code: Select all
# ls -lrt /usr/local/nagios/etc/
total 416
-rwxrwxr-x 1 apache nagios 210 Dec 30 18:50 resource.cfg
-rw-rw-r-- 1 apache nagios 4827 Dec 30 18:52 ndomod.cfg
-rw-rw-r-- 1 apache nagios 2229 Dec 30 18:52 ndo2db.cfg
-rw-rw-r-- 1 apache nagios 7988 Dec 30 18:53 nrpe.cfg
-rw-rw-r-- 1 apache nagios 1627 Dec 30 18:53 send_nsca.cfg
-rw-rw-r-- 1 apache nagios 5345 Dec 30 18:53 nsca.cfg
-rw-rw-r-- 1 apache nagios 0 Jan 2 11:37 recurringdowntime.cfg
-rwxrwxr-x 1 apache nagios 5754 Jan 2 15:30 nagios.cfg
drwsrwsr-x 2 apache nagios 4096 Jan 2 15:57 static
drwsrwsr-x 2 apache nagios 12288 Jan 2 15:57 services
drwxrwxr-x 4 apache nagios 4096 Jan 2 15:57 pnp
drwxrwxr-x 4 apache nagios 12288 Jan 2 15:57 cfgrep
drwsrwsr-x 2 apache nagios 12288 Jan 2 19:51 hosts
-rw-rw-r-- 1 apache nagios 980 Jan 5 20:20 cgi.cfg
drwsrwsr-x 2 apache nagios 4096 Jan 5 20:21 import
-rw-rw-r-- 1 apache nagios 5988 Jan 5 20:31 hostgroups.cfg
-rw-rw-r-- 1 apache nagios 90224 Jan 5 20:31 servicegroups.cfg
-rw-rw-r-- 1 apache nagios 28632 Jan 5 20:31 hosttemplates.cfg
-rw-rw-r-- 1 apache nagios 5139 Jan 5 20:31 timeperiods.cfg
-rw-rw-r-- 1 apache nagios 86687 Jan 5 20:31 servicetemplates.cfg
-rw-rw-r-- 1 apache nagios 843 Jan 5 20:31 serviceextinfo.cfg
-rw-rw-r-- 1 apache nagios 825 Jan 5 20:31 serviceescalations.cfg
-rw-rw-r-- 1 apache nagios 823 Jan 5 20:31 servicedependencies.cfg
-rw-rw-r-- 1 apache nagios 837 Jan 5 20:31 hostextinfo.cfg
-rw-rw-r-- 1 apache nagios 819 Jan 5 20:31 hostescalations.cfg
-rw-rw-r-- 1 apache nagios 817 Jan 5 20:31 hostdependencies.cfg
-rw-rw-r-- 1 apache nagios 1675 Jan 5 20:31 contacttemplates.cfg
-rw-rw-r-- 1 apache nagios 4400 Jan 5 20:31 contacts.cfg
-rw-rw-r-- 1 apache nagios 1450 Jan 5 20:31 contactgroups.cfg
-rw-rw-r-- 1 apache nagios 47254 Jan 5 20:31 commands.cfg
Code: Select all
# ls -lrt /usr/local/nagios/etc/hosts/ |wc -l
270
Code: Select all
# ls -lrt /usr/local/nagios/etc/services/ |wc -l
269
Code: Select all
[root@Nagios02 etc]# cat /usr/local/nagios/etc/hosts/XXXXXXXXXX01.cfg
###############################################################################
#
# Host configuration file
#
# Created by: Nagios Core Config Manager 2.3.0
# Date: 2015-01-02 19:45:38
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define host {
host_name XXXXXXXXXX01
use template-linux
alias apihosts
address X.X.X.X
parents localhost
hostgroups apihosts,linuxhosts,Linux_Servers
_HOST_ID 125
register 1
}
###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################
5) also below is the sample service file (I have removed some details from this as well)
Code: Select all
cat /usr/local/nagios/etc/services/XXXXXXXXXX01.cfg
###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.3.0
# Date: 2014-12-31 12:27:22
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define service {
host_name XXXXXXXXXX01
service_description /usr_filesystem
use template_/usr
notifications_enabled 1
_SERVICE_ID 5456
register 1
}
define service {
host_name XXXXXXXXXX01
service_description /var_filesystem
use template_/var
notifications_enabled 1
_SERVICE_ID 5455
register 1
}
define service {
host_name XXXXXXXXXX01
service_description /_filesystem
use template_/
notifications_enabled 1
_SERVICE_ID 5446
register 1
}
define service {
host_name XXXXXXXXXX01
service_description check_ssh
use template_tcp_ssh
_SERVICE_ID 5460
register 1
}
define service {
host_name XXXXXXXXXX01
service_description cpu
use template_os_cpu
_SERVICE_ID 5449
register 1
}
define service {
host_name XXXXXXXXXX01
service_description disk_sda
use template_disk-io_sda
_SERVICE_ID 21636
register 1
}
define service {
host_name XXXXXXXXXX01
service_description disk_sdb
use template_disk-io_sdb
_SERVICE_ID 21906
register 1
}
define service {
host_name XXXXXXXXXX01
service_description disk_sdc
use template_disk-io_sdc
_SERVICE_ID 22173
register 1
}
define service {
host_name XXXXXXXXXX01
service_description load
use template_os_load_average
_SERVICE_ID 5447
register 1
}
define service {
host_name XXXXXXXXXX01
service_description memory_with_cache
use template_os_memory_with_cache
_SERVICE_ID 5448
register 1
}
define service {
host_name XXXXXXXXXX01
service_description ping_reach
use template_ping
_SERVICE_ID 5498
register 1
}
define service {
host_name XXXXXXXXXX01
service_description swap
use template_os_swap
_SERVICE_ID 5450
register 1
}
define service {
host_name XXXXXXXXXX01
service_description traffic_eth0
use template_traffic_eth0
_SERVICE_ID 5508
register 1
}
###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
7) Not sure what was missed in the core configuration import steps, help me rectify the same or suggest some other options. Recreation of 200-300 hosts and related services has hugh efforts.
Regards,
Sandeep S Panchal.
-
sandeepspan
- Posts: 9
- Joined: Tue Dec 30, 2014 4:55 am
Re: nagios XI report and dashlets not showing newly added ho
in addition to my last inputs, we do see that for nagiosql databases the hosts and services imported from core nagios configuraiton exists, below is the output for the count details,
1) copied generic host template as "template_generic_hosts"
2) applied configuration
3) copied Linux_Servers group as "monitoring_servers"
4) applied configuration
5) used configuration wizard "Linux SNMP" and followed steps to finish, but could not see the above created group in the hostgroup selection page.
6) applied configuration
7) still host not visible in profile and dashboard count remains as 1 host.
Regards,
Sandeep S Panchal
wondering why entries are missing in nagios database. Also i tried creation of new group, new template, new host using snmp configuraion wizard by following below steps but could not see it reflected either in dashboard or profile details output.# echo 'select count(*) from nagiosql.tbl_host;' | mysql -s -pnagiosxi
268
# echo 'select count(*) from nagiosql.tbl_service;' | mysql -s -pnagiosxi
3921
1) copied generic host template as "template_generic_hosts"
2) applied configuration
3) copied Linux_Servers group as "monitoring_servers"
4) applied configuration
5) used configuration wizard "Linux SNMP" and followed steps to finish, but could not see the above created group in the hostgroup selection page.
6) applied configuration
7) still host not visible in profile and dashboard count remains as 1 host.
Regards,
Sandeep S Panchal
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: nagios XI report and dashlets not showing newly added ho
Out of curiosity if this could be related to a bug we has recently worked on, could you restart nagios from the CLI and let me know if the hosts show up
Code: Select all
service nagios stop
killall -9 nagios
service nagios start-
sandeepspan
- Posts: 9
- Joined: Tue Dec 30, 2014 4:55 am
Re: nagios XI report and dashlets not showing newly added ho
Regret for delayed reply, i just took time to get things reverted to original snapshot of fresh installation of nagios XI and tried import in a cautious manner. below are the observations,
1) sequence specified in the documentation as was below,
commands -> timeperiods -> contacttemplates -> contacts -> contactgroups -> hosttemplates -> hosts -> hostgroups -> servicetemplates -> services -> servicegroups
but nowhere any note for the resource and other files and there disadvantages of being import, I am suspecting that import of file apart from above sequence made that issue
2) i removed the common configurations from the files before importing them like,
- default timeperiods like 24X7
- default commands
- default contacts like nagiosadmin
- default host/service/contact groups
- default host/service/contact templates
3) additional defined variables like $USER*$ where also needed to be replaced in the required cfg files as the Nagios Core setup was well altered.
4) then sequence followed for import was as specified in documentation went well, now graphs alert all things are working properly.
But i got into one more issue of corrupt PDF attachment while getting the report feature configured, any hints on that
Error is as below,
"Adobe Reader could not open 'filename.pdf' because it is either not a supported file type of because the file has been damaged (or example, it was sent as an email attachment and was not correctly decoded)"
Regards,
Sandeep S. Panchal
1) sequence specified in the documentation as was below,
commands -> timeperiods -> contacttemplates -> contacts -> contactgroups -> hosttemplates -> hosts -> hostgroups -> servicetemplates -> services -> servicegroups
but nowhere any note for the resource and other files and there disadvantages of being import, I am suspecting that import of file apart from above sequence made that issue
2) i removed the common configurations from the files before importing them like,
- default timeperiods like 24X7
- default commands
- default contacts like nagiosadmin
- default host/service/contact groups
- default host/service/contact templates
3) additional defined variables like $USER*$ where also needed to be replaced in the required cfg files as the Nagios Core setup was well altered.
4) then sequence followed for import was as specified in documentation went well, now graphs alert all things are working properly.
But i got into one more issue of corrupt PDF attachment while getting the report feature configured, any hints on that
Error is as below,
"Adobe Reader could not open 'filename.pdf' because it is either not a supported file type of because the file has been damaged (or example, it was sent as an email attachment and was not correctly decoded)"
Regards,
Sandeep S. Panchal
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: nagios XI report and dashlets not showing newly added ho
Since your reload of the system, what version of XI are you running? Also how are you getting this pdf, from a scheduled report emailed to you, or by turning a report page into a pdf from the webui?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.