Using Munin Day to Day¶
This page covers the practical aspects of working with Munin once it is installed and collecting data.
Reading Graphs¶
Munin graphs show data over time. The default view shows the last 24 hours. You can switch between time ranges using the links at the top of each graph:
hour — last 60 minutes (5-minute resolution)
day — last 24 hours (5-minute resolution)
week — last 7 days (30-minute resolution)
month — last 31 days (2-hour resolution)
year — last 12 days (1-day resolution)
Understanding Graph Types¶
- Counter / Derive graphs (network traffic, disk I/O)
These show rates — bytes per second, operations per second, etc. The Y-axis label says “per second” or “per minute” depending on the
graph_periodsetting. Values represent the rate of change since the last measurement.If you see a flat line at zero, the counter may have been reset or the data type may be wrong. If you see sudden spikes, the counter may have wrapped or been reset.
- Gauge graphs (temperature, load, disk usage)
These show absolute values — degrees, percentage, number of processes. The Y-axis label shows the unit directly.
If you see
NaN(not a number), the plugin may have failed to produce a value, or RRDtool does not have enough data points yet.- Stacked graphs (disk usage by partition, traffic by interface)
Multiple data sources are stacked on top of each other. The total height represents the sum. Click on a graph to see the individual components.
Understanding Colors¶
Green — normal values within thresholds
Yellow — values above the warning threshold
Red — values above the critical threshold
Grey — unknown or missing data
The warning and critical thresholds are set by the plugin or overridden
in munin.conf. See Let Munin croak alarm for details.
Working with Thresholds¶
Munin plugins define default warning and critical thresholds. You can
override these in /etc/munin/munin.conf on the master.
Setting Thresholds¶
To set a warning level for a specific data source on a specific host:
[webserver.example.com]
address 192.0.2.10
cpu.user.warning 80
cpu.user.critical 95
This sets a warning at 80% and critical at 95% for the user field
of the cpu plugin on webserver.example.com.
To set thresholds for all hosts in a group:
[webservers;]
cpu.user.warning 80
Threshold Syntax¶
A single number sets the upper limit:
cpu.user.warning 80
A colon-separated pair defines a range. Values outside the range trigger the alert:
cpu.user.warning 20:80
This warns when the value is below 20 or above 80.
Checking Current Thresholds¶
To see what thresholds are currently set for a plugin:
sudo munin-run cpu config
Look for lines like cpu.user.warning and cpu.user.critical.
Managing Nodes¶
Adding a New Node¶
Install
munin-nodeon the new machine.Edit
/etc/munin/munin-node.confon the new node and add the master’s IP to theallowlist.Restart
munin-nodeon the new machine.Add a section for the new node in
/etc/munin/munin.confon the master:[newserver.example.com] address 192.0.2.20
Wait for the next
munin-cronrun (up to 5 minutes), or run it manually:sudo -u munin /usr/share/munin/munin-cron
Removing a Node¶
Remove or comment out the node’s section in
/etc/munin/munin.conf.The RRD files in
/var/lib/munin/are not automatically removed. You can delete them manually if desired.Optionally uninstall
munin-nodefrom the removed machine.
Organizing with Groups¶
Munin uses groups to organize nodes in the web interface. Groups are
defined by the hierarchy in munin.conf:
[dc1;web;web1.example.com]
address 192.0.2.10
[dc1;web;web2.example.com]
address 192.0.2.11
[dc1;db;db1.example.com]
address 192.0.2.20
This creates a hierarchy: dc1 → web → web1, dc1 → db → db1.
If you use a simple hostname without a semicolon, the domain part becomes the group:
[web1.example.com]
address 192.0.2.10
This places web1.example.com in the group example.com.
Adding Plugins¶
Installing a Plugin¶
Place the plugin script in
/usr/share/munin/plugins/(or any directory you prefer).Make it executable:
chmod +x /usr/share/munin/plugins/myplugin
Create a symlink in
/etc/munin/plugins/:ln -s /usr/share/munin/plugins/myplugin /etc/munin/plugins/myplugin
Restart
munin-node:sudo systemctl restart munin-node
Test the plugin:
sudo munin-run myplugin sudo munin-run myplugin config
Using Wildcard Plugins¶
Wildcard plugins monitor multiple instances of the same thing (network interfaces, disk drives, etc.). They use the symlink name to determine what to monitor.
For example, the if_ plugin monitors network interfaces:
ln -s /usr/share/munin/plugins/if_ /etc/munin/plugins/if_eth0
ln -s /usr/share/munin/plugins/if_ /etc/munin/plugins/if_eth1
See Wildcard Plugins for details.
Configuring Plugin Environment¶
Some plugins need environment variables (database credentials, SNMP
communities, etc.). Set these in /etc/munin/plugin-conf.d/:
[myplugin]
env.DB_HOST localhost
env.DB_USER munin
env.DB_PASS secret
See Configuring for the full configuration reference.
Checking Munin’s Health¶
Log Files¶
Munin writes logs to /var/log/munin/:
munin-update.log— data collection from nodesmunin-limits.log— threshold checks and alertsmunin-httpd.log— web interface requests (if logging is enabled)
Check these logs if something is not working as expected.
Quick Health Check¶
Run this to verify the master can reach a node and collect data:
sudo -u munin /usr/share/munin/munin-update --debug --nofork --host <node-address> --service <plugin-name>
This shows the full communication between master and node.
Verifying Data Collection¶
To check that data is being written to RRD files:
rrdtool fetch /var/lib/munin/<domain>/<host>-<plugin>-<field>-g.rrd AVERAGE | tail -5
This shows the last 5 data points for the specified field.