This is a roll-up of all the small bugfixes for the last couple of years, especially those that stop Weathermap working with newer MySQL or PHP versions. There is a more substantial 1.0 release in the works, but I will backport any simple improvements or fixes to 0.98(abcd) releases. There are also small usability changes aimed at reducing repeat "error reports" in the forums. IMPORTANT NOTE - you may need to reset permissions on your users after upgrading, as I've finally switched to the "new-style" plugin API that's been around for 5+ years. This handles permissions differently, unfortunately. IMPORTANT NOTE 2: THIS RELEASE DOES NOT WORK WITH CACTI 1.x! You will want version 1.0+ for that. 0.98a FIXED - Works with PHP 7.x and 5.6 - removed all mysql_*() function calls, and use PDO instead FIXED - Blank line issue with RRDtool 1.5+ 0.98 FIXED - MySQL error in table-creation. MySQL 5.6 is fussier. FIXED - Editor 'delete link' broken FIXED - KILO was ignored when processing %k in special tokens FIXED - Various fixes for PHP deprecated or strict-mode warnings FIXED - Line-ending trimming in 'external script' data source FIXED - rounding error 'kinks' in angled VIA links FIXED - Config file path validation issue in editor (CVE-2013-3739) FIXED - Cloning a templated node in editor retains the template in the clone FIXED - cacti_use_ifspeed incorrect when interfaces > 20M and ifhighspeed available FIXED - More PHP 5.3/5.4/strict related errors (split -> explode) CHANGE - Finally switch to "new-style" plugin API. CHANGE - Editor data picker improved sort (thanks shd) CHANGE - (Cacti plugin only) images are written to a temporary file first, to avoid displaying half-written images CHANGE - Editor no longer uses editor-config.php ADDED - Weathermap will use anti-aliasing if your GD supports it (php-bundled GD doesn't) (thanks shd) ADDED - Special token formatting can handle timeticks and time_t formatting (%T and %t respectively) ADDED - new DATAOUTPUTFILE allows collected data to be written to a file for later use (automatically enabled in Cacti) ADDED - new wmdata: datasource plugin can read data from files produced by DATAOUTPUTFILE ADDED - IMAGEOUTPUTFILE and HTMLOUTPUTFILE are honoured in Cacti poller as a location for a second copy of those files. ADDED - Editor 'tidy link' function replaces Vert & Horiz, and does much nicer job ADDED - 'retidy' option in editor to recalculate all links previously positioned with 'tidy'. ADDED - KEYBGCOLOR and KEYOUTLINECOLOR both accept 'none' ADDED - command-line weathermap has new --no-warn option to disable warnings ADDED - AICONFILLCOLOR accepts 'none' for drawing giant transparent shapes. ADDED - Extra warning for Boost users about poller_output ADDED - if there are actually 0 maps in the database, the 'Weathermaps' tab gives some basic instructions. ADDED - Cacti data picker in editor tracks most recently used hosts (thanks Zdolny) ADDED - New permission in Cacti: edit maps. Maps can be edited by authorized users without needing to enable the editor in the source code. 0.97c had no additional changes - it's just 0.97b with some silly errors fixed, and all the CSS files included with the correct paths. There were also reports of problems with the actual zip file. 0.97b is a special release starting from 0.97a and backporting all the quick bugfixes from the 0.98 code. There are larger structural changes in 0.98 and new features, but these bugfixes were useful enough to warrant a new 0.97 release (especially the mysql schema change). A real 0.98 release will follow in due course. Also late addition to 0.97b - a couple of security analysts have pointed out flaws in the editor. First, the ability to remotely create .php files and then cross-site-scripting vulnerabilities. Both are really facets of the same thing - lack of input validation. 0.97b improves this a great deal. Thanks to Gerry Eisenhaur and Daniel Ricardo dos Santos respectively for their security bug reports. 0.97b FIXED - absolute SCALE definitions didn't support K (thanks wwwdrich) FIXED - memory leak in poller code. Memory usage is MUCH lower now. FIXED - updated mysql schema commands to use modern ENGINE instead of TYPE; FIXED - static datasource plugin honours KILO FIXED - check-gdbug.php shouldn't complain about empty ob_flush buffers anymore FIXED - SNMP DS should deal better with non-numeric (and blank) return values FIXED - NINK colours were exchanged (thanks Deathwing00!) FIXED - WriteConfig (i.e. editor) won't 'lose' absolute keyword from FIXED - fixed some function-name clashes with other plugins FIXED - PHP 5.3/5.4/strict related errors ("Creating default object from empty value") CHANGE - editor snap function improved (snap to *nearest* point) (thanks Andreas Braun) CHANGE - the Cacti UI will warn you about fundamental file permissions problems CHANGE - editor ignores attempts to rename nodes to have space in names CHANGE - Moved all PHP that doesn't need to be web-accessible into lib CHANGE - Editor won't deal with config files that don't have a .conf extension CHANGE - Manual updates for changes in Cacti, and improvements in styling. Security section added. CHANGE - General improvements in input validation and output escaping in editor CHANGE - 'External Script' datasource plugin is disabled by default in new installs (NOT upgrades though!) ADDED - Caching for cacti data fetched by dsstats and rrdtool/poller_output DS plugins ADDED - Ability to disable any warning with 'SET nowarn_WMxxx 1' ADDED - .htaccess files added for directories that don't need to be web-accessible - needs "AllowOverride Limit" or "AllowOverride All" in your Apache config. 0.97a FIXED - Incorrect action URL in 'map selector' combo box for Cacti users. FIXED - cacti_graph_id set to 0 instead of ID, by rrd/poller_output and dsstats plugins (thanks sh0x) FIXED - 'classic' legend drew 'hidden' colour values for things like key background colour. (thanks jmayniac) FIXED - PHP 5.3 deprecated code in HTML_Imagemap.class.php FIXED - 'Show Only First' option ignored in Cacti (thanks inko_nick) FIXED - Editor deals with overlapping nodes on different ZORDERS properly. FIXED - "property of non-object in editor.php line 466" while editing map properties (thanks to iNeo) FIXED - no-data option on command-line didn't work FIXED - Clone Node was broken in 0.97 FIXED - Maps with per-user permissions show up multiple times in map selector FIXED - Removed incorrect warning about imagefilter and USEICONSCALE. FIXED - string escaping bug with editor and direct config changes (thanks uhtred) FIXED - --imageuri was ignored on command-line (thanks Marcus Stögbauer) FIXED - links with targets containing spaces are broken by the editor (thanks Andreas Braun) FIXED - deprecated jQuery function call in cacti-pick.php (thanks again Andreas Braun) CHANGE - Group sorting is a bit more logical and the presentation nicer. CHANGE - cacti-integrate.php uses getopt to take more command-line params CHANGE - Updated jQuery to latest version CHANGE - Number formatting will pick 1G over 1000M (and similar) (thanks cerbum) CHANGE - The editor is disabled by default - see top of editor.php (and install guide) ADDED - LINK WIDTH accepts decimals ADDED - cacti-integrate.php can generate DSStats TARGETs too ADDED - Simple VIA editing in editor (thanks to Zdolny) ADDED - SCALE can accept G,M,K,T,m,u,n suffixes (for absolute scales) 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) FIXED - 'AICONOUTLINECOLOR none' is actually valid now (thanks to mgb & Leathon) FIXED - readdir() loop never stops, on some systems (thanks to jerebernard) FIXED - bad regexp in the MRTG DS plugin (thanks to Matt McMahon) FIXED - 0.96 had a new 'time' DS plugin - now documented! FIXED - NCFPC now only complains about missing scale lines on NODEs for the variable that is in use. ADDED - USEICONSCALE no longer has special dependencies - and the colours are nicer too. 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 ADDED - SNMP datasource has configurable timeout and retry values. ADDED - SNMP datasource has option to give up on a failing host ADDED - LABELOFFSET supports percentage compass offsets and radial offsets, like NODES does. ADDED - Percentage compass offsets (NODES and LABELOFFSET) support > 100% offsets 0.96a FIXED - New z-ordering code did not work correctly on PHP4. This broke (at least) the editor. (thanks toe_cutter) FIXED - \n is no longer treated as a newline in TARGETs (thanks NetAdmin) FIXED - KILO was broken completely between 0.95b and 0.96 (thanks Jethro Binks) FIXED - Link comments in certain positions could cause div-by-zero errors. (thanks again Jethro) FIXED - USEICONSCALE didn't colorise (broken between 0.95b and 0.96 again) (thanks colejv) FIXED - Managed to make LABELOFFSET case-sensitive. 0.96 ADDED - TEMPLATE allows a node or link to copy it's settings from another, instead of from DEFAULT. ADDED - RRD datasource can take SET rrd_default_path to make configs a little easier to read. ADDED - RRD datasource can take SET rrd_default_in_ds and rrd_default_out_ds for non-Cacti users. ADDED - RRD datasource can get Cacti query information (in poller_output mode ONLY) - like ifAlias, ifSpeed etc ADDED - RRD datasource can take the ifSpeed/ifHighSpeed from the above, and use it in the map. ADDED - RRD datasource fills in Cacti cacti_path_rra and cacti_url with Cacti base path and URL ADDED - RRD datasource can take global SET rrd_options to add extra options to rrdtool command lines ADDED - SNMP datasource also stores the raw data from the SNMP agent in snmp_raw_in/snmp_raw_out ADDED - SNMP datasource allows '-' as an OID, similar to '-' targets in RRDs. ADDED - Control the drawing order with ZORDER. ADDED - New artificial icons: nink, inpie and outpie. See ICON in manual. ADDED - Warning for probably-incorrect BWLABELPOS where inDIRECTORY_SEPARATOR changes - there weren't any problems, but it's a potential one. FIXED if you use the editor and your rrdtool is somewhere other than /usr/bin/rrdtool then you get an incorrect error about checking line 27 of the CLI tool. 0.81 - Added a Weathermaps link to the Cacti 'Configuration' side-menu. Removed 'Manage Maps' link in Weathermap tab. (knobdy) File-picker in editor no longer masks on *.conf FIXED sort-order bug for imagemaps (Fran Boon) FIXED plugin shows same map twice if you have 'Anyone + users' (Fran Boon, again) FIXED default bandwidth duplicated field in editor. (qjy2000_cn) FIXED now allow TITLEPOS 0 0 (actually, y=0 is useless, but x=0 might be useful) (knobdy) Editor still won't upload images, but it WILL let you pick from any PNG files in the images/ folder, and any images already mentioned in the map configuration file for ICON and BACKGROUND lines. (everyone and their dog) Similar change for DEFINEFONT. You still have to hand-edit to define the font, but after that, the editor will let you pick it. Changed the dependency tests to NOT give a warning about particular DLL names. Added more dependency tests for specific functions. Changes some debug messages to warning, so that they are visible in the logs even without DEBUG on. FIXED minor (unreported) bug with sort order in Manage Maps Changed most Cacti Plugin code to use Cacti's (logging) SQL functions. Hopefully this will help with running down a couple of problems for Windows users. More error reporting generally. Fixed error when creating multiple links between nodes in the editor (fozzy) Docs update - More FAQs and config reference improvements/amendments. Added 'Cycle' mode to plugin - automatically cycle between your weathermaps. 0.8 - Added ability to have multiple targets for a LINK - aggregate your T1s Added ability to use half an RRD (use '-' as the DS name) - if you have 'in' in one RRD, and 'out' in another Added a tab-seperated file datasource for TARGET lines, so you can draw anything you can dump into a textfile. Added ability to specify which corner of a NODE each LINK-end goes to - handy for busy hub nodes Added support for FreeType & GD fonts Added VIA points - a link can go around corners, and they're nicely curved too. Added gradient SCALEs - specify two colours for a band to have colours interpolated. Added many more colour controls for map elements: For Links: OUTLINECOLOR r g b ( or OUTLINECOLOR none) For Link bandwidth labels: BWOUTLINECOLOR, BWBOXCOLOR, BWFONTCOLOR For Nodes: LABELBGCOLOR, LABELFONTCOLOR, LABELOUTLINECOLOR, LABELFONTSHADOWCOLOR For Map 'furniture': TIMECOLOR, TITLECOLOR, KEYBGCOLOR, KEYTEXTCOLOR, KEYOUTLINE Added Cacti plugin. View and Manage UI, plus poller integration. No editor (yet) Updated example config to use new 0.8 features Re-organised manual, and heavily re-written config reference. Fixed cacti-pick.php some more (all done now?) Added non-bandwidth bandwidth labels: BWLABELS unformatted Many Thanks to James Lang, Niels Baggesen and the [php-weathermap] mailing list for feedback during the testing of this release. 0.71 - Fixed database code in cacti-pick.php Fixed up editor to handle blank maps better. Fixed a problem with cached images in editor. 0.7 - Updated the manual and example map to reflect all these changes. Added config options for HTMLOUTPUTFILE and IMAGEOUTPUTFILE. The idea is to reduce the size of command-lines, and make the map files more self-contained. CLI options still take precedence. Includes new 'DHTML' editor for the first time. This is still very much in testing - backup any map configs you edit with it first! Fixed DrawLegend() to not go below a minimum width (it used to use the title length, but that can be too small now) Added BACKGROUNDCOLOR option: take an R G B like the SCALE lines (request from kbriggs) Ripped out some of the 'live PHP' code to make DrawMap a bit simpler. Added a check for PNG support in CLI command. Added command-line error-checking (Niels is back again) Added a fix for Windows line-endings. Seems that PHP uses Unix-endings even on Win32 Added LINK DEFAULT and NODE DEFAULT - set the defaults for (nearly) any parameter. This also means that most node-affecting and link-affecting parameters are now per-node and per-link. Added ARROWSTYLE option - there's 'classic' and 'compact' with neater arrowheads. Added LABELOFFSET option to change the relative position of the LABEL when an ICON is also used. Added OVERLIBWIDTH and OVERLIBHEIGHT to allow better OverLib output (Niels B, once more) Switched to using 24bit images internally. This should improve the handling of PNG transparency in ICONs. Improved number and content of error messages. 0.6 - Renamed weathermap.php to just 'weathermap' to make it more obviously not a PHP page. Fixed up NODE name regexp (thanks Niels Baggesen) Added warning for non-existent NODES in LINK (thanks again Niels Baggesen) HTML fix for in generated HTML (Niels once more) More HTML fixes to make us a bit more XHTML-like. You can have an ICON and a LABEL now. LABEL is centred over the NODE, for the moment. Also, there's a drop shadow effect, to make it easier to read the overlaid text. New config features: LINKFONT, NODEFONT and KEYFONT to control the fonts used for those things. It's a number from 1 to 5. Added BWLABELS NONE for no labels on links at all (request from Ueli Heuer) Moved responsibility for complete HTML page from the class to the CLI program - MakeHTML produces an HTML fragment now. Added ability to customise timestamp and legend text, by adding new text after the KEYPOS and TIMEPOS commands. 0.5a - Fixed totally embarrassing problems with the DS-specification code. As far as I can figure I never did test it. Oh dear. Thanks to Jethro Binks for speedy patches. 0.5 - Fixed asymmetric BANDWIDTH bug - thanks rpingar Fix to make rrdtool commandline work on Windows - also thanks to rpingar Added specification of RRD DS names in TARGET ( blah.rrd:ds0:ds1 - that's in then out) Fix for different C libraries returning something other than NaN for a NaN (thru rrd) - now we look for good data rather than bad data. Allow for decimals in BANDWIDTH specifications - 1.5M should work now Allow for decimals in SCALE specifications - mainly useful for very small values on big links Brought back sub-1.0 percentages, which got lost somewhere along the line Added in warning for >100% lines Added TIMEPOS option so *you* get to choose where the timestamp goes, mgb Fixed stupid bug in ReadRRDData - Weathermap should follow the data better now. Thanks to 'cl' 0.4 - Changed all internals to deal in bits/sec instead of bytes Moved timestamp back up to the top-right corner. *BREAKAGE* Changed BANDWIDTH to use bits too Added support for K,M,G,T suffixes on bandwidth specs Added KILO config file option to redefine 1K=1000 or 1K=1024 (or anything actually) Added --sizedebug commandline option, to help with figuring out what you did wrong with the new BANDWIDTH format. Shows max bandwidth instead of the current bandwidth on all links. Included something a bit more like a manual. *BREAKAGE* Changed BWLABELS options to be bits/percent, since they *are* bits! LABEL regexp relaxed to allow spaces in labels HTMLSTYLE, BWLABELS regexps tightened up to detect more errors Added new example config in docs/ directory Moved editor.php out of the way to random-bits Included a copy of auto-overlib.pl, just cos it's handy 0.3 - ICON config directive for NODEs added - same effect as jas0420's perl code Fixed WriteConfig a little - TITLEs are written. OVERLIBGRAPH config is written for NODES. Fixed bug with OVERLIBGRAPH DHTML and NODEs Added --image-uri option back in from the perl version 0.2 - NODEs with no label aren't drawn but can still be an endpoint for a LINK. Small bugfixes from mgb Included the editor.php for people to see Code tidyup for weathermap.php 0.1 - Initial pre-release version