Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
i use cacti for almost a year now. but am definitely no expert. i just managed to get serveral standard templates to work.
now that i installed a postfix server i wanted to monitor that as well.
i followed the guide here
after some fiddling and patience i managed to see some spikes.
since the server is not that busy (yet) it handles just some mails per hour.
at the moment i have to be very lucky to catch a mail being delivered when the 5 minute cron job starts the queue poll for postfix.
how can i change this to show me a count of the mails that have been sent in the past 5 minutes, since i last checked on the queues? did i do something wrong?
# cat /usr/local/bin/getmailq.sh
#!/bin/bash
#getmailq.sh - written by Valec 2006. Steal and share.
#Get postfix queue lengths
#Place in /usr/local/bin/
#exec .1.3.6.1.4.1.2021.53.101.0 mailq /usr/local/bin/getmailq.sh
QUEUES="incoming active deferred hold"
for i in $QUEUES; do
COUNT=`qshape.pl $i | grep TOTAL | awk '{print $2}'`
printf "$i:$COUNT "
done
you have to consider what your graphing. this particular graphing utility isn't about graphing the number of mails postfix receives - it's about graphing the size of the queue at a given moment in time. my graphs look similar to yours, with the exception of having a deferred queue that floats between 12k and 35k messages throughout the day. this is normal for us because we use postfix on our secondary servers which are drop points for spammers and dictionary attacks.
the usefulness of this graph is to show that the queues are being processed, or that your mail is flowing. if you saw that your deferred queue started growing abnormally, or your inbound queue, or another queue, then you could investigate to see if there's a problem, or if you need to tune postfix for better performance.
i'm not aware of anything that counts every message postfix processes in each queue and records that as a counter for you to graph. it _might_ exist, but it seems like an inefficient use of cpu resources to track it.
Adrian Goins - President / CEO
Arces Network, LLC
http://www.arces.net
Sry to bump such an old thread, but i have a couple of postfix servers that I would like to use the getmailq.sh script. I have the script working on each of the servers. I can run them from the command line as root and i get the following.
My only problem is I can not get the graph XML file that was provided with the code. I am unable to get it to load into our older version of cacti. Here is the output of cactid -v
CACTID 0.8.6e Copyright 2002-2005 by The Cacti Group.
I am unable to upgrade the version of cacti because we have tons of other servers that are graphing and i am not allow to upgrade due to the risk of the other serves not being able to continue to graph historically. Can anyone help, either provide me an XML script that will load and not give me the Error XML hash missing error, or help me create new graph in cacti. I started to try to create my own graph in cacti, but my scripting skills are gone, I havent done it in 10 years now. Any help is appreciated..
So, the template won't import due to it being too new. There are a few posts to "hacking" cacti that will allow you to import some, more than likely, but possibly not templates.
Use google and search for the keywords "import hash does not exist site:forums.cacti.net" and see what you come up with.
TheWitness wrote:When executed by a trained cacti professional, its quite painless.
L
LOL, i better wait then, next month this wont be an issue we are migrating it to a VM on one of our ESX bladecenters.
I was lead to believe that i could create my own graph through the UI for this script. I started to sniff around in there and found that i didnt have alot of answers to the variables it was asking for. =( I really wanted to use this script. For now ill just have to use the fetch_mail perl script that i have running on my log server.
If anyone has a graph for this script that works with 8.6e please post it.