More updates for influx

This commit is contained in:
laf
2015-08-19 20:58:02 +00:00
parent d2676213a4
commit 433562d351
66 changed files with 355 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ require 'includes/alerts.inc.php';
$poller_start = utime();
echo $config['project_name_version']." Poller\n\n";
$options = getopt('h:m:i:n:r::d::a::');
$options = getopt('h:m:i:n:r::d::a::f::');
if ($options['h'] == 'odd') {
$options['n'] = '1';
@@ -72,6 +72,7 @@ if (!$where) {
echo " Instances start at 0. 0-3 for -n 4\n\n";
echo "Debugging and testing options:\n";
echo "-r Do not create or update RRDs\n";
echo "-f Do not insert data into InfluxDB\n";
echo "-d Enable debugging output\n";
echo "-m Specify module(s) to be run\n";
echo "\n";
@@ -99,6 +100,14 @@ if (isset($options['r'])) {
$config['norrd'] = true;
}
if (isset($options['f'])) {
$config['noinfluxdb'] = true;
}
if ($config['noinfluxdb'] !== true) {
$influxdb = influxdb_connect();
}
rrdtool_pipe_open($rrd_process, $rrd_pipes);
echo "Starting polling run:\n\n";