docs:tips_n_tricks:nagios:using_http_for_passive_checks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
docs:tips_n_tricks:nagios:using_http_for_passive_checks [23.10.2012 10:44 CEST] – peter | docs:tips_n_tricks:nagios:using_http_for_passive_checks [23.10.2012 10:54 CEST] (current) – peter | ||
---|---|---|---|
Line 47: | Line 47: | ||
<?php | <?php | ||
+ | $state_str=array( 0 => ' | ||
+ | 1 => ' | ||
+ | 2 => ' | ||
+ | 3 => ' | ||
$nsca_host=" | $nsca_host=" | ||
$send_nsca="/ | $send_nsca="/ | ||
Line 58: | Line 62: | ||
$log_fh=fopen("/ | $log_fh=fopen("/ | ||
fwrite($log_fh,' | fwrite($log_fh,' | ||
+ | ?>< | ||
while (list ($key, $val) = each ($_REQUEST)) { | while (list ($key, $val) = each ($_REQUEST)) { | ||
print htmlentities(" | print htmlentities(" | ||
Line 67: | Line 72: | ||
$state | $state | ||
$msg = $_REQUEST[' | $msg = $_REQUEST[' | ||
- | | + | |
$nsca_fh=popen($send_nsca.' | $nsca_fh=popen($send_nsca.' | ||
fwrite($nsca_fh, | fwrite($nsca_fh, | ||
- | fwrite($log_fh, | + | fwrite($log_fh, |
+ | printf("< | ||
+ | "< | ||
pclose($nsca_fh); | pclose($nsca_fh); | ||
| | ||
Line 78: | Line 85: | ||
</ | </ | ||
</ | </ | ||
+ | |||
docs/tips_n_tricks/nagios/using_http_for_passive_checks.1350981868.txt.gz · Last modified: 23.10.2012 10:44 CEST by peter