Munin : Set Thresholds2016/01/15 |
The monitoring target items are set as plugins and thresholds are defined in some plugins by default,
but if you'd like to add more thresholds to a plugin, configure like follows.
|
|
[1] | It's possible to see plugins like follows. |
# current enabled plugins are located under the directory below root@dlp:~# ls /etc/munin/plugins cpu forks irqstats ntp_kernel_err open_inodes uptime df fw_packets load ntp_kernel_pll_freq processes users df_inode if_err_eth0 memory ntp_kernel_pll_off proc_pri vmstat diskstats if_eth0 munin_stats ntp_offset swap entropy interrupts netstat open_files threads # installed plugins are located under the directory below root@dlp:~# ls /usr/share/munin/plugins acpi nvidia_ amavis open_files apache_accesses open_inodes apache_processes openvpn apache_volume perdition ..... ..... |
[2] | It's possible to display current values for each plugin. |
# display values for cpu plugin root@dlp:~# munin-run cpu user.value 18278 nice.value 1250 system.value 7586 idle.value 4761687 iowait.value 31943 irq.value 0 softirq.value 259 steal.value 0 guest.value 0 # display values for df plugin root@dlp:~# munin-run df _run.value 0.0918908771132431 _dev_mapper_tmp__vg_root.value 7.84949941507675 _sys_fs_cgroup.value 0 _run_lock.value 0 _run_shm.value 0 _run_user.value 0 _dev_vda1.value 30.2330974791166 |
[3] | Set threshold's value in munin.conf like follows. ⇒ [plugin name].[field name].[warning | critical] min-value:max-value The field name is just the one which is displayed when executing "munin-run" command. The min-value or max-value can be omitted. |
root@dlp:~#
vi /etc/munin/munin.conf # set threshold on target node [dlp.srv.world] address 127.0.0.1 use_node_name yes # set 80% of warning and 90% of critical for user field in cpu plugin cpu.user.warning :80 cpu.user.critical :90 # set 80% of warning and 90% of critical for root partition field in df plugin df._dev_mapper_VolGroup_lv_root.warning :80 df._dev_mapper_VolGroup_lv_root.critical :90 |
[4] | If you configured notification setting and a value is over from the threshold's value, the email is sent like follows. |
From munin@dlp.srv.world Fri Jun 12 14:35:07 2015 Return-Path: <munin@dlp.srv.world> X-Original-To: root Delivered-To: root@dlp.srv.world Date: Fri, 12 Jun 2015 14:35:07 +0900 To: root@dlp.srv.world Subject: Munin-notification for srv.world::dlp.srv.world User-Agent: Heirloom mailx 12.5 7/5/10 Content-Type: text/plain; charset=us-ascii From: munin@dlp.srv.world (Munin user) Status: R srv.world :: dlp.srv.world :: CPU usage CRITICALs: user is 100.38 (outside range [:80]). |
Sponsored Link |