From: Israel Garcia on
On Tue, Apr 27, 2010 at 2:52 PM, Patrick Chemla
<patrick.chemla(a)perfaction.net> wrote:
> You can put whatever you want in the script. I am monitoring different parts
> of the servers.
>
> Extract:
>
> # Identify the server by the last digit of his IP
> ip3d=`/sbin/ifconfig| grep Bcast|grep 10.0.0|cut -d":" -f2 | cut -d" "
> -f1|cut -d"." -f4`
>
> # Get queue stats from qmail
> qmailctl stat|grep queue:|awk -vip=$ip3d '{print "qmail a" ip,$NF}' >
> /tmp/qstat$ip3d
>
> # Get active queue stats from postfix
> find /var/spool/postfix/active -type f|wc -l|awk -vip=$ip3d '{print "postfix
> a" ip,$NF}' >> /tmp/qstat$ip3d
>
> ##### Add here whatever number you want to send to the server : cpu, memory,
> disk space, ....
>
> # Send the file to the central. You can  use shared disk. Some of my servers
> are remote, so I use scp.
> scp /tmp/qstat$ip3d 10.0.0.252:/tmp/muninqstat
>
> Munin has also very powerful specific scripts, but on large architecture it
> creates a huge amount of traffic and load both on nodes and server to update
> the database. This way, I also use munin, but I split better the load  and I
> minimize connexions.

thanks partick.. I'll take a look.

regards
Israel.
>
> On the server side, with grep and awk extract from all qstatXXX files the
> data you want to show for each graph, you can generate with whatever tool..
> There I do it with a munin script, it's simple.
>
> Patrick
>



--
Regards;
Israel Garcia