Let's begin resource monitoring with munin 2011 1209 zem_distribution

2,555 views
2,424 views

Published on

Munin で始めるリソースモニタリング。Munin User Group Japan の紹介、自作プラグイン(迷惑メール数カウントフィルタ)のサンプル、各種リソースモニタのサンプル。おまけでMuninのインストール方法。

Published in: Technology, News & Politics
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,555
On SlideShare
0
From Embeds
0
Number of Embeds
120
Actions
Shares
0
Downloads
25
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Let's begin resource monitoring with munin 2011 1209 zem_distribution

  1. 1. • クラウドは人生(キリッ – • • • – • • – •
  2. 2. #!/bin/sh## Plugin to monitor SAPM email detection and reject counter# 2011/11/28#%# family=auto#%# capabilities=autoconfif [ "$1" = "autoconf" ] ; then if [ -n "$SPAMS" ] ; then y echo "yes" else echo "¥$SPAMS not defined." fi exitfiif [ "$1" = "config" ] ; then " fi " h echo "graph_args --base 1000 -r --lower-limit 0"; #echo "graph_args --base 1000 -r --lower-limit 0 --units-exponent 3"; echo "graph_title SPAM E il Reject Counter, by type"; h " h titl E-mails R j t C t b t " echo "graph_category sendmail"; echo "graph_info This graph shows procmail filter counter."; echo graph printf %3 0lf graph_printf %3.0lf echo graph_vlabel SPAMs echo "graph_order $SPAM"
  3. 3. FIRSTSPAM=1; for SPAM in $SPAMS; do echo "${SPAM}.label $SPAM" echo "${SPAM}.info procmail recipe by $SPAM" echo "${SPAM}.type GAUGE" if [ $FIRSTSPAM -eq 1 ] ; then echo "${SPAM}.draw AREA" h "${SPAM} d export FIRSTSPAM=0; else echo "${SPAM} dra STACK" "${SPAM}.draw fi done ; exitfifor SPAM in $SPAMS ; do { grep $SPAM /var/lib/munin/plugin-state/SpamFiltered.state}done;
  4. 4. 4,9,14,19,24,29,34,39,44,49,54,59 * * * */usr/share/munin/plugins/countSpamFiltered.sh > /var/lib/munin/plugin-state/SpamFiltered.state t t /S Filt d t t#!/bin/sh# by zembutsu@link co jp 2011/11/28 zembutsu@link.co.jp# env spam.body spam.from spam.receivedfor SPAM in body from received x info Subject Body null body Nov class mailer x-info Subject_Body_null body-Novmessageid reply return body-DotAsia RegacyAddress Subject-Word X-Mailer-Outlook-Forged body-Decdo echo -n "${SPAM}.value " grep ^Message- /var/spool/procmail/spam.${SPAM}.log | wc -ldone
  5. 5. • –• – 88
  6. 6. •• – • – • •

×