Page 1 of 1

find out 1minute checks

Posted: Tue Jan 26, 2021 8:17 am
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!

Re: find out 1minute checks

Posted: Tue Jan 26, 2021 1:02 pm
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

Re: find out 1minute checks

Posted: Tue Jan 26, 2021 6:04 pm
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.

Re: find out 1minute checks

Posted: Wed Jan 27, 2021 10:02 am
by elinagios
thank you, was very helpful.

Re: find out 1minute checks

Posted: Wed Jan 27, 2021 10:08 am
by benjaminsmith
thank you, was very helpful
Your welcome!