summaryrefslogtreecommitdiffstats
path: root/check_mem
diff options
context:
space:
mode:
Diffstat (limited to 'check_mem')
-rwxr-xr-xcheck_mem4
1 files changed, 1 insertions, 3 deletions
diff --git a/check_mem b/check_mem
index 01288dd..31beef5 100755
--- a/check_mem
+++ b/check_mem
@@ -151,9 +151,7 @@ my (%warn, %crit);
($warn{'vm'}, $warn{'rss'}, $warn{'anon'}, $warn{'vml'}) = parse_thresholds($n->opts->w);
($crit{'vm'}, $crit{'rss'}, $crit{'anon'}, $crit{'vml'}) = parse_thresholds($n->opts->c);
-if ($n->opts->s && $n->opts->s =~ m/(\w[\w\/]*\w)/) {
- $ENV{'NAGIOS_PLUGIN'} = $1;
-}
+$ENV{'NAGIOS_PLUGIN'} = $1 if ($n->opts->s && $n->opts->s =~ m/^(.+)$/);
my $domain = '';
$domain = ('.' . $n->opts->d) if $n->opts->d;