CentOS 6
Sponsored Link

Munin : Set Trigers2015/02/18

 
The monitoring target items are set as plugins and trigers are defined in some plugins by default, but if you'd like to add more trigers to a plugin, configure like follows.
[1] It's possible to confirm plugins like follows.
# current enabled plugins are located under the directory below

[root@dlp ~]#
ls /etc/munin/plugins

cpu        fw_packets   memory               ntp_states          proc_pri
df         if_err_eth0  netstat              open_files          swap
df_inode   if_eth0      ntp_kernel_err       open_inodes         threads
diskstats  interrupts   ntp_kernel_pll_freq  postfix_mailqueue   uptime
entropy    irqstats     ntp_kernel_pll_off   postfix_mailvolume  users
forks      load         ntp_offset           processes           vmstat

# 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 78157
nice.value 89926
system.value 18768
idle.value 15468097
iowait.value 44479
irq.value 282
softirq.value 102
steal.value 279
guest.value 0

# display values for df plugin

[root@dlp ~]#
munin-run df

_dev_mapper_VolGroup_lv_root.value 8.95905168081408
_dev_shm.value 0
_dev_vda1.value 26.2256196272281
[3] Set triger'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 triger 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 triger's value, the email is sent like follows.
From munin@dlp.srv.world  Fri Feb 19 159:00:07 2015
Return-Path: <munin@dlp.srv.world>
X-Original-To: root
Delivered-To: root@dlp.srv.world
Date: Fri, 19 Feb 2015 19:00:07 +0900
To: root@dlp.srv.world
Subject: Munin-notification for srv.world::dlp.srv.world
User-Agent: Heirloom mailx 12.4 7/29/08
Content-Type: text/plain; charset=us-ascii
From: munin@dlp.srv.world (Munin user)
Status: RO

srv.world :: dlp.srv.world :: CPU usage
        WARNINGs: user is 100.26 (outside range [:80]).
Matched Content