Debian 13 trixie

Munin : Set Thresholds2025/10/03

 

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  df_inode   entropy  fw_packets     if_enp1s0      interrupts  load    munin_stats  open_inodes  proc_pri  threads  users
df   diskstats  forks    http_loadtime  if_err_enp1s0  irqstats    memory  open_files   processes    swap      uptime   vmstat

# installed plugins are located under the directory below

root@dlp:~#
ls /usr/share/munin/plugins

acpi                      interrupts           pgbouncer_connections           snmp__memory
amavis                    iostat               pgbouncer_requests              snmp__netapp_diskusage_
apache_accesses           iostat_ios           ping_                           snmp__netapp_inodeusage_
apache_processes          ip_                  plugin.sh                       snmp__netstat
apache_volume             ipac-ng              plugins.history                 snmp__print_pages
apc_envunit_              ipmi_                pm3users_                       snmp__print_supplies
apc_nis                   ipmi_sensor_         pop_stats                       snmp__processes
apt                       ircu                 port_                           snmp__rdp_users
.....
.....
[2] It's possible to display current values for each plugin.
# display values for cpu plugin

root@dlp:~#
munin-run cpu

user.value 2110
nice.value 977
system.value 1129
idle.value 531515
iowait.value 2157
irq.value 0
softirq.value 5
steal.value 0
guest.value 0

# display values for df plugin

root@dlp:~#
munin-run df

_dev_mapper_debian__vg_root.value 5.7966791760295
_dev_shm.value 0
_run.value 0.137520055008022
_run_lock.value 0
_tmp.value 0.000199305619222628
_dev_vda1.value 15.3474271825211
[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 /tmp partition field in df plugin
    df._tmp.warning :80
    df._tmp.critical :90
[4] If you configured notification setting and a value is over from the threshold's value, the email is sent like follows.
Return-Path: <munin@dlp.srv.world>
X-Original-To: root
Delivered-To: root@dlp.srv.world
Received: by dlp.srv.world (Postfix, from userid 101)
        id 5F0A6E0016; Thu, 02 Oct 2025 09:30:05 +0900 (JST)
Subject: Munin-notification for srv.world::dlp.srv.world
To: root@dlp.srv.world
User-Agent: mail (GNU Mailutils 3.19)
Date: Thu,  2 Oct 2025 09:30:05 +0900
Message-Id: <20251002003005.5F0A6E0016@dlp.srv.world>
From: munin application user <munin@dlp.srv.world>

srv.world :: dlp.srv.world :: Disk usage in percent
        CRITICALs: /tmp is 98.38 (outside range [:90]).
        OKs: /dev/shm is 0.00, / is 5.80, /run is 0.14, /boot is 15.35, /run/lock is 0.00.
Matched Content