google maps based on data sources?

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
craigb
Posts: 4
Joined: Mon Aug 11, 2008 10:28 am

google maps based on data sources?

Post by craigb »

I've been writing a google maps application that displays network connections (or any data source really) overlaid on a map that represents their general location, and the lines and icons can be clicked on to bring up info bubles with current stats and links to graphs. There's a screen shot at the bottom that better depicts what I'm talking about. Has this been done?
if not, are there any tutorials or instructions for building an addon for cacti? I searched around and couldn't find much of anything. For now I just took apart graph.php and put in some skeleton functionality to show what I'm talking about, but thats probably the wrong way to go about it...

Here's what I was planning on doing in a little more detail, granted I haven't figured it all out yet:
--I've already added some tables to my database to connect data sources with maps, so that each map can contain multiple data sources, and cacti can have multiple maps. --Theres another additional table that relates each data source to an address or lat/long for google maps to place it correctly.
--Obviously I need a create map form. I was thinking it would allow the user to select data sources from a drop down (with a '+add another field' button), and then next to each selected data source have a field for the address or lat/long (google will geocode it for us).
--The lines on the graph can be optional, since it makes sense when monitoring links between routers, but not so much for temperature at different points...So maybe two different types of maps are needed? Or maybe just have optional fields in the map creation form that will let you say which two data sources to use to create a line...

All this sound good / feasible?
Attachments
Screenshot.png
Screenshot.png (412.47 KiB) Viewed 9912 times
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Did you look at the phpweathermap plugin for Cacti?
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
mojiro
Cacti User
Posts: 121
Joined: Sun Jul 24, 2005 12:20 pm
Location: Ireland, Dublin

Post by mojiro »

I like weathermap a lot, but using real maps is a great feature.

Also it is possible to be implemented with WiND project too.

site: http://wind.cube.gr/
google code: http://code.google.com/p/wind/
live: http://wind.awmn.net/
[i]Born to be online![/i]
craigb
Posts: 4
Joined: Mon Aug 11, 2008 10:28 am

Post by craigb »

I set up a phpweathermap version of the map for my older customers, because that's what they're used to, but I don't like it. It feels like an outdated solution (rendering a static png server-side, vs dynamic maps that are drawn with javascript on the client computer) compared to google maps.

Plus its a hell of a lot more functional, with click events for icons and lines at least. And links to graphs or devices or graphs themselves can appear in the info bubble.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

craigb wrote:I set up a phpweathermap version of the map for my older customers, because that's what they're used to, but I don't like it. It feels like an outdated solution (rendering a static png server-side, vs dynamic maps that are drawn with javascript on the client computer) compared to google maps.

Plus its a hell of a lot more functional, with click events for icons and lines at least. And links to graphs or devices or graphs themselves can appear in the info bubble.
All of those things are possible with Weathermap (click events on icons/nodes and links, URLs+graphs in the popup). I don't see that putting more work on the client just for the sake of "feeling new" is worthwhile, but I'm obviously biased. :-) In the editor, that's a different story, of course.

Anyway, enjoy the plugin writing process!
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!)
craigb
Posts: 4
Joined: Mon Aug 11, 2008 10:28 am

Post by craigb »

True. I forgot about all the extra stuff phpweathermap does...Thanks for that :)
is there a cacti interface to create phpweathermaps (like creating graphs or data sources)?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Yep.
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!)
craigb
Posts: 4
Joined: Mon Aug 11, 2008 10:28 am

Post by craigb »

Now THAT I haven't found. I installed phpweathermap by hand and wrote the config to use cacti's rra's instead...
Can you point me to some docs for that?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

It's all in the manual (installation guide). There's an interactive editor that lets you pick from Cacti's data sources, click to position nodes, links etc.
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 7 guests