AWS t2.micro インスタンスで監視サーバ

  • nagios + munin
  • 監視対象サーバは60ぐらい

Server Version: Apache/2.4.16 (Amazon) mod_fcgid/2.3.9 PHP/5.6.14
Server MPM: event

aws インスタンス

CPU steal
http://d.hatena.ne.jp/toritori0318/20140312/1394634304

yum install libcgroup
yum install httpd24 mod24_fcgid

nagios

yum install nagios nagios-plugins-all
slack連携

SlackをNagiosに連携させる方法

yum install perl-libwww-perl perl-Crypt-SSLeay perl-LWP-Protocol-https

munin

  • グラフ、HTMLは動的に生成する。
yum install munin

/etc/munin.conf
 ====
graph_strategy cgi
html_strategy cgi
 ====

/etc/httpd/conf.d/munin.conf
 ====


AuthUserFile /etc/munin/munin-htpasswd
AuthName "Munin"
AuthType Basic
require valid-user

ExpiresActive On
ExpiresDefault A310




RewriteEngine On
# HTML
RewriteRule ^/munin(/.*\.html)?$ /munin-cgi/munin-cgi-html/$1 [PT]


ScriptAlias /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph
ScriptAlias /munin-cgi/munin-cgi-html /var/www/cgi-bin/munin-cgi-html
# Ensure we can run (fast)cgi scripts

    Options +ExecCGI
    
        SetHandler fcgid-script
    
    
        SetHandler cgi-script
    

 ====
AWS料金
slack連携