Weathermap not show traffic

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
foxnet
Posts: 2
Joined: Wed Jan 04, 2017 3:13 pm

Weathermap not show traffic

Post by foxnet »

My weathermap does not show any traffic on the links.

Below is a configuration file I'm using and the weathermap image.

----- CONFIGURATION FILE
HTMLSTYLE overlib

KEYPOS DEFAULT 662 69 Traffic Load
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE DEFAULT 0 0 192 192 192
SCALE DEFAULT 0 1 255 255 255
SCALE DEFAULT 1 10 140 0 255
SCALE DEFAULT 10 25 32 32 255
SCALE DEFAULT 25 40 0 192 255
SCALE DEFAULT 40 55 0 240 0
SCALE DEFAULT 55 70 240 240 0
SCALE DEFAULT 70 85 255 192 0
SCALE DEFAULT 85 100 255 0 0

#SET key_hidezero_DEFAULT 1
SET rrd_use_poller_output 1

# End of global section

# TEMPLATE-only NODEs:
NODE DEFAULT
MAXVALUE 100

# TEMPLATE-only LINKs:
LINK DEFAULT
BANDWIDTH 100M

# regular NODEs:
NODE JUNIPER_MX480
LABEL JUNIPER_MX480
ICON images/router40.png
POSITION 197 285

NODE BROCADE
LABEL BROCADE
ICON images/router40.png
POSITION 520 288

# regular LINKs:
LINK BROCADE-JUNIPER_MX480
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=3598
OVERLIBGRAPH /cacti/graph_image.php?local_graph_id=3598&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET /usr/share/cacti/rra/bb3_traffic_in_3567.rrd
NODES BROCADE JUNIPER_MX480
BANDWIDTH 10000M

---- END CONFIGURATION FILE

I have tried several configurations and I have no results.

When I try to run the debug on the console I get the following error:

PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in / usr / share / cacti / plugins / weathermap / weathermap on line 60

Thank you for any help.
Attachments
Weathermap
Weathermap
Untitled.png (25.99 KiB) Viewed 6779 times
pgolding
Posts: 3
Joined: Thu Jan 19, 2017 3:19 am

Re: Weathermap not show traffic

Post by pgolding »

This will resolve that problem:
https://network-weathermap.com/2016/09/ ... -on-0-98a/

but then you might end up with this one:
PHP Fatal error: Cannot redeclare rotateAboutPoint() (previously declared in /var/www/html/plugins/weathermap/WeatherMap.functions.php:473) in /var/www/html/plugins/weathermap/lib/geometry.php on line 55

which I cant yet find a solution for. :cry:
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap not show traffic

Post by Howie »

pgolding wrote: but then you might end up with this one:
PHP Fatal error: Cannot redeclare rotateAboutPoint() (previously declared in /var/www/html/plugins/weathermap/WeatherMap.functions.php:473) in /var/www/html/plugins/weathermap/lib/geometry.php on line 55

which I cant yet find a solution for. :cry:
Huh? It's a one-line change that doesn't mention rotateAboutPoint... what version are you running, pgolding? And when do you get this error?

It sounds like you have parts of 0.98 and parts of some other version.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
pgolding
Posts: 3
Joined: Thu Jan 19, 2017 3:19 am

Re: Weathermap not show traffic

Post by pgolding »

installed weathermap 0.98 with cacti 0.8.8a (cactiez), after removing 0.97a, then saw what i posted previusly, via command line debug execution. tried the one line fix, which led us all here! verified php ver was as specified before installing.

tried 0.98 because 0.97a was doing this:

DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:391] configs/xxx.conf: RRD ReadData: Headings are: 5min_cpu
WARNING: configs/xxx.conf: RRD ReadData: At least one of your DS names (5min_cpu and 5min-cpu) were not found, even though there was a valid data line. Maybe they are wrong? Valid DS names in this file are: 5min_cpu, [WMRRD06]

so tried cpu, Cputil, 5min_cpu, 5min-cpu, DS0,DS1,ds0,ds1 which were found on various places, but none seem to work. is there possibly a null appended to the real "5min_cpu" which is causing a comparison to fail and generate the above?

And we started all this because colorizing the node based on measured cpu was just returning a black box with this config (ver 0.97a):
NODE rt1
POSITION 425 100
LABEL RT1
TARGET gauge:../../rra/rt1_5min_cpu_150.rrd:5min_cpu:-

the target line is where all the different combinations (cpu, Cputil, 5min etc) were tested. tried with/without gauge, with inpercent, percent etc (found in various places). verified that the rrd file exists. manual rrd fetch returns good numbers.

hope i've not messed up the install smashing different versions together?


maybe should add: 0.97a was not giving the node cpu colorisation, so tried 0.98, found and made the one line fix, then no more updated weathermaps. debug then gave us the rotateAboutPoint error in the previous post. tried commenting the rotate function declaration out in both places it occurs (one at a time!) but it just threw different errors for each so i gave up on that approach.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap not show traffic

Post by Howie »

OK, so based on your log lines there, this target is correct:

Code: Select all

   TARGET	gauge:../../rra/rt1_5min_cpu_150.rrd:5min_cpu:-
If you run with debugging again (once the other thing is fixed), you'll see what data it's actually receiving, and hopefully get a clue about why it's black.

The reason you got that first message is that only one of your two DS names exists in that file (5min_cpu does, 5min-cpu doesn't), so that's reasonable. It does tell you what the valid DS names are on the end of the message (i.e. ds0, DS0, cputil was never going to work)

As for the other error - these are functions that were broken out into smaller files between 0.97a and 0.98, so I'd delete (or rename) the lib/ directory and unpack it from the 0.98 zip to make sure you only have one version.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
foxnet
Posts: 2
Joined: Wed Jan 04, 2017 3:13 pm

Re: Weathermap not show traffic

Post by foxnet »

Thank´s for help...

$ret=$cg->getopt($args, $short_opts, $long_opts);

-if ((new PEAR)->isError($ret)) { die ("Error in command line: " . $ret->getMessage() . "\n (try --help)\n"); }
+$pear = new PEAR;
+if ($pear->isError($ret)) { die ("Error in command line: " . $ret->getMessage() . "\n (try --help)\n"); }

$gopts=$ret[0];

This works great to correct the PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in / usr / share / cacti / plugins / weathermap / weathermap on line 60

But graphics still without color and does not show any traffic on the links.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap not show traffic

Post by Howie »

OK, so back to basics, now that it is running:

What do the logs say? If data can't be collected, there will be some kind of error message.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
pgolding
Posts: 3
Joined: Thu Jan 19, 2017 3:19 am

Re: Weathermap not show traffic

Post by pgolding »

thanks Howie, thats resolved my issue.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests