find out 1minute checks

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

find out 1minute checks

Post by elinagios »

Hello

is there a way how to find out service and host checks where time interval has been set to 1minute? Maybe a mysql query?

Thank you!
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: find out 1minute checks

Post by SteveBeauchemin »

There is a file Nagios creates where all the items are expanded out such that each definition is complete with no underlying templates involved.

In your /usr/local/nagios/etc/nagios.cfg file you can see where your file is located

Code: Select all

grep object_cache /usr/local/nagios/etc/nagios.cfg
# object_cache relocated
object_cache_file=/var/nagiosramdisk/objects.cache
I use the ramdisk and the file is found there for my site.

To see all your timings you can use this

Code: Select all

grep check_interval /var/nagiosramdisk/objects.cache | sort -u
If you see a 1 minute interval, then you can edit the file and search for it to find the item using it.

Then, in the Nagios GUI you will have to see if it is coded directly to the host/service or is inherited by a Template definition.

That is how I would look for the data.

Thanks

Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: find out 1minute checks

Post by benjaminsmith »

Thanks for the input, Steve!

The configurations are stored in the nagiosql database (the tbl_host and tbl_service tables), and you can pull data there as well.
For example:

Code: Select all

mysql -u root -pnagiosxi
use nagiosql;
select host_name, check_interval from tbl_host order by check_interval asc;;
Let us know if you have any other questons.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

Re: find out 1minute checks

Post by elinagios »

thank you, was very helpful.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: find out 1minute checks

Post by benjaminsmith »

thank you, was very helpful
Your welcome!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked