GPS Maps for Cacti

Announcements concerning Plugins for Cacti

Moderators: Moderators, Developers

Post Reply
Author
Message
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

GPS Maps for Cacti

#1 Post by spiffydudex » Fri Aug 07, 2009 3:55 pm

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 39325 times
Last edited by spiffydudex on Thu Dec 01, 2011 10:16 pm, edited 23 times in total.

User avatar
Linegod
Developer
Posts: 1630
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

#2 Post by Linegod » Sat Aug 08, 2009 9:59 am

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

spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

#3 Post by spiffydudex » Wed Aug 12, 2009 10:13 am

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.

Caracarn
Posts: 17
Joined: Thu Nov 27, 2008 6:30 pm

#4 Post by Caracarn » Fri Aug 14, 2009 2:36 am

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.

spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

#5 Post by spiffydudex » Fri Aug 14, 2009 9:52 am

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

User avatar
chrisgapske
Cacti User
Posts: 278
Joined: Tue May 22, 2007 7:56 am
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL

#6 Post by chrisgapske » Fri Aug 14, 2009 9:57 am

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.

spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

#7 Post by spiffydudex » Fri Aug 14, 2009 10:39 am

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: Select all

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: Select all

   
//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.
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]

User avatar
chrisgapske
Cacti User
Posts: 278
Joined: Tue May 22, 2007 7:56 am
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL

#8 Post by chrisgapske » Fri Aug 14, 2009 11:19 am

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

spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

#9 Post by spiffydudex » Fri Aug 14, 2009 11:38 am

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.

User avatar
chrisgapske
Cacti User
Posts: 278
Joined: Tue May 22, 2007 7:56 am
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL

#10 Post by chrisgapske » Fri Aug 14, 2009 1:40 pm

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.

spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

#11 Post by spiffydudex » Fri Aug 14, 2009 2:35 pm

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.

Bingobango
Posts: 6
Joined: Mon Dec 17, 2007 2:39 am
Location: Terra Firma

#12 Post by Bingobango » Sat Aug 15, 2009 12:45 pm

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

spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

#13 Post by spiffydudex » Sat Aug 15, 2009 1:01 pm

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

Caracarn
Posts: 17
Joined: Thu Nov 27, 2008 6:30 pm

#14 Post by Caracarn » Mon Aug 17, 2009 12:41 am

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
Sites.JPG
GPS Map Screenshot
Sites.JPG (59.33 KiB) Viewed 38828 times

spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

#15 Post by spiffydudex » Tue Aug 18, 2009 3:47 pm

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

Post Reply