Munin 2.0 Ubuntu 12.04 nginx sendEmail

Munin 监控非常轻巧,不过被监控节点多了就吃不消了,小规模的用这个蛮适合。

1. 添加apt源

可能要导入key,方法如下

2. 创建依赖关系和安装

munin主节点需要安装munin和munin-node,被监控节点只需要安装munin-node。

3. 配置munin.conf

4. 配置munin-node.conf

5. 插件生效

或者,自己创建软连接即可。

6. 配置nginx

需要安装spawn-fcgi,并启动下面的进程。

7.web界面

就可以通过http://monitor.ttlsa.com/munin/ 界面查看监控图形了。

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:3   其中:访客  3   博主  0

  1. 美女内涵图 0

    好东西 谢谢分享

  2. 默北 5

    contact.ttlsa_monitor.command /usr/local/bin/sendEmail -f support@ttlsa.com -s smtp.exmail.qq.com -xu support@ttlsa.com -xp ttlsa.com -o message-content-type=html -o message-charset=utf8 -t monitor@ttlsa.com
    -u "* ${if:cfields PROBLEM }${if:wfields PROBLEM }${if:fofields RECOVERY } – ${var:host}/${var:graph_title} is ${if:cfields CRITICAL}${if:wfields WARNING}${if:fofields OK} *"
    -m "Group: ${var:group}<p> Host: ${var:host}<p>
    Warngin: ${loop<,>:wfields – ${var:value} outside range [${var:wrange}] (${var:label})}<p>
    Critical: ${loop<,>:cfields – ${var:value} outside range [${var:crange}] (${var:label})}<p>
    OK: ${ loop<,>:fofields – ${var:value} = ${var:label} }"
    -l /tmp/mail.log
    不能分行写,会报错,sh: 1: Bad substitution

    su – munin –shell=/bin/bash -c "/usr/share/munin/munin-limits –contact mail –force "
    su – munin –shell=/bin/bash -c "/usr/share/munin/munin-limits –contact mail –force –debug"