Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Dec 15, 2018 11:18 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Installation Guide (Standalone)
PostPosted: Wed Nov 28, 2018 4:54 pm 
Offline

Joined: Wed Nov 28, 2018 4:49 pm
Posts: 5
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?


Top
 Profile  
 
 Post subject: Re: Installation Guide (Standalone)
PostPosted: Wed Nov 28, 2018 5:21 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5279
Location: United Kingdom
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:
./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:
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!)


Top
 Profile  
 
 Post subject: Re: Installation Guide (Standalone)
PostPosted: Wed Nov 28, 2018 5:55 pm 
Offline

Joined: Wed Nov 28, 2018 4:49 pm
Posts: 5
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.


Top
 Profile  
 
 Post subject: Re: Installation Guide (Standalone)
PostPosted: Wed Nov 28, 2018 5:58 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5279
Location: United Kingdom
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!)


Top
 Profile  
 
 Post subject: Re: Installation Guide (Standalone)
PostPosted: Wed Nov 28, 2018 6:12 pm 
Offline

Joined: Wed Nov 28, 2018 4:49 pm
Posts: 5
Ok cool, thank you!

So i've got a simple graph working between two nodes. When i run
Code:
./weathermap --config weathermap.conf
i get this:

Code:
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:
TARGET data/AMS-smokeping.nyc.rrd:loss:ping1


Doesn't really do anything and i now see this when loading the config:
Code:
/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


Top
 Profile  
 
 Post subject: Re: Installation Guide (Standalone)
PostPosted: Wed Nov 28, 2018 6:18 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5279
Location: United Kingdom
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!)


Top
 Profile  
 
 Post subject: Re: Installation Guide (Standalone)
PostPosted: Wed Nov 28, 2018 6:21 pm 
Offline

Joined: Wed Nov 28, 2018 4:49 pm
Posts: 5
copied it a few mins ago.... i'll keep poking around.


Top
 Profile  
 
 Post subject: Re: Installation Guide (Standalone)
PostPosted: Thu Nov 29, 2018 4:50 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5279
Location: United Kingdom
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!)


Top
 Profile  
 
 Post subject: Re: Installation Guide (Standalone)
PostPosted: Thu Nov 29, 2018 8:55 am 
Offline

Joined: Wed Nov 28, 2018 4:49 pm
Posts: 5
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:
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


Top
 Profile  
 
 Post subject: Re: Installation Guide (Standalone)
PostPosted: Thu Nov 29, 2018 12:50 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5279
Location: United Kingdom
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!)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group