Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
 
Go Back   Zimbra - Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra - Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack (4) Thread Tools Display Modes
  4 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 05-10-2006, 04:12 PM
Intermediate Member
 
Posts: 20
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
Reply With Quote
  #2 (permalink)  
Old 05-10-2006, 11:06 PM
Loyal Member
 
Posts: 83
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?
Reply With Quote
  #3 (permalink)  
Old 02-21-2007, 11:10 AM
Senior Member
 
Posts: 52
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.
Reply With Quote
  #4 (permalink)  
Old 02-21-2007, 11:15 AM
Zimbra Consultant & Moderator
 
Posts: 11,506
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
Reply With Quote
  #5 (permalink)  
Old 02-21-2007, 11:43 AM
Senior Member
 
Posts: 52
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.
Reply With Quote
  #6 (permalink)  
Old 02-21-2007, 11:49 AM
Zimbra Consultant & Moderator
 
Posts: 11,506
Default

There's only thirteen of them.

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


Bill
Reply With Quote
  #7 (permalink)  
Old 02-21-2007, 12:33 PM
Senior Member
 
Posts: 52
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. :-)
Reply With Quote
  #8 (permalink)  
Old 02-21-2007, 03:52 PM
Senior Member
 
Posts: 52
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
Reply With Quote
  #9 (permalink)  
Old 05-25-2007, 06:15 AM
Active Member
 
Posts: 26
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...
Reply With Quote
  #10 (permalink)  
Old 06-05-2007, 08:47 AM
Elite Member
 
Posts: 303
Default could mask an underlying problem

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


Thread Tools
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0