Hi guys
sup?
I recieve daily messages report from my server... i need this statistics moth, its is possible?
Thanks mans...
Hi guys
sup?
I recieve daily messages report from my server... i need this statistics moth, its is possible?
Thanks mans...
Hello halley, welcome to the forum. Could you clarify your question a little as I dont quite understand it. Thanks.
The arguments to zmdailyreport include:
--user <email_address> Report usage for <email_address> only
--mail Send report via email, default is stdout
--now Shortcut for midnight to the current time
--time <start>,<end> Default is midnight to midnight of the previous day
Start and end times must be in YYYYMMDD[hhmmss] format
So you can either-
A) Run it manually:
Comma included or it wont find the end time.cd /opt/zimbra/libexec
./zmdailyreport -m -t start,end
./zmdailyreport -m -t 20090301112233,2009031211223
You also don't have to be that specific:
./zmdailyreport -m -t 2009,20090312
B) Modify cron:
su - zimbra
contab -e (opens in vim)
You'll want to put in values for -t such that it's auto (make yourself a $datefirstmonth & $datecurrent)# Daily reports
#
10 1 * * * /opt/zimbra/libexec/zmdailyreport -m
C) Modify /opt/zimbra/libexec/zmdailyreport default to contain *720 or an extra *30 (or so):
Keep in mind it checks the logger DB, so the results you get are going to be limited by:# usage: getTimes( now => $Opt{now}, time => $Opt{time} )
sub getTimes {
my %arg = @_;
my ( $start, $end );
if ( $arg{time} ) {
( $start, $end ) = split( /\s*,\s*/, $arg{time} );
$start = timeToSqlTime($start);
$end = timeToSqlTime($end) if ($end);
}
elsif ( $arg{now} ) {
$start = tsToSqlTime( time(), 1 );
$end = tsToSqlTime( time(), 0 );
}
else { # default to the previous day
$start = tsToSqlTime( ( time() - ( 60 * 60 * 24 ) ), 1 );
$end = tsToSqlTime( time(), 1 );
}
return ( $start, $end );
zimbraLogRawLifetime (default 31d) - lifetime (nnnnn[hmsd]) of raw log rows in consolidated logger tables
zimbraLogSummaryLifetime (default 730d)- lifetime (nnnnn[hmsd]) of summarized log rows in consolidated logger tables
Adjust with: zmprov mcf zimbraLogAttribute Xd
Last edited by mmorse; 03-12-2009 at 10:37 AM. Reason: note ,
-Mike Morse (MCode151)
ZCS-to-ZCS Migrations & Moves | Admin Tools & Tidbits » ZimbraBlog.com | ZimbraCommunity.com
I should clarify the comma is important or it wont find the end time.
You also don't have to be that specific:A) Run it manually:
cd /opt/zimbra/libexec
./zmdailyreport -m -t 20090301112233,2009031211223
./zmdailyreport -m -t 2009,20090312
-Mike Morse (MCode151)
ZCS-to-ZCS Migrations & Moves | Admin Tools & Tidbits » ZimbraBlog.com | ZimbraCommunity.com
Work Fine man... very thanks... very...![]()
Last edited by halley; 03-12-2009 at 11:34 AM.
Cool
Without -m presents it to your console/stdout.
Specifying -m sends it to the email specified in localconfig:
zmlocalconfig -e smtp_destination=admin@domain.com
Also relevant to that is:
smtp_source=admin@domain.com (the from)
smtp_notify=yes
zimbra_mtareport_max_recipients=50
zimbra_mtareport_max_senders=50
-Mike Morse (MCode151)
ZCS-to-ZCS Migrations & Moves | Admin Tools & Tidbits » ZimbraBlog.com | ZimbraCommunity.com
There are currently 1 users browsing this thread. (0 members and 1 guests)