PHP Network Weathermap 0.8 (now 0.9)

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Howie wrote:Why would the map ID change? They should never get repeated or reused. It's a mysql autoincrement field, which just goes up and up as you add maps. It would only ever change if you deleted the other map and re-added it.
I currenlty only have two visible maps - one of them being the example "simple.conf" that came with the plugin. Their IDs are now 14 and 15. I'm guessing they increment each time you add or remove them from inside Cacti (MySQL)... knowing that helps. :)

So, the next question, how is it determined which item (node or link) shows on "top" of the other? Order of appearance in config file? All links go behind all nodes?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

knobdy wrote:I currenlty only have two visible maps - one of them being the example "simple.conf" that came with the plugin. Their IDs are now 14 and 15. I'm guessing they increment each time you add or remove them from inside Cacti (MySQL)... knowing that helps. :)
Yes - add/remove them, but not move them. You don't really need to add/remove them ever. If you want to have them disabled temporarily then just click on the 'Active' link to disable it.
knobdy wrote: So, the next question, how is it determined which item (node or link) shows on "top" of the other? Order of appearance in config file? All links go behind all nodes?
Nodes on top of links. Both drawn in the order they appear in the config file.

If you have overlapping links, there's a problem in the current version that the overlib areas favour the wrong link (the bottom one). That'll be fixed in the next release.
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!)
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Okay, need some layout/VIA help needed here:

Code: Select all

NODE node1144090646
        LABEL Internet
        ICON images/cloud_large.png
        LABELFONT 5
        POSITION 400 45

NODE node1144090672
        LABEL 
        INFOURL 
        ICON images/7500_router.png
        LABELOFFSET W
        POSITION 315 260

LINK node1144090672-node1144090646
        ARROWSTYLE Compact
        BWFONT 3
        BWOUTLINECOLOR none
        BWFONTCOLOR 255 0 0
        VIA 280 200
        VIA 320 160
        VIA 360 120
        VIA 380 80
        NODES node1144090672 node1144090646
        BANDWIDTH 1.5M

LINK node1144090646-node1144090672
        ARROWSTYLE Compact
        BWFONT 3
        BWOUTLINECOLOR none
        BWFONTCOLOR 255 0 0
        VIA 360 170
        NODES node1144090646 node1144090672
        BANDWIDTH 1.5M
I guess it would be helpful if I had a grid with a ruler in the editor, but beyond that, I'm just not sure what turns what which way! :o

I'm trying to get each link to bend opposite directions (not too much since to the right of both of these I have a third link going to that same "Internet" node and the labels step on each other)...?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

knobdy wrote:Okay, need some layout/VIA help needed here:
I guess it would be helpful if I had a grid with a ruler in the editor, but beyond that, I'm just not sure what turns what which way! :o
I find that less VIA points is better than more, usually.
knobdy wrote: I'm trying to get each link to bend opposite directions (not too much since to the right of both of these I have a third link going to that same "Internet" node and the labels step on each other)...?
My trick for placing VIAs is to create a NODE in the editor where you want the VIA to be, then edit the file by hand and take those coordinates and turn the NODE into a VIA for the right link.

For yours, I get OK results (for me anyway) with

Code: Select all

LINK node1144090672-node1144090646
        ARROWSTYLE compact
        BWFONT 3
        BWOUTLINECOLOR none
        BWFONTCOLOR 255 0 0
		NODES node1144090672 node1144090646
		VIA 300 160
        BANDWIDTH 1.5M

LINK node1144090646-node1144090672
        ARROWSTYLE compact
        BWFONT 3
        BWOUTLINECOLOR none
        BWFONTCOLOR 255 0 0
        NODES node1144090646 node1144090672
        BANDWIDTH 1.5M 
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!)
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Howie wrote:My trick for placing VIAs is to create a NODE in the editor where you want the VIA to be, then edit the file by hand and take those coordinates and turn the NODE into a VIA for the right link.

For yours, I get OK results (for me anyway) with
That's a good trick to know! Any way to change where the labels fall on the arrow? I kind of like:

Code: Select all

VIA 300 200
VIA 310 100
But still, as with your example, the cloud I'm using is overstepping the top label.
davs
Posts: 28
Joined: Fri Mar 31, 2006 9:47 am
Location: paris

Post by davs »

davs wrote:here is what I have on CACTI DEBUG mode after a cycle:

WEATHERMAP:Poller[0] Weathermap has left the building
WEATHERMAP:Poller[0] Iterated all maps.
WEATHERMAP:Poller[0] Iterating all maps.
CMDPHP:Poller[0] DEBUG: SQL Assoc: "select * from weathermap_maps where active='on'"
WEATHERMAP:Poller[0] Engaging Weathermap DEBUG mode
WEATHERMAP:Poller[0] Weathermap 0.8 in da house
any idea????
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

davs wrote: any idea????
Only that maybve your maps are disabled in the management view...

You should get some kind of error in between the two 'iterating/iterated' messages, otherwise.

If you run the SQL from the mysql command-line tool, do you get any results?

Code: Select all

select * from weathermap_maps where active='on'
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
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

I am experimenting with the overlibgraph option on the nodes. I want the pop up to display some info about the device in a similar fashion as the monitor plugin. Right now I have it pointing to a static page, but all I see on the overlib popup is a broken graphic and no other info. the overlib works fine on the links. The logs do not indicate anything out of the ordinary.
thanks for your help.
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

egarnel wrote:I am experimenting with the overlibgraph option on the nodes. I want the pop up to display some info about the device in a similar fashion as the monitor plugin. Right now I have it pointing to a static page, but all I see on the overlib popup is a broken graphic and no other info. the overlib works fine on the links. The logs do not indicate anything out of the ordinary.
thanks for your help.
That's because it needs to be an image. Whatever you put in there is put straight into an HTML <IMG SRC="">. When you point it at a static page, your browser tries to figure out what kind of image that is, and gives up.

Right now, you'd need to make some kind of script to produce an image from your information. I think imagemagick might render a text file to a PNG, so that's a possibilty...

hehe. it does! Try something like:

Code: Select all

 convert -trim test.txt public_html/test.png
to get a cropped, black-on-white png of the text in test.txt. I've attached a dummy one. That's almost useable, and it'd be a 10-line shell/awk script to make them.

The real answer is to allow embedable HTML in the overlib stuff, but that means having some kind of HTTP client in weathermap, as well as being sure that the HTML fragments that were fetched are valid. Most things will produce a complete page, which isn't valid.
Attachments
Test of text-&amp;gt;image with ImageMagick.
Test of text-&gt;image with ImageMagick.
test.png (4.35 KiB) Viewed 5137 times
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
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

cool! I'm going to try another approach... I will take a snapshot of the html page and save it as an image...
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

here is the result I was looking for
Attachments
map.jpg
map.jpg (64.59 KiB) Viewed 5123 times
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

How'd you do it? Can it be done on the fly/on demand? Via a script?

I'd just like what I currently have being displayed at the top of my graph views - system info...
kagoryu
Posts: 6
Joined: Thu Dec 08, 2005 4:29 am

Post by kagoryu »

Hi Howie,

I would like to thank you for the tool.
I'm having a problem with the png file.
I've tried testing your addon with 3 network equipments I'm
monitoring and it works well.
I've decided to add all my core network equipments, around
20 of 'em now the weather_15.png is generated blank. The size is about
33k, but when I manually run ./weathermap it generates the whole png.

What seems to be the problem?

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

Post by Howie »

kagoryu wrote:Hi Howie,

I would like to thank you for the tool.
I'm having a problem with the png file.
I've tried testing your addon with 3 network equipments I'm
monitoring and it works well.
I've decided to add all my core network equipments, around
20 of 'em now the weather_15.png is generated blank. The size is about
33k, but when I manually run ./weathermap it generates the whole png.

What seems to be the problem?

Thanks.
What does the cacti log say? What about if you turn DEBUG on for one poller cycle?

(hehe. I can think I need a macro button to type that, like lvm must have... :-) )
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
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

knobdy wrote: But still, as with your example, the cloud I'm using is overstepping the top label.
Ah, it was fine with my icons ;-)

If it is though, try using one of the node offsets, like SW or SE, so that the arrow starts from the edge. The labels are always 25% and 75% of the way along the link, unfortunately. You can change where 0 and 100% appear, however, with those offsets. You'd need a squarish cloud to stop it looking funny though.

I'm thinking that I'll probably add a pixel offset sometime soon, like LABELOFFSET has, so that you can fine-tune it for non-square nodes.
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!)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests