PHP Network Weathermap 0.8 (now 0.9)
Moderators: Developers, Moderators
Hello Howie,
Great tool this weathermap. I gues you could call it weathermap-ng (next generation) when looking at the differences between the original version and this version.
I have a suggestion for the near future. Reading this thread a lot of people see the potentional and the current use of weathermap. Maybe for the future its an idea to not generate one large image but generate a lot of images.
Let me explain.
If weathermap could be changed to generate a seperate png drawing for each item in the weathermap (node, link, timestamp, legend). You would have a bunch of drawings. To generate the original weathermap drawing again each little drawing should be placed on a webpage with for example the div statement.
The end result would be a map which looks exactly like the map weathermap is currently generating but i think with a few advantages.
- Its easy to change the color of an icon when the state changes. Just generate two icons with different colors and switch them upon change of state.
- animation would be simpler since you don't have to generate an animation for the complete weathermap but just for the link or icon you want to be animated.
- Only links have to be regenerated each 5 minutes since the other pictures are static. Also the html page with the div's only need to be generated once. If the .conf file stays the same.
- An editor with WYSIWYG capability would be simpler because you can manipulate the individual div's.
Can't exactly tell about the impact of this for the program but as i said before. It's just a suggestion.
Michael,
Using over 10 weathermaps at the moment.
Great tool this weathermap. I gues you could call it weathermap-ng (next generation) when looking at the differences between the original version and this version.
I have a suggestion for the near future. Reading this thread a lot of people see the potentional and the current use of weathermap. Maybe for the future its an idea to not generate one large image but generate a lot of images.
Let me explain.
If weathermap could be changed to generate a seperate png drawing for each item in the weathermap (node, link, timestamp, legend). You would have a bunch of drawings. To generate the original weathermap drawing again each little drawing should be placed on a webpage with for example the div statement.
The end result would be a map which looks exactly like the map weathermap is currently generating but i think with a few advantages.
- Its easy to change the color of an icon when the state changes. Just generate two icons with different colors and switch them upon change of state.
- animation would be simpler since you don't have to generate an animation for the complete weathermap but just for the link or icon you want to be animated.
- Only links have to be regenerated each 5 minutes since the other pictures are static. Also the html page with the div's only need to be generated once. If the .conf file stays the same.
- An editor with WYSIWYG capability would be simpler because you can manipulate the individual div's.
Can't exactly tell about the impact of this for the program but as i said before. It's just a suggestion.
Michael,
Using over 10 weathermaps at the moment.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
This is exactly what I am looking at right now, to make an "ajax"-like editor. To do have draggable nodes, they need to be seperate images. The editor then sends update messages only to the server-side, which returns json-formatted data to update the client-side positions, plus a redrawn arrows+background image asynchronously, so it doesn't slow down the editor. I have a very rough demo doing this for one node.mgb wrote:I have a suggestion for the near future. Reading this thread a lot of people see the potentional and the current use of weathermap. Maybe for the future its an idea to not generate one large image but generate a lot of images.
The issue with it at the moment (apart from the pretty big changes to the drawing code) are the to draw anything WYSIWYG, the server-side needs to read and parse the whole config, so caching of output is important, as well as marking it 'dirty' correctly. It's an interesting challenge, and a good excuse to play with client-side javascript, which I don't get to do for work
It hadn't occured to me to make the 'normal' map that way too though. That's an interesting alternative. I think it perhaps makes it harder to embed the weathermap in other stuff (e.g. thumbnail views, or in another page).
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!)
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!)
Maybe weathermap can still generate two sort's of maps, the original one for thumbnails and other stuff and a second one with seperated images.It hadn't occured to me to make the 'normal' map that way too though. That's an interesting alternative. I think it perhaps makes it harder to embed the weathermap in other stuff (e.g. thumbnail views, or in another page).
might call it an issue or a challange.
I understood that you once experimented with animation. It would be so cool to have animated node links which move faster when there is more data going through.
As to make things even more complicated. It looks like a lot of people want to have an overlib html page. It would be great to have some info regarding the switch/router and some small graphs showing CPU/TMP/MEM etc.
Gues you don't have time for your dayjob anymore
Michael
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Yes. Actually, I don't think it would be so bad.mgb wrote:Maybe weathermap can still generate two sort's of maps, the original one for thumbnails and other stuff and a second one with seperated images.
might call it an issue or a challange.
It would My animation was of sets of 5-minute maps over a day, which doesn't really work very well. Not for the traffic we get, anyway.mgb wrote:I understood that you once experimented with animation. It would be so cool to have animated node links which move faster when there is more data going through.
I think that if I did add something like this, it would be very generic, like a URL that gets included. It would mean that either I add something to fetch an HTML page and change the body tags to divs, or use iframes or something like that. The less 'knowledge' that weathermap has of the surrounding system, the better, for me. It's not just Cacti users that use it.mgb wrote: As to make things even more complicated. It looks like a lot of people want to have an overlib html page. It would be great to have some info regarding the switch/router and some small graphs showing CPU/TMP/MEM etc.
Only one pays the rent, sadly I prefer doing this to cleaning out spam, which seems to be this week's problemmgb wrote: Gues you don't have time for your dayjob anymore
Michael
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!)
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!)
-
- Posts: 3
- Joined: Fri Apr 07, 2006 7:59 am
The error of weathermap's editor.php
Hi,
when I use editor.php to edit a map, in Map Properties,I input pngfile's name and htmlfile's name,when I submit ,there is an error :Undefined index: map_linkdefaultbwout in /www/htdocs/cacti/plugins/weathermap/editor.php on line 177 .
I check editor.php,find the code in editor "<td><input name="map_linkdefaultbwin" size="6" type="text" value="<?= $map->defaultlink->max_bandwidth_in_cfg ?>" /> bit/sec in, <input name="map_linkdefaultbwin" size="6" type="text" value="<?= $map->defaultlink->max_bandwidth_out_cfg ?>" /> bit/sec out</td>" have an error, the second "map_linkdefaultbwin" should be "map_linkdefaultbwout". I changed it. and then editor.php no error.
but it is not create png file and html file still. why?
when I use editor.php to edit a map, in Map Properties,I input pngfile's name and htmlfile's name,when I submit ,there is an error :Undefined index: map_linkdefaultbwout in /www/htdocs/cacti/plugins/weathermap/editor.php on line 177 .
I check editor.php,find the code in editor "<td><input name="map_linkdefaultbwin" size="6" type="text" value="<?= $map->defaultlink->max_bandwidth_in_cfg ?>" /> bit/sec in, <input name="map_linkdefaultbwin" size="6" type="text" value="<?= $map->defaultlink->max_bandwidth_out_cfg ?>" /> bit/sec out</td>" have an error, the second "map_linkdefaultbwin" should be "map_linkdefaultbwout". I changed it. and then editor.php no error.
but it is not create png file and html file still. why?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: The error of weathermap's editor.php
You are correct. I'll fix that in the next release.qjy2000_cn wrote:Hi,
when I use editor.php to edit a map, in Map Properties,I input pngfile's name and htmlfile's name,when I submit ,there is an error :Undefined index: map_linkdefaultbwout in /www/htdocs/cacti/plugins/weathermap/editor.php on line 177 .
I check editor.php,find the code in editor "<td><input name="map_linkdefaultbwin" size="6" type="text" value="<?= $map->defaultlink->max_bandwidth_in_cfg ?>" /> bit/sec in, <input name="map_linkdefaultbwin" size="6" type="text" value="<?= $map->defaultlink->max_bandwidth_out_cfg ?>" /> bit/sec out</td>" have an error, the second "map_linkdefaultbwin" should be "map_linkdefaultbwout". I changed it. and then editor.php no error.
but it is not create png file and html file still. why?
The editor doesn't create png or html files. It only edits the config. You need to use either the Cacti plugin, or the command-line tool to make the 'real' map.
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!)
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!)
-
- Posts: 3
- Joined: Fri Apr 07, 2006 7:59 am
Re: The error of weathermap's editor.php
First, thank you Howie!
How to use the Cacti plugin to creat png and html files with config file?
I find if you wan to see the map, the waethermap-cacti-plugin.php needs the name of html file woule be "weathermap_"+map_id. how can I creat this file?
thank!
How to use the Cacti plugin to creat png and html files with config file?
I find if you wan to see the map, the waethermap-cacti-plugin.php needs the name of html file woule be "weathermap_"+map_id. how can I creat this file?
thank!
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: The error of weathermap's editor.php
You need to install the plugin architecture, and the plugin properly. Read the installation section in the manual!qjy2000_cn wrote:First, thank you Howie!
How to use the Cacti plugin to creat png and html files with config file?
I find if you wan to see the map, the waethermap-cacti-plugin.php needs the name of html file woule be "weathermap_"+map_id. how can I creat this file?
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!)
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!)
It wouldn't have to be so complicated, just allow you to control where the different links connect on a given icon. For an example, rather than saying E, plot 100 points along the icon left-to-right, top-to-bottom and say S5 to connect the link to the bottom of the icon, 5 "points" from the left corner. Instead of SW it would be W100, S would be S50, etc.. That make sense?Howie wrote:I can't see this happening soon... basically like the composite shapes in Visio?
<SNIP>
Again though, I don't know quite how you'd configure them. A link with just one node on the NODES line? It'd have to make sure that no other link used the same node, because that node would not be drawn normally. It's a NINK, or a LODE.
Since most icons have edges, and at least in my case they are all square, it would make more sense for almost all of my links to be above the icons. Perhaps have a layered editor so that you can pick and choose what is above what. Or all host icons on one layer, links on another, call-outs on third and finally "info" (title, key, time stamp) no a fourth if it had to stay real basic.Howie wrote:Yeah, for that one special caseknobdy wrote: It also seems like the links should be above the icons.
Speaking of that info layer - how do I add the title to the map? I have a title defined, I have a position defined, nothing shows up? In the manual it says:
TITLE
TITLE titlestring
TITLEPOS
TITLEPOS x-pos y-pos headingstring
If you add a title through the editor, it seems, it uses TITLE. Adding TITLEPOS with just the coordinates doesn't work. Adding TITLEPOS with coordinates and title doesn't work. Removing TITLE and using just TITLEPOS doesn't work either.
-
- Posts: 3
- Joined: Fri Apr 07, 2006 7:59 am
Re: The error of weathermap's editor.php
The plugin architecture is already installed, and I can see weathermap in cacti, and the config file has already created. and I have added the map config file.
but it says map is not created yet. I have readed the Manual carefully,and not found the answer. can you help me . thanks !!!
but it says map is not created yet. I have readed the Manual carefully,and not found the answer. can you help me . thanks !!!
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: The error of weathermap's editor.php
Put the config file in the configs directory, then Manage Maps, Add and choose your map. Wait for the next poller cycle (5 minutes).qjy2000_cn wrote:The plugin architecture is already installed, and I can see weather in cacti,
but it says map is not created yet. I have readed the Manual carefully,and not found the answer. can you help me . thanks !!!
If it fails, check the Cacti log for more information.
If it *still* fails, turn on DEBUG in Cacti, wait for a cycle and check the log again.
The log should always tell you if something is wrong.
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!)
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!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Both of those work for me... have I missed out a default somewhere?knobdy wrote:The TITLE thing is weird. It is used, correctly, everywhere else except in the map itself.
I also attempted to change the actual text of the timestamp - which didn't work.
Here's the top of one of my (working) maps:
Code: Select all
FONTDEFINE 120 GillSansBold 24
FONTDEFINE 20 GillSansItalic 9
FONTDEFINE 21 GillSansItalic 11
FONTDEFINE 22 GillSans 12
TIMEFONT 21
TITLEFONT 120
TITLE UK Network Overview
TIMEPOS 10 48 Data Updated: %b %d %Y %H:%M:%S
TITLEPOS 10 30
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!)
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!)
I have:
This is a brand new map and was all generated by the editor.
Code: Select all
WIDTH 1200
HEIGHT 600
HTMLSTYLE overlib
TITLE Data Center
KEYPOS 1 8 Traffic Load
KEYTEXTCOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE 1 10 140 0 255
SCALE 10 25 32 32 255
SCALE 25 40 0 192 255
SCALE 40 55 0 240 0
SCALE 55 70 240 240 0
SCALE 70 85 255 192 0
SCALE 85 100 255 0 0
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
You need to add a TITLEPOS line. The default TITLEPOS is -1,-1, which is 'off'. This is because the TITLE existed a few versions ago, just to be used by the editor, and it's only in 0.8 that you can show it on-screen, so I defaulted it to not shown, so as not to break any existing maps.knobdy wrote:I have:
(snip)
This is a brand new map and was all generated by the editor.
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!)
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!)
Who is online
Users browsing this forum: No registered users and 0 guests