Hallo,
I've a question about data retrieving on Nagios.
In several services we need to populate the field 'Notes URL': this is done in different ways, it happens to directly write the field inside the service, in some cases we use a Service Template with the field 'Notes URL' populated, or a 'Host Template'. A next complication level is added when a template containing the information is inherited from another template.
I've tried to write a SQL query, to get this information from Mysql 'nagios' database: the query is enormous and it's very hard to retrieve all the possible cases and combination with the various possible template.
Do you know a way to get these information? Maybe Nagios scan via script inside the configuration files bypassing the database option?
Regards
Francesco
retrieve field populated in several template
Re: retrieve field populated in several template
When the Nagios process starts up, it will go through all of the configuration files, resolve the dependencies, templates etc and create a file called objects.cache with all of that resolved.
You can then search through that file for the information you are looking for which would probably be easier that doing the SQL query and determining the links, etc as it is already done in that file.
You can then search through that file for the information you are looking for which would probably be easier that doing the SQL query and determining the links, etc as it is already done in that file.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: retrieve field populated in several template
Thanks,
you solved my problem! The information can be retrieved much easier in this way.
Regards,
Francesco
you solved my problem! The information can be retrieved much easier in this way.
Regards,
Francesco
Re: retrieve field populated in several template
Your welcome.
Is it alright to mark this post as solved and lock it up?
Is it alright to mark this post as solved and lock it up?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: retrieve field populated in several template
Yes, of course!
Regards,
Francesco
Regards,
Francesco