Merge pull request #3339 from jkohen/patch-1
[collectd.git] / contrib / exec-nagios.px
index c7f18c5..b9758ec 100755 (executable)
@@ -36,7 +36,7 @@ exit (0);
 
 =head1 CONFIGURATION
 
-This script reads it's configuration from F</etc/exec-nagios.conf>. The
+This script reads its configuration from F</etc/exec-nagios.conf>. The
 configuration is read using C<Config::General> which understands a Apache-like
 config syntax, so it's very similar to the F<collectd.conf> syntax, too.
 
@@ -442,7 +442,7 @@ sub execute_script
 
   close ($fh);
   # Save the exit status of the check in $state
-  $state = $?;
+  $state = $? >> 8;
 
   if ($state == 0)
   {