X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=contrib%2Fexec-nagios.px;h=ec13b0a0753798bad5883c03cdd199374d308c68;hb=dd73647f366f003b30792821bfd93164af259c8e;hp=a9f466338cdabe4c8a692065b03d39c63a7bb9a6;hpb=6a69db4d304118e11fd4bae9c761fc14674e4942;p=collectd.git diff --git a/contrib/exec-nagios.px b/contrib/exec-nagios.px index a9f46633..ec13b0a0 100755 --- a/contrib/exec-nagios.px +++ b/contrib/exec-nagios.px @@ -23,8 +23,10 @@ use Regexp::Common ('number'); our $ConfigFile = '/etc/exec-nagios.conf'; our $TypeMap = {}; +our $NRPEMap = {}; 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); @@ -40,6 +42,7 @@ config syntax, so it's very similar to the F syntax, too. Here's a short sample config: + NRPEConfig "/etc/nrpe.cfg" Interval 300