その他
    ホーム技術発信DoRubyCentOS MuninとプラグインのInstall方法

    CentOS MuninとプラグインのInstall方法

    この記事はアピリッツの技術ブログ「DoRuby」から移行した記事です。情報が古い可能性がありますのでご注意ください。

    rickNo36です。
    最近CentOS7でmunin入れたのでインストール方法を記載します。

    環境

    CentOS7
    Apache(yumにてinstall済)

    Muninインストール

    yum install epel-release
    yum install munin munin-node
    systemctl start munin-node
    apachectl configtest
    systemctl restart httpd.service

    アクセス

    http://xxx/munin
    これだけ、とても簡単

    ラグイン追加

    設定されているplugin
    /etc/munin/plugins
    用意されているplugin
    /usr/share/munin/plugins

    追加例:Apache

    # アクセス数
    ln -s /usr/share/munin/plugins/apache_accesses /etc/munin/plugins/apache_accesses
    # プロセス数
    ln -s /usr/share/munin/plugins/apache_processes /etc/munin/plugins/apache_processes
    # データ転送量
    ln -s /usr/share/munin/plugins/apache_volume /etc/munin/plugins/apache_volume
    cd /etc/httpd/conf
    vim httpd.conf
    ———————
    nclude conf.modules.d/*.conf
    下記追加
    ExtendedStatus On

    SetHandler server-status
    Require local

    ———————
    vim extra/httpd-vhosts.conf
    ———————

    ServerName hoge

    RewriteEngine On
    RewriteRule ^/balancer-manager$ /balancer-manager/ [L]
    RewriteRule ^/server-status$ /server-status/ [L]
    RewriteRule ^(.*)$ [R=404,L]

    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1

    SetHandler balancer-manager
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1

    ———————
    systemctl restart httpd.service
    systemctl restart munin-node