mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
enchancements from robje
git-svn-id: http://www.observium.org/svn/observer/trunk@2008 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$check = shell_exec($config['nagios_plugins'] . "/check_dns -H ".$service['param']." -s ".$service['hostname']);
|
// provide some sane default
|
||||||
|
if ($service['service_param']) { $nsquery = $service['service_param']; } else { $nsquery = "localhost"; }
|
||||||
|
|
||||||
|
$check = shell_exec($config['nagios_plugins'] . "/check_dns -H ".$nsquery." -s ".$service['hostname']);
|
||||||
|
|
||||||
list($check, $time) = split("\|", $check);
|
list($check, $time) = split("\|", $check);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$check = shell_exec($config['nagios_plugins'] . "/check_mysql -H ".$service['hostname']." ".$service['service_param']);
|
// provide some sane default
|
||||||
|
if ($service['service_param']) { $dbname = $service['service_param']; } else { $dbname = "mysql"; }
|
||||||
|
|
||||||
|
$check = shell_exec($config['nagios_plugins'] . "/check_mysql -H ".$service['hostname']." ".$dbname);
|
||||||
|
|
||||||
list($check, $time) = split("\|", $check);
|
list($check, $time) = split("\|", $check);
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ include("includes/functions.php");
|
|||||||
$ports = mysql_result(mysql_query("SELECT count(*) FROM ports"),0);
|
$ports = mysql_result(mysql_query("SELECT count(*) FROM ports"),0);
|
||||||
$devices = mysql_result(mysql_query("SELECT count(*) FROM devices"),0);
|
$devices = mysql_result(mysql_query("SELECT count(*) FROM devices"),0);
|
||||||
|
|
||||||
$dataHandle = fopen("http://www.observium.org/latest.php?i=$ports&d=$devices&v=".$config['version'], r);
|
$dataHandle = fopen("http://www.observium.org/latest.php?i=$ports&d=$devices&v=".$config['version'], 'r');
|
||||||
|
|
||||||
if ($dataHandle)
|
if ($dataHandle)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user