GPS Maps for Cacti

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
lcano
Cacti User
Posts: 190
Joined: Thu Oct 09, 2008 5:46 pm
Location: Spain

Post by lcano »

I guess I have a similar issue than other people, but no way to step forward.

Pluging succesfully installed like another plugins. Platform:

cacti: 0.8.7g
PIA: 2.8
PHP5
gpsmap1.53.zip


No problem to show the map, as I think there should be no problem with the API KEY. Then I go to devices and insert the coordinates manually, but no hosts :-(

I tried to remove the gpsXML.xml file. And now I cannot see that cacti re-create it again.

So, I can see the map, but no hosts inside. Any other troubleshooting tip?
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Post by spiffydudex »

lcano wrote:I guess I have a similar issue than other people, but no way to step forward.

No problem to show the map, as I think there should be no problem with the API KEY. Then I go to devices and insert the coordinates manually, but no hosts :-(

I tried to remove the gpsXML.xml file. And now I cannot see that cacti re-create it again.

So, I can see the map, but no hosts inside. Any other troubleshooting tip?

Thanks, I have been waiting for other people to encounter this issue as I cannot seem to reproduce it.

It creates the gpsXML.xml file, does it fill it with data relevant to the hosts you put data in for? (You should be able to open this with notepad or any other text editor)
Depending on what that file contains will help me further understand where the problem lies.
User avatar
lcano
Cacti User
Posts: 190
Joined: Thu Oct 09, 2008 5:46 pm
Location: Spain

Post by lcano »

spiffydudex wrote: It creates the gpsXML.xml file, does it fill it with data relevant to the hosts you put data in for? (You should be able to open this with notepad or any other text editor)
Depending on what that file contains will help me further understand where the problem lies.
Here is my first problem. After deleting the gpsXML.xml file, it doesn't create it again. My XML folder looks like this:

Code: Select all

$:/aplicaciones/cacti/plugins/gpsmap/XML> ls -lrt
total 4
-rw-r--r-- 1 cactiuser users 41 2009-05-09 13:13 index.php
-rw-r--r-- 1 cactiuser users  0 2010-04-27 14:27 gpsKML.kml
Any specific action to re-create it?
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Post by spiffydudex »

lcano wrote:
spiffydudex wrote: It creates the gpsXML.xml file, does it fill it with data relevant to the hosts you put data in for? (You should be able to open this with notepad or any other text editor)
Depending on what that file contains will help me further understand where the problem lies.
Here is my first problem. After deleting the gpsXML.xml file, it doesn't create it again. My XML folder looks like this:

Code: Select all

$:/aplicaciones/cacti/plugins/gpsmap/XML> ls -lrt
total 4
-rw-r--r-- 1 cactiuser users 41 2009-05-09 13:13 index.php
-rw-r--r-- 1 cactiuser users  0 2010-04-27 14:27 gpsKML.kml
Any specific action to re-create it?
The XML file is generated on page reload by the web server. Is that directory writable by your web server user?
Simple question I know, but sometimes it is the main problem. I only ask that because usual web server users are named differently than "cactiuser".
User avatar
lcano
Cacti User
Posts: 190
Joined: Thu Oct 09, 2008 5:46 pm
Location: Spain

Post by lcano »

May be simple, but needed when I don't really know how the pluging works :oops:

Done, correct permisions to the folder, and now the file is generated again. But no filled.

Code: Select all

:/aplicaciones/cacti/plugins/gpsmap/XML> ls -lrt
total 8
-rw-r--r-- 1 cactiuser users  41 2009-05-09 13:13 index.php
-rw-r--r-- 1 cactiuser users   0 2010-04-27 14:27 gpsKML.kml
-rw-r--r-- 1 wwwrun    www   214 2010-08-02 09:36 gpsXML.xml
User avatar
lcano
Cacti User
Posts: 190
Joined: Thu Oct 09, 2008 5:46 pm
Location: Spain

Post by lcano »

Correction.... Today is Monday and I'm still slept.

XML file is generated (I look at KML file instead of XML file). XML file generated and also filled with information. But no icons in the map.

$:/aplicaciones/cacti/plugins/gpsmap/XML> more gpsXML.xml
<markers>
<marker id="4" name="XXXXXXXX" address="X.X.X.X" lat="XX.4028701782" lng="XX.6994769573" type="" templateId="0" availability="100.00000" ra
dius="0" status="up" latency="1.09493" />
</markers>
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Post by spiffydudex »

Ah ok, Hmm in that case the error is somewhere in the gload() function starting on line 234 in the gpsmap.php. The point at which the gps data is loaded is on line 250. If your xml location is different with respect to the gpsmap folder then make that change here.

Also zoom 100% out and ensure that there is no point as the GPS coords may be wrong. A negative (-) can make a big difference in location.

Is there any output in your error log?

I am going to work on a debug mode for this plugin as I think it will help a lot of people that have issues.
User avatar
lcano
Cacti User
Posts: 190
Joined: Thu Oct 09, 2008 5:46 pm
Location: Spain

Post by lcano »

Zoom out 100% and no icon either :(

Also tried changing the GDownloaddir to an absolute link instead a relative one:

Code: Select all

        //set to our XML path
//      GDownloadUrl("./XML/gpsXML.xml", function(data) {
        GDownloadUrl("/aplicaciones/cacti/plugins/gpsmap/XML/gpsXML.xml", function(data) {
          var xml = GXml.parse(data);
Same problem. No incons :(

Regarding error.log:

I get this error, but only when I press IP ANALYSYS WITH COVERAGE, so I thing it is not what we are looking for

Code: Select all

[Mon Aug 02 10:49:43 2010] [error] [client 10.113.99.117] PHP Notice:  Undefined index:  0 in /aplicaciones/cacti-0.8.7g_cactiuser/plugins/gpsmap/includes/coveragexml.php on line 53, referer: http://cacticore.wnet/plugins/gpsmap/gpsmap.php
[Mon Aug 02 10:49:43 2010] [error] [client 10.113.99.117] PHP Notice:  Undefined index:  0 in /aplicaciones/cacti-0.8.7g_cactiuser/plugins/gpsmap/includes/coveragexml.php on line 53, referer: http://cacticore.wnet/plugins/gpsmap/gpsmap.php
[Mon Aug 02 10:49:43 2010] [error] [client 10.113.99.117] PHP Notice:  Undefined index:  0 in /aplicaciones/cacti-0.8.7g_cactiuser/plugins/gpsmap/includes/coveragexml.php on line 53, referer: http://cacticore.wnet/plugins/gpsmap/gpsmap.php
No error if I only reload the GPS page.

More info, I tried both with Firefox and IExplorer, same behaviour
User avatar
lcano
Cacti User
Posts: 190
Joined: Thu Oct 09, 2008 5:46 pm
Location: Spain

Post by lcano »

This is absolutely crazy :o

Some more info that may be could help you to troubleshoot it. Depending on which is the web browser I'm using, it works. :x

Firefox (v3.6.8) : It doesn't work
IExplorer (v6.0.2900): I works
Iceweasel v2.0.0.19 (debian platform): Also working
Epiphany (Gnome web browser v2.14.3): Working as well

What I don't know is how to troubleshoot it to isolate the issue. :( Anyway, that debug options could be really interesting :wink:

So far, It seems to be a compatibility issue with the web browsers. May be other people with different web browsers can also try to
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please install Firebug in FF3.6.8 and use the "Console" tab in Firebug to determine the JS error.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
lcano
Cacti User
Posts: 190
Joined: Thu Oct 09, 2008 5:46 pm
Location: Spain

Post by lcano »

Strange for me. Below the output of both screenshots, with error console and also firebug console:

It seems firefox doesn't find gpsXML.xml file. Sounds stupid when other browsers found it perfectly. In addition, firebug console reports OK. :o
Attachments
Firefox Error Console
Firefox Error Console
gps_console_error.PNG (28.76 KiB) Viewed 4141 times
Firebug console
Firebug console
firebug_consoloe.PNG (10.89 KiB) Viewed 4141 times
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Post by Voiper99 »

Absolutely spectacular plugin spiffydudex. Thanks a lot for your hard work, you have done a brilliant job!!!

I have just installed version 1.53 on Ubuntu installed on Cacti 8.7e installed through source and it worked perfectly in a matter of minutes. I can't believe such a great plugin was so easy to install! :)

By the way, thanks a lot to the user who posted the fact that it did not work for them in Firefox but did work in IE, as I have the same issue. If it wasn't for you I would have thought I broke something when it didn't work in Firefox and would have wasted countless hours (and tears! :P) trying to get it to work.

And thanks to the user who posted the link to http://www.gpsvisualizer.com/geocoder/ - it worked perfectly for me.

Once again, brilliant work spiffydudex :)
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Post by spiffydudex »

Thanks a lot for your comments. Really encouraging :)

I am looking into the issues with Firefox. I have updated to FF3.6.8 on my Windows 7 machine and cannot seem to get the error. I'll try on ubuntu once I get it installed

Update: I tried FF 3.6.8 on my netbook remix and it still seems to work fine. I'm partially at a loss for what to try next.
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Post by Voiper99 »

spiffydudex wrote:Thanks a lot for your comments. Really encouraging :)

I am looking into the issues with Firefox. I have updated to FF3.6.8 on my Windows 7 machine and cannot seem to get the error. I'll try on ubuntu once I get it installed

Update: I tried FF 3.6.8 on my netbook remix and it still seems to work fine. I'm partially at a loss for what to try next.
Not a problem at all :)

hmmm, that is extremely strange that you cannot re produce the issue. What PIA and Cacti version are you using?

I am running Windows Vista and Firefox (I am not on the same laptop at the moment so do not know what version I was running, but I believe it is the latest one).

I will try using Firefox on my Ubuntu and Windows 7 boxes and see if they experience the issue and I will report back my findings as well as the Firefox versions they are all running. Also, if I get the time I will install Windows XP and as well as Firefox and will let you know how that goes too.

By the way, I've got a minor suggestion for the plugin. I have noticed it is not possible to edit the Templates and that you can only add new ones or delete existing ones, so if you want to edit an existing one you must first delete it and then re create it. Would you be able to make editing them available please??

Thanks, and keep up the great work!
User avatar
lcano
Cacti User
Posts: 190
Joined: Thu Oct 09, 2008 5:46 pm
Location: Spain

Post by lcano »

spiffydudex wrote:Thanks a lot for your comments. Really encouraging :)

I am looking into the issues with Firefox. I have updated to FF3.6.8 on my Windows 7 machine and cannot seem to get the error. I'll try on ubuntu once I get it installed

Update: I tried FF 3.6.8 on my netbook remix and it still seems to work fine. I'm partially at a loss for what to try next.
Uhmmm I'm running XP. Somehow, firefox doesn't find the xml file. If you are not able to reproduce the issue, may be something related to installed plugins?.....
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests