I am looking for guidance on where to store plugins in our gearman worker boxes. I am getting notifications from XI that my worker does not have the plugin but I am not sure where to put them.
Sorry I am not following. The Gearman worker boxes does not have any nagios folder in it. As per their instructions by Mod Gearman, plugins must be added to the gearman boxes locally. I am looking for the folder to place them.
I might be able to offer a more thorough answer here - mod_gearman actually pulls down all the information it needs from the job server. This dude interprets macros for you so that when they get to gearman they've already been all expanded out.
With that said you're going to want your plugins in the same location on all the servers, that location by default is what tgriep pointed out.
To doublecheck you typically would find it defined as the $USER1$ macro in /usr/local/nagios/etc/resources.cfg file
Thanks for the explanation and that's what I was looking for.
I also have one more question regarding Mod_Gearman. How does it handle "localhost" checks or should I change the hostname? If say a worker node checks "localhost" it isn't going to return the correct value.
You have to be careful. "localhost" is a special case because all of it's checks are local checks whereas remote systems are remote checks. mod_gearman cannot take care of that for you... it will report its own status for localhost. 2 ways to deal with it.
1) Change all of your localhost checks to use NRPE and attach at the external IP, not 127.0.0.1.
2) setup a hostgroup for localhost that will prevent all the remote workers from grabbing its hosts/services.
So my understanding is that if I specify a hostgroup in the mod_gearman_worker config, then that worker will only perform checks of that hostgroup? Is that correct? If so, is there anyway to specify workers to do everything BUT this localhost group?
The Docs wrote:Server Options
Additional options for the NEB module only:
localhostgroups
sets a list of hostgroups which will not be executed by gearman. They are just passed through.