mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
More influx changes
This commit is contained in:
@@ -44,6 +44,8 @@ function influxdb_connect() {
|
||||
|
||||
function influx_update($device,$measurement,$tags=array(),$fields) {
|
||||
global $influxdb,$config,$console_color;
|
||||
if ($influxdb !== false) {
|
||||
echo "AHHHH $influxdb\n";
|
||||
$tmp_fields = array();
|
||||
$tmp_tags['hostname'] = $device['hostname'];
|
||||
foreach ($tags as $k => $v) {
|
||||
@@ -73,5 +75,6 @@ function influx_update($device,$measurement,$tags=array(),$fields) {
|
||||
else {
|
||||
print $console_color->convert('[%gInfluxDB Disabled%n] ', false);
|
||||
}//end if
|
||||
}//end if
|
||||
}// end influx_update
|
||||
|
||||
|
||||
+4
-1
@@ -105,9 +105,12 @@ if (isset($options['f'])) {
|
||||
$config['noinfluxdb'] = true;
|
||||
}
|
||||
|
||||
if ($config['noinfluxdb'] !== true) {
|
||||
if ($config['noinfluxdb'] !== true && $config['influxdb']['enable'] === true) {
|
||||
$influxdb = influxdb_connect();
|
||||
}
|
||||
else {
|
||||
$influxdb = false;
|
||||
}
|
||||
|
||||
rrdtool_pipe_open($rrd_process, $rrd_pipes);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user