For anyone else that has Graphite set up in their environment, attached is a script that takes the daily mail report, parses it, and pumps daily and hourly metrics into Graphite.
We run the following cron job to generate the report, create a file, and run the script. We generate a file so we can look and see what was parsed, as opposed to redirecting the output directly into the script:
00 00 * * * /opt/zimbra/libexec/zmdailyreport > /root/scripts/mailreport.txt && /root/scripts/zimbra2graphite.py /root/scripts/mailreport.txt | nc -q0 graphite.mydomain.com 2003
(You may want to run the zmdailyreport report at 23:55. The shipped version parses the logs looking for the current day. We modified ours to look for the previous 24 hours).
Before running zimbra2graphite for the first time, you should setup the retention for the metrics. Our test mail server is "zimbra-hollis". Here is ours:
pattern = ^zimbra-hollis.perhour
retentions = 1h:90d
pattern = ^zimbra-hollis
retentions = 1d:90d
I wanted to attach a Grafana dashboard screenshot of the metrics from Graphite, but the forum would not allow png or jpg file uploads. However, you can view it here: http://www.oaktreepeak.com/grafana.png . There are only 24 hours of per hour metrics in the screenshot.
Hope someone finds this useful.