NagioS-Mod-Gearman Help

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.
Post Reply
cool_oar
Posts: 2
Joined: Wed Mar 19, 2025 11:30 pm

NagioS-Mod-Gearman Help

Post by cool_oar »

Hello,

I am newbie to Nagios Distributed monitoring and facing challenges when trying to setup distributed monitoring with nagios core and gearman.
  • I have a Nagios Core server running and I have another server where I want to run a Gearman server to distribute checks.
  • Both the servers are able to communicate with each other on port 4730
However when I check service status: systemctl status nagios-mod-gearman-worker.service it's failed with the following output:

× nagios-mod-gearman-worker.service - Nagios Mod Gearman Worker
Loaded: loaded (/usr/lib/systemd/system/nagios-mod-gearman-worker.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-03-20 04:30:38 UTC; 5min ago
Duration: 672ms
Docs: https://www.nagios.org/projects/nagios-mod-gearman/
Process: 533 ExecStart=/usr/bin/nagios-mod-gearman-worker --config=/etc/nagios-mod-gearman/worker.conf --pidfile=/run/nagios-mod-gearman-worker/nagios-mod-gearma>
Main PID: 533 (code=exited, status=203/EXEC)
CPU: 5ms

I am unsure what is going wrong. Also it would be great if someone could guide me on how to edit the Gearman Module and Worker Configuration files.
cool_oar
Posts: 2
Joined: Wed Mar 19, 2025 11:30 pm

Re: NagioS-Mod-Gearman Help

Post by cool_oar »

Hello,

I have managed to get this working by reinstalling everything from scratch, I am running Nagios core version 4.5.9 on Ubuntu 24.0. However when the broker is enabled, Nagios stops or crashes every 4mins:

Program End[03-20-2025 13:26:49] Caught SIGTERM, shutting down...
Program End[03-20-2025 13:26:49] Caught SIGSEGV, shutting down...
Informational Message[03-20-2025 13:22:19] Successfully launched command file worker with pid 60359
Informational Message[03-20-2025 13:22:19] Event broker module '/usr/lib64/nagios-mod-gearman/nagios-mod-gearman.o' initialized successfully.
Informational Message[03-20-2025 13:22:19] nagios-mod-gearman: initialized version 1.0.1 (libgearman 1.1.20+ds)
Informational Message[03-20-2025 13:22:19] wproc: Registry request: name=Core Worker 60358;pid=60358
Informational Message[03-20-2025 13:22:19] wproc: Registry request: name=Core Worker 60355;pid=60355
Informational Message[03-20-2025 13:22:19] wproc: Registry request: name=Core Worker 60357;pid=60357
Informational Message[03-20-2025 13:22:19] wproc: Registry request: name=Core Worker 60356;pid=60356
Informational Message[03-20-2025 13:22:19] wproc: Successfully registered manager as @wproc with query handler
Informational Message[03-20-2025 13:22:19] qh: help for the query handler registered
Informational Message[03-20-2025 13:22:19] qh: echo service query handler registered
Informational Message[03-20-2025 13:22:19] qh: core query handler registered
Informational Message[03-20-2025 13:22:19] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
Informational Message[03-20-2025 13:22:19] LOG VERSION: 2.0
Informational Message[03-20-2025 13:22:19] Local time is Thu Mar 20 13:22:19 UTC 2025
Program Start[03-20-2025 13:22:19] Nagios 4.5.9 starting... (PID=60354)
Program End[03-20-2025 13:12:41] Caught SIGTERM, shutting down...
Program End[03-20-2025 13:12:40] Caught SIGSEGV, shutting down...
Informational Message[03-20-2025 13:08:11] Successfully launched command file worker with pid 60137
Informational Message[03-20-2025 13:08:11] Event broker module '/usr/lib64/nagios-mod-gearman/nagios-mod-gearman.o' initialized successfully.
Informational Message[03-20-2025 13:08:11] nagios-mod-gearman: initialized version 1.0.1 (libgearman 1.1.20+ds)
Informational Message[03-20-2025 13:08:11] wproc: Registry request: name=Core Worker 60134;pid=60134
Informational Message[03-20-2025 13:08:11] wproc: Registry request: name=Core Worker 60135;pid=60135
Informational Message[03-20-2025 13:08:11] wproc: Registry request: name=Core Worker 60136;pid=60136
Informational Message[03-20-2025 13:08:11] wproc: Registry request: name=Core Worker 60133;pid=60133
Informational Message[03-20-2025 13:08:11] wproc: Successfully registered manager as @wproc with query handler
Informational Message[03-20-2025 13:08:11] qh: help for the query handler registered
Informational Message[03-20-2025 13:08:11] qh: echo service query handler registered
Informational Message[03-20-2025 13:08:11] qh: core query handler registered
Informational Message[03-20-2025 13:08:11] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
Informational Message[03-20-2025 13:08:11] LOG VERSION: 2.0
Informational Message[03-20-2025 13:08:11] Local time is Thu Mar 20 13:08:11 UTC 2025
Program Start[03-20-2025 13:08:11] Nagios 4.5.9 starting... (PID=60131)
Program End[03-20-2025 13:03:43] Caught SIGTERM, shutting down...
Program End[03-20-2025 13:03:43] Caught SIGSEGV, shutting down...
Service Critical[03-20-2025 13:03:02] SERVICE ALERT: localhost;HTTP;CRITICAL;SOFT;1;connect to address 127.0.0.1 and port 80: Connection refused
DoubleDoubleA
Posts: 199
Joined: Thu Feb 09, 2017 5:07 pm

Re: NagioS-Mod-Gearman Help

Post by DoubleDoubleA »

Try this:

Edit /etc/nagios-mod-gearman/module.conf

Set
debug=1

Save and restart core

look here for errors:
/var/log/nagios-mod-gearman/nagios-mod-gearman-neb.log
Post Reply