Automation of disabling earmand

14 views
Skip to first unread message

T.J. Yang

unread,
Mar 23, 2015, 6:29:29 AM3/23/15
to mod_g...@googlegroups.com
I have a mod_gearman on a Nagios 3.5.1 server(CentOS 6.6) with job/worker on same box, 
I found I need to run following commands in sequence to completely disable mod_gearman.
So that I can observe performance with/without mod_gearman.

1. /etc/init.d/mod_gearman_worker stop
2. /etc/init.d/gearmand stop
3. vi /etc/nagios/nagios.cfg # to comment out mod_gearman.o broker
4. /etc/init.d/nagios reload

Is above sequence correct ? 
Can I leave mod_german_worker running ? 
If I skip 3. and 4., will nagios daemon crash or suffer ?

I am tempting to automate 2,3,4 steps into a command like "/etc/init.d/geamand disable"

Stig Sandbeck Mathisen

unread,
Mar 23, 2015, 4:54:18 PM3/23/15
to T.J. Yang, mod_g...@googlegroups.com
Comment out the mod_gearman.o broker and restart Nagios. Nagios will
then handle all host and service checks by itself.

After Nagios has restarted, the "mod_gearman_worker" and "gearmand"
services will consume a tiny bit of resources while running, but can be
stopped at this point.

--
Stig Sandbeck Mathisen

T.J. Yang

unread,
Mar 24, 2015, 9:42:27 PM3/24/15
to mod_g...@googlegroups.com, tjyan...@gmail.com
When I left mod_gearman.o loaded and only disabled job server and worker daemon, I found all service/host checks stopped.
Is this expected behavior  ? 

tj

Alessandro Ren

unread,
Mar 25, 2015, 9:53:22 AM3/25/15
to mod_g...@googlegroups.com

    I think all the checks still get sent to the gearmand queue where the worker was supposed to process them and delivery back the results to the check_results queue.
    You have to comment out the broker on nagios / naemon,
   
    []s.
--
You received this message because you are subscribed to the Google Groups "mod_gearman" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod_gearman...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


| Lançamento de produto | OpMon Traffic Analyzer - Veja o tráfego que passa através da sua rede em tempo real | Download Gratuito | 30 dias TRIAL!

T.J. Yang

unread,
Mar 25, 2015, 12:43:34 PM3/25/15
to mod_g...@googlegroups.com
if this the case, shouldn't following actions/logics be performed ?

1.  /etc/init.d/gearmand start: check if mod_gearm.o is in /etc/nagios/nagios.cfg or not
     1.1 Yes ? startup gearmand (job server).
      1.2 No ? add/enable mod_gearman.o line in nagios.cfg
           1.2.1 reload nagios
2.  /etc/init.d/gearmand stop: 
    2.1 kill gearmand deamon
    2.2 remove/comment out mod_gearman.o line in nagios.cfg
    2.3 reload nagios

tj

Alessandro Ren

unread,
Mar 25, 2015, 12:48:16 PM3/25/15
to mod_g...@googlegroups.com

    I'd just comment out the broker on nagios and restart it, as gearmand and mod_gearman_worker wont consume that much resources when doing nothing on the server and simplifying the enabling / disabling process.

    []s.
Reply all
Reply to author
Forward
0 new messages