mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
This reverts commit e5dad7a64e
.
This commit is contained in:
@@ -13,19 +13,31 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
use LibreNMS\Data\Store\Datastore;
|
||||
|
||||
$init_modules = array();
|
||||
require __DIR__ . '/includes/init.php';
|
||||
|
||||
$options = getopt('drfpgh:');
|
||||
$options = getopt('d::h:f:;');
|
||||
if (set_debug(isset($options['d']))) {
|
||||
echo "DEBUG!\n";
|
||||
}
|
||||
|
||||
if (isset($options['f'])) {
|
||||
\LibreNMS\Config::set('noinfluxdb', true);
|
||||
}
|
||||
|
||||
if (isset($options['p'])) {
|
||||
$prometheus = false;
|
||||
}
|
||||
|
||||
if (\LibreNMS\Config::get('noinfluxdb') !== true && \LibreNMS\Config::get('influxdb.enable') === true) {
|
||||
$influxdb = influxdb_connect();
|
||||
} else {
|
||||
$influxdb = false;
|
||||
}
|
||||
|
||||
$poller_start = microtime(true);
|
||||
|
||||
$datastore = Datastore::init($options);
|
||||
rrdtool_initialize();
|
||||
|
||||
echo "Starting service polling run:\n\n";
|
||||
$polled_services = 0;
|
||||
@@ -84,4 +96,4 @@ $string = $argv[0] . " " . date(\LibreNMS\Config::get('dateformat.compact'))
|
||||
." - $polled_services services polled in $poller_time secs";
|
||||
d_echo("$string\n");
|
||||
|
||||
Datastore::terminate();
|
||||
rrdtool_close();
|
||||
|
Reference in New Issue
Block a user