Mod_Gearman Worker Hostgroups

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Mod_Gearman Worker Hostgroups

Post by CFT6Server »

I have defined a hostgroup to test the plugins and mod_gearman_worker.

1. I have added a host to a "test" hostgroup.
2. I have configured a specific worker to handle that hostgroup.
3. I perform a check from XI, and noticed that the check is running on the XI host instead.

Steps taken:

1. Went into HostGroup, created "test" and then added host to it.
2. edit the /etc/mod_gearman/mod_gearman_worker.conf on worker2. Restarted mod_gearman_worker.
3. enable debug and tail log on all worker nodes.
4. monitor gearman_top to confirm that the hostgroup is recognized.
5. Initiate a service check of the host => check performed via XI.

Ine added to /etc/mod_gearman/mod_gearman_worker.conf on woker 2

Code: Select all

hostgroup=test
Confirmation message from log on worker1 which is the XI servier

Code: Select all

[2015-05-07 13:32:40][9811][DEBUG] got service job: kdcnaggm01 - Memory Usage
Gearman Top showing the hostgroup

Code: Select all

2015-05-07 13:33:40  -  localhost:4730  -  v1.1.8

 Queue Name                      | Worker Available | Jobs Waiting | Jobs Running
----------------------------------------------------------------------------------
 check_results                   |               1  |           0  |           0
 eventhandler                    |              99  |           0  |           0
 host                            |              99  |           0  |           0
hostgroup_test                  |              25  |           0  |           0
 service                         |              99  |           0  |           0
 worker_kdcnaggm01               |               1  |           0  |           0
 worker_kdcnaggm02               |               1  |           0  |           0
 worker_kdcnaggm03               |               1  |           0  |           0
 worker_kdcnagxi01                |               1  |           0  |           0
----------------------------------------------------------------------------------
Did I miss anything here?
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Mod_Gearman Worker Hostgroups

Post by jolson »

What does the mod_gearman conf file look like on your XI server?

Code: Select all

cat /etc/mod_gearman/mod_gearman_worker.conf
If the XI server is set up to handle your test hostgroup, it may pull the checks from the jobs queue.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Mod_Gearman Worker Hostgroups

Post by jdalrymple »

I don't see where that you specified the hostgroup in the neb conf:

Code: Select all

# sets a list of hostgroups which will go into seperate
# queues. Either specify a comma seperated list or use
# multiple lines.
#hostgroups=name1
#hostgroups=name2,name3
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: Mod_Gearman Worker Hostgroups

Post by CFT6Server »

This is the conf file of worker 2 that's configured with the hostgroup.
worker.conf
On top of configuring the conf on the worker node, do I also need to configure the server node?
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Mod_Gearman Worker Hostgroups

Post by Box293 »

On the Nagios XI server, you need to specify the hostgroups:

Code: Select all

/etc/mod_gearman/mod_gearman_neb.conf

hostgroups=test
Then restart Nagios.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: Mod_Gearman Worker Hostgroups

Post by CFT6Server »

Thanks. That's what I was missing. So the worker conf needs the hostgroups as well as the server needs the hostgroups defined in the neb conf.
Locked