Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Zimbra .pids / service monitoring

  1. #21
    Join Date
    Mar 2007
    Location
    Small village in the center of Italy
    Posts
    350
    Rep Power
    8

    Default monitor and unmonitor into logrotate script

    reficeja, your scipt is a great starting point, i am using iwth with a very slighly change.
    what can be interesting is to integrate your script in to logrotate script to avoid receing alert during log rotation

    this is the snippet:

    Code:
    /var/log/zimbra.log {                                                                                                                                                              
        daily                                                                                                                                                                          
        rotate 365
        dateext                                                                                                                                                           
        missingok                                                                                                                                                                      
        notifempty
        create 0644 zimbra zimbra
        prerotate
          /usr/bin/monit -g zimbra unmonitor all
        endscript
        postrotate
          killall -HUP syslogd 2> /dev/null || true
          kill -HUP `cat /opt/zimbra/log/swatch.pid 2> /dev/null` 2> /dev/null || true
          kill -HUP `cat /opt/zimbra/log/logswatch.pid 2> /dev/null` 2> /dev/null || true
          /usr/bin/monit -g zimbra monitor all
        endscript
        compress
    }
    For John:
    i use monit principally to monit ldap, ldap process sometimes die without letting any reason on logs; i have to open a ticket to allow tech ppl to investigate the issue; in the meantime ldap start is the only way to get zimbra alive and monit does this task; there is no zimbra watchdog on ldap process.
    Last edited by maumar; 02-01-2009 at 12:21 AM.

  2. #22
    Join Date
    Mar 2007
    Location
    Small village in the center of Italy
    Posts
    350
    Rep Power
    8

    Default rotation of /opt/zimbra/log/mailbox.log

    hi there
    i am rotating daily zimbra.log, with 1 year of logs:

    Code:
       daily
        rotate 325
        dateext
    i would have 1 year of logs for mailbox.log, to trace imap access to mailboxes and all others activity (e.g.: trashing and deleting message, etc ect).
    I am searching around with no success; file should be log4j.properties, but i cannot find any MaxBackupIndex.
    There is ZimbraPatternLayout, but i dunno where is defined and what does contain.
    Any clue regarding this issue?
    tia

  3. #23
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Logfiles under /opt/zimbra/log and /opt/zimbra/log/mailboxd get pruned via a crontab entry. Take a look at
    Code:
    su - zimbra
    crontab -l

  4. #24
    Join Date
    Feb 2008
    Posts
    11
    Rep Power
    7

    Default

    I've updated the monit file for Zimbra 5.x with jetty. See below.

    Code:
    #zimbra processes                           
    
    check process antivirus with pidfile /opt/zimbra/log/clamd.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/zmantivirusctl start"
            stop program = "/bin/su - zimbra /opt/zimbra/bin/zmantivirusctl stop"  
            if children > 250 then alert                                           
            depends on ldap                                                        
            group zimbra                                                           
    
    
    check process ldap with pidfile /opt/zimbra/openldap/var/run/slapd.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/ldap start" with timeout 120 seconds
            stop program = "/bin/su - zimbra /opt/zimbra/bin/ldap stop" with timeout 120 seconds  
            if children > 250 then alert                                                          
            group zimbra                                                                          
    
    check process logwatch with pidfile /opt/zimbra/log/logswatch.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/zmlogswatchctl start"
            stop program = "/bin/su - zimbra /opt/zimbra/bin/zmlogswatchctl stop"  
            if children > 250 then alert                                           
            group zimbra                                                           
    
    check process mysql with pidfile /opt/zimbra/db/mysql.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/mysql.server start" with timeout 120 seconds
            stop program = "/bin/su - zimbra /opt/zimbra/bin/mysql.server stop" with timeout 120 seconds  
            if children > 250 then alert                                                                  
            group zimbra                                                                                  
    
    check process apache with pidfile /opt/zimbra/log/httpd.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/zmapachectl start"
            stop program = "/bin/su - zimbra /opt/zimbra/bin/zmapachectl stop"  
            if children > 250 then alert                                        
            depends on jetty                                                    
            group zimbra                                                        
    
    check process amavis with pidfile /opt/zimbra/log/amavisd.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/zmamavisdctl start"
            stop program = "/bin/su - zimbra /opt/zimbra/bin/zmamavisdctl stop"  
            if children > 250 then alert                                         
            group zimbra                                                         
    
    check process jetty with pidfile /opt/zimbra/log/zmmailboxd_java.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/zmmailboxdctl start" with timeout 240 seconds
            stop program = "/bin/su - zimbra /opt/zimbra/bin/zmmailboxdctl stop" with timeout 240 seconds  
            if children > 250 then alert                                                                   
            depends on ldap                                                                                
            group zimbra
    
    check process cyrus-sasl with pidfile /opt/zimbra/cyrus-sasl/state/saslauthd.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/zmsaslauthdctl start"
            stop program = "/bin/su - zimbra /opt/zimbra/bin/zmsaslauthdctl stop"
            if children > 250 then alert
            depends on ldap
            group zimbra
    
    check process snmp-swatch with pidfile /opt/zimbra/log/swatch.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/zmswatchctl start"
            stop program = "/bin/su - zimbra /opt/zimbra/bin/zmswatchctl stop"
            if children > 250 then alert
            group zimbra
    
    check process postfix with pidfile /opt/zimbra/data/postfix/spool/pid/master.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/postfix start" with timeout 120 seconds
            stop program = "/bin/su - zimbra /opt/zimbra/bin/postfix stop" with timeout 120 seconds
            if children > 250 then alert
            depends on ldap
            group zimbra
    
    check process zmmtaconfigctl with pidfile /opt/zimbra/log/zmmtaconfig.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/zmmtaconfigctl start"
            stop program = "/bin/su - zimbra /opt/zimbra/bin/zmmtaconfigctl stop"
            if children > 250 then alert
            depends on postfix
            group zimbra
    
    check process freshclam with pidfile /opt/zimbra/log/freshclam.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/zmclamdctl start"
            stop program = "/bin/su - zimbra /opt/zimbra/bin/zmclamdctl stop"
            if children > 250 then alert
            depends on antivirus
            group zimbra
    
    #Only for commercial version of zimbra
    #check process zmconvertdmon with pidfile /opt/zimbra/log/zmconvertdmon.pid
    #        start program = "/bin/su - zimbra /opt/zimbra/bin/zmconvertctl start"
    #        stop program = "/bin/su - zimbra /opt/zimbra/bin/zmconvertctl stop"
    #        if children > 250 then alert
    #        depends on postfix
    #        group zimbra
    
    check process mysqllogger with pidfile /opt/zimbra/logger/db/mysql.pid
            start program = "/bin/su - zimbra /opt/zimbra/bin/logmysql.server start" with timeout 120 seconds
            stop program = "/bin/su - zimbra /opt/zimbra/bin/logmysql.server stop" with timeout 120 seconds
            if children > 250 then alert
            depends on mysql
            group zimbra
    Last edited by sblandford; 06-24-2009 at 05:30 AM.

  5. #25
    Join Date
    Dec 2009
    Posts
    13
    Rep Power
    5

    Default

    Did you managed to lunch monit's web page ?
    In my case the webpage never shows if I go to Zimbra offers Open Source email server software and shared calendar for Linux and the Mac.

Similar Threads

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