Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support
It is currently Sun Dec 21, 2014 3:28 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 283 posts ]  Go to page 1, 2, 3, 4, 5 ... 19  Next
Author Message
 Post subject: GPS Maps for Cacti
PostPosted: Fri Aug 07, 2009 3:55 pm 
Offline
Cacti User

Joined: Thu Jul 24, 2008 11:21 am
Posts: 97
Location: Hallsville, TX
GPS MAPS

This plugin provides an integration of Google maps with cacti in order to visually map out hosts using previously recorded Latitude and Longitude coordinates. Tracking of IP ranges and addresses and displaying them on the map. Information about each point is displayed when clicked on, with a direct link to the hosts graphs. Additionally there is a function that will allow for overlay mapping of IP ranges to get a coverage map.

***UPDATE ASAP to 1.63***
Google removed certain critical icon files from their servers. In order to continue usage please update!
Remember: DO NOT UNINSTALL THE PLUGIN unless you have backed up your host database! GPS Coordinates will be DELETEDwhen uninstalled.

Version 1.63
-Emergency update.
-Fixed relying on Google for icon files.
-All icons are contained within the images\icons folder
-Made coverage overlays the last part to be rendered.
-Fixed bug where coverage overlays would eat up RAM by causing a invalid for loop.

Newest Version info is on page 12
Download is here http://spiffdev.com/

If you are in need of a good Geocoder:
Zorrosam wrote:
coordinates taken from this website http://www.gpsvisualizer.com/geocoder/ seems to be correct.



Please let me know if you come across any bugs. I only have a single development environment so please report any mishaps and I'll do what I can to sort them out.

Enjoy,
Andy


Attachments:
gpsmap.jpg
gpsmap.jpg [ 130.07 KiB | Viewed 24722 times ]


Last edited by spiffydudex on Thu Dec 01, 2011 10:16 pm, edited 23 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 08, 2009 9:59 am 
Offline
Developer
User avatar

Joined: Thu Feb 20, 2003 10:16 am
Posts: 1596
Location: Canada
Nice.

If possible, could you add this to the Contributed Plugins at http://docs.cacti.net/plugins

(User ID for Documentation site is the same as http://bugs.cacti.net )

_________________
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 12, 2009 10:13 am 
Offline
Cacti User

Joined: Thu Jul 24, 2008 11:21 am
Posts: 97
Location: Hallsville, TX
Version 1.4 released

Made significant changes to the internal workings of this plugin. Most noticeable the reduction of about 50% of all database calls.

Please update as this will improve performance for any size system.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 2:36 am 
Offline

Joined: Thu Nov 27, 2008 6:30 pm
Posts: 17
Looks great, been hoping for a plugin such as this! :D

Had alot of trouble trying to get the routers to display on the map, in the end I logged out and logged back in, and they appeared!

Any chance you could have an option to display all of the sites in green and then if a site is offline, the image turns red?

How about an option to default to map type ie either Map, Satellite or Hybrid?

Does the Google API allow mouse scroll wheel functionality to zoom in and out?

Thanks again.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 9:52 am 
Offline
Cacti User

Joined: Thu Jul 24, 2008 11:21 am
Posts: 97
Location: Hallsville, TX
Yes, the color changing for the Up/Recovering/Down is something my boss asked about, so it will be implemented in future releases. I'll also add a option to "Display All", so that disabled devices will be displayed.

Quote:
How about an option to default to map type ie either Map, Satellite or Hybrid? Does the Google API allow mouse scroll wheel functionality to zoom in and out?


I'll be looking into that, as that would be a nice addition.
I think so, I'm not positive. I agree clicking buttons is starting to get annoying. I'll see what I can do.
I head back to school in a week, so I'll try to get something out before I really get bogged down.

Thanks for the feedback,
Andy


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 9:57 am 
Offline
Cacti User
User avatar

Joined: Tue May 22, 2007 7:56 am
Posts: 278
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
UG I just upgraded to , 1.4 and lost my icons.

I am still not sure how to assign objects icons to types of map items.

When I get map Items back.

Maybe it could be set in the settings that templats groups have map icons assigned to them.


Anyway I like it alot and only hope it can have more devolipment to come ..


Maybe multiple maps pages for maybe a general map of the state/country Total area. Than links to maybe area of tower groupings. ?


Great product.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 10:39 am 
Offline
Cacti User

Joined: Thu Jul 24, 2008 11:21 am
Posts: 97
Location: Hallsville, TX
Quote:
UG I just upgraded to , 1.4 and lost my icons.
I am still not sure how to assign objects icons to types of map items.


For the time being, check to ensure that the custom_hosts.php and host_icons.php exist.

The custom_hosts.php defines the type identifier. The case number corresponds to the template ID that is stored in your cacti database.

Example:
Code:
case 1:     //   <-- This is the number that corresponds to your template ID number in the host_template table
   $type = "Server";  //<-- common name ID. This is displayed on the map pop-up.
   break;


Then use that common name ID in your host_icons.php

Example:
Code:
   
//Define a google map Icon, you can copy one of the existing and modify or use one of the preset one I have given.

var iconYellow = new GIcon();
iconYellow.image = 'http://labs.google.com/ridefinder/images/mm_20_yellow.png';
iconYellow.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
iconYellow.iconSize = new GSize(12, 20);
iconYellow.shadowSize = new GSize(22, 20);
iconYellow.iconAnchor = new GPoint(6, 20);
iconYellow.infoWindowAnchor = new GPoint(5, 1); 
   

//Add the Icon into the customIcons array and define the Icon type, Use the common name you set earlier.

customIcons["Server"] = iconYellow;


Hopefully that clears things up a little bit. I do hope to eventually make this a much easier process and utilize a GUI for these. But I need that inspiration on how to do it effectively and efficiently.

Quote:
Maybe it could be set in the settings that templates groups have map icons assigned to them.


Yes, this is a feature I am looking into. Personally I don't like messing with code when there is a GUI, I jest need to find a way to perform those customizations efficiently.


Also, as Caracarn stated earlier with the Up/Recovering/Down colors, would it be necessary to still continue implementing custom icons?[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 11:19 am 
Offline
Cacti User
User avatar

Joined: Tue May 22, 2007 7:56 am
Posts: 278
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
OK that is much clearer way of stating it thank you..


But my problem is I did uninstall it from the plugin management and than when I installed the new vertion I did a install .. I still have all the data in the settings window like where they map should start and such .. But I don't have anything show up as devices.


Anything I should check.. ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 11:38 am 
Offline
Cacti User

Joined: Thu Jul 24, 2008 11:21 am
Posts: 97
Location: Hallsville, TX
sad to say... but because of the PIA standards, whenever you uninstall a plugin, it has to uninstall all data that goes along with it, that includes the GPS Data. Upgrading plugins really is just copying the new files over the old ones.

Try re-saving a few devices and see if they start to show up.

I need to looking into the upgrade features of the PIA. And from the sounds of it, implement some form of backup feature.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 1:40 pm 
Offline
Cacti User
User avatar

Joined: Tue May 22, 2007 7:56 am
Posts: 278
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
Yup that part I tried the re saving part.. With no luck.. Blth...

you might be able to draw a few things from weather map it is very diffrent.. But in the end some of the same things.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 2:35 pm 
Offline
Cacti User

Joined: Thu Jul 24, 2008 11:21 am
Posts: 97
Location: Hallsville, TX
Get a fresh download of 1.4 and replace all of the files in your gpsmaps folder. Other than that, I don't really know what is going on.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 15, 2009 12:45 pm 
Offline

Joined: Mon Dec 17, 2007 2:39 am
Posts: 6
Location: Terra Firma
Hi, I've installed the plugin and it's mostly behaving itself. I can see my devices etc. in the map.

But one bug which is annoying me, is that I have to activate the 'console' menu for my users who wants to get the 'GPS map' link.

I have activated the plugin for the different users I have, but no go.

Oh, I'm running 0.8.7e and the install is just 1 month old.

Any thoughts ??


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 15, 2009 1:01 pm 
Offline
Cacti User

Joined: Thu Jul 24, 2008 11:21 am
Posts: 97
Location: Hallsville, TX
I haven't done any testing for different user groups. Will look into it. I would suspect this to be a simple fix.

Thanks for the feedback


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 17, 2009 12:41 am 
Offline

Joined: Thu Nov 27, 2008 6:30 pm
Posts: 17
Have added the gps coords for all of my sites and it looks great. It will be even better if/when you add the online status for the sites.

I have noticed though that if I click on any tab other than Console, the GPS Map tab disappears, and the only way I can bring it back is clicking on the Console tab again.

To reduce the number of clicks could you put a zoom link on the status balloon that pops up for a particular office, so you move in a set distance?

Could you display latency in the status balloon?

Is Google Street View available?

Thanks for your hardwork, even without these changes this is an excellent plugin.

Have included a screenshot of what all 90 sites look like.


Attachments:
File comment: GPS Map Screenshot
Sites.JPG
Sites.JPG [ 59.33 KiB | Viewed 24225 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 18, 2009 3:47 pm 
Offline
Cacti User

Joined: Thu Jul 24, 2008 11:21 am
Posts: 97
Location: Hallsville, TX
Quote:
But one bug which is annoying me, is that I have to activate the 'console' menu for my users who wants to get the 'GPS map' link.

Quote:
I have noticed though that if I click on any tab other than Console, the GPS Map tab disappears, and the only way I can bring it back is clicking on the Console tab again.


I'll need to get a person more versed in the PIA to have a look. To my understanding it should be showing up...but its not.

Quote:
Is Google Street View available?

It is possible, but for the scope of my project, that is a little much. Out where my company is located. Google street only has the main town covered.

Check the newest update, I added a few of the main features needed. such as UP/Down status and zoom with the mouse wheel. I don't think I will have much more free time to play with this nifty plugin.
School is starting soon and I still have to pack! :oops:
Please if you find a bug, post it. I like this plugin and if time is available I'll try and address those issues.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 283 posts ]  Go to page 1, 2, 3, 4, 5 ... 19  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group