Last change
on this file since 2977 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
|
Rev | Line | |
---|
[1761] | 1 | #!/usr/bin/perl -n |
---|
| 2 | BEGIN { |
---|
| 3 | print <<'EOF'; |
---|
| 4 | <% |
---|
| 5 | from invirt.config import structs as cfg |
---|
| 6 | %> |
---|
| 7 | EOF |
---|
| 8 | } |
---|
| 9 | |
---|
| 10 | s/^user root/user munin/m; |
---|
| 11 | s/^group root/group munin/m; |
---|
| 12 | s/^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 |
---|
| 17 | s/^#.*$//m; |
---|
| 18 | print unless /^$/; |
---|
| 19 | |
---|
| 20 | END { |
---|
| 21 | print <<'EOF'; |
---|
[2965] | 22 | % for host in cfg.get('monitoring', []): |
---|
[1761] | 23 | allow ^${host.ip.replace('.', '\.')}$ |
---|
| 24 | % endfor |
---|
| 25 | EOF |
---|
| 26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.