how to use Query Socket in Nagios 4

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
abhijitnt
Posts: 6
Joined: Mon Dec 30, 2013 11:04 am

how to use Query Socket in Nagios 4

Post by abhijitnt »

Hi All,
trying to understand how to use Query Socket feature in my Nagios 4.0.2 server. I am not getting good example beside nagios documentation (http://nagios.sourceforge.net/docs/nagi ... ery_socket) to understand more about this new feature. I am not using any database in my current setup but trying to understand can any other application (outside Nagios) talk to nagios and pull currently critical services/checks?
Does this require DB backend to work or any other requirement, can someone share few examples of ../var/rw/nagios.qh to understand how we suppose to configure and use that?

Thanks
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: how to use Query Socket in Nagios 4

Post by sreinhardt »

This does not require a database backend at all, it is purely a file socket that queries the core engine for whatever data you request and returns it back over the same socket. However as it's relatively new, I don't know of any examples outside of the nerd radio stuff.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
abhijitnt
Posts: 6
Joined: Mon Dec 30, 2013 11:04 am

Re: how to use Query Socket in Nagios 4

Post by abhijitnt »

Thanks Spenser.
Would you mind sharing those example or nerd, how to configure and use it if you have handy or any detailed documentation will also work.

Thanks
Abhijit
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: how to use Query Socket in Nagios 4

Post by sreinhardt »

About the only code I know of, is the actual core code for nerd radio. You can find it here on sourceforge git, or in your tarball for nagios core. http://sourceforge.net/p/nagios/nagiosc ... ase/nerd.c
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked