Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


google maps based on data sources?

 
Post new topic   Reply to topic    Cacti Forum Index -> Addons for Cacti
Author Message
craigb



Joined: 11 Aug 2008
Posts: 4

PostPosted: Mon Aug 11, 2008 10:46 am    Post subject: google maps based on data sources? Reply with quote

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?



Screenshot.png
 Description:
 Filesize:  412.47 KB
 Viewed:  2034 Time(s)

Screenshot.png


Back to top
Linegod
Developer


Joined: 20 Feb 2003
Posts: 501
Location: Canada

PostPosted: Tue Aug 12, 2008 1:24 pm    Post subject: Reply with quote

Did you look at the phpweathermap plugin for Cacti?
Back to top
mojiro
Cacti User


Joined: 24 Jul 2005
Posts: 60
Location: Greece, Korydallos - Athens (AWMN)

PostPosted: Wed Aug 13, 2008 2:04 am    Post subject: Reply with quote

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/
Back to top
craigb



Joined: 11 Aug 2008
Posts: 4

PostPosted: Wed Aug 13, 2008 9:07 am    Post subject: Reply with quote

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.
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Wed Aug 13, 2008 9:28 am    Post subject: Reply with quote

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!
Back to top
craigb



Joined: 11 Aug 2008
Posts: 4

PostPosted: Wed Aug 13, 2008 10:02 am    Post subject: Reply with quote

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)?
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Wed Aug 13, 2008 10:10 am    Post subject: Reply with quote

Yep.
Back to top
craigb



Joined: 11 Aug 2008
Posts: 4

PostPosted: Wed Aug 13, 2008 10:21 am    Post subject: Reply with quote

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?
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Wed Aug 13, 2008 10:28 am    Post subject: Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Addons for Cacti All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group