内容へ移動
fl8 Wiki
ユーザ用ツール
ログイン
サイト用ツール
検索
ツール
文書の表示
以前のリビジョン
バックリンク
最近の変更
メディアマネージャー
サイトマップ
ログイン
>
最近の変更
メディアマネージャー
サイトマップ
現在位置:
Dokuwiki.fl8.jp
»
01_linux
»
04_監視
»
02 Munin
トレース:
01_linux:04_監視:02_munin
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== 02 Munin ====== Munin はシンプルなシステムの監視とパフォーマンスデータの可視化を提供するツールです。 ===== インストール ===== ==== epelインストール ==== dnf install epel-release ==== muninインストール ==== dnf install munin munin-node ==== 設定 ==== <code|/etc/munin/munin.conf> [localhost] address 127.0.0.1 use_node_name yes [Node1] address 192.168.0.10 use_node_name yes </code> ==== munin起動 ==== systemctl enable --now munin-node ==== munin-cron ==== このmunin-cronでデータを集めます。 <code|/etc/cron.d/munin> */5 * * * * munin /usr/bin/munin-cron </code> ===== HTTP サーバーの設定 ===== dnf install httpd systemctl enable --now httpd <code|/etc/httpd/conf.d/munin.conf> Alias /munin /var/www/html/munin <Directory /var/www/html/munin> Options None Require all granted </Directory> </code> systemctl restart httpd ===== 他のホストへの接続テスト ===== <code> telnet 192.168.0.10 4949 # munin node at hogehoge.com list apache_accesses apache_processes apache_volume cpu df df_inode entropy forks fw_conntrack fw_forwarded_local fw_packets if_ens3 if_ens4 if_ens5 interrupts irqstats load memory open_files open_inodes postfix_mailqueue postfix_mailvolume proc_pri processes swap threads uptime users vmstat fetch apache_accesses accesses80.value 37929933 </code> ===== 監視設定 ===== SSL証明書の有効期限を監視、アラートを飛ばす <code> curl -L -o /usr/share/munin/plugins/ssl_certificate_expiry https://raw.githubusercontent.com/munin-monitoring/contrib/refs/heads/master/plugins/ssl/ssl-certificate-expiry chmod +x /usr/share/munin/plugins/ssl_certificate_expiry ln -s /usr/share/munin/plugins/ssl_certificate_expiry /etc/munin/plugins/ssl_certificate_expiry_www.fl8.jp # cat /etc/munin/plugin-conf.d/munin-node [ssl_certificate_expiry_*] env.services www.fl8.jp env.port 443 env.warning 14: env.critical 7: </code> 有効期限が14日以内になったら、Warning 有効期限が7日以内になったら、Critical ==== アラート通知設定 ==== アラートメール送信元: munin@fl8.jp Cc: matsui@fl8.jp To: matsui@flateight.com <code> # tail -1 /etc/munin/munin.conf contact.mail.command mail -s "Munin Alert: [${var:group}]:${var:host} ${var:worst}" -r munin@fl8.jp -c matsui@fl8.jp matsui@flateight.com </code> {{tag>監視 Munin}}
01_linux/04_監視/02_munin.txt
· 最終更新: 2025/01/15 11:07 by
matsui
ページ用ツール
文書の表示
以前のリビジョン
バックリンク
文書の先頭へ