Merge pull request #4031 from adaniels21487/issue-4028

BUGFIX: Added influxdb options to check-services.php
This commit is contained in:
Neil Lathwood
2016-08-11 11:03:59 +01:00
committed by GitHub

View File

@@ -28,8 +28,7 @@ if (isset($options['d'])) {
ini_set('display_startup_errors', 1); ini_set('display_startup_errors', 1);
ini_set('log_errors', 1); ini_set('log_errors', 1);
ini_set('error_reporting', 1); ini_set('error_reporting', 1);
} } else {
else {
$debug = false; $debug = false;
// ini_set('display_errors', 0); // ini_set('display_errors', 0);
ini_set('display_startup_errors', 0); ini_set('display_startup_errors', 0);
@@ -37,6 +36,16 @@ else {
// ini_set('error_reporting', 0); // ini_set('error_reporting', 0);
} }
if (isset($options['f'])) {
$config['noinfluxdb'] = true;
}
if ($config['noinfluxdb'] !== true && $config['influxdb']['enable'] === true) {
$influxdb = influxdb_connect();
} else {
$influxdb = false;
}
rrdtool_pipe_open($rrd_process, $rrd_pipes); rrdtool_pipe_open($rrd_process, $rrd_pipes);
foreach (dbFetchRows('SELECT * FROM `devices` AS D, `services` AS S WHERE S.device_id = D.device_id ORDER by D.device_id DESC') as $service) { foreach (dbFetchRows('SELECT * FROM `devices` AS D, `services` AS S WHERE S.device_id = D.device_id ORDER by D.device_id DESC') as $service) {