summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f558b0d)
raw | patch | inline | side by side (parent: f558b0d)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 5 Jul 2010 07:45:46 +0000 (09:45 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 5 Jul 2010 07:45:46 +0000 (09:45 +0200) |
contrib/exec-nagios.px | patch | blob | history |
diff --git a/contrib/exec-nagios.px b/contrib/exec-nagios.px
index b26981fb32c7687507ae1690a53ceefa29ca6984..4b112f95139aa97fc0b04b3044c528f3218837f8 100755 (executable)
--- a/contrib/exec-nagios.px
+++ b/contrib/exec-nagios.px
our $ConfigFile = '/etc/exec-nagios.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 $time = time ();
my $script = shift;
my @args = ();
- my $host = hostname () || 'localhost';
+ my $host = $Hostname || hostname () || 'localhost';
my $state = 0;
my $serviceoutput;