Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have inherited a Munin installation and I want to make a list of all the monitored hosts. Is there a command or other way to export a list of all monitored hosts to CSV or XML?

share|improve this question
up vote 0 down vote accepted

It seems rather lame, but I find that

grep '^\[' /etc/munin/munin.conf

pulls out all the host entries, and nothing much else; you can slice-and-dice it with (eg) tr from there.

share|improve this answer

The easiest way is probably to look in <dbdir>/munin-update.stats (on RHEL and Debian, dbdir is /var/lib/munin). That file contains a line for each host that was checked in the last run. Each line is of the format:


There are three fields, separated by |s. "UD" stands for something like "update detail"; there's also a "UT" line with the total time it took to update everything, so you should probably grep '^UD' /var/lib/munin/munin-update.stats. The second field is the host and its categories, in the same format that /etc/munin/munin.conf has. The third field is the number of seconds it took to get the host's data.

This approach is a little better than grepping through /etc/munin/munin.conf directly for two reasons: Primarily because munin has include directives so it's possible that not all of your hosts are defined directly in the main config file; and secondly just because the file format is simpler, so it's easier to get data out of it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.