Weathermaps on LibreNMS - How to export the html and png files of the map

got it.
No worries, 300 sec is good enough.

have you experimented with the WeatherMapper plugin ? I got it to work and do a couple of maps, but it has some issues. For example, hovering on a link would not show the traffic graph, and clicking on a link does not do anything.

Hi Kevin,

More on this, I noticed that the links sometimes would show the load (color change) and sometimes would turn gray as if zero traffic is passing. I know that is not the case as I can see some links between our switches have constant traffic, and can’t be zero. See example below:

You can see the link being hovered on. The graph shows clearly constant traffic at around 200 mbps, while the link itself is gray with Zero traffic label.

What do you think ?

When I run the map-poller.php manually I see the following errors (few examples below) :

WARNING: configs//vmware-cluster.conf: ReadData: LINK sw81.rai.xxxxxx-node03.xxxxxa, target: ./sw81.xxxxxx/port-id4241.rrd:INOCTETS:OUTOCTETS on config line 475 of configs//vmware-cluster.conf had no valid data, according to WeatherMapDataSource_rrd
WARNING: configs//vmware-cluster.conf: ReadData: LINK sw22.rai.xxxxxx-artemis.xxxxxx, target: ./sw22.xxxxxx/port-id3193.rrd:INOCTETS:OUTOCTETS on config line 483 of configs//vmware-cluster.conf had no valid data, according to WeatherMapDataSource_rrd
WARNING: configs//vmware-cluster.conf: ReadData: LINK sw27.xxxxxxx-aiolos.xxxxxxx, target: ./sw27.xxxxxxx/port-id3175.rrd:INOCTETS:OUTOCTETS on config line 490 of configs//vmware-cluster.conf had no valid data, according to WeatherMapDataSource_rrd

There is a clear inconsistency in updating the Links on the map as they frequently show Zero value, where they shouldn’t. Showing Link values seems to be sporadic and i’m not sure if the issue is caused by the warning shown above.
Below is a sample of a link that shows Zero value, while in fact this link is a connection between two core switches and never has zero traffic. Every few refresh cycle, the link would show a value, but then it goes to zero again.

Usually if you use rrdcached some values are still not written to the rrd files and are still in the rrdcached queue.
I deal with this sending a FLUSHALL command before the weathermap poller. It could be something like this:
echo 'FLUSHALL' | nc -w 3 YOUR_RRDCACHED_SERVER 42217 >> /dev/null 2>&1
sleep 60
/opt/librenms/html/plugins/Weathermap/map-poller.php >> /dev/null 2>&1

I will make /when I have some time/ a list of the rrd files which I need to actually FLUSH for the weathermap and not FLUSHALL. But for now the flushall works.

Hi Danis,

Thanks for the explanation.

  • Would the flush affect the graphs (gaps or delay) ?
  • YOUR-RRD-SERVER, do you mean the rrdcached server ? well I guess it’s the same as libreNMS server itself.
  • The commands you mentioned are to be put in the librenms cron ?
  • sleep 60 is a separate command ?


Yes, your rrdcached server. To know which server you use, check out the setting $config['rrdcached'] in config.php
In your case this could be the server where you’ve installed LibreNMS. In my case is a separate server.
in the cron you can add the flush command before the weathermap poller and append a sleep. Or do it like in this post: Weathermap links report "no valid data" with distributed poller (rrdcached)

Hi Danis,

Indeed I have rrdcached on the same server with LibreNMS.
I will add the commands to the cron job and see how it goes.
Many thanks.

This seems to have stopped the graphs. Not sure why.
Here is the Cron :

33   */6  * * *   librenms    /opt/librenms/cronic /opt/librenms/ 1
*/5  *    * * *   librenms    /opt/librenms/discovery.php -h new >> /dev/null 2>&1
*/5  *    * * *   librenms    /opt/librenms/cronic /opt/librenms/ 16
*    *    * * *   librenms    /opt/librenms/alerts.php >> /dev/null 2>&1
*/5  *    * * *   librenms    /opt/librenms/poll-billing.php >> /dev/null 2>&1
01   *    * * *   librenms    /opt/librenms/billing-calculate.php >> /dev/null 2>&1
*/5  *    * * *   librenms    /opt/librenms/check-services.php >> /dev/null 2>&1
*/5  *    * * *   librenms    echo 'FLUSHALL' | nc -w 3 42217 >> /dev/null 2>&1
sleep 60
*/5  *    * * *   librenms    /opt/librenms/html/plugins/Weathermap/map-poller.php >> /dev/null 2>&1

# Daily maintenance script. DO NOT DISABLE!
# If you want to modify updates:
#  Switch to monthly stable release:
#  Disable updates:
15   0    * * *   librenms    /opt/librenms/ >> /dev/null 2>&1
*/5  *    * * *   librenms    /opt/librenms/ 1

Hey, follow the crontab rules :slight_smile:
Try with what the post Weathermap links report "no valid data" with distributed poller (rrdcached) says or put the sleep in front the weather poller like
sleep 60 && /opt/librenms/html/plugins/Weathermap/map-poller.php >> /dev/null 2>&1
or something like this.

Hi Danis,

Will test again and see how it goes.
Will post an update.


Yep, Adding them in the cron as below seems to work :

 */5  *    * * *   librenms    echo 'FLUSHALL' | nc -w 3 localhost 42217 >> /dev/null 2>&1
 */5  *    * * *   librenms    sleep 60 && /opt/librenms/html/plugins/Weathermap/map-poller.php >> /dev/null 2>&1

I will keep it running for some time, and if the Links on the graph are consistent, we call it a victory.

Thank you very much for the help.

1 Like

Good job!
I hope all works fine :beers:

thanks man :beers:

I follow all the steps and i put the name.png and html and still get 404

the png and html file are not being created, only the .conf

any help ?

i set up the name in for html and PNG file but still getting the same error.

I put in these two cron lines and now some of my overall traffic graphs are not showing up. System is giving me “Error Drawing Graph:” error. I’ve restarted the servers but it doesn’t seem to fix the issue. Its only showing this error for a few devices not all of them.

Hi Kalamchi75,

Hope you are doing well.

I am struggling with Weathermapper as I am un-able to generate any automated weathermap. I have installed both the plugins and 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 you please help me to set the same.



Hi @Hardik_Patel,

Oh man it’s been a while since i’ve deployed WeatherMaps in our LNMS.
Let me dig our server history to remember what I had to do at the time.
One thing I remember, the auto generated maps weren’t really helpful in terms of how I wanted my weathermaps to look like, and what devices/connections I wanted to visualize. So I opted for manual creation (design, add devices, add connections, etc.).

I also noticed that the error you got complains about LNMS auto-discovery might not be enabled. Have you looked into this ?


Hi Kalmchi,

Thanks for your prompt reply.

Yes, I have checked an enabled auto discovery in config.php for ARP and other discoveries as well but still getting the same issue.

Below are the config parameters I have added in config.php.

$config[‘discovery_by_ip’] = true;
$config[‘discovery_modules’][‘discovery-arp’] = true;
$config[‘autodiscovery’][‘xdp’] = true;

Does it require anything else apart from this.



Hi @Hardik_Patel,

Please let me know where your Weathemap plugin is located. Normally it would be in:


Make sure it is owned by user “librenms”

drwxrwxrwx 10 librenms librenms 4.0K Sep 14  2021 Weathermap

Now inside Weathermap directory, you should see “configs” directory , which holds your actual weathermap maps:

-rw-r--r--  1 librenms librenms  25K Feb 18  2020 AIOLOS_SLOT_01.conf
-rwxrwxrwx  1 librenms librenms  12K Jun 29 14:09 backup-servers.conf
-rw-r--r--  1 librenms librenms 7.3K Mar 13  2020 BGW_DC01-UPSTREAM_2.conf
-rw-r--r--  1 librenms librenms 8.1K Feb 26  2020 BGW_DC01-UPSTREAM.conf
-rw-r--r--  1 librenms librenms 8.9K Feb 21  2020 FRA.conf
-rwxr-xr-x  1 librenms librenms   33 Feb 13  2020 .htaccess
-rw-r--r--  1 librenms librenms   51 Feb 13  2020 index.php
-rw-r--r--  1 librenms librenms  27K Feb 20  2020 RAI-ROUTER_CONNECTIONS.conf
-rw-r--r--  1 librenms librenms  23K Feb 20  2020 RAI-SWITCH_CONNECTIONS.conf
-rw-r--r--  1 librenms librenms  11K Feb 19  2020 RAI-UPSTREAM.conf
-rw-r--r--  1 librenms librenms  25K Feb 18  2020 ROUTER_BLADE_48-Ports.conf
-rw-r--r--  1 librenms librenms  23K Feb 18  2020 ROUTER_CONNECTIONS.conf
-rw-r--r--  1 librenms librenms  21K Feb 18  2020 SWITCH_CONNECTIONS.conf
-rw-r--r--  1 librenms librenms 1.5K Feb 18  2020 TestMap2.conf
-rwxrwxrwx  1 librenms librenms  21K Feb 20  2020 vmware-cluster.conf
-rw-r--r--  1 librenms librenms 5.4K Feb 18  2020 vmware-vms.conf

Inside that directory, create a file named testmap.conf (or .conf) and see if you can then find/edit it from LNMS Weathermap plugin page. Note my TestMap2.conf :

If it shows “Read Only”, you might want to change the file attributes to allow Read/Write for everyone to be able to edit it.
Now click on the file to open it for editing (adding hosts, connections, labels, etc).

Please try and let me know how it goes.