Weathermapper unable to generate automated weathermap

Hello,

Hope you are doing well.

I am a new to librenms, I have configured librenms and weathermap plugin which works fine. Also I discovered devices using snmp-scan.py and it automatically added devices to my librenms.

I wish to generate automated weathermap using weathermapper plugin, I have installed plugin and try to generate automated weather map but no any success. I followed how to available on “https://github.com/pblasquez/weathermapper”.

When I run php weathermap.php command from the console using “librenms” user. it gives error “No links found for home-network-example, please ensure LibreNMS auto-discovery is enabled and working.”.

Could anyone please help me to resolve the issues my ./validate.php output is as below.

====================================

Component Version
LibreNMS 22.6.0-11-g8ea8a97f6
DB Schema 2022_05_30_084932_update-app-status-length (242)
PHP 7.4.3
Python 3.8.10
MySQL 10.3.34-MariaDB-0ubuntu0.20.04.1
RRDTool 1.7.2
SNMP 5.8

====================================

[OK] Composer Version: 2.3.7
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] rrd_dir is writable
[OK] rrdtool version ok

Thanks,

Hardik

I used this a long time ago to get a heap of nodes in to a map quicker so I could then re-arrange with all the links done. Since then I’ve just added to my existing maps, so I’ve not used it for a long time.

You’ll need to ensure you have the right settings in your weathermapper.conf.php file - it uses this to obtain all the data from the database to build the maps. However I note in my file since settings have migrated to .env files, my database settings were not in the main config array, so I have put the database details in that file directly at the end:

$config['db_host'] = 'localhost';
$config['db_name'] = 'librenms';
$config['db_user'] = 'librenms';
$config['db_pass'] = 'xxxxxxxxx';

Sound like you’re getting a step further than that though.

When I generate one from the UI I get the below created:

conf.d/test-generation.php example:

<?php
$label = "test-generation";
$weathermapper[$label] = [];
$weathermapper[$label]['title'] = "Network Map (".$label.")";
$weathermapper[$label]['grid_opts'] = [];
$weathermapper[$label]['search_opts'] = [];
$weathermapper[$label]['search_opts']['types'] = [];
$weathermapper[$label]['grid_opts']['layout'] = 'top';
$weathermapper[$label]['grid_opts']['radius'] = 300;
$weathermapper[$label]['search_opts']['types'][] = 'hostname';
$weathermapper[$label]['search_opts']['hostnames'] = [];
$weathermapper[$label]['search_opts']['hostnames'][] = [
    'regex' => 'NOV*',
    'row' => 10
];

What is the contents of your conf.d/home-network-example.php? Maybe it’s not matching any hosts.