4 # Menu: Distributed Monitoring
6 # Here you can enable/disable distributed features based on Gearman.
7 # Using Mod-Gearman will reduce the latency and load caused by check execution -
8 # even when used on the same host - because the Mod-Gearman worker
9 # is smaller and more efficient in the creation of processes than Nagios.
16 echo "off: disable gearman features"
17 echo "on: enable gearman features"
20 # this just enables/disables the gearman settings tree
21 if [ "$2" = "on" ]; then
22 if [ ! -d $OMD_ROOT/etc
/mod-gearman
/.
]; then
23 echo "ERROR: make sure $OMD_ROOT/etc/mod-gearman exists! (Should have been shipped with OMD)"
26 mkdir
-p $OMD_ROOT/etc
/nagios
/nagios.d
27 ln -sfn ..
/..
/mod-gearman
/nagios.cfg
$OMD_ROOT/etc
/nagios
/nagios.d
/mod-gearman.cfg
28 mkdir
-p $OMD_ROOT/etc
/icinga
/icinga.d
29 ln -sfn ..
/..
/mod-gearman
/nagios.cfg
$OMD_ROOT/etc
/icinga
/icinga.d
/mod-gearman.cfg
31 rm -f $OMD_ROOT/etc
/nagios
/nagios.d
/mod-gearman.cfg
32 rm -f $OMD_ROOT/etc
/icinga
/icinga.d
/mod-gearman.cfg