GPS Maps for Cacti

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
geskorup
Posts: 24
Joined: Thu Nov 23, 2006 1:08 am

Re: GPS Maps for Cacti

Post by geskorup »

spiffydudex wrote: You have to remember that the data values are updated with your poller, not immediately. In order to get a coverage overlay, you will need to put devices in a group ID that is not 0. So, create a map template for the Motorola AP device type, set it as AP to True. Now when you edit the device properties you should get an extra box for Radius, Start and Stop degree. Radius will be automatically calculated to the furthest non-AP device in the group. If you do not have any other devices in the group, a radius of 0 will be used,(no devices to map distance). You can set a static radius if so desired. (I will have to check the code to see if this works without having any other devices in the group).

If setting a static radius does not work, I will do a bit of checking to see why the static radius is not being compliant. My suggestion for the time being is to include a dummy SM (even at the same coordinates as the AP or slightly off by a degree point) this will allow the radius generation portion of the code to work.


As for the saving issues, I will look into those, I didn't change much code in the setup file, so this is news to me.
I was playing with it for a good three hours. I understand that the map is updated at the end of each poller run. I did try setting a group other than zero. I do have a map template for device type Canopy AP that is set to AP=true. I do have start/stop degrees and a fixed radius value defined for each host. Since I'm not monitoring SMs, I guess that's the issue. I just figured it would do the radius overlay using the radius defined per host. That would be great if you could get it working that way!

Let me know if you need me to look deeper into the settings save issue, just tell me what to do and where to look (I'm not a code guy). :D
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Re: GPS Maps for Cacti

Post by spiffydudex »

geskorup wrote:
spiffydudex wrote: You have to remember that the data values are updated with your poller, not immediately. In order to get a coverage overlay, you will need to put devices in a group ID that is not 0. So, create a map template for the Motorola AP device type, set it as AP to True. Now when you edit the device properties you should get an extra box for Radius, Start and Stop degree. Radius will be automatically calculated to the furthest non-AP device in the group. If you do not have any other devices in the group, a radius of 0 will be used,(no devices to map distance). You can set a static radius if so desired. (I will have to check the code to see if this works without having any other devices in the group).

If setting a static radius does not work, I will do a bit of checking to see why the static radius is not being compliant. My suggestion for the time being is to include a dummy SM (even at the same coordinates as the AP or slightly off by a degree point) this will allow the radius generation portion of the code to work.


As for the saving issues, I will look into those, I didn't change much code in the setup file, so this is news to me.
I was playing with it for a good three hours. I understand that the map is updated at the end of each poller run. I did try setting a group other than zero. I do have a map template for device type Canopy AP that is set to AP=true. I do have start/stop degrees and a fixed radius value defined for each host. Since I'm not monitoring SMs, I guess that's the issue. I just figured it would do the radius overlay using the radius defined per host. That would be great if you could get it working that way!

Let me know if you need me to look deeper into the settings save issue, just tell me what to do and where to look (I'm not a code guy). :D
I'm not sure what is going on with you not being able to save. On my test install everything works and the values are changed in the DB. Later today I am going to do a new cacti install (start 100% clean) and see what happens. I have confirmed the issue with the static radius not being set.

tosage wrote:Hello, thanks for the new version of the module.

My First feedback :

Nothing displaying on the map :)

Thanks for any advice
Please check your XML folder. Is there an all.xml? If so, is it populated with entries?
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: GPS Maps for Cacti

Post by tosage »

spiffydudex wrote:
geskorup wrote:
spiffydudex wrote: You have to remember that the data values are updated with your poller, not immediately. In order to get a coverage overlay, you will need to put devices in a group ID that is not 0. So, create a map template for the Motorola AP device type, set it as AP to True. Now when you edit the device properties you should get an extra box for Radius, Start and Stop degree. Radius will be automatically calculated to the furthest non-AP device in the group. If you do not have any other devices in the group, a radius of 0 will be used,(no devices to map distance). You can set a static radius if so desired. (I will have to check the code to see if this works without having any other devices in the group).

If setting a static radius does not work, I will do a bit of checking to see why the static radius is not being compliant. My suggestion for the time being is to include a dummy SM (even at the same coordinates as the AP or slightly off by a degree point) this will allow the radius generation portion of the code to work.


As for the saving issues, I will look into those, I didn't change much code in the setup file, so this is news to me.
I was playing with it for a good three hours. I understand that the map is updated at the end of each poller run. I did try setting a group other than zero. I do have a map template for device type Canopy AP that is set to AP=true. I do have start/stop degrees and a fixed radius value defined for each host. Since I'm not monitoring SMs, I guess that's the issue. I just figured it would do the radius overlay using the radius defined per host. That would be great if you could get it working that way!

Let me know if you need me to look deeper into the settings save issue, just tell me what to do and where to look (I'm not a code guy). :D
I'm not sure what is going on with you not being able to save. On my test install everything works and the values are changed in the DB. Later today I am going to do a new cacti install (start 100% clean) and see what happens. I have confirmed the issue with the static radius not being set.

tosage wrote:Hello, thanks for the new version of the module.

My First feedback :

Nothing displaying on the map :)

Thanks for any advice
Please check your XML folder. Is there an all.xml? If so, is it populated with entries?
Yep i have a lot of xml, kml and -top.html file in the XML folder
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Re: GPS Maps for Cacti

Post by spiffydudex »

tosage wrote:Yep i have a lot of xml, kml and -top.html file in the XML folder
Open the all.xml and see if there are entries in it. If there isn't double check a device to make sure it has coordinates.
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: GPS Maps for Cacti

Post by tosage »

Yep in the al.xml i have one marker
I tested with Firefox Seven 10.2 or Internet Explorer 9 Seven
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
Swiftie
Posts: 6
Joined: Thu Feb 23, 2012 5:16 pm

Re: GPS Maps for Cacti

Post by Swiftie »

spiffydudex wrote: As for the saving issues, I will look into those, I didn't change much code in the setup file, so this is news to me.
I know I had issues with not being able to save any settings in cacti 0.8.7i until I applied the patch for it here -> http://www.cacti.net/download_patches.php not sure if this is linked
geskorup
Posts: 24
Joined: Thu Nov 23, 2006 1:08 am

Re: GPS Maps for Cacti

Post by geskorup »

Swiftie wrote:
spiffydudex wrote: As for the saving issues, I will look into those, I didn't change much code in the setup file, so this is news to me.
I know I had issues with not being able to save any settings in cacti 0.8.7i until I applied the patch for it here -> http://www.cacti.net/download_patches.php not sure if this is linked
Yep, that fixed it.
deekdeek
Posts: 3
Joined: Wed Mar 21, 2012 7:36 pm

help with gpsmaps running on port 88

Post by deekdeek »

Hi i have cacti Version 0.8.7i with gpsmaps 1.70

i have problem and it took me forever to figure it out, the port that Apache listens on is 88, i was not seeing the pin onthe google map but i was able to hover over and get the info. then when i inspect html , it is because it is looking for the graphic on port 80, not 88. i think i found the file to correct this but i am unsure how to add a port number to the string can anyone help.
[20:42:04.315] GET http://xx.xx.xx.xx:88/plugins/gpsmap/XML/all.xml [HTTP/1.1 200 OK 57ms]
[20:42:04.840] GET http://xx.xx.xx.xx/plugins/gpsmap/image ... /Green.png [HTTP/1.1 404 Not Found 52ms]

second line tries from port 80 not 88

is the proper file to fix this located in /var/www/cacti/plugins/gpsmap/includes/polling/iconskml.php
maybe this line:

$iconlist .= "<href>http://".$kmlDomain.$config['url_pat
h']."plugins/gpsmap/images/icons/".$icon.".".$tail."</href>";
deekdeek
Posts: 3
Joined: Wed Mar 21, 2012 7:36 pm

Re: help with gpsmaps running on port 88

Post by deekdeek »

deekdeek wrote:Hi i have cacti Version 0.8.7i with gpsmaps 1.70

i have problem and it took me forever to figure it out, the port that Apache listens on is 88, i was not seeing the pin onthe google map but i was able to hover over and get the info. then when i inspect html , it is because it is looking for the graphic on port 80, not 88. i think i found the file to correct this but i am unsure how to add a port number to the string can anyone help.
[20:42:04.315] GET http://xx.xx.xx.xx:88/plugins/gpsmap/XML/all.xml [HTTP/1.1 200 OK 57ms]
[20:42:04.840] GET http://xx.xx.xx.xx/plugins/gpsmap/image ... /Green.png [HTTP/1.1 404 Not Found 52ms]

second line tries from port 80 not 88

is the proper file to fix this located in /var/www/cacti/plugins/gpsmap/includes/polling/iconskml.php
maybe this line:

$iconlist .= "<href>http://".$kmlDomain.$config['url_pat
h']."plugins/gpsmap/images/icons/".$icon.".".$tail."</href>";
Bueller?
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Re: help with gpsmaps running on port 88

Post by spiffydudex »

deekdeek wrote:
deekdeek wrote:Hi i have cacti Version 0.8.7i with gpsmaps 1.70

i have problem and it took me forever to figure it out, the port that Apache listens on is 88, i was not seeing the pin onthe google map but i was able to hover over and get the info. then when i inspect html , it is because it is looking for the graphic on port 80, not 88. i think i found the file to correct this but i am unsure how to add a port number to the string can anyone help.
[20:42:04.315] GET http://xx.xx.xx.xx:88/plugins/gpsmap/XML/all.xml [HTTP/1.1 200 OK 57ms]
[20:42:04.840] GET http://xx.xx.xx.xx/plugins/gpsmap/image ... /Green.png [HTTP/1.1 404 Not Found 52ms]

second line tries from port 80 not 88

is the proper file to fix this located in /var/www/cacti/plugins/gpsmap/includes/polling/iconskml.php
maybe this line:

$iconlist .= "<href>http://".$kmlDomain.$config['url_pat
h']."plugins/gpsmap/images/icons/".$icon.".".$tail."</href>";
Bueller?

A little late, sometimes I don't recieve email updates about topic replies. Not sure why it works intermittently. Anyways better late than never.

To change that, look in the icons.php file in the includes folder, line 19:

Code: Select all

$iconlist .= "".$icon.".image = 'http://".$server.$url_path."plugins/gpsmap/images/icons/".$icon.".".$tail."';\n";
change to:

Code: Select all

$iconlist .= "".$icon.".image = 'http://".$server.":PORTHERE".$url_path."plugins/gpsmap/images/icons/".$icon.".".$tail."';\n";
For KML applications open icons KML in the includes/polling folder, line 19:

Code: Select all

$iconlist .= "<href>http://".$kmlDomain.$config['url_path']."plugins/gpsmap/images/icons/".$icon.".".$tail."</href>";
change to:

Code: Select all

$iconlist .= "<href>http://".$kmlDomain.":PORTHERE".$config['url_path']."plugins/gpsmap/images/icons/".$icon.".".$tail."</href>";

That should do it.
pk2121
Posts: 1
Joined: Tue May 15, 2012 8:08 am

Re: GPS Maps for Cacti

Post by pk2121 »

We have the icons working after changing the icons.php file

When viewing the source in the browser there are a couple of lines for the picture locations which are wrong
DrkGreen.image = 'http://xx.xx.complugins/gpsmap/images/i ... kGreen.png';

In the icons.php file there is a line
$iconlist .= "".$icon.".image = 'http://".$server.$url_path."plugins/gpsmap/images/icons/".$icon.".".$tail."';\n";

we changed this line to the line below and now everything works fine:
$iconlist .= "".$icon.".image = 'http://".$server.$url_path."/cacti/plugins/gpsmap/images/icons/".$icon.".".$tail."';\n";
alerm
Posts: 2
Joined: Mon Jun 11, 2012 9:43 am

Re: GPS Maps for Cacti

Post by alerm »

Hi!

I have a problem with this plugin. I can't view host on the map. All xml and other files is generated correctly, when i exporting kml file directly to google maps it show me my devices. All icons urls is ok. I don't know what is wrong.

I tested with Firefox 13, Internet Explorer 9.0.4, Chrome 19.0.1084.52, Opera 11.64 on Windows 7 and on Linux Ubuntu.

cacti - Version 0.8.7e
gpsmap - GPSMaps 1.7


p.s. - sorry for my bad english
semakka
Posts: 20
Joined: Mon Oct 23, 2006 6:37 am

Re: GPS Maps for Cacti

Post by semakka »

I have all set up fine and nothing is showed on the map.
I fund this in the logs:
PHP Notice: Undefined variable: v in /var/www/cacti/plugins/gpsmap/includes/setup/database.php on line 45, referer: http://10.15.0.21/cacti/plugins.php
PHP Warning: file_get_contents(./plugins/gpsmap/XML/all-top.html): failed to open stream: No such file or directory in /var/www/cacti/plugins/gpsmap/gpsmap.php on line 20
PHP Warning: file_get_contents(./plugins/gpsmap/XML/all-top.html): failed to open stream: No such file or directory in /var/www/cacti/plugins/gpsmap/gpsmap.php on line 20, referer: http://10.15.0.21/cacti/host.php?action=edit&id=1
any idea?
Nothing in the XML folder even if the permissions are set corrently...
cacti 0.8.8a, gpsmap 1.7

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

Re: GPS Maps for Cacti

Post by spiffydudex »

semakka wrote:I have all set up fine and nothing is showed on the map.
I fund this in the logs:
PHP Notice: Undefined variable: v in /var/www/cacti/plugins/gpsmap/includes/setup/database.php on line 45, referer: http://10.15.0.21/cacti/plugins.php
PHP Warning: file_get_contents(./plugins/gpsmap/XML/all-top.html): failed to open stream: No such file or directory in /var/www/cacti/plugins/gpsmap/gpsmap.php on line 20
PHP Warning: file_get_contents(./plugins/gpsmap/XML/all-top.html): failed to open stream: No such file or directory in /var/www/cacti/plugins/gpsmap/gpsmap.php on line 20, referer: http://10.15.0.21/cacti/host.php?action=edit&id=1
any idea?
Nothing in the XML folder even if the permissions are set corrently...
cacti 0.8.8a, gpsmap 1.7

thanks
S
I'll update to the latest Cacti and see if I can figure out what is going on. It may take me a little bit of time, all I have are IIS boxes around me...My beloved Linux and Apache have gone missing for the time being. If it works in IIS, I'll get a VM or something that runs Debian up and going.

Seems to be an issue in HTML/XML creation portion. When in doubt try chmod 777 on the XML folder. Not the best, but its worth a shot. Also, remember that the update occurs with the poller.
semakka
Posts: 20
Joined: Mon Oct 23, 2006 6:37 am

Re: GPS Maps for Cacti

Post by semakka »

yep, that worked. that means permissions to wrong user :roll:
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests