Page 1 of 2

Quick Gearman Question

Posted: Mon Oct 22, 2012 9:24 am
by BanditBBS
So, I have XI installed and also gearman. Everything is working great. Now I want to add a worker and I can see it communicating with the server. I know with Nagios Core I need to just install nagios plugins and of course any extra plugins I would install. With XI, is that the case or do I need to install XI on the workers as well?

I have a test machine in a hostgroup I am forcing to the new worker. It is a windows desktop and is trying to use this command:

Code: Select all

check_xi_service_nsclient 	$USER1$/check_nt -H $HOSTADDRESS$ -s "$ARG1$" -p 12489 -v $ARG2$ $ARG3$ $ARG4$
Well, check_nt does exist on the worker since I installed Nagios plugins, but all I get back is "could not fetch information from server"

I also compared the check_nt file that installed with XI, it is 93815 in size, however, the one installed with Nagios Plugins is 127779, could that be the issue? I'm so lost :(

Anyone have any ideas?

I'm going to post in mod_gearman's google group as well.

Re: Quick Gearman Question

Posted: Mon Oct 22, 2012 9:33 am
by scottwilkerson
You should only need the plugin (and any of their dependencies), not all of XI.

The machines could be different architectures (32 or 64 bit) and the filesize would be different, this is normal.

It looks like you have the right idea, but you need to make sure that the NSClient++ NSC.ini file isn't set to only allow access from your nagios XI server in the
allowed_hosts setting.

Re: Quick Gearman Question

Posted: Mon Oct 22, 2012 9:33 am
by mguthrie
So, I have XI installed and also gearman. Everything is working great. Now I want to add a worker and I can see it communicating with the server. I know with Nagios Core I need to just install nagios plugins and of course any extra plugins I would install. With XI, is that the case or do I need to install XI on the workers as well?
Yes, this part works the same. The only difference is that you don't want to use mod gearman for event handlersin XI, just checks.
Well, check_nt does exist on the worker since I installed Nagios plugins, but all I get back is "could not fetch information from server"
Most likely you'll need to add the gearman worker to the list of allowed hosts in NsClient's nsc.ini file, and then restart nsclient.

Re: Quick Gearman Question

Posted: Mon Oct 22, 2012 9:38 am
by BanditBBS
Yea, I modified the allowed_hosts line and from the XI server I now get the "could not fetch information from server" and from the worker I am adding I can now fetch the data. I have that worker configured to receive hostgroup test and servicegroup test, but it looks like the main XI server is still checking it as I am still getting "could not fetch information from server"

I'm still working on it....I'll fix this and be a gearman expert if it kills me!

Re: Quick Gearman Question

Posted: Mon Oct 22, 2012 9:43 am
by scottwilkerson
You can add both addresses to the allowed_hosts in a comma separated list

Re: Quick Gearman Question

Posted: Mon Oct 22, 2012 9:45 am
by BanditBBS
scottwilkerson wrote:You can add both addresses to the allowed_hosts in a comma separated list
Yea, I'm aware. I'm testing this for sending checks to a node of the network the main server does not have access to. It will just have port 4730(gearman) open to the worker.

Re: Quick Gearman Question

Posted: Mon Oct 22, 2012 11:25 am
by BanditBBS
Important note for anyone else doing this : Make sure hostgroup and servicegroup names are all lowercase! I've got it all figured out now....I think.

Re: Quick Gearman Question

Posted: Mon Oct 22, 2012 1:07 pm
by mguthrie
The check distribution fails if there's uppercase letters in the group names???

Re: Quick Gearman Question

Posted: Mon Oct 22, 2012 1:10 pm
by BanditBBS
mguthrie wrote:The check distribution fails if there's uppercase letters in the group names???
Sure seems that way. I changed them to all lowercase in XI and then in the worker conf file and everything started working fine.

Re: Quick Gearman Question

Posted: Mon Oct 22, 2012 1:34 pm
by mguthrie
That strikes me as a serious bug in mod_gearman if that's the case, but I'm suspicious the issue could be something else. Maybe spaces after the commas or something. Almost everything in Nagios (addons included) uses the host name and service description and does a case sensitive match for each...