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

Hi Guys,

I am experimenting with Weathermaps and Weathermapper plugins. I have installed both plugins and got some maps working (to some degree) using the Weathemapper automated creation.

Now, i’m trying to create a map using the classic weathermap editor. See below:

I can see the MAPNAME.conf file
I can see a pointer in the GUI to the map. See below:

I can see the .conf file in /opt/librenms/html/plugins/Weathermaps/configs . See Below

But I don’t know how to export the .html and .png files to /opt/librenms/html/plugins/Weathermaps/output

And If i click on the map link in the GUI, I get a 404 error page not found.

Any advice please ?

Ok got it to work.
I needed to fill in the map title and html and png output names in the editor under map properties. See below:

Now when i click on the map link in the GUI, it shows the map correctly, and when I hover on the links it shows the graph, and when I click on a link it will take me to the interface graph page. See below:

Now I only need to figure out the autorefresh of the map.

Yeah thats coverd in the docs Also, ensure you set an output image filename and output HTML filename in Map Properties. I’d recommend you use the output folder as this is excluded from git updates (i.e enter output/mymap.png and output/mymap.html).

and the map will auto refresh every 300 seconds

Hi Kevin,

Thanks man.
Yeh I wasn’t really sure where was that filename settings. I haven’t created weathermaps in our old cacti’s for a really long time.

When you say refresh every 300 seconds, that’s based on the cron job. My librenms (the test one) is set to poll every minute. I guess I can set the weathemap cron to do also refresh every one minute.
Would that work ?

Yes weathermap depends on the cron job for the time to update the data. But the page itself only refreshed every 300 seconds and is hard code into the page.

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.