Hello,
We have started using librenms recently, we can see that this tool is very powerful.
We want to use this tool as a network analyser.
We would like to plug it into a network and fill in the client’s network, let it run and see the results.
We are now at the stage of adding stations automatically via autodiscovery. My question is this:
Is it possible to discover new stations without modifying the SNMP and still have the feedback that comes back when we do an SNMP scan?
I was able to do a scan with the --ping option and it did bring up some stations but without any information. There is any other way to do it ?
The output of ./validate.php
:
root@raspberrypi:/opt/librenms# cat validate.php
#!/usr/bin/env php
print_fail('Remove the ?> at the end of config.php');
$pre_checks_failed = true;
}
}
// Composer check
$validator = new Validator();
$validator->validate([‘dependencies’]);
if ($validator->getGroupStatus(‘dependencies’) == ValidationResult::FAILURE) {
$pre_checks_failed = true;
}
if ($pre_checks_failed) {
exit;
}
$init_modules = [];
require ‘includes/init.php’;
// make sure install_dir is set correctly, or the next includes will fail
if (! file_exists(Config::get(‘install_dir’) . ‘/.env’)) {
$suggested = realpath(DIR);
print_fail(’‘install_dir’ config setting is not set correctly.’, “It should probably be set to: $suggested”);
exit;
}
if (\LibreNMS\DB\Eloquent::isConnected()) {
$validator->ok(‘Database connection successful’, null, ‘database’);
} else {
$validator->fail(‘Error connecting to your database.’, null, ‘database’);
}
$precheck_complete = true; // disable shutdown function
print_header($validator->getVersions());
if (isset($options[‘g’])) {
$modules = explode(’,’, $options[‘g’]);
} elseif (isset($options[‘m’])) {
$modules = explode(’,’, $options[‘m’]); // backwards compat
} else {
$modules = []; // all modules
}
// run checks
$validator->validate($modules, isset($options[‘s’]) || ! empty($modules));
function print_header($versions)
{
$output = ob_get_clean();
@ob_end_clean();
echo <<< EOF
====================================
Component | Version |
---|---|
LibreNMS | ${versions[‘local_ver’]} |
DB Schema | ${versions[‘db_schema’]} |
PHP | ${versions[‘php_ver’]} |
Python | ${versions[‘python_ver’]} |
MySQL | ${versions[‘mysql_ver’]} |
RRDTool | ${versions[‘rrdtool_ver’]} |
SNMP | ${versions[‘netsnmp_ver’]} |
====================================
$output
EOF;
}
// output matches that of ValidationResult
function print_fail($msg, $fix = null)
{
c_echo("[%RFAIL%n] $msg");
if ($fix && strlen($msg) > 72) {
echo PHP_EOL . ’ ';
}
if (! empty($fix)) {
c_echo(" [%BFIX%n] %B$fix%n");
}
echo PHP_EOL;
}
If it’s an issue with the WebUI then please consider including a screenshot and the browser version you are using.
If you are having troubles with discovery/polling include the pastebin output of:
./discovery.php -h HOSTNAME -d | ./pbin.sh
./poller.php -h HOSTNAME -r -f -d | ./pbin.sh
If you need to post any text longer than a few lines, please use a pastebin service such as https://p.libren.ms using non-expiring pastes.