summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dfa9f10)
raw | patch | inline | side by side (parent: dfa9f10)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 5 Jul 2010 07:40:55 +0000 (09:40 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 5 Jul 2010 07:40:55 +0000 (09:40 +0200) |
contrib/exec-munin.px | patch | blob | history |
diff --git a/contrib/exec-munin.px b/contrib/exec-munin.px
index b57601a3054aa9c99c8022c384d869f595828882..3e62ce009ae71ef16bcfe2d4ee118628e65ef26f 100755 (executable)
--- a/contrib/exec-munin.px
+++ b/contrib/exec-munin.px
our $ConfigFile = '/etc/exec-munin.conf';
our $TypeMap = {};
our $Scripts = [];
-our $Interval = 300;
+our $Interval = defined ($ENV{'COLLECTD_INTERVAL'}) ? (0 + $ENV{'COLLECTD_INTERVAL'}) : 300;
+our $Hostname = defined ($ENV{'COLLECTD_HOSTNAME'}) ? $ENV{'COLLECTD_HOSTNAME'} : '';
main ();
exit (0);
my $pinst;
my $time = time ();
my $script = shift;
- my $host = hostname () || 'localhost';
+ my $host = $Hostname || hostname () || 'localhost';
if (!open ($fh, '-|', $script))
{
print STDERR "Cannot execute $script: $!";