Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Zimbra .pids / service monitoring

  1. #1
    Join Date
    Jan 2006
    Posts
    20
    Rep Power
    9

    Question Zimbra .pids / service monitoring

    Hi - I was wondering where the pids for Zimbra are located as I would really like to set up monitoring of the vital services in Zimbra using somehting like monit (http://www.tildeslash.com/monit/index.php) and the easiest way to do this is via process IDs

    Ade

  2. #2
    Join Date
    Jan 2006
    Posts
    83
    Rep Power
    9

    Default

    Quote Originally Posted by bin2hex
    Hi - I was wondering where the pids for Zimbra are located as I would really like to set up monitoring of the vital services in Zimbra using somehting like monit (http://www.tildeslash.com/monit/index.php) and the easiest way to do this is via process IDs

    Ade
    what's wrong with SNMP?

  3. #3
    Join Date
    Feb 2007
    Posts
    52
    Rep Power
    8

    Default Monit doesnt do snmp.

    Quote Originally Posted by robbyt View Post
    what's wrong with SNMP?
    And snmp is just for monitoring. Monit is used to actively monitor and restart services.

    I just had the same though, clamav died and user's email got queued up. Monit would have caught it.

  4. #4
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    There's a few pids in different directories, you'll find them if you do a search of the /opt/zimbra directories.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    Join Date
    Feb 2007
    Posts
    52
    Rep Power
    8

    Default Unfortunately..

    Quote Originally Posted by phoenix View Post
    There's a few pids in different directories, you'll find them if you do a search of the /opt/zimbra directories.
    There are more pid's then zmcontrol status report.

    If someone has a monit recipe for zimbra that they can post here, that would be awsome.

    Otherwise I'm going to have to go through the pid's and see which services those actually are. Kind of a bummer to do on a production system.

  6. #6
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    There's only thirteen of them.

    You could always contribute your findings to the wiki once you're done.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  7. #7
    Join Date
    Feb 2007
    Posts
    52
    Rep Power
    8

    Default

    Quote Originally Posted by phoenix View Post
    There's only thirteen of them.

    You could always contribute your findings to the wiki once you're done.
    and 8 processes. Optimally I'd like to have all 13 monitored.

    Looks like I will be doing just that. :-)

  8. #8
    Join Date
    Feb 2007
    Posts
    52
    Rep Power
    8

    Cool Here's some..

    Quote Originally Posted by phoenix View Post
    There's only thirteen of them.

    You could always contribute your findings to the wiki once you're done.
    It's untested. Haven't even brought up monit yet. Anyone care to test? Give feedback?

    This is for 4.5.1 Network Edition btw..

    Code:
    #zimbra processes
    
    check process antivirus with pidfile /opt/zimbra/log/clamd.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmantivirusctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmantivirusctl stop' zimbra"
            if children > 250 then alert
            depends on ldap
            group zimbra
    
    
    check process ldap with pidfile /opt/zimbra/openldap-2.3.21/var/run/slapd.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/ldap start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/ldap stop' zimbra"
            if children > 250 then alert
            group zimbra
    
    check process logwatch with pidfile /opt/zimbra/log/logswatch.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmlogswatchctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmlogswatchctl stop' zimbra"
            if children > 250 then alert
            group zimbra
    
    check process mysql with pidfile /opt/zimbra/db/mysql.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/mysql start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/mysql stop' zimbra"
            if children > 250 then alert
            group zimbra
    
    check process apache with pidfile /opt/zimbra/log/httpd.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmapachectl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmapachectl stop' zimbra"
            if children > 250 then alert
            depends on tomcat
            group zimbra
    
    check process amavis with pidfile /opt/zimbra/log/amavisd.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmamavisdctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmamavisdctl stop' zimbra"
            if children > 250 then alert
            group zimbra
    
    check process tomcat with pidfile /opt/zimbra/log/zmtomcatmgr.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/tomcat start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/tomcat stop' zimbra"
            if children > 250 then alert
            depends on ldap
            group zimbra
    
    check process cyrus-sasl with pidfile /opt/zimbra/cyrus-sasl-2.1.21.ZIMBRA/state/saslauthd.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmsaslauthdctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmsaslauthdctl stop' zimbra"
            if children > 250 then alert
            depends on ldap
            group zimbra
    
    check process snmp-swatch with pidfile /opt/zimbra/log/swatch.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmswatchctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmswatchctl stop' zimbra"
            if children > 250 then alert
            group zimbra
    
    check process postfix with pidfile /opt/zimbra/postfix-2.2.9/spool/pid/master.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/postfix start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/postfix stop' zimbra"
            if children > 250 then alert
            depends on ldap
            group zimbra
    
    check process zmmtaconfigctl with pidfile /opt/zimbra/log/zmmtaconfig.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmmtaconfigctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmmtaconfigctl stop' zimbra"
            if children > 250 then alert
            depends on postfix
            group zimbra
    
    check process freshclam with pidfile /opt/zimbra/log/freshclam.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmclamdctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmclamdctl stop' zimbra"
            if children > 250 then alert
            depends on antivirus
            group zimbra
    
    check process zmconvertdmon with pidfile /opt/zimbra/log/zmconvertdmon.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmconvertctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmconvertctl stop' zimbra"
            if children > 250 then alert
            depends on postfix
            group zimbra
    
    check process mysqllogger with pidfile /opt/zimbra/logger/db/mysql.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/logmysql start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/logmysql stop' zimbra"
            if children > 250 then alert
            depends on mysql
            group zimbra
    Last edited by azilber; 02-22-2007 at 07:42 AM. Reason: update

  9. #9
    Join Date
    May 2007
    Location
    London, UK
    Posts
    26
    Rep Power
    8

    Default

    Quote Originally Posted by azilber View Post
    It's untested. Haven't even brought up monit yet. Anyone care to test? Give feedback?

    This is for 4.5.1 Network Edition btw..

    Code:
    #zimbra processes
    
    check process antivirus with pidfile /opt/zimbra/log/clamd.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmantivirusctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmantivirusctl stop' zimbra"
            if children > 250 then alert
            depends on ldap
            group zimbra
    
    
    check process ldap with pidfile /opt/zimbra/openldap-2.3.21/var/run/slapd.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/ldap start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/ldap stop' zimbra"
            if children > 250 then alert
            group zimbra
    
    check process logwatch with pidfile /opt/zimbra/log/logswatch.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmlogswatchctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmlogswatchctl stop' zimbra"
            if children > 250 then alert
            group zimbra
    
    check process mysql with pidfile /opt/zimbra/db/mysql.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/mysql start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/mysql stop' zimbra"
            if children > 250 then alert
            group zimbra
    
    check process apache with pidfile /opt/zimbra/log/httpd.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmapachectl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmapachectl stop' zimbra"
            if children > 250 then alert
            depends on tomcat
            group zimbra
    
    check process amavis with pidfile /opt/zimbra/log/amavisd.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmamavisdctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmamavisdctl stop' zimbra"
            if children > 250 then alert
            group zimbra
    
    check process tomcat with pidfile /opt/zimbra/log/zmtomcatmgr.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/tomcat start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/tomcat stop' zimbra"
            if children > 250 then alert
            depends on ldap
            group zimbra
    
    check process cyrus-sasl with pidfile /opt/zimbra/cyrus-sasl-2.1.21.ZIMBRA/state/saslauthd.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmsaslauthdctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmsaslauthdctl stop' zimbra"
            if children > 250 then alert
            depends on ldap
            group zimbra
    
    check process snmp-swatch with pidfile /opt/zimbra/log/swatch.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmswatchctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmswatchctl stop' zimbra"
            if children > 250 then alert
            group zimbra
    
    check process postfix with pidfile /opt/zimbra/postfix-2.2.9/spool/pid/master.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/postfix start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/postfix stop' zimbra"
            if children > 250 then alert
            depends on ldap
            group zimbra
    
    check process zmmtaconfigctl with pidfile /opt/zimbra/log/zmmtaconfig.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmmtaconfigctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmmtaconfigctl stop' zimbra"
            if children > 250 then alert
            depends on postfix
            group zimbra
    
    check process freshclam with pidfile /opt/zimbra/log/freshclam.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmclamdctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmclamdctl stop' zimbra"
            if children > 250 then alert
            depends on antivirus
            group zimbra
    
    check process zmconvertdmon with pidfile /opt/zimbra/log/zmconvertdmon.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmconvertctl start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/zmconvertctl stop' zimbra"
            if children > 250 then alert
            depends on postfix
            group zimbra
    
    check process mysqllogger with pidfile /opt/zimbra/logger/db/mysql.pid
            start program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/logmysql start' zimbra"
            stop program = "/sbin/runuser --shell=/bin/bash --command='/opt/zimbra/bin/logmysql stop' zimbra"
            if children > 250 then alert
            depends on mysql
            group zimbra
    Thanks for that... I'm currently testing that out on our beta server... will run it for a week or so and let you know how its done.

    I modified the paths in your config file for openldap, cyrus-sasl and postfix - no need to include the version numbers as Zimbra has some sybolic links that make the script independent of whatever versions of these packages future versions of Zimbra will use

    If all goes well, I'll start Monit from init... at the moment I want to be able to kill it easily if things go wrong...

  10. #10
    Join Date
    Jul 2006
    Location
    ireland
    Posts
    388
    Rep Power
    9

    Default could mask an underlying problem

    This looks good but there is a danger this could mask an underlying problem
    if processes dies regularly

Similar Threads

  1. Can't start Zimbra!
    By zibra in forum Administrators
    Replies: 5
    Last Post: 03-22-2007, 12:34 PM
  2. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM
  3. huge log size
    By rmvg in forum Administrators
    Replies: 5
    Last Post: 01-02-2007, 10:39 AM
  4. zimbra-core missing
    By kinaole in forum Developers
    Replies: 1
    Last Post: 10-02-2006, 12:59 PM
  5. Unable to start tomcat
    By chanck in forum Administrators
    Replies: 11
    Last Post: 06-11-2006, 01:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •