Page 1 of 2

Report that shows key information about Checks.

Posted: Wed Dec 22, 2010 12:23 pm
by QS1
Happy Holidays!

I was wondering if there is plans for a report or view that show more detailed information about checks (at a glance). For instance to see the
Host Name
Host Ip
Check Intervals
Retry Intervals
Check Period
Notification Period
Contacts, etc...
I know this is alot of information, but it would be very valuable for us. If not through Nagiosxi, and if there are no plans to do this in the future, then can I get this information from the MySql database currently installed?

CentOs release 5.4
32 bit
VMware Image running on Windows
GNOME 2.16.0

Re: Report that shows key information about Checks.

Posted: Wed Dec 22, 2010 12:27 pm
by tonyyarusso
That sounds like you want more of a printout of your current configuration, rather than a "report", which talks about events. Is that right? What would you be using this for?

Re: Report that shows key information about Checks.

Posted: Wed Dec 22, 2010 3:43 pm
by QS1
tonyyarusso wrote:That sounds like you want more of a printout of your current configuration, rather than a "report", which talks about events. Is that right? What would you be using this for?
Exactly, We would like to put this information into other databases for record keeping and so that other non-nagios users can see checks that are setup for their systems.

Re: Report that shows key information about Checks.

Posted: Wed Dec 22, 2010 3:49 pm
by tonyyarusso
Hmm, there really isn't a way to get that in a "pretty" form right now. I'll have to keep that in mind for a later addition - no idea on timing. All of the information is present in both the flat config files and the MySQL database, but due to the inheritance features it's not all in one place, so the configuration for any given service might be pulling settings from a dozen different files.

Re: Report that shows key information about Checks.

Posted: Wed Dec 22, 2010 4:30 pm
by QS1
tonyyarusso wrote:Hmm, there really isn't a way to get that in a "pretty" form right now. I'll have to keep that in mind for a later addition - no idea on timing. All of the information is present in both the flat config files and the MySQL database, but due to the inheritance features it's not all in one place, so the configuration for any given service might be pulling settings from a dozen different files.
Fair enough, but the info is in the SQL database?

Re: Report that shows key information about Checks.

Posted: Wed Dec 22, 2010 5:01 pm
by tonyyarusso
Yeah, the one called 'nagiosql', specifically. Here's a sample:

Code: Select all

[root@demo ~]# mysql -u root -p nagiosql -e "SELECT id, host_name, address, check_interval, retry_interval, notification_interval, contacts FROM tbl_host;"
Enter password: 
+----+----------------------+----------------------+----------------+----------------+-----------------------+----------+
| id | host_name            | address              | check_interval | retry_interval | notification_interval | contacts |
+----+----------------------+----------------------+----------------+----------------+-----------------------+----------+
|  1 | localhost            | 127.0.0.1            |           NULL |           NULL |                  NULL |        0 | 
|  2 | Cube switch          | 192.168.5.42         |              5 |              1 |                    60 |        1 | 
| 19 | support.nagios.com   | support.nagios.com   |              5 |              1 |                    60 |        0 | 
| 10 | ESX Server           | 192.168.5.32         |              5 |              1 |                    60 |        0 | 
|  7 | www.oreilly.com      | www.oreilly.com      |              5 |              1 |                    60 |        1 | 
| 11 | Tony Desktop         | 192.168.5.9          |              5 |              1 |                    60 |        1 | 
|  8 | www.nagios.com       | www.nagios.com       |              5 |              1 |                    60 |        1 | 
| 22 | Server Room          | 192.168.5.254        |              5 |              1 |                    60 |        0 | 
| 18 | nagios.org           | nagios.org           |              5 |              1 |                    60 |        0 | 
| 15 | Ubuntu Desktop       | 192.168.5.89         |              5 |              1 |                    60 |        1 | 
| 21 | community.nagios.org | community.nagios.org |              5 |              1 |                    60 |        0 | 
| 20 | library.nagios.com   | library.nagios.com   |              5 |              1 |                    60 |        0 | 
+----+----------------------+----------------------+----------------+----------------+-----------------------+----------+
[root@demo ~]# mysql -u root -p nagiosql -e "SELECT tbl_host.host_name, tbl_hosttemplate.template_name FROM tbl_host LEFT JOIN tbl_lnkHostToHosttemplate ON tbl_host.id=tbl_lnkHostToHosttemplate.idMaster LEFT JOIN tbl_hosttemplate ON tbl_lnkHostToHosttemplate.idSlave=tbl_hosttemplate.id;"Enter password: 
+----------------------+------------------------------+
| host_name            | template_name                |
+----------------------+------------------------------+
| localhost            | linux-server                 | 
| Cube switch          | xiwizard_switch_host         | 
| support.nagios.com   | xiwizard_website_host        | 
| ESX Server           | xiwizard_generic_host        | 
| www.oreilly.com      | xiwizard_webtransaction_host | 
| Tony Desktop         | xiwizard_windowsdesktop_host | 
| www.nagios.com       | xiwizard_website_host        | 
| Server Room          | xiwizard_websensor_host      | 
| nagios.org           | xiwizard_website_host        | 
| Ubuntu Desktop       | xiwizard_linuxserver_host    | 
| community.nagios.org | xiwizard_website_host        | 
| library.nagios.com   | xiwizard_website_host        | 
+----------------------+------------------------------+
[root@demo ~]# 
Working out the template cascading will be quite the adventure.

Re: Report that shows key information about Checks.

Posted: Mon Jan 10, 2011 9:51 am
by QS1
tonyyarusso wrote:Yeah, the one called 'nagiosql', specifically. Here's a sample:

Code: Select all

[root@demo ~]# mysql -u root -p nagiosql -e "SELECT id, host_name, address, check_interval, retry_interval, notification_interval, contacts FROM tbl_host;"
Enter password: 
+----+----------------------+----------------------+----------------+----------------+-----------------------+----------+
| id | host_name            | address              | check_interval | retry_interval | notification_interval | contacts |
+----+----------------------+----------------------+----------------+----------------+-----------------------+----------+
|  1 | localhost            | 127.0.0.1            |           NULL |           NULL |                  NULL |        0 | 
|  2 | Cube switch          | 192.168.5.42         |              5 |              1 |                    60 |        1 | 
| 19 | support.nagios.com   | support.nagios.com   |              5 |              1 |                    60 |        0 | 
| 10 | ESX Server           | 192.168.5.32         |              5 |              1 |                    60 |        0 | 
|  7 | www.oreilly.com      | www.oreilly.com      |              5 |              1 |                    60 |        1 | 
| 11 | Tony Desktop         | 192.168.5.9          |              5 |              1 |                    60 |        1 | 
|  8 | www.nagios.com       | www.nagios.com       |              5 |              1 |                    60 |        1 | 
| 22 | Server Room          | 192.168.5.254        |              5 |              1 |                    60 |        0 | 
| 18 | nagios.org           | nagios.org           |              5 |              1 |                    60 |        0 | 
| 15 | Ubuntu Desktop       | 192.168.5.89         |              5 |              1 |                    60 |        1 | 
| 21 | community.nagios.org | community.nagios.org |              5 |              1 |                    60 |        0 | 
| 20 | library.nagios.com   | library.nagios.com   |              5 |              1 |                    60 |        0 | 
+----+----------------------+----------------------+----------------+----------------+-----------------------+----------+
[root@demo ~]# mysql -u root -p nagiosql -e "SELECT tbl_host.host_name, tbl_hosttemplate.template_name FROM tbl_host LEFT JOIN tbl_lnkHostToHosttemplate ON tbl_host.id=tbl_lnkHostToHosttemplate.idMaster LEFT JOIN tbl_hosttemplate ON tbl_lnkHostToHosttemplate.idSlave=tbl_hosttemplate.id;"Enter password: 
+----------------------+------------------------------+
| host_name            | template_name                |
+----------------------+------------------------------+
| localhost            | linux-server                 | 
| Cube switch          | xiwizard_switch_host         | 
| support.nagios.com   | xiwizard_website_host        | 
| ESX Server           | xiwizard_generic_host        | 
| www.oreilly.com      | xiwizard_webtransaction_host | 
| Tony Desktop         | xiwizard_windowsdesktop_host | 
| www.nagios.com       | xiwizard_website_host        | 
| Server Room          | xiwizard_websensor_host      | 
| nagios.org           | xiwizard_website_host        | 
| Ubuntu Desktop       | xiwizard_linuxserver_host    | 
| community.nagios.org | xiwizard_website_host        | 
| library.nagios.com   | xiwizard_website_host        | 
+----------------------+------------------------------+
[root@demo ~]# 
Working out the template cascading will be quite the adventure.
That will work for me, Thankyou.

Re: Report that shows key information about Checks.

Posted: Mon Jan 10, 2011 10:14 am
by mguthrie
The /usr/local/nagios/var/objects.cache is a cached file with the full configurations for everything in Nagios. It's not necessarily a handy thing to sort through if you have thousands of services, but it does show the full configuration for everything Nagios is using.

Re: Report that shows key information about Checks.

Posted: Mon Jan 10, 2011 12:05 pm
by QS1
mguthrie wrote:The /usr/local/nagios/var/objects.cache is a cached file with the full configurations for everything in Nagios. It's not necessarily a handy thing to sort through if you have thousands of services, but it does show the full configuration for everything Nagios is using.

Even better. I appreciate it. I will see what we can come up with. Thankyou.

Re: Report that shows key information about Checks.

Posted: Tue Jan 11, 2011 11:05 am
by tonyyarusso
Good luck - let us know how it goes!