source: trunk/packages/xvm-munin-config/debian/transform_munin-node.conf.xvm.mako @ 3006

Last change on this file since 3006 was 2965, checked in by broder, 15 years ago

Fix munin-config to work if no monitoring hosts are configured.

  • Property svn:executable set to *
File size: 499 bytes
Line 
1#!/usr/bin/perl -n
2BEGIN {
3  print <<'EOF';
4<%
5from invirt.config import structs as cfg
6%>
7EOF
8}
9
10s/^user root/user munin/m;
11s/^group root/group munin/m;
12s/^node.startup = manual/node.startup = automatic/m;
13# mako just generally doesn't deal well with lines that start with
14# hashes, so we'll strip them
15#
16# And empty lines too, just for cleanliness
17s/^#.*$//m;
18print unless /^$/;
19
20END {
21  print <<'EOF';
22% for host in cfg.get('monitoring', []):
23allow ^${host.ip.replace('.', '\.')}$
24% endfor
25EOF
26}
Note: See TracBrowser for help on using the repository browser.