PHP Network Weathermap 0.8 (now 0.9)

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

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

PHP Network Weathermap 0.8 (now 0.9)

Post by Howie »

[ EDIT: Current version is now 0.9 - see this post ]

Version 0.8 of PHP Weathermap is now available for download.

It has a lot of new features that have been requested including curved links, aggregate links & Cacti integration using the plugin architecture.

I've attached the CHANGES entry. The manual is readable online at the web page, including a demo map:
http://wotsit.thingy.com/haj/cacti/php-weathermap/

(and the download of course)

---
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

---
Last edited by Howie on Fri Apr 20, 2007 4:53 am, edited 3 times in total.
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!)
Sin
Posts: 2
Joined: Thu Mar 17, 2005 7:21 am
Location: UK

Post by Sin »

nice, looks good I'll give it a go, Thanks for the hard work :)
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

Awesome job!

The editor is much easier to use and I like the thumbnails feature of the plugin. Could I make 1 simple request? Can we please have a tab to either preview or go back to the base cacti dir in the editor?


Thanks

Eric
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:Awesome job!

The editor is much easier to use and I like the thumbnails feature of the plugin. Could I make 1 simple request? Can we please have a tab to either preview or go back to the base cacti dir in the editor?
How do you mean preview? The view in the editor is produced by the same code as the view in Cacti... The only difference is that the editor doesn't read your data files, because that takes too long. Is that what you mean?

I'm intending to fully integrate the editor in the next version. The editor is likely to change quite a bit more before that. There is an issue with all this which is that not all weathermap users are Cacti users. I know it's hard to believe :-)
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!)
davs
Posts: 28
Joined: Fri Mar 31, 2006 9:47 am
Location: paris

Post by davs »

hi everyone,

I have just added the new php weathermap version for the first time... and I have some issues. :(

I have those 2 warning in the top of my page (weathermap/editor.php):

warning: dl() [function.dl] : Not supported multithreaded Web servers - use extension=gd.so in your php.ini in C:\...\weathermap\weathermap.class.php on line 20

warning: dl() [function.dl] : Not supported multithreaded Web servers - use extension=gd.dll in your php.ini in C:\...\weathermap\weathermap.class.php on line 20

I guess that the problem comes from the 'gd' extension (with PNG, TrueColour and FreeType support). I think that I don't have it.

How could I know if my php include this extension?
and how could I add it?

I have a WAMP configuration with cacti 0.8.6h and php5.

Is there anyone can help me??

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

Post by knobdy »

LOVE IT!!! Just a couple of thoughts though:

Can we remove the management link in the "viewer" tab so that users can see the map but not have the option of managing them? Could we then add a link in the console for same?

Installed easily, btw. I can't wait to get a couple maps put together to share!
tgk
Posts: 28
Joined: Sat Mar 11, 2006 10:46 pm

Post by tgk »

This plugin is awesome!!!
I had a tiny little problem. It uses the auth_realms 42 and 43, and I was already using 42 in the "cycle" plugin (so it overwrote the "View Cycle Graphs" line in User Management / Realm Permissions).

Code: Select all

        $user_auth_realms[42]='Configure Weathermap';
        $user_auth_realms[43]='View Weathermaps';
I just edited the cycle plugin setup.php and changed its user_auth_realms to an unused slot.

Thanks for such a great plugin!
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

tgk wrote:This plugin is awesome!!!
I had a tiny little problem. It uses the auth_realms 42 and 43, and I was already using 42 in the "cycle" plugin (so it overwrote the "View Cycle Graphs" line in User Management / Realm Permissions).

Code: Select all

        $user_auth_realms[42]='Configure Weathermap';
        $user_auth_realms[43]='View Weathermaps';
I just edited the cycle plugin setup.php and changed its user_auth_realms to an unused slot
oops! I used a couple that weren't in the list of used ones on the cactiusers.org wiki....
tgk wrote: Thanks for such a great plugin!
Thanks! :-)

I'll probably make a Cycle-like mode for the next version, actually.
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:LOVE IT!!! Just a couple of thoughts though:

Can we remove the management link in the "viewer" tab so that users can see the map but not have the option of managing them? Could we then add a link in the console for same?
The first part is easy. Don't give your users the 'Manage Weathermaps' right, and they shouldn't get that link.

The second part - sure, why not? It's on the list.
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 »

davs wrote: How could I know if my php include this extension?
and how could I add it?

I have a WAMP configuration with cacti 0.8.6h and php5.
My French is rusty, but I'm pretty sure this page is saying to add

Code: Select all

extension=php_gd2.dll
to your php.ini file.

A quick 'find files' should find php.ini, and php_gd2.dll (just to make sure you have them). While you are in the php.ini, you might want to change memory_limit, as it suggests in the manual.
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:The first part is easy. Don't give your users the 'Manage Weathermaps' right, and they shouldn't get that link.
I'm a blind dumbass - sorry.
Howie wrote:The second part - sure, why not? It's on the list.
Not sure I follow you there.
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:
Howie wrote:The second part - sure, why not? It's on the list.
Not sure I follow you there.
I meant my todo list, sorry.

Actually, it's done in my dev version, but I'm not going to make a 0.81 just for that ;-) There's a 'Weathermaps' option underneath 'Devices' in the Management section of the console (assuming you have rights).
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:Actually, it's done in my dev version, but I'm not going to make a 0.81 just for that ;-) There's a 'Weathermaps' option underneath 'Devices' in the Management section of the console (assuming you have rights).
Need a beta tester? ;)

So now that I've read all of the documentation I think I understand how this should work. Weatehrmap images are supposed to get created after the first poll - right? If so my maps aren't getting created, just get the "(thumbnail for map 12 not created yet)" in the weathermap tab.

Turning debug on now - but that might kill my machine...anywhere else to look?

What permissions, exactly, should conf files int he configs directory have?
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: So now that I've read all of the documentation I think I understand how this should work. Weatehrmap images are supposed to get created after the first poll - right? If so my maps aren't getting created, just get the "(thumbnail for map 12 not created yet)" in the weathermap tab.
Correct. Either you have some permissions problem, or something wrong with your config file. It's better to use the command-line weathermap to make sure your map is right, if you aren't sure.
knobdy wrote: Turning debug on now - but that might kill my machine...anywhere else to look?

What permissions, exactly, should conf files int he configs directory have?
The config files need to be readable by your cactiuser.
The output folder needs to be writable by it (so it can create the images).

If you want the editor to be able to edit files, then they need to be writable by the user that runs your webserver.

On a unix system,

Code: Select all

chown -R cactiuser output
chown -R wwwuser configs
chmod 755 output configs
chmod 644 output/* configs/*
ought to do it.

That's it! Check the logs before you turn on DEBUG. More serious errors (like not being able to write any files) go into the log anyway.
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 »

Yep, it looks like it was a permissions thing. I didn't see in the online documentation where you had to change the output folder - but the message was loud and clear as soon as I grepped cacti.log! :)

Here we go...!
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests