Installation Guide (Standalone)

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

Author
Message
gerald
Posts: 5
Joined: Wed Nov 28, 2018 4:49 pm

Installation Guide (Standalone)

#1 Post by gerald » Wed Nov 28, 2018 4:54 pm

Hello,

Is there a step by step install guide for PHP weathermap? I want to install the standalone version and use my smokeping rrds as data for weathermap.
Problem is i can't really find a easy guide on how to make it all work.

I can't even find what operating system i should install weathermap on... I assume Centos 6.9 is OK?
Can someone point me in the right direction please?

Right now i have downloaded php-weathermap-0.98.zip and unzipped it....
now what?

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Installation Guide (Standalone)

#2 Post by Howie » Wed Nov 28, 2018 5:21 pm

There is a manual in the docs folder that goes through a simple map, and has a full reference to the map configuration.

CentOS 6.9 should be fine as long as you have PHP installed. Run php check.php and it'll make sure you have all the necessary php modules. Then you'll need to edit weathermap and change the path to rrdtool near the top.

Create some config files (there's an example in weathermap.conf). Run

Code: Select all

./weathermap --config mymap.conf --output mymap.png
and it should generate a map.

For smokeping rrds, use the rrd file as the TARGET for a link, and the first time you run the map, it will tell you the DS names are wrong, but also will tell you what the right names should be. Add those at the end of the TARGET, so it looks like:

Code: Select all

TARGET somefile.rrd:ds_in:ds_out
Weathermap 0.98 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!)

gerald
Posts: 5
Joined: Wed Nov 28, 2018 4:49 pm

Re: Installation Guide (Standalone)

#3 Post by gerald » Wed Nov 28, 2018 5:55 pm

Thank you!

All my PHP checks are good and i'm trying to get a basic conf file going.

One issue - my smokeping server is on a different VM (running Ubuntu 16.04)
I guess i should be running the weathermap on the same VM as the smokeping rrds?

I was thinking i could just copy the rrd files between the two VMs every minute or so, but not sure if that is correct.

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Installation Guide (Standalone)

#4 Post by Howie » Wed Nov 28, 2018 5:58 pm

Either way works, as long as it's not between a 32 and 64 bit system (rrdtool's format is architecture dependent).

Or NFS/something else to share the directory.
Weathermap 0.98 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!)

gerald
Posts: 5
Joined: Wed Nov 28, 2018 4:49 pm

Re: Installation Guide (Standalone)

#5 Post by gerald » Wed Nov 28, 2018 6:12 pm

Ok cool, thank you!

So i've got a simple graph working between two nodes. When i run

Code: Select all

./weathermap --config weathermap.conf
i get this:

Code: Select all

WARNING: weathermap.conf: RRD ReadData: At least one of your DS names (traffic_in and traffic_out) were not found, even though there was a valid data line. Maybe they are wrong? Valid DS names in this file are: uptime,loss,median,ping1,ping2,ping3,ping4,ping5,ping6,ping7,ping8,ping9,ping10, [WMRRD06]
WARNING: weathermap.conf: ReadData: LINK ams-to-nyc, target: data/AMS-smokeping.nyc.rrd on config line 24 of weathermap.conf had no valid data, according to WeatherMapDataSource_rrd
The two things i'm interested in is latency and packet loss. So not really sure what DS names i should use from that list above
Trying something like:

Code: Select all

TARGET data/AMS-smokeping.nyc.rrd:loss:ping1
Doesn't really do anything and i now see this when loading the config:

Code: Select all

/weathermap --config weathermap.conf
WARNING: weathermap.conf: ReadData: LINK ams-to-nyc, target: data/AMS-smokeping.nyc.rrd:loss:ping1 on config line 24 of weathermap.conf had no valid data, according to WeatherMapDataSource_rrd
PHP Warning:  strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in /var/www/html/weathermap/lib/Weathermap.class.php on line 3196

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Installation Guide (Standalone)

#6 Post by Howie » Wed Nov 28, 2018 6:18 pm

How long ago did you copy the files? It uses data from the last 15 minutes. If the files are older than 15 minutes, you will get that message. Or if smokeping isn't updating all of the data in its files (I don't think it does that ever, but I've never checked).

That's the right idea though.

Updating your php.ini to define a timezone will clear that other message.
Weathermap 0.98 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!)

gerald
Posts: 5
Joined: Wed Nov 28, 2018 4:49 pm

Re: Installation Guide (Standalone)

#7 Post by gerald » Wed Nov 28, 2018 6:21 pm

copied it a few mins ago.... i'll keep poking around.

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Installation Guide (Standalone)

#8 Post by Howie » Thu Nov 29, 2018 4:50 am

If you add the --debug option, you will get a LOT more output, but in there will be a bunch of lines for ReadData - that'll show what rrdtool command is being run, and what output it is getting.
Weathermap 0.98 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!)

gerald
Posts: 5
Joined: Wed Nov 28, 2018 4:49 pm

Re: Installation Guide (Standalone)

#9 Post by gerald » Thu Nov 29, 2018 8:55 am

I found a thread with someone having simialr issues, looks like it was time realted and you suggested. I think i've fixed that up now, running ./weathermap comes back clean.

However i'm not seeing any data on my map at all. I just see two nodes connected both saying 0%
Here is my config.... feels like i'm still missing someting

Code: Select all

cat weathermap.conf
#
# A minimal config file to get you started.
# - see also the docs/example folder.
# - and configs/simple.conf

HTMLSTYLE overlib
WIDTH 800
HEIGHT 600

HTMLOUTPUTFILE weathermap.html
IMAGEOUTPUTFILE weathermap.png

NODE AMS
    POSITION 200 200
    LABEL AMS

NODE NYC
    POSITION 500 200
    LABEL NYC

LINK ams-to-nyc
    NODES AMS NYC
    BANDWIDTH 10G
    TARGET data/AMS-smokeping-.nyc.rrd:median:loss

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Installation Guide (Standalone)

#10 Post by Howie » Thu Nov 29, 2018 12:50 pm

OK, I think what you are now seeing is to do with scales.

Your target isn't traffic, so the values are quite small (0-100 for loss, <1 for latency). But you have BANDWIDTH set to 10G. Weathermap uses that to calculate the percentage throughput, even if you aren't measuring traffic. So you probably want to set BANDWIDTH to something like 100.

You may also want to create a scale that makes sense for the value being drawing (e.g. for loss, anything more than 1 or 2 is really visible, but latency is not like that). The default scale is defined assuming you are measuring traffic, so it gets towards red at 100% utilisation. Weathermap isn't very smart - all it does is turn numbers into percentages, and then percentages into colours :-)
Weathermap 0.98 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!)

smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: Installation Guide (Standalone)

#11 Post by smiles » Tue Dec 18, 2018 10:13 am

I have the latest weathermap plugin installed and working for Cacti 1.2.0. Polling is working fine. I can view my old maps fine within cacti.

The check.php script finds no issues with the php.

However, I can not get the editor working. I believe this is due to bower being deprecated, and javascript/jquery not being installed.

When I click on the edit icon within cacti, in the browser console I get "Uncaught ReferenceError: JQuery is not defined". The editor appears to be looking for the jquery libraries under vendor folder, where I have verified they are not installed.

Can composer be modified to install the javascript dependancies? Please help.

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Installation Guide (Standalone)

#12 Post by Howie » Tue Dec 18, 2018 1:32 pm

smiles wrote:I have the latest weathermap plugin installed and working for Cacti 1.2.0. Polling is working fine. I can view my old maps fine within cacti.
You don't have the latest version, you have the current development code.

Please feel free to supply Pull Requests!

(it also sounds like you didn't read the readme)
Weathermap 0.98 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!)

smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: Installation Guide (Standalone)

#13 Post by smiles » Tue Dec 18, 2018 1:46 pm

I apologize for my ignorance. I assumed the master branch was the latest version since it had recent commits.

I did read the readme. It said under the "Using the dev version" section that bower installs the necessary javascript dependencies under the /vendor directory. It also says further down under "known Issues" that Bower is deprecated. My question was posed with this in mind and I'm asking for your help with getting the javascript dependencies installed correctly with a different package manager. I have tried and have not been successful.

I would love to submit a pull request if I knew how to fix it.

Thank you, I do appreciate your hard work on this very valuable tool.

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Installation Guide (Standalone)

#14 Post by Howie » Tue Dec 18, 2018 2:19 pm

Sorry - snappy after a long work day.

Did you run bower install? It sounds like you didn't... (that's what puts jquery in the vendor folder)

As far as I know, the editor should work right now.
Weathermap 0.98 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!)

smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: Installation Guide (Standalone)

#15 Post by smiles » Wed Dec 19, 2018 11:52 am

I did, but it was throwing an error. I assumed because of the deprecation.

After researching more, I found this:

"Bower is deprecating their registry hosted with Heroku. http://bower.herokuapp.com/ Will not be accessible anymore or it might be down intermittently, therefore, forcing users to a new registry."

After adding this to the .bowerrc, I was able to get it to run successfully

{
"registry": "https://registry.bower.io"
}

Thank you for pointing me in the right direction.

Post Reply