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 Thread Tools Search this Thread Display Modes
  #21 (permalink)  
Old 02-01-2009, 01:07 AM
Elite Member
 
Posts: 286
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 01:21 AM..
Reply With Quote
  #22 (permalink)  
Old 02-01-2009, 06:14 AM
Elite Member
 
Posts: 286
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
Reply With Quote
  #23 (permalink)  
Old 02-01-2009, 07:41 AM
Moderator
 
Posts: 7,911
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
__________________
Reply With Quote
  #24 (permalink)  
Old 06-24-2009, 03:53 AM
Member
 
Posts: 11
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 06:30 AM..
Reply With Quote
  #25 (permalink)  
Old 04-03-2010, 10:12 PM
Member
 
Posts: 13
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.