Quick Gearman Question

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Quick Gearman Question

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Quick Gearman Question

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Quick Gearman Question

Post 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.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Quick Gearman Question

Post 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!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Quick Gearman Question

Post by scottwilkerson »

You can add both addresses to the allowed_hosts in a comma separated list
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Quick Gearman Question

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Quick Gearman Question

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Quick Gearman Question

Post by mguthrie »

The check distribution fails if there's uppercase letters in the group names???
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Quick Gearman Question

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Quick Gearman Question

Post 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...
Locked