GithubHelp home page GithubHelp logo

howardjones / network-weathermap Goto Github PK

View Code? Open in Web Editor NEW
422.0 422.0 95.0 33.32 MB

Network Weathermap draws diagrams from data

Home Page: http://www.network-weathermap.com/

License: MIT License

Perl 0.34% CSS 1.35% PHP 81.92% Shell 1.91% HTML 1.61% JavaScript 11.99% Makefile 0.19% Ruby 0.14% Batchfile 0.01% TSQL 0.54%

network-weathermap's Introduction

PHP Network Weathermap 1.0.0 (dev)

Current Status (2018-03-02)

I decided it would be useful to add this section to the top of the README, while things are moving around a lot. Here is what is working, and what is being worked on:

NOTE First, please note that Weathermap will require PHP 5.6 or above, from 1.0.0 onwards (including the current dev version).

NOTE2 For dev version, READ THIS FILE FIRST, before installing. Especially if you are thinking of installing on your production Cacti server.

General goals

By the time 1.0.0 is done, near enough everything will have had some kind of rewrite work, even it's just tidying up the naming. A lot of it will have significantly more change, including stuff that was originally written before 0.98 a few years ago, and never used. The aim of all of that is to break the code up between the UI, the map-drawing, and data-collecting parts, and make it a generally more pleasant place for someone to work, in the hopes of getting some additional contributors.

To make it easier to deal with multiple contributors, automated testing is pretty essential. You should be able to quickly tell if your changes have broken anything. Lots of code has been pulled into smaller testable classes to make that easier (and tests written!). Previously, most of the stuff that appeared on a web page was not at all easy to test, and that's improving now. The editor has tests for the first time, for example, and a lot of the database manipulation that used to be buried in the cacti plugin does, too.

Current Status/Usability

  • Core - should be working OK. passing all tests. All code modified to use namespaces and autoloader, one class per file, most PSR-2 standards.

  • CLI - should be working OK. Rewritten to avoid PEAR dependency. There's also a weathermap-new which needs testing, but is intended to replace the old weathermap (all the business is in a class, not the script)

  • Editor - should be working OK. Re-implemented class/template-based version of editor (same UI).

  • Cacti 0.8 Plugin - broken UI, working poller. Code has all been moved, poller run, UI not tested.

  • Cacti 1.0 Plugin - broken UI, working poller. Code has all been moved, poller run, UI not tested.

Using the dev version

This git repo deliberately DOES NOT contain third party libraries (and if it does now, it won't soon).

Dependencies are managed with bower npm. If you have never used it before, you will need to:

  • Install nodejs (and npm - which should come with it)
  • Install composer
  • Go to the weathermap checkout directory
  • Make sure that directory is called weathermap and not network-weathermap (which git will default to) or Cacti will not recognise it properly.
  • npm install should install all the necessary javascript dependencies to the node_modules/ directory.
  • composer update will grab the PHP dependencies for both the runtime and testing environments The release process collects up these files and puts them in the zip file, via the packing.list file(s). You only need to do this if you are working with the current development code.

If you aren't intending to do any development, run the tests, or contribute patches (why not? It's fun!) then you can use composer update --no-dev above, and reduce the number of PHP packages installed significantly.

Work currently in progress:

  • Move to namespaces - PHP Namespaces help keep our code out of your code. Especially important for something that sits inside other software

  • Remove dependency on PEAR - CLI uses a Composer module now for options

  • Move to React for Cacti UI, with only JSON/API type stuff in the PHP code

    • Management

      • Add A Map (with multiples, directly into correct group)
      • Delete A Map
      • Enable/Disable Map
      • Add Group
      • Update Map (properties page)
        • Move to new group
        • Alter schedule
        • Alter debugging
        • (Alter archiving)
      • Edit map
      • Create map (create a blank, ready to edit)
      • SET Settings editor for global, group and map
      • Access editor for (group) and map
      • App Settings editor (for Cacti/host-app settings)
    • User

      • Show Thumbnails
      • Show full size maps
      • "Overlib" 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, which asks MapManager for the maps to run. Use a MapRuntime class per-map to contain all the knowledge needed to run that map.
  • Dependency Injection - there's some ugly stuff especially with logging and global variables. Switch to a real logger (planning on monolog), wrapped in a simple class to manage things like muting certain messages, and switching between debug and normal logging. Then find a better way (DI container?) to have that one logger object shared between the places that want to use it. This also has some side benefits - monolog can log to lots of destinations (syslog etc), in lots of formats (json, text, pretty coloured text), and can 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, whereas the 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 like read_config_option in the UI, so it doesn't depend on Cacti being underneath. When someone wants to make a plugin/integration for a new application, it'll be a lot 'thinner' this way, too. This is done as Weathermap\Integration\ApplicationInterface

  • Map object: really, this is several different things:

    1. A container for the nodes, links, & scales, and some management functions used by the editor mainly to access them (addNode, getNode etc). Also processString, which lives here because it looks inside everything else (does it still?).

    2. For no particular reason, the home of title and timestamps (which should be their own objects with their draw() method)

    3. A manager for the map drawing and data collection process - there could definitely be a DataManager for readData(), preprocessTargets() etc.

    4. Global data for the map

    5. The imagemap and z-layer information, which are just another couple of managed lists used for draw.

    6. Some functions to draw overlays that are only used by the editor. There should be some mechanism to provide 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 data related 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) is quite cumbersome, and adds a lot of complexity to the classes, as it effectively reverse-engineers the config from scratch. Some kind of DOM-style structure produced by 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/issues

I'm trying managing feature requests with FeatHub. You can add features here, and vote for them too:

Feature Requests

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/?License

The Bitstream Vera Open Source fonts (Vera*.ttf) are copyright Bitstream, Inc. See http://www.bitstream.com/font_rendering/products/dev_fonts/vera.html

The manual uses the Kube CSS Framework - http://imperavi.com/kube/ and ParaType's PT Sans font: http://www.fontsquirrel.com/fonts/PT-Sans

jquery-latest.min.js is the jQuery javascript library - written by John Resig and collaborators. http://docs.jquery.com/Licensing

Some of the icons used in the editor, and also supplied in the images/ folder are from 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 License http://creativecommons.org/licenses/by/2.5/

Other libraries in the vendor/ directory are provided by third-parties. composer info will provide licensing information per component for php components.

network-weathermap's People

Contributors

arjanoosting avatar dependabot[bot] avatar florisvanderhaar avatar howardjones avatar malgoe avatar netniv avatar pautiina avatar yatv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

network-weathermap's Issues

Multi-channel targets

There's no particular reason why targets are limited to 2 channels (in and out). Multi-channel targets could allow for error counters, for example. This would need some clean up of the config language so it refers to something like channel 0 instead of 'in', at least as an alias.

Feature request: more parsing of {node:....} etc

Hi Howie etc,

Can you extend parsing so that {node:...} and {link:...} can be used in more places, particularly variable assignments? I want to have this construct:

LINK CurSX_McC1-10G
NODES mccance1 cursx
SET src mccance1
SET ip {node:mccance1:ip}
SET group {node:mccance1:group}

but SET ip {node...} doesn't get replaced.

I've already defined variable 'ip' on the node so it can be used in the node OVERLIBGRAPH (inherited from NODE DEFAULT, for CPU), so I just want to be able to call that value back so it will get used for the link OVERLIBGRAPH too (inherited from LINK DEFAULT).

At the moment, I have to explicitly SET ip with the actual IP address on the link as well in order for OVERLIBGRAPH to work, but since I've already had to do that on the node, that's just repeating information. And I like to avoid that at all costs!

Thanks for considering. Love weathermap.

PHP Parse error when installing

Centos 6.8 with PHP 5.3.3 and network-weathermap 0.89 pulled from github today. MRTG only, no Cacti

MRTG and Apache up and polling properly. Working through the install instructions here I try and run weathermap and get the following error:

PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /var/www/html/weathermap/weathermap on line 60

Line 60 is
if ((new PEAR)->isError($ret)) { die ("Error in command line: " . $ret->getMessage() . "\n (try --help)\n"); }

I can launch the editor and work with conf files but when I try to generate the html page I get the same error. Both check.php and check-gdbug.php come back perfect.

Support for PHP7

This projects heavily relies upon mysql_* functionality from PHP and no other MySQL interface can be chosen, since it is hardcoded. Therefore it does not work with PHP7. The underlying database shouldn't be too much of a deal and should be configurable. At the very least mysqli should be used to stay compatible with PHP7.

Error in weathermap install Centos 7

Hi

i have a error when i start weathermap :

[systemadmin@weathermap html]# ./weathermap
PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Console/Getopt.php on line 109

anyone know this error ?

CentOS Linux release 7.3.1611

Installed packages, channel pear.php.net:

Package Version State
Archive_Tar 1.3.11 stable
Console_Getopt 1.3.1 stable
PEAR 1.9.4 stable
Structures_Graph 1.0.4 stable
XML_Util 1.2.1 stable

PHP 5.4.16

regards
olivier

support for cacti version 1.0?

I've been doing some fairly extensive testing with the new cacti v 1.0 (now available on github... yay!) and was wondering about the current compatibility of the network-weathermap plugin.

Is there a particular branch that is more likely to work than another?

I'd be happy to test things out if it would be helpful.

lib/datasources/WeatherMapDataSource_tabfile.php

Hi Howard -

I just wanted to post the fix i found for the following error:

PHP Warning: preg_match(): Unknown modifier '1' in /var/www/html/weathermap/lib/datasources/WeatherMapDataSource_tabfile.php on line 41 WARNING: /var/www/html/weathermap/configs//SW_CTX-WTK_CAREN.conf: ReadData: LINK 1/1/1.AUSUTXZM71W-4/1/1.AUSBTX5203W, target: data/SW_CTX-WTK_CAREN.txt on config line 333 of /var/www/html/weathermap/configs//SW_CTX-WTK_CAREN.conf had no valid data, according to WeatherMapDataSource_tabfile

basically if $itemname has a forward slash, it will kick back this error. Quickest fix was to the following function:

`
function ReadData($targetstring, &$map, &$item)
{
$data[IN] = NULL;
$data[OUT] = NULL;
$data_time=0;

           // OLD Line
           // $itemname = $item->name;

           // NEW Line
            $itemname = preg_quote($item->name,'/');

            $matches=0;

            $fd=fopen($targetstring, "r");

`

If you have any questions, please reachout [email protected]

Thanks,
Bryan

Genuine math expressions in targets

Replace the existing prefix-based multipliers and implicit add, with a full mathematical expression parser. This would allow you to do things like MAX(target1,target2) and (target1/target2) (i.e. dynamic percentages).

Aggregate maps only show "out" direction data on 0.98

It looks like the wmrrd_read_from_real_rrdtool_aggregate function drops first line of RRDTool output, but using RRDtool 1.5.5, there is no leading blank line in the output of the rrdtool command. So I lose the first ("IN:") line. If I comment out lib/datasources/WeatherMapDataSource_rrd.php line 276, it works as expected.

Plugin-based data source picker

The picker in the editor should allow backend plugins to supply lists of possible targets. This will allow picking for other data source plugins without editing the actual editor code.

Maps not showned in plugin tab after upgrade 0.97c->0.98

Hello,

Yesterday, after network-weathermap upgrade (0.97c->0.98), my maps are freezed at 08:05AM.
Even so the files in output directory are updated:
24 -rw-r--r-- 1 cactiuser cactiuser 24373 Jun 3 11:15 040ae8b1624617bd7da3.html
28 -rw-r--r-- 1 cactiuser cactiuser 25469 Jun 3 11:15 040ae8b1624617bd7da3.png
4 -rw-r--r-- 1 cactiuser cactiuser 1032 Jun 3 11:15 040ae8b1624617bd7da3.results.txt
12 -rw-r--r-- 1 cactiuser cactiuser 10294 Jun 3 11:15 040ae8b1624617bd7da3.thumb.png
32 -rw-r--r-- 1 cactiuser cactiuser 31371 Jun 3 11:15 0e08b428f2362608fb02.html
28 -rw-r--r-- 1 cactiuser cactiuser 28551 Jun 3 11:15 0e08b428f2362608fb02.png
4 -rw-r--r-- 1 cactiuser cactiuser 1323 Jun 3 11:15 0e08b428f2362608fb02.results.txt
Those file are perfectly viewed from explorer.

In cacti.log file:
06/03/2016 11:20:21 AM - WEATHERMAP: Poller[0] [Map 141] map.conf: Map: /var/www/localhost/htdocs/cacti-0.8.8h/plugins/weathermap/configs/map.conf -> /var/www/localhost/htdocs/cacti-0.8.8h/plugins/weathermap/output/1fc33f91f3df819f1f5f.html & /var/www/localhost/htdocs/cacti-0.8.8h/plugins/weathermap/output/1fc33f91f3df819f1f5f.png
06/03/2016 11:20:22 AM - WEATHERMAP: Poller[0] [Map 141] map.conf: About to write image file. If this is the last message in your log, increase memory_limit in php.ini [WMPOLL01]
06/03/2016 11:20:22 AM - WEATHERMAP: Poller[0] [Map 141] map.conf: Wrote map to /var/www/localhost/htdocs/cacti-0.8.8h/plugins/weathermap/output/1fc33f91f3df819f1f5f.png and /var/www/localhost/htdocs/cacti-0.8.8h/plugins/weathermap/output/1fc33f91f3df819f1f5f.thumb.png
06/03/2016 11:20:22 AM - WEATHERMAP: Poller[0] STATS: Weathermap 0.98 run complete - Fri, 03 Jun 16 11:20:22 +0300: 20 maps were run in 13 seconds with 5 warnings.

In cacti, weathermap tab i have a strange thing:
Powered by PHP Weathermap version 0.97c --- Weathermap Management | Local Documentation | Editor
and all maps freezed at date: Jun 2 2016 08:05 AM, the date&time before upgrade.

What can i do? It's from cacti or from plugin?

Thank you & sorry for my unexercised english.

cacti-integrate.php - use-dsstats logic is reversed

In random-bits/cacti-integrate.php the logic for generating the target should be reversed:
current code reads:

if ($use_dsstats) {
....
} else {
$tgt = "8*dsstats:$local_data_id" . $ds_names;
....
}

when $use_dsstats is true is should use the contents of the second clause, not the first.

how to display the bandwith graphs (overlib) on the left side of the mouse?

I have a rather large map with several nodes and links on the right side of the map. when i mouse-over the link, tha bandwith graphs are "hidden" outside of the browser window. If I resize the browser window i see the whole graph.

Is there a config option to display the overlib graph on the left side of the mouse?

weathermap

I'm using the phpweathermap V0.97c on a FreeBSD System

Rewriting graphics functions to support other rendering engines

Hello!
I'm using weathermap for few maps that are over 5k x 5k pixels in size and in my opinion it's time to rewrite code to use another rendering engine to make it look more fresh. I wonna replace all function calls with something like RE[::|->]filledarc(...) (RE for Render Engine).

Is now good time to fork project and replace that code or it's better for me to write those render engine class and write script to rewrite [by regex] all calls to graphics functions (to make it possible replacing calls in future versions of map)?

How to draw a ServerRack

I saw in the weathermap propaganda content to see a server rack map, this is how to draw it? Request for comment

Dynamically change node (or node label) colour

I'm looking to use NWM as a replacement for a commercial application called InterMapper. One of the handy features of InterMapper is that the server keeps track of 'packet loss' for a node. If the server detects a certain level and interval of packet loss, it changes the colour of the node itself to depict that the node is in trouble and to what degree of trouble it's in.

I'm wondering if NWM has the capability to dynamically change a node's (or perhaps a node's label) colour similar to how a change in link bandwidth causes the link colour to change.

Link BW labels should attempt automatic slight repositioning

Bandwidth links can already be re-positioned from the default (75% 25% for IN OUT) so they aren't sitting on top of each other. However on crowded maps doing this manually can be very tedious. Maps can be made bigger as well but re-spacing all the nodes out is only slightly less tedious. Also using template to move all links doesn't usually solve the issue it just changes the position where all the overlaps occur slightly.

It would be nice if there was an algorithm to detect if links are/will display on top of each other and if possible try to slightly maneuver themselves in whatever direction along the graph as little as possible to not be on top of each other. This way users won't have to use the BWLABELPOS a custom amount repeated a bazillion times for every different link.

Algo might be something like:
A) detect label overlap and attempt move up/down along link in direction that would make less overlap
B) attempt also to not overlap node icons but this is preferable to overlap of labels if unavoidable
C) detect if truetype font in use and rotate label/text as necessary to create more room (last priority)

Just some ideas.

Call to undefined function mysql_connect()

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/net.musurit.monitoring/plugins/weathermap/cacti-pick.php:69 Stack trace: #0 {main} thrown in /var/www/net.musurit.monitoring/plugins/weathermap/cacti-pick.php on line 69

I use Nginx + php-fpm ( PHP70 )

Ubuntu 16 with PHP 5.6 - adding maps fail

Create an Ubuntu 16 install with PHP 5.6 like this:

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0
sudo apt-get install php5.6-common php5.6-cli php5.6-xml php5.6-snmp php5.6-gd
sudo apt install unzip

sudo a2dismod php7.0
sudo a2enmod php5.6

sudo rm /etc/alternatives/php
sudo ln -s /usr/bin/php5.6 /etc/alternatives/php

sudo apt-get install cacti cacti-spine

sudo service apache2 restart

Install weathermap 0.98 and add a map.

[Mon Sep 05 19:28:27.803109 2016] [:error] [pid 4638] [client 10.0.2.2:61766] PHP Warning:  mysql_insert_id(): A link to the server could not be established in /usr/share/cacti/site/plugins/weathermap/weathermap-cacti-plugin-mgmt.php on line 843, referer: http://127.0.0.1:8080/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php?action=addmap_picker
[Mon Sep 05 19:28:27.803115 2016] [:error] [pid 4638] [client 10.0.2.2:61766] PHP Stack trace:, referer: http://127.0.0.1:8080/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php?action=addmap_picker
[Mon Sep 05 19:28:27.803120 2016] [:error] [pid 4638] [client 10.0.2.2:61766] PHP   1. {main}() /usr/share/cacti/site/plugins/weathermap/weathermap-cacti-plugin-mgmt.php:0, referer: http://127.0.0.1:8080/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php?action=addmap_picker
[Mon Sep 05 19:28:27.803126 2016] [:error] [pid 4638] [client 10.0.2.2:61766] PHP   2. add_config() /usr/share/cacti/site/plugins/weathermap/weathermap-cacti-plugin-mgmt.php:274, referer: http://127.0.0.1:8080/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php?action=addmap_picker
[Mon Sep 05 19:28:27.803132 2016] [:error] [pid 4638] [client 10.0.2.2:61766] PHP   3. mysql_insert_id() /usr/share/cacti/site/plugins/weathermap/weathermap-cacti-plugin-mgmt.php:843, referer: http://127.0.0.1:8080/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php?action=addmap_picker

Entry does appear in the weathermap_maps table, but following updates fail (because of no useful value from mysql_insert_id() )

Link bandwidth won't get updated from web editor

Hi Howie,

Right after the latest commits I can't no longer update link bw from the web editor. If I do this from the webeditor but by editing the host directives it works.

Branch: database-refactor
wm issue 53

Call to undefined function mysql_real_escape_string()

Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in /var/www/net.musurit.monitoring/plugins/weathermap/weathermap-cacti-plugin-mgmt.php:837 Stack trace: #0 /var/www/net.musurit.monitoring/plugins/weathermap/weathermap-cacti-plugin-mgmt.php(274): add_config('simple.conf') #1 {main} thrown in /var/www/net.musurit.monitoring/plugins/weathermap/weathermap-cacti-plugin-mgmt.php on line 837

I use Nginx + php-fpm (php70)

Cloned hosts won't appear

I'm currently using refactor branch.

A couple a days ago every time I cloned a host it never showed up because it was only clonning the host by adding the _copy and no directive at all. So the cloned host was on the .conf file but without any other directive than POSISTION.

Today I updated to latest github commits and now it looks like totally broken. Every time I clone a host it does nothing, nor even creating the new host with _copy on it.

Map list should be cleaner

The map list in Cacti should be a cleaner, simpler list:

  • Drag/Drop to re-sort?
  • No seperate page for group management
  • complete settings, including schedule, debug and archiving
  • a single pop-up properties page to show all settings

^M characters on conf files @web-editor

Sometimes when I edit hosts from the web editor and have a look at the conf file from the linux shell I see that the host I've just edited got all this ^M characters. The directive I've added to the original conf on this case was the "LABELFONT 99".
I waited for a polling interval to see if weathermap fixes it after updating the map but It doesn't.

BTW I noticed this on 0.98 as well as the database-refactor branch.

NODE timelabel_London^M
TEMPLATE tz^M
LABEL {node:this:time_time24}^M
TARGET time:Europe/London^M
LABELFONT 99^M
POSITION 270 118^M
^M

Editor resources 404

editor.js and editor.css are located in editor-resource/ but editor.php tries to load them in ./
Can anyone reproduce this? Got version 0.97b.
I fixed it and now it looks like:
image

Can not editor my map!

12
my map config is

Automatically generated by php-weathermap v0.97c

FONTDEFINE 100 /var/www/html/plugins/weathermap/msyh.ttf 10

WIDTH 1024
HEIGHT 768
HTMLSTYLE overlib
KEYFONT 100
TITLE test
TIMEPOS 746 17 Created: %b %d %Y %H:%M:%S

KEYPOS DEFAULT 823 491 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 192 192 192
SCALE DEFAULT 0 1 255 255 255
SCALE DEFAULT 1 10 140 0 255
SCALE DEFAULT 10 25 32 32 255
SCALE DEFAULT 25 40 0 192 255
SCALE DEFAULT 40 55 0 240 0
SCALE DEFAULT 55 70 240 240 0
SCALE DEFAULT 70 85 255 192 0
SCALE DEFAULT 85 100 255 0 0

SET nowarn_clipping 1

End of global section

TEMPLATE-only NODEs:

NODE DEFAULT
LABELFONT 100
MAXVALUE 100

TEMPLATE-only LINKs:

LINK DEFAULT
WIDTH 2
BWFONT 100
COMMENTFONT 100
BWLABEL bits
BANDWIDTH 100M

regular NODEs:

NODE 互联网交换机01
LABEL 互联网交换机01
INFOURL /graph.php?rra_id=all&local_graph_id=11
OVERLIBGRAPH /graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=11
POSITION 802 370

NODE 互联网交换机02
LABEL 互联网交换机02
INFOURL /graph.php?rra_id=all&local_graph_id=17
OVERLIBGRAPH /graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=17
POSITION 953 370

NODE node08151
LABEL Node
INFOURL /graph.php?rra_id=all&local_graph_id=39
OVERLIBGRAPH /graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=39
POSITION 800 174

NODE 电信网
LABEL 电信网
ICON images/Cloud-Filled.png
POSITION 802 66

NODE node05202
LABEL Node
POSITION 955 177

NODE 联通网
LABEL 联通网
ICON images/Cloud-Filled.png
POSITION 953 66

NODE 内层防火墙01
LABEL 内层防火墙01
POSITION 470 210

NODE 内层防火墙02
LABEL 内层防火墙02
POSITION 621 210

NODE 核心路由器02
LABEL 核心路由器02
POSITION 621 54

NODE 核心路由器01
LABEL 核心路由器01
POSITION 470 54

NODE 核心交换机01
LABEL 核心交换机01
POSITION 470 370

NODE 核心交换机02
LABEL 核心交换机02
POSITION 621 370

NODE 数据库服务器A
LABEL 数据库服务器A
INFOURL /graph.php?rra_id=all&local_graph_id=124
OVERLIBGRAPH /graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=124
POSITION 427 442

NODE 数据库服务器B
LABEL 数据库服务器B
INFOURL /graph.php?rra_id=all&local_graph_id=151
OVERLIBGRAPH /graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=151
POSITION 621 444

NODE 内网汇聚01
LABEL 内网汇聚01
POSITION 108 370

NODE 内网汇聚02
LABEL 内网汇聚02
POSITION 297 370

regular LINKs:

LINK node1-node2
INFOURL /graph.php?rra_id=all&local_graph_id=16
OVERLIBGRAPH /graph_image.php?local_graph_id=16&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET /var/www/html/rra/sw01_traffic_in_19.rrd
NODES 互联网交换机02 互联网交换机01

LINK node08151-互联网交换机01
INFOURL /graph.php?rra_id=all&local_graph_id=39
OVERLIBGRAPH /graph_image.php?local_graph_id=39&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET /var/www/html/rra/f5-01_traffic_in_42.rrd
NODES node08151 互联网交换机01

LINK 电信网-node08151
NODES 电信网 node08151

LINK 联通网-node05202
NODES 联通网 node05202

LINK 联通网-node05202a
NODES 联通网 node05202

LINK 联通网-node05202aa
NODES 联通网 node05202

LINK node05202-互联网交换机02
NODES node05202 互联网交换机02

LINK node08585-node08590
NODES 内层防火墙02 核心交换机02

LINK node08585-node08580
NODES 内层防火墙02 内层防火墙01

LINK node08588-node08580
INFOURL /graph.php?rra_id=all&local_graph_id=83
OVERLIBGRAPH /graph_image.php?local_graph_id=83&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET /var/www/html/rra/01_traffic_in_86.rrd
NODES 核心交换机01 内层防火墙01

LINK node08588-node08590
NODES 核心交换机01 核心交换机02

LINK 核心路由器01-内层防火墙01
INFOURL /graph.php?rra_id=all&local_graph_id=46
OVERLIBGRAPH /graph_image.php?local_graph_id=46&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET /var/www/html/rra/01_traffic_in_49.rrd
NODES 核心路由器01 内层防火墙01

LINK 内层防火墙02-核心路由器02
INFOURL /graph.php?rra_id=all&local_graph_id=57
OVERLIBGRAPH /graph_image.php?local_graph_id=57&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET /var/www/html/rra/02_traffic_in_60.rrd
NODES 内层防火墙02 核心路由器02

LINK 互联网交换机01-内层防火墙01
INFOURL /graph.php?rra_id=all&local_graph_id=16
OVERLIBGRAPH /graph_image.php?local_graph_id=16&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET /var/www/html/rra/sw01_traffic_in_19.rrd
NODES 互联网交换机01 内层防火墙01

LINK 内层防火墙02-互联网交换机02
INFOURL /graph.php?rra_id=all&local_graph_id=20
OVERLIBGRAPH /graph_image.php?local_graph_id=20&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET /var/www/html/rra/sw02_traffic_in_23.rrd
NODES 内层防火墙02 互联网交换机02

LINK 核心路由器01-核心路由器02
INFOURL /graph.php?rra_id=all&local_graph_id=53
OVERLIBGRAPH /graph_image.php?local_graph_id=53&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET /var/www/html/rra/01_traffic_in_56.rrd
NODES 核心路由器01 核心路由器02

LINK 内层防火墙01-内网汇聚01
NODES 内层防火墙01 内网汇聚01

LINK 内层防火墙02-内网汇聚02
NODES 内层防火墙02 内网汇聚02

That's All Folks!

when I editor the map,the map can‘t editor!Like this!
12

Remove dependency on PEAR Console/Getopt

PEAR is complicated on non-Linux systems, and is becoming less supported for modern PHP. Find or write a replacement command-line parser for the command-line weathermap tool.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.