Page 1 of 1

Migrate to gearman from NCSA

Posted: Mon Sep 19, 2016 7:44 am
by punkoivan
Hello to all!

I wanna move infrastructure from NCSA to Gearman.
In gearman docs I found that it can be done with set off all distributed options in gearman server config.

I already did it, but can't understand how to config workers.
this is my /etc/mod_gearman2/module.conf:

Code: Select all

debug=2
logfile=/var/log/mod_gearman2/mod_gearman_neb.log
server=localhost:4730
eventhandler=no
services=no
hosts=no
do_hostchecks=yes
route_eventhandler_like_checks=no
encryption=yes
use_uniq_jobs=on
result_workers=1
perfdata=no
perfdata_mode=1
orphan_host_checks=yes
orphan_service_checks=yes
accept_clear_results=yes
It's just for testing, so I don't setup secure key, groups and other for now.

Can anyone help me with this or give a helpful links?

Thanks a lot!
Cheers,
Ivan

Re: Migrate to gearman from NCSA

Posted: Mon Sep 19, 2016 1:49 pm
by tmcdonald
You're comparing apples and oranges here. NSCA is a daemon that runs on the Nagios server and accepts passive checks from agents running on remote machines. mod_gearman is used to distribute active checks to several remote workers.

So in this context, I am not sure what you are asking for help with.

Re: Migrate to gearman from NCSA

Posted: Tue Sep 20, 2016 4:18 am
by punkoivan
Gearman can do passive checks via command "send_gearman"

If you're interesting in, try this document on page 22
https://assets.nagios.com/presentations ... earman.pdf

so, the main question is how run this command - send_gearman.
Do I need to install Nagios server to push passive check to Master or it can be done with gearmand (server).

Re: Migrate to gearman from NCSA

Posted: Tue Sep 20, 2016 12:37 pm
by lmiltchev
Mod Gearman is not our (Nagios) product. You can review their documentation in regards to passive checks here:
https://labs.consol.de/nagios/mod-gearm ... ive_checks

You could set up your command to run on a cron.

The command would be something like this:

Code: Select all

./send_gearman --server=<job server> --encryption=no --host="<hostname>" --service="<service>" --message="message"
or

Code: Select all

./send_gearman --server=<job server> --encryption=yes --key="<your key>" --host="<hostname>" --service="<service>" --message="message"
Note: Depending on the version of the Mod Gearman you are running, you may need to use "./send_gearman2" instead of "./send_gearman".

Hope this helps.

Re: Migrate to gearman from NCSA

Posted: Wed Sep 21, 2016 2:42 am
by punkoivan
lmiltchev, Thanks!
I'm already realized that I need server, like with NSCA to submit passvie check or use cron, as you said..

Mark question as solved.