Weathermap 0.97 test (updated -> test4)

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

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

Weathermap 0.97 test (updated -> test4)

Post by Howie »

Update: I've made another version. This fixes some bugs that were found before, and also improves the tabs feature, and the SNMP data source performance when there is a down device.

If anyone has a test server, and fancies trying to find some bugs, I have a test-release for Weathermap 0.97 available.

Please don't bother if you haven't tried Weathermap before. I don't really want to help you install this.

I've been running this for myself with no problems so far, but I'm sure that someone else will find some :-) There is now a converter to use with DSStats to convert existing rrd-based maps to use DSStats instead, if you have that plugin installed.

The changelog is

Code: Select all

0.97    FIXED - RRD Aggregation regexp was failing (thanks to shd)
        FIXED - Scale numerals honour locale (thanks again, shd)
        FIXED - THold plugin check failed with Thold 0.4.1 (PA 2.x, actually)
        FIXED - Uninitialized variable in ReadData when plugin is disabled
        FIXED - Zero-length link check didn't include offsets (thanks Ryan Botoluzzi)
        FIXED - Cacti-pick should get right rra path for packagers that move the rra directory (e.g. Ubuntu, Debian *again*)
        FIXED - DS plugins that return one value and a null should work properly
        FIXED - "Strange" characters (e.g. /) in NODE and LINK names broke the imagemap.
        FIXED - Map Style settings in editor were broken after internal defaults changes
        FIXED - Imagemap no longer contains areas with no href defined
        FIXED - SPLITPOS was ignored with VIASTYLE angled (thanks to uhtred)
        ADDED - Option of a dropdown selector to navigate between maps (in full-size view)
        ADDED - Maps can be organised into groups in Cacti plugin. These appear
                        as tabs in the UI for viewing maps.
        ADDED - Extra variables can be defined per-group, so all maps in a group can have similar settings (e.g. a "24hr average" tab).
        ADDED - INCLUDE keyword to include a file of common definitions (based on work by BorisL)
                        (NOTE: this can confuse the editor sometimes - see the manual page for INCLUDE)
        ADDED - Warning for maps that contain OVERLIBGRAPH but not 'HTMLSTYLE overlib'
        ADDED - Warning for use of TEMPLATE not as the first line of an object (overwrites settings otherwise)
        ADDED - SCALE will accept values below 0, and also above 100
        ADDED - USESCALE has two new options: absolute and percent, which allows you to have a SCALE of absolute values
        ADDED - New datasource plugin to support statistics from TheWitness's DSStats Cacti Plugin. This gets you daily,weekly,monthly and annual stats with no complicated rrdtool stuff.
        ADDED - New converter to take a rrdtool-based map config and make it into a DSStats-based one
        ADDED - static datasource can be used for negative values
http://www.network-weathermap.com/files ... 7test4.tgz
Last edited by Howie on Fri Nov 20, 2009 4:23 am, edited 1 time in total.
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!)
User avatar
trik
Posts: 12
Joined: Mon Sep 21, 2009 2:21 pm

Post by trik »

\o/ :D

Thank you again for your incredible work !

I will copy my production server to another server and test this new version ...
Debian 5.0.3 / Php 5.2.6
Cacti 0.8.7e / Spine 0.8.7e
DLNoah
Cacti User
Posts: 119
Joined: Wed Jun 20, 2007 11:27 pm

Post by DLNoah »

For the record, I've been running 0.97test3 on my main box for two days without issue. Once I remembered to copy my configs and custom icon files over to the appropriate places (doh!), 0.97 picked up and ran just fine where 0.96a left off.
trogs
Posts: 14
Joined: Mon Apr 20, 2009 5:31 pm

Post by trogs »

Heya,

I noticed that if i have VIASTYLE angled in a link, with no VIA parameters, then it seems to make the link transparent.. Bug?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

trogs wrote:Heya,

I noticed that if i have VIASTYLE angled in a link, with no VIA parameters, then it seems to make the link transparent.. Bug?
Can you post the config for that link? It will refuse to draw links that are shorter than a certain length... could it be that? You'd get a log message then though.
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!)
trogs
Posts: 14
Joined: Mon Apr 20, 2009 5:31 pm

Post by trogs »

Chopped some bits and pieces to protect the innocent, but this is an example.

The actual VIASTYLE angled line was actually not supposed to be there (just a leftover from a previous version of the map config), I was just curious that the previous version showed this as a normal link, but this new version seems to show it transparent (with black border)

Code: Select all

KEYPOS DEFAULT 668 655 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.01   0 0 0  
SCALE DEFAULT 0 2   32 243 0  
SCALE DEFAULT 2 10   25 136 0  
SCALE DEFAULT 10 20   220 98 0  
SCALE DEFAULT 20 100   255 0 0  

# TEMPLATE-only NODEs:
NODE DEFAULT
        MAXVALUE 100


# TEMPLATE-only LINKs:
LINK DEFAULT
        OVERLIBWIDTH 597
        OVERLIBHEIGHT 268
        ARROWSTYLE compact
        BWLABEL bits
        BANDWIDTH 10000M

LINK ak-pe1-ph-pe1
	VIASTYLE angled
	INFOURL https://example/
	OVERLIBGRAPH https://example
	TARGET /var/lib/cricket/example.rrd:ds0:ds1
	NODES ak-pe1 ph-pe1


NODE ak-pe1
	LABEL ak-pe1
	LABELOFFSET N
	ICON /var/www/weathermap/images/router40.png
	POSITION 420 100

NODE ph-pe1
	LABEL ph-pe1
	LABELOFFSET N
	ICON /var/www/weathermap/images/router40.png
	POSITION 620 100
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Fixed. I had commented out the "fill polygon" command to help debug another problem with straight vias, and didn't put it back.

Remove the # on the beginning on WeatherMap.functions.php line 1003.

:oops:
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!)
Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

Post by Palermo »

Well this is great.
I had a lot of unsolved error in the previous versions.
I copyd the new version over the old version en i have no errors at all en the maps working fine.

The only thing i found (Don`t know if it is a bug).
is if i have an existing map and i wand to edit the link or icon with a graph. than i click on the switch icon or link nothing happens.
No popup to edit the name or link graph.

This is also when is create a new map.

Any others the same thing.

i`m so glad that i got rid of the errors Thx
Last edited by Palermo on Wed Oct 28, 2009 7:02 pm, edited 1 time in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Palermo wrote:Well this is great.
I had a lot of unsolved error in the previous versions.
I copyd the new version over the old version en i have no errors at all en the maps working fine.

The only thing i found (Don`t know if it is a bug).
is if i have an existing map and i wand to edit the link or icon with a graph. than i click on the switch icon or link nothing happens.
No popup to edit the name or link graph.

Any others the same thing.

i`m so glad that i got rid of the errors Thx
You definitely overwrote everything? Because the editor has changed internally between 0.96 and 0.97 - if you had the .js file from one and the .php file from the other, then you would get the problem you are describing. Or possibly one of the class.php files, too.
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!)
Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

Post by Palermo »

I copyed everything i`m sure of it.
1 map did not work t so i copyed that one from backup.
Now it was working. now it is...

I`m going to test i tomorrow. 1.20am so in need some sleep.
Tomorrow i gona test the editor function

Thx in advanced
jerrison
Cacti User
Posts: 57
Joined: Fri Dec 29, 2006 4:02 am

Post by jerrison »

Hi Howie,

first of incredible Plugin, awesome work, i use it a lot and i´m very happy with it as well.

i´m using the latest SVN version from 20.10.2009, it says 0.97dev.

i got a few issues/request and/or need to be pointed at the right directions.

here´s my list:
1. I can´t use "variables" (or hints) for all Config-Parameters like zorder, Position, etc. -> my goal is to have as much templated data as possible. Where can i define which Config-Parameters can be used with "hints"?
I need this, because i want to show threshold-labels only when they really occur. Working with the "zorder"-config would give me the easiest way (in my mind) to "hide" non-triggered thresholds. I´d like to do sth. like mutliplying/adding the zorder value with i.e. "{node:this:thold_failcount}" and have the background image defined as a node with zorder = 1. Does that make sense or is there already a better way to "hide" untriggered threshold. It might help if weathemap had a small "if...then" function for showing stuff :).
If you can tell me where (script-line) the magic with hint-variables happens, i might give it a shot myself.

2. I managed to get a bit more out of the thold-table by modifying your cacti_thold-plugin. So now i can show WHICH Threshold made the alert (we have multiple thresholds for one host). I basically just added 3 more hint variables: thold_name, thold_hi, thold_lastread (tablefields). This works well, this is more a more informational point though.

3. Did you get the "linebreak" feature to work? And if: how and under which configuration-parameter? I know the workaround (subnode), but again: not very template-friendly :).


Thanks again for all your work, i haven´t encountered any issues with the latest 0.97 version so far, but i´m happy to report!

greetz,
andré
Last edited by jerrison on Thu Oct 29, 2009 9:42 am, edited 1 time in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

jerrison wrote: here´s my list:
1. I can´t use "variables" (or hints) for all Config-Parameters like zorder, Position, etc. -> my goal is to have as much templated data as possible. Where can i define which Config-Parameters can be used with "hints"?
I need this, because i want to show threshold-labels only when they really occur. Working with the "zorder"-config would give me the easiest way (in my mind) to "hide" non-triggered thresholds. I´d like to do sth. like mutliplying/adding the zorder value with i.e. "{node:this:thold_failcount}" and have the background image defined as a node with zorder = 1. Does that make sense or is there already a better way to "hide" untriggered threshold. It might help if weathemap had a small "if...then" function for showing stuff :).
If you can tell me where (script-line) the magic with hint-variables happens, i might give it a shot myself.
The thing you are looking for is calls to ProcessString. The basic rule is that anything that produces a string gets run through it - targets, urls, labels, filenames - and anything else doesn't. This is mainly to keep the editor sane.
There are a couple of related things that will change soon - one is a request to extend the 'math' that target strings can use to a full expression parser (actually, the request was for division, but I want min(), avg() & max() too). The other is that in 0.97, all the target strings are assigned to a plugin before any results are collected - that means that some substitutions that used to work, no longer do (e.g. use the value from one node in the target of another).
It seems to me that the answer to all this stuff is just to define what should really happen, and then anything else is 'just luck'. It's never really been defined so far when each of these variables is set, and when you should expect them to work. There isn't a very clear distinction between 'config-time' and 'run-time' at the moment. I have some of a plan to change how the config reader works, and how templates work, so that it's clearer what is going on - templates would no longer be 'copy this over that', and wouldn't depend on the order of things in the config file. This sort-of plan would allow the editor to edit everything, and handle defaults/templates properly too.
Which is all a long-winded way to say that if anything, I'd be working to make it so you can't do what you want.
I do think that something to do conditional display (either of text within a line, or whole objects) is useful though - I have a couple of use-cases for that already. Not sure exactly how it should work. If it could avoid me having to implement some kind of mini-language inside the configs, that would be a good thing, IMHO. :-)
I'm definitely open to discussion/suggestions on all this (and most other feature requests - I like to hash them out), but the less hacky it all ends up, the better.
jerrison wrote: 2. I managed to get a bit more out of the thold-table by modifying your cacti_thold-plugin. So now i can show WHICH Threshold made the alert (we have multiple thresholds for one host). I basically just added 3 more hint variables: thold_name, thold_hi, thold_lastread (tablefields). This works well, this is more a more informational point though.
Sounds good. I'll add those in too.
jerrison wrote: 3. Did you get the "linebreak" feature to work? And if: how and under which configuration-parameter? I know the workaround (subnode), but again: not very template-friendly :).
No I didn't. I want to get back to that after 0.97 is out (today/tomorrow), because I'd like to use it too :-) The trouble is, I immediately thought that what I *really* want is one line in bold and a line below in smaller/non-bold (for IP/description/whatever), and that is suddenly a markup language of some sort...
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!)
jerrison
Cacti User
Posts: 57
Joined: Fri Dec 29, 2006 4:02 am

Post by jerrison »

hey,
thanks for the fast answer!

I don´t really use the editor at all but i can imagine why a lot of people would prefer an editor to hacking a config script :). since i´m a network-guy, i´m really used to CLI and text-files and the syntax for weathermap is pretty straightforward and the documentation a real treat :).

i checked the processstring-function before but i have to admint that my programming skills have not progressed for a couple of years and i can´t figure out, why certain Config-Parameters can have "hint-variables" and some don´t. I get the generel concept but don´t know where exactly i have to "clone" code for the zorder-parameter to work i.e. like the label-parameter..from what you are saying (and from what i am understanding): this might be a lot of work :).

about a conditional statement: IMO it would suffice to exclude/include certain config-lines if a certain condition is (not) met.
like
IF {node:this:state} = down
ICON 500 500 images/all_dead.gif
ENDIF

Don´t really see a need for an "else"-clause...might be handy, sure, but not for me at the moment :).
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

jerrison wrote: about a conditional statement: IMO it would suffice to exclude/include certain config-lines if a certain condition is (not) met.
like
IF {node:this:state} = down
ICON 500 500 images/all_dead.gif
ENDIF

Don´t really see a need for an "else"-clause...might be handy, sure, but not for me at the moment :).
That's not really going to work. The way things happen right now is:
1. Read Config, create items in memory for each map item, collect targets
2. Read Data from the targets
3. Draw Map

That way, you would have to:
1. Read Config, create items in memory for each map item, collect targets
2. Read Data from the targets
3. Forget the config, but not the data, then re-read the config, applying the conditional rules with the data you now have.
3. Draw Map

It's also will break the editor horribly again. (How can you show that some of the items in a dialog box are subject to some arbitrary condition?)
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!)
jerrison
Cacti User
Posts: 57
Joined: Fri Dec 29, 2006 4:02 am

Post by jerrison »

That's not really going to work. The way things happen right now is:
1. Read Config, create items in memory for each map item, collect targets
2. Read Data from the targets
3. Draw Map
actually i thought, that we could embed the "if ...then" function inside the "read config" part of the whole system...well, sure, there is the issue, that we´ll need to read the actual data from the conditional statement prior to create items in memory. so the read function would need to check first: do i have conditional statements (hint variable, maybe) and then do the specific "data getting magic" before reading the whole of the config...hmm...come to think of it, could we create a temporary config before reading it into memory?
that´s a lot of work, i think :), so i won´t be putting any pressure on this particular topic, hehe.

to clarify:
1. read config with conditional statements (skip to 4 if there aren´t any)
2. collect data for "conditionals" and check for true/false results
3. write temporary config file which include/exclude specific lines according to "conditionals"-results
4. write config to memory...etc. (normal proccess-flow)

i actually would be already happy, if all config-commands could handle variables and math. Isn´t this a generall thing that could be "easily" applied since it´s already "in" the code? speaking laymen-lingo here :)!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests