I decided it would be useful to add this section to the top of the README, while things are moving around a lot. Hereis what is working, and what is being worked on:
![Cacti Network Weathermap Cacti Network Weathermap](/uploads/1/2/4/8/124885474/385552611.jpg)
Current Status (2018-03-02)
NOTE First, please note that Weathermap will require PHP 5.6 or above, from 1.0.0 onwards (including the current dev version).
Weathermap is an open source network visualisation tool, to take data you already have and show you an overview of your network activity in map form. Data is collected via plugins. Plugins are supplied for RRDtool, MRTG (RRD and old log-format), tab-delimited text files, SNMP, fping, external scripts, and Cacti-specific data.
NOTE2 For dev version, READ THIS FILE FIRST, before installing. Especially if you are thinking of installing on your productionCacti server.
![Network Network](/uploads/1/2/4/8/124885474/996892891.png)
General goals
By the time 1.0.0 is done, near enough everything will have had some kind of rewrite work, even it's justtidying up the naming. A lot of it will have significantly more change, including stuffthat was originally written before 0.98 a few years ago, and never used. The aim of all of thatis to break the code up between the UI, the map-drawing, and replacement for popup graphs
- Cycle mode
- Cycle mode fullscreen
-
Update Editor to use same UI classes as Cacti (input validation, one method per 'command', testability)Update Editor Data Picker to use same UI classes as Cacti (input validation, one method per 'command', testability)Known Issues
-
Weathermap management only shows after the second click on the Weathermap menu option? Something to do with relative URLs and Cacti's partial loading
-
Bower is deprecated. Need to move to using npm directly -
Judging from the memory logging, there's a memory leak (300-500KB per map).
Longer-term WIP:
-
Break down 'monster methods' into simpler ones. Identify groups within the larger classes for refactoring (e.g. plugin-related stuff in Map)
- Poller - a single runMaps() function currently does almost everything. Replace with Poller class for general environment setup, whichasks MapManager for the maps to run.
Use a MapRuntime class per-map to contain all the knowledgeneeded to run that map.
- Poller - a single runMaps() function currently does almost everything. Replace with Poller class for general environment setup, whichasks MapManager for the maps to run.
-
Dependency Injection - there's some ugly stuff especially with logging and global variables. Switch to a real logger (planning on monolog), wrappedin a simple class to manage things like muting certain messages, and switching between debug and normal logging. Then finda better way (DI container?) to have that one logger object shared between the places that want to use it. This also has someside benefits - monolog can log to lots of destinations (syslog etc), in lots of formats (json, text, pretty coloured text), andcan automatically do things like tag on memory usage and function call info for debug logs.
-
Move as much generic database-related stuff out of the Cacti plugin and into MapManager - MapManager is testable, whereasthe Cacti plugin is not (easily). Also, MapManager is currently a literal collection of every query that was in the 0.8.8 plugin,which turns out to be quite a few. Breaking that down into global, map, and group objects would be a good thing.
-
Make an abstraction layer for things likeread_config_option
in the UI, so it doesn't depend on Cacti being underneath. When someone wants to make a plugin/integration for a newapplication, it'll be a lot 'thinner' this way, too. This is done as WeathermapIntegrationApplicationInterface -
Map object: really, this is several different things:
-
A container for the nodes, links, & scales, and some management functions used by the editor mainly to access them (addNode, getNode etc). AlsoprocessString, which lives here because it looks inside everything else (does it still?).
-
For no particular reason, the home of title and timestamps (which should be their own objects with their draw() method)
-
A manager for the map drawing and data collection process - there could definitely be a DataManager forreadData(), preprocessTargets() etc.
-
Global data for the map
-
The imagemap and z-layer information, which are just another couple of managed lists used for draw.
-
Some functions to draw overlays that are only used by the editor. There should be some mechanism toprovide a delegate to draw these, supplied by the editor.
-
-
Create a MapTitle and MapTimestamp class (from #2 above)
-
Create a MapDataManager class (#3 above)
-
As much as possible make the draw function in Map generically call the draw()functions in each map item.
-
Other map items: These have a mix of concerns between the drawing off the item, and the datarelated to it. Most of the data stuff is in MapDataItem these days though.
-
In all cases, the way configs are built up for getConfig() (aka the editor) isquite cumbersome, and adds a lot of complexity to the classes, as it effectivelyreverse-engineers the config from scratch. Some kind of DOM-style structure producedby readConfig(), and simply read back by getConfig() would make the world a lot simpler.
Normal README
This is PHP Network Weathermap, version 1.0.0 by Howard Jones ([email protected])See the docs sub-directory for full HTML documentation, FAQ and example config.See CHANGES for the most recent updates, listed by version.See LICENSE for the license under which php-weathermap is released.There is much more information, tutorials and updates available at:http://www.network-weathermap.com/Project Admin
For news and updates, see http://www.network-weathermap.com/(also twitter @netweathermap and Facebook)For issue tracking and bug reports use the Github issue tracker: https://github.com/howardjones/network-weathermap/issuesI'm trying managing feature requests with FeatHub. You can add features here, and vote for them too:Credits
PHP Weathermap contains components from other software developers:overlib.js is part of Overlib 4.21, copyright Erik Bosrup 1998-2004. All rights reserved.See http://www.bosrup.com/web/overlib/?LicenseThe Bitstream Vera Open Source fonts (Vera*.ttf) are copyright Bitstream, Inc.See http://www.bitstream.com/font_rendering/products/dev_fonts/vera.htmlThe manual uses the Kube CSS Framework - http://imperavi.com/kube/and ParaType's PT Sans font: http://www.fontsquirrel.com/fonts/PT-Sansjquery-latest.min.js is the jQuery javascript library - written by John Resig and collaborators.http://docs.jquery.com/LicensingSome of the icons used in the editor, and also supplied in the images/ folder arefrom the excellent Fam Fam Fam Silk icon collection by Mark James:http://www.famfamfam.com/lab/icons/silk/These are released under the Creative Commons Attribution 2.5 Licensehttp://creativecommons.org/licenses/by/2.5/Other libraries in the vendor/ directory are provided by third-parties.composer info
willprovide licensing information per component for php components.Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign upNew issue Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.By clicking âSign up for GitHubâ, you agree to our terms of service and privacy statement. Weâll occasionally send you account related emails.Already on GitHub? Sign in to your accountComments
commented Feb 1, 2017
hello,weathermap plugin doesnt work, it would appear there are some functions missing.2017-02-01 15:28:53 - ERROR PHP ERROR in Plugin 'weathermap': Uncaught Error: Call to undefined function html_graph_start_box() in /usr/share/cacti/plugins/weathermap/weathermap-cacti-plugin.php:426
Stack trace:
#0 /usr/share/cacti/plugins/weathermap/weathermap-cacti-plugin.php(292): weathermap_thumbview(-1)
#1 {main}
thrown in file: /usr/share/cacti/plugins/weathermap/weathermap-cacti-plugin.php on line: 426commented Feb 1, 2017â¢
editedi found the issue to be just these missing functions in /lib/html.phpworkaround: add the missing functions in lib/html.php at start, before function html_start_boxseems to work ...commented Feb 1, 2017
@imax64 I have plugin 0.98a with my change. This pugin work on Cacti 1.0.0 and have new api, but I not a programmer and my change plugin have some mistake.
If you want-you can install my change plugin and use:
weathermap.zipcommented Feb 1, 2017
Please open a ticket with Howie. He knows about the Cacti 1.0.0 release. He should be able to help you.commented Feb 2, 2017
pardon the noob question... how do i open a ticket with howie?commented Feb 2, 2017
@imax64 I open https://github.com/howardjones/network-weathermap/issues/58, but no answer yet.commented Feb 2, 2017
I had a brief discussion with TheWitness about this a while ago, and there wasn't any documentation for the completely changed plugin system (now all AJAX, new hooks). Based on that, I decided I'd prioritise other things - PHP 7/PDO support (basically done), and then a standalone map management app, so that users of tools other than Cacti benefit too. If it is going to require a rewrite anyway, I might as well make it more inclusive.commented Feb 4, 2017
I have provided Howie a patch for the near term in the link above.commented Feb 6, 2017
thanksSign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment -