mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -10,6 +10,8 @@ $config['snmpwalk'] = "/usr/bin/snmpwalk";
|
||||
$config['snmpget'] = "/usr/bin/snmpget";
|
||||
$config['snmpbulkwalk'] = "/usr/bin/snmpbulkwalk";
|
||||
|
||||
$config['nagios_plugins'] = "/usr/lib/nagios/plugins";
|
||||
|
||||
### Local Specifics
|
||||
|
||||
$config['title_image'] = "images/observer-logo.gif";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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);
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
|
||||
$check = `scripts/services/check_mysql -H $service[hostname] $service[service_param]`;
|
||||
|
||||
echo($check);
|
||||
$check = shell_exec($config['nagios_plugins'] . "/check_mysql -H ".$service['hostname']." ".$service['service_param']);
|
||||
|
||||
list($check, $time) = split("\|", $check);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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);
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<?php
|
||||
|
||||
if($service[service_port]) { $port = $service[service_port]; } else { $port = '23'; }
|
||||
if($service['service_port']) { $port = $service['service_port']; } else { $port = '23'; }
|
||||
|
||||
|
||||
$check = `scripts/services/check_tcp -H $service[hostname] -p $port`;
|
||||
$check = shell_exec($config['nagios_plugins'] . "/check_dns -H ".$service['hostname']." -p ".$port);
|
||||
|
||||
list($check, $time) = split("\|", $check);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user