GPS Maps for Cacti

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
xefil
Cacti User
Posts: 233
Joined: Tue Jun 20, 2006 2:48 am
Location: Italy
Contact:

Post by xefil »

Good morning spiffydudex,

Ok, the host_icons.php was the old one. I've copied the new over the old, now it works. Don0t ask mw WHY with the old version on my map were hosts on Texas, no idea! :)
Surely are not insert by me with wrong coords, 'cause they were hosts with different IPs and hostnames as mine.

for now all seems working perfectly, great plugin!

Bye,

Simon
Øyvind
Posts: 12
Joined: Thu Mar 26, 2009 7:25 am

Post by Øyvind »

spiffydudex wrote:@Øyvind
Make sure you are using the newest version 1.41. If you updated I think that the custom_hosts.php is not the newest version. there are some changes in the new version.
Ah yes, I got this working after a reboot, so for some reason it just wouldn't update the maps on my pc at first. Great plugin!

Just one small request. As I use it for sites that are not radio/wifi/wimax (although some are), could it be possible to "tag" devices as either a tower (for radio/wifi/wimax), and untagged devices won't have the coverage circle?
And could radio coverage show point-to-point radio links or sectors instead of a circle?
junkiee
Posts: 2
Joined: Fri Sep 04, 2009 10:51 am

Post by junkiee »

hey guys, have apache2 installed on a w2k3 server cacti runs great, but I can't get the GPs map plugin to work. I have configured the google APi key, GPS and all teh settings in the settings section for gpsmap but when I click on the tab, I get a HTTP 500 error.

I have given the XML folder write permissions, so I am lost as of what to do next.

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

Post by spiffydudex »

�yvind wrote: Just one small request. As I use it for sites that are not radio/wifi/wimax (although some are), could it be possible to "tag" devices as either a tower (for radio/wifi/wimax), and untagged devices won't have the coverage circle?
And could radio coverage show point-to-point radio links or sectors instead of a circle?
Thanks for the interest. With the way this semester is turning out with some of my classes. it looks like the next time I will be able to actually dedicate time to this is in December. (Sorry :( ) In either case I will try and answer questions when I can. I will keep track of the requests that you guys offer so I can implement some when I get the time.

Yes, I do like your suggestion alot.
hey guys, have apache2 installed on a w2k3 server cacti runs great, but I can't get the GPs map plugin to work. I have configured the google APi key, GPS and all teh settings in the settings section for gpsmap but when I click on the tab, I get a HTTP 500 error.
I have given the XML folder write permissions, so I am lost as of what to do next.
thanks,
I personally have not run into any 500 errors and am not sure why you are running into them... you may be having issues with actual windows file permissions...I am not too sure. The tar file was made on a linux based machine, and as such there are all of the filepermissions that follow with it. Although I do not think those should clash. Especially when extracting from a tar on a windows machine supposedly removes all of the file permissions. Hopefully you figured it out.[/quote]
Jason.S
Posts: 35
Joined: Thu Jun 11, 2009 9:28 am

Post by Jason.S »

I am guessing making a cone or triangle would be too hard for the main AP/Tower? That would work perfect for us.



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

Post by spiffydudex »

Jason.S wrote:I am guessing making a cone or triangle would be too hard for the main AP/Tower? That would work perfect for us.



Thanks,
Jason
Ok, this is just off the top of my head and I have not tried it. But it should effectively make the tower display a custom Icon.

In the gpsmap.php starting on line 304

Code: Select all

function createMarker(displayupdown, id, point, name, address, type, availability, status, latency) {

     if(displayupdown){
		var marker = new GMarker(point, customIcons[status]);
	}else{
		var marker = new GMarker(point, customIcons[type]);
      }
This defines whether or not the host is going to be set as an up/down type or as a static marker.

So make the change to this:

Code: Select all

function createMarker(displayupdown, id, point, name, address, type, availability, status, latency) {

     if(displayupdown && (type != "AP/Tower")){
		var marker = new GMarker(point, customIcons[status]);
	}else{
		var marker = new GMarker(point, customIcons[type]);
      }
Basically what is going to happen is we are setting the up/down recovering status for everything EXCEPT the AP/Tower type, it will get a static custom Icon.

So in the host_icons.php make the necessary changes to change the code.

Code: Select all

 customIcons["AP/Tower"] = CUSTOM VAR ICON

I think that will do it, mind you I have not tried it.

Hope that helps
Andy
gmi
Posts: 1
Joined: Mon Sep 28, 2009 9:24 am

Post by gmi »

I've juste installed the plugin and I have this error : Parse error: syntax error, unexpected $end in /var/www/htdocs/cacti/plugins/gpsmap/gpsmap.php on line 330

Any idea ?
VegardAa
Posts: 6
Joined: Wed Oct 14, 2009 4:08 am

Post by VegardAa »

Hello! First of all, thanks for a great plugin.

We've got many devices very close together on the map. And I was wondering if it's possible to have the servers displayed with a custome image/color on the map?

It's hard to see what's down, if it's a Switch, Server, Wireless link, etc. I know I can click on the devices to find out what it is. But different colors or images would be great!

-Thanks!
-Vegard
VegardAa
Posts: 6
Joined: Wed Oct 14, 2009 4:08 am

Post by VegardAa »

spiffydudex wrote:
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]
I've done this. But the colors won't change.

I editet Host_Icons and custom_hosts. The case number is the same as in the host_template table. I changed the color to blue on ID 2 (case2, named "Servers"). I know it's case sensetive and I've checked everyting. Still no luck.. Any ideas?
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Post by spiffydudex »

Currently there is no support for multiple color UP/Down/Recovering status.

This was one of the features I did not have enough time to implement. You can have static colors for a host by disabling the up/down in the settings, this applies to all hosts, or you can do the code tweak described in my previous post.

Sorry, but I will not have time to come up with a way to solve this until December, this is when I get out of school.
VegardAa
Posts: 6
Joined: Wed Oct 14, 2009 4:08 am

Post by VegardAa »

Ok. I'll try to add custome images then. Thanks! :)
kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Undefined offset: 3

Post by kenny29 »

:P
Jason.S
Posts: 35
Joined: Thu Jun 11, 2009 9:28 am

Export

Post by Jason.S »

Howdy,

I would love to have a way to export the data from GPSMap plugin to a google earth KML or even a Maps.Google.com KML. We have 400+ items in this plugin and would love to not have to double manage this and google Earth with the data that should be the same.

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

Re: Export

Post by spiffydudex »

Jason.S wrote:Howdy,

I would love to have a way to export the data from GPSMap plugin to a google earth KML or even a Maps.Google.com KML. We have 400+ items in this plugin and would love to not have to double manage this and google Earth with the data that should be the same.

Jason

Looking at KML, it seems fairly easy to implement the scheme. I will not be able to begin work on updates for this plugin until Finals week is over. (Huzzah one more week) If you are looking to implement this sooner, you can look at the pointsxml.php in the includes folder and just format the data to the KML spec.

This has been added to my list of updates. I will get around to doing this, although for a new release it might take a few weeks.


Thanks,
Andy
Jason.S
Posts: 35
Joined: Thu Jun 11, 2009 9:28 am

Post by Jason.S »

Hello,

Great to hear! I will look and see what I can do until you come out with an update. This plugin is just awesome.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests