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
Report that shows key information about Checks.
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Report that shows key information about Checks.
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.
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.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?
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Report that shows key information about Checks.
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.
Fair enough, but the info is in the SQL database?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.
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Report that shows key information about Checks.
Yeah, the one called 'nagiosql', specifically. Here's a sample:
Working out the template cascading will be quite the adventure.
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 ~]#
Re: Report that shows key information about Checks.
That will work for me, Thankyou.tonyyarusso wrote:Yeah, the one called 'nagiosql', specifically. Here's a sample:
Working out the template cascading will be quite the adventure.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 ~]#
Re: Report that shows key information about Checks.
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.
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.
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Report that shows key information about Checks.
Good luck - let us know how it goes!