Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@shamil
Created August 21, 2012 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shamil/3419161 to your computer and use it in GitHub Desktop.
Save shamil/3419161 to your computer and use it in GitHub Desktop.
how to install nagios3 with mod-gearman on Ubuntu

how to install nagios3 with mod-gearman on Ubuntu

configure apt to not install sugested and recommended packages

sudo tee /etc/apt/apt.conf.d/02recommends <<END
APT::Install-Recommends "0";
APT::Install-Suggests "0";
APT::AutoRemove::RecommendsImportant false; # optional
END

add ppa repo for gearman and install it

sudo apt-add-repository -y ppa:gearman-developers/ppa
sudo apt-get update
sudo apt-get install gearman
cd /usr/lib && sudo ln -s libgearman.so.7.0.0 libgearman.so.6

download mod-gearman deb packages

mkdir mod-gearman && cd mod-gearman

# your version might be other than 1.3.6
wget http://http.us.debian.org/debian/pool/main/m/mod-gearman/mod-gearman-doc_1.3.6-1_all.deb
wget http://http.us.debian.org/debian/pool/main/m/mod-gearman/mod-gearman-module_1.3.6-1_amd64.deb
wget http://http.us.debian.org/debian/pool/main/m/mod-gearman/mod-gearman-tools_1.3.6-1_amd64.deb
wget http://http.us.debian.org/debian/pool/main/m/mod-gearman/mod-gearman-worker_1.3.6-1_amd64.deb

install nagios

sudo apt-get install nagios3
usermod -s /bin/bash nagios

configure nagios

# make sure to set /etc/nagios3/nagios.cfg with the folowing options:
event_broker_options=-1
broker_module=/usr/lib/mod_gearman/mod_gearman.o config=/etc/mod-gearman/module.conf

finally restart nagios

invoke-rc.d nagios3 restart

testing

# check that nagios loaded the mod-gearman 
grep mod_gearman /var/log/nagios3/nagios.log | grep 'initialized successfully'

# check the status of gearman workers
/usr/lib/nagios/plugins/check_gearman -H localhost -q worker_`hostname` -t 10 -s check

# list workers in gearman queue
gearman_top
@wencesc
Copy link

wencesc commented Oct 10, 2013

hello .... thank you very much for the info!

follow step by step all ... but I have some problems because modgearman not start, the problem is because it creates the module. conf and I have conflicts with the line:
config=/etc/mod-gearman/module.conf

I just have to download the deb packages .... or should I install them also? .... because in your hand only downloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment