Migrate to gearman from NCSA

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.
Locked
punkoivan
Posts: 6
Joined: Thu Sep 15, 2016 7:13 am

Migrate to gearman from NCSA

Post 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
Last edited by punkoivan on Wed Sep 21, 2016 2:42 am, edited 1 time in total.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Migrate to gearman from NCSA

Post 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.
Former Nagios employee
punkoivan
Posts: 6
Joined: Thu Sep 15, 2016 7:13 am

Re: Migrate to gearman from NCSA

Post 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).
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Migrate to gearman from NCSA

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
punkoivan
Posts: 6
Joined: Thu Sep 15, 2016 7:13 am

Re: Migrate to gearman from NCSA

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