This commit is contained in:
laf
2016-01-10 00:41:20 +00:00
1439 changed files with 160313 additions and 1198 deletions

View File

@@ -33,7 +33,7 @@ echo "MySQL: ".$versions['mysql_ver']."\n";
echo "RRDTool: ".$versions['rrdtool_ver']."\n";
echo "SNMP: ".$versions['netsnmp_ver']."\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';
@@ -81,6 +81,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";
@@ -108,6 +109,17 @@ if (isset($options['r'])) {
$config['norrd'] = true;
}
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);
echo "Starting polling run:\n\n";