GPS Maps for Cacti

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

Re: .... argh

Post by zorrosam »

spiffydudex wrote:
zorrosam wrote: only for clarify. In your opinion which is the best way for generate the api key?
my server has a private ip address and is natted in internet with a private one.
Cacti is only accessible from the private LAN.
The public ip doesn't have a dns record registered.
Which is the ip that i have to use for generate the api key?

let me know.
zorro
If I remember correctly, I used the localIP address. For my local test website, I put "localhost" in as the sitename to generate the API key.

The CSS error is not a big one. That is just telling you that the "Border-Radius" was not used anywhere on the page so it was dropped.

nobi67 wrote:Following your suggestion to zorrosam I opened the console on Firefox when displaying the map with and without templates. What I got was the following:

using templates

Code: Select all

Errore: invalid regular expression flag b
File sorgente: http://dvbb0mo1/cacti/plugins/gpsmap/gpsmap.php
Riga: 167, Colonna: 93
Codice sorgente:
<b>Notice</b>:  Undefined offset:  1 in <b>C:\cacti\plugins\gpsmap\includes\customicons.php</b> on line <b>9</b><br /> 
no map displayed;

non using templates no errors and the map is displayed.
I hope this may be helpfull.
Thanks.
I'm looking for the cause of the regular expression error. but the line number doesn't make much sense. Are you selecting an icon for all three properties in the template?
ok ...

two cases now

1) my prod installation (0.87d) now works. I have deleted all the custom templates ... the map is generated and the xml populated correctly (the XML was populated even before ... the problem was only on the display of the icons maybe). So the problem maybe is in the code of the new function for generate icons templates.

2) my test installation (0.87e) doesn't work. After i have deleted the XML i can create the newer one ... but only empty ... without any coordinates.

I have deleted the custom templates ... ma the result is the same. No icons on the map even if i have populated my hosts with the coordinates.

let me know

zorro
nobi67
Posts: 6
Joined: Wed Apr 21, 2010 9:45 am

Post by nobi67 »

Yes, I selected an icon for all the three states.

I'm not sure but I suppose the problem could be generated at line 9 of customicons.php
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Post by spiffydudex »

I now have an install of 0.87e.

I made a few changes to the customicons.php, this will help get rid of some of the undefined offsets. Still trying to figure out the regular expression error.

I'm still trying to find out about those other errors.
I changed some of the way the displays work just in case the % for the width was throwing things off. I'm kinda fishing in the dark, I hope this it.
Attachments
gpsmap1.53.zip
(34.09 KiB) Downloaded 512 times
nobi67
Posts: 6
Joined: Wed Apr 21, 2010 9:45 am

Post by nobi67 »

It works :D
Really great job spiffy, thank you very much. :wink:
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

no icons in 0.87e ver

Post by zorrosam »

spiffydudex wrote:I now have an install of 0.87e.

I made a few changes to the customicons.php, this will help get rid of some of the undefined offsets. Still trying to figure out the regular expression error.

I'm still trying to find out about those other errors.
I changed some of the way the displays work just in case the % for the width was throwing things off. I'm kinda fishing in the dark, I hope this it.
no way in my test installation

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; MS-RTC LM 8)
Timestamp: Wed, 28 Apr 2010 10:14:14 UTC


Message: 'documentElement' is null or not an object
Line: 219
Char: 11
Code: 0
URI: https://achille/cacti/plugins/gpsmap/gpsmap.php


the icons are not displayed in the map

zorro
armstrongzhao
Posts: 28
Joined: Mon Feb 02, 2009 10:21 am
Location: CHINA

Post by armstrongzhao »

After installed the plugin, I can't change, create or edit devices. There is a note: Error:save Failed.

But when I uninstall the plugin, cacti works fine. I can edit devices again.

My OS is win2003, cacti 0.8.7e, PA 2.6 GPSmap 1.53
Attachments
gpssaving error.png
gpssaving error.png (33.46 KiB) Viewed 7088 times
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

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

Post by spiffydudex »

armstrongzhao wrote:After installed the plugin, I can't change, create or edit devices. There is a note: Error:save Failed.

But when I uninstall the plugin, cacti works fine. I can edit devices again.

My OS is win2003, cacti 0.8.7e, PA 2.6 GPSmap 1.53
Its as if the latitude and longitude columns in the host table did not get added. Not really sure why that happened as they are in the database.php to be added. The column adds are at line 18 in database.php

Did you comment out the gpsmap_setup_database() in setup.php on line 39? It is safe to leave that uncommented, it will not erase anything. Previously that had to be commented to keep from overwriting data, that is not the case now.

If you want to manually create the columns.

Code: Select all

latitude     type= float(13,10) default = '0'
longitude    type= float(13,10) default = '0'
GPScoverage  type= varchar(3)   default = 'on'
Just the standard plug here, I don't have any real working experience with Windows IIS based hosts. So I don't have a whole lot of insight as to why that wouldn't work.
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Re: no icons in 0.87e ver

Post by spiffydudex »

zorrosam wrote:
spiffydudex wrote:I now have an install of 0.87e.

I made a few changes to the customicons.php, this will help get rid of some of the undefined offsets. Still trying to figure out the regular expression error.

I'm still trying to find out about those other errors.
I changed some of the way the displays work just in case the % for the width was throwing things off. I'm kinda fishing in the dark, I hope this it.
no way in my test installation

Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; MS-RTC LM 8)
Timestamp: Wed, 28 Apr 2010 10:14:14 UTC

Message: 'documentElement' is null or not an object
Line: 219
Char: 11
Code: 0
URI: https://achille/cacti/plugins/gpsmap/gpsmap.php

the icons are not displayed in the map

zorro
I'm looking as to why that isn't working, especially given the line number points to the function gload(); which is the event that tells it to output the map. What is confusing, is the character number. There isn't that many characters in that line. If you can give me any other information or error material, that would be helpful. Is there any errors in your PHP error log? If you have Firefox, there is a utility/extension called firebug, it has a better built in javascript debugging engine.
Diskbox
Posts: 9
Joined: Fri Jan 16, 2009 6:36 am

had icons in v 8.7e but now they've gone

Post by Diskbox »

ok this is odd. I downloaded from the first page and setup the plugin in the usual way. Everything went ok and I had pins on the map which changed colour etc.

Then I saw that version 1.53 was out on page 8 so replaced mine with this and now I have no icons. Have changed the permissions on the XML folder to everyone read/write to make sure it's not a permissions problem but still no joy.

Anyone have any ideas as it's driving me up the wall now?
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Post by spiffydudex »

I think it has something to do with differences in php versions. I.53 works with php5

if you want you can download the old versions here
http://spiffdev.com/

if you have any error logs or anything that could help me solve the issue that would be nice.
Diskbox
Posts: 9
Joined: Fri Jan 16, 2009 6:36 am

odd things afoot

Post by Diskbox »

Thanks for the speedy reply.

I've just gone back in to look again at the problem and clicked the gps tab to discover it's not all working. :roll:

I've not done anything since I emailed you other than reboot the system (it ran out of swap for some reason) so no whave no idea what happened.

If it happens again I'll grab all the logs and post whatever's relevant here to help you get to the bottom if it.

Off not to see if there's a section in your scripts to let me specify terrain as the default maptype.

Thanks again for the plugin!
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Post by spiffydudex »

I'm beginning to wonder if it has something to do with the PHP memory limit setting. I'll run some test when I get home. I know if you have large sets of data, you might be going over the memory limit for that php session, thus causing it to fail.
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Re: API problem

Post by smlick »

trungtano wrote:When I try to generate API key with my company then push it in GPS API key in cacti it sad:

The Google Maps API server rejected your request. This could be because the API key used on this site was registered for a different web site. You can generate a new key for this web site at
http://code.google.com/apis/maps/.

anybody know why?? Because my company web site have just resisted few days ago! Who stolen my web site ???
I got also this kind of problem!!!
I use last 1.5 version and tried a lot and also applied suggestion to trungtano :"Make sure you copy the entire API key. if you just double click then copy you will usually only get half of the API Key. ALSO for some reason I have found that google can be particular about the differences between: www.domain.com and domain.com
Use the one that most suites you.
".
Possible solutions?

Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Post by spiffydudex »

Try using the IP address that you use to connect to the machine. This can have significance if the machine is external vs internal.

So if I connect to my cacti install by going to http://domain.com/cacti/ but my internal DNS resolves that address to an internal IP address, then you will need to put in your internal IP address when requesting a API Key.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests