mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Rebased
This commit is contained in:
14
poller.php
14
poller.php
@@ -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";
|
||||
|
Reference in New Issue
Block a user