Munin : しきい値の設定2026/06/10 |
|
監視対象となる項目はプラグインで設定します。 |
|
| [1] | プラグインは以下で確認できます。 |
|
# 現在有効なプラグインは以下の場所に配置されている root@dlp:~# ls /etc/munin/plugins cpu entropy if_enp1s0 load open_inodes threads df forks if_err_enp1s0 memory proc_pri uptime df_inode fw_packets interrupts munin_stats processes users diskstats http_loadtime irqstats open_files swap vmstat # インストール済みのプラグインは以下の場所に保管されている root@dlp:~# ls /usr/share/munin/plugins acpi perdition amavis pgbouncer_connections apache_accesses pgbouncer_requests apache_processes ping_ apache_volume plugin.sh apc_envunit_ plugins.history apc_nis pm3users_ apt pop_stats apt_all port_ bind9 postfix_mailqueue ..... ..... |
| [2] | 現在有効な各プラグインは、手動実行することで現在の値を表示可能です。 |
|
# cpu プラグインを実行 root@dlp:~# munin-run cpu user.value 2160 nice.value 589 system.value 1402 idle.value 187512 iowait.value 1584 irq.value 0 softirq.value 8 steal.value 0 guest.value 0 # df プラグインを実行 root@dlp:~# munin-run df _dev_mapper_ubuntu__vg_ubuntu__lv.value 26.3091888233636 _dev_shm.value 0 _run.value 0.150603275333828 _tmp.value 0.000229929457642395 _dev_vda2.value 5.35645579144472 |
| [3] | しきい値の設定は、munin.conf 内の監視対象ノードのセクション内で、以下のような書式で設定します。 ⇒ [プラグイン名].[フィールド名].[warning | critical] 下限値:上限値 フィールド名は [2] の例のように、プラグインを手動実行した際に表示される各値の名称のドット前の部分です。 なお、値に指定する下限値と上限値は、いずれかを省略可能です。 |
|
root@dlp:~#
vi /etc/munin/munin.conf # 対象ノードに閾値設定 [dlp.srv.world] address 127.0.0.1 use_node_name yes # cpu プラグインの user フィールドの使用率が 80% 超過で warning, 90% 超過で critical cpu.user.warning :80 cpu.user.critical :90 # /tmp パーティションの使用率が 80% 超過で warning, 90% 超過で critical df._tmp.warning :80 df._tmp.critical :90 |
| [4] | メール通知を設定した状態で、設定したしきい値を超えると以下のようなメールが送信されます。 |
Return-Path: <munin@dlp.srv.world>
X-Original-To: root
Delivered-To: root@dlp.srv.world
Received: by dlp.srv.world (Postfix, from userid 105)
id E08C4603D0; Wed, 10 Jun 2026 00:35:04 +0000 (UTC)
Subject: Munin-notification for srv.world::dlp.srv.world
To: root@dlp.srv.world
User-Agent: mail (GNU Mailutils 3.20)
Date: Wed, 10 Jun 2026 00:35:04 +0000
Message-Id: <20260610003504.E08C4603D0@dlp.srv.world>
From: munin application user <munin@dlp.srv.world>
srv.world :: dlp.srv.world :: Disk usage in percent
CRITICALs: /tmp is 91.81 (outside range [:90]).
OKs: /dev/shm is 0.00, /boot is 5.36, /run is 0.15, / is 26.31.
|
| Sponsored Link |
|
|