make services work again. uses nagios plugins.

git-svn-id: http://www.observium.org/svn/observer/trunk@812 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-02-11 04:35:16 +00:00
parent f7a5c57105
commit 217e119ca2
12 changed files with 14 additions and 15 deletions

View File

@@ -10,6 +10,8 @@ $config['snmpwalk'] = "/usr/bin/snmpwalk";
$config['snmpget'] = "/usr/bin/snmpget"; $config['snmpget'] = "/usr/bin/snmpget";
$config['snmpbulkwalk'] = "/usr/bin/snmpbulkwalk"; $config['snmpbulkwalk'] = "/usr/bin/snmpbulkwalk";
$config['nagios_plugins'] = "/usr/lib/nagios/plugins";
### Local Specifics ### Local Specifics
$config['title_image'] = "images/observer-logo.gif"; $config['title_image'] = "images/observer-logo.gif";

View File

@@ -1,6 +1,6 @@
<?php <?php
$check = `scripts/services/check_dns -H $service[param] -s $service[hostname]`; $check = shell_exec($config['nagios_plugins'] . "/check_dns -H ".$service['param']." -s ".$service['hostname']);
list($check, $time) = split("\|", $check); list($check, $time) = split("\|", $check);

View File

@@ -1,6 +1,6 @@
<?php <?php
$check = `scripts/services/check_ftp -H $service[hostname]`; $check = shell_exec($config['nagios_plugins'] . "/check_ftp -H ".$service['hostname']);
list($check, $time) = split("\|", $check); list($check, $time) = split("\|", $check);

View File

@@ -1,6 +1,6 @@
<?php <?php
$check = `scripts/services/check_http -H $service[hostname] $service[service_param]`; $check = shell_exec($config['nagios_plugins'] . "/check_http -H ".$service['hostname']." ".$service['service_param']);
list($check, $time) = split("\|", $check); list($check, $time) = split("\|", $check);

View File

@@ -1,6 +1,6 @@
<?php <?php
$check = `scripts/services/check_imap -H $service[hostname]`; $check = shell_exec($config['nagios_plugins'] . "/check_imap -H ".$service['hostname']);
list($check, $time) = split("\|", $check); list($check, $time) = split("\|", $check);

View File

@@ -1,8 +1,6 @@
<?php <?php
$check = `scripts/services/check_mysql -H $service[hostname] $service[service_param]`; $check = shell_exec($config['nagios_plugins'] . "/check_mysql -H ".$service['hostname']." ".$service['service_param']);
echo($check);
list($check, $time) = split("\|", $check); list($check, $time) = split("\|", $check);

View File

@@ -1,6 +1,6 @@
<?php <?php
$check = `scripts/services/check_pop -H $service[hostname]`; $check = shell_exec($config['nagios_plugins'] . "/check_pop -H ".$service['hostname']);
list($check, $time) = split("\|", $check); list($check, $time) = split("\|", $check);

View File

@@ -1,6 +1,6 @@
<?php <?php
$check = `scripts/services/check_simap -H $service[hostname]`; $check = shell_exec($config['nagios_plugins'] . "/check_simap -H ".$service['hostname']);
list($check, $time) = split("\|", $check); list($check, $time) = split("\|", $check);

View File

@@ -1,6 +1,6 @@
<?php <?php
$check = `scripts/services/check_smtp -H $service[hostname]`; $check = shell_exec($config['nagios_plugins'] . "/check_smtp -H ".$service['hostname']);
list($check, $time) = split("\|", $check); list($check, $time) = split("\|", $check);

View File

@@ -1,6 +1,6 @@
<?php <?php
$check = `scripts/services/check_spop -H $service[hostname]`; $check = shell_exec($config['nagios_plugins'] . "/check_spop -H ".$service['hostname']);
list($check, $time) = split("\|", $check); list($check, $time) = split("\|", $check);

View File

@@ -1,6 +1,6 @@
<?php <?php
$check = `scripts/services/check_ssh -H $service[hostname]`; $check = shell_exec($config['nagios_plugins'] . "/check_ssh -H ".$service['hostname']);
list($check, $time) = split("\|", $check); list($check, $time) = split("\|", $check);

View File

@@ -1,9 +1,8 @@
<?php <?php
if($service[service_port]) { $port = $service[service_port]; } else { $port = '23'; } if($service['service_port']) { $port = $service['service_port']; } else { $port = '23'; }
$check = shell_exec($config['nagios_plugins'] . "/check_dns -H ".$service['hostname']." -p ".$port);
$check = `scripts/services/check_tcp -H $service[hostname] -p $port`;
list($check, $time) = split("\|", $check); list($check, $time) = split("\|", $check);