GPS Maps for Cacti

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

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

Post by Bingobango »

Success! Looking good on my box now, excellent work! :D :D
nobi67
Posts: 6
Joined: Wed Apr 21, 2010 9:45 am

Post by nobi67 »

Still have some errors:
when displaying the map I get

Code: Select all

Notice: Undefined index: 0 in C:\cacti\plugins\gpsmap\includes\pointsxml.php on line 20

Notice: Undefined index: 0 in C:\cacti\plugins\gpsmap\includes\pointsxml.php on line 20

Notice: Undefined index: 0 in C:\cacti\plugins\gpsmap\includes\pointsxml.php on line 20

Notice: Undefined index: 0 in C:\cacti\plugins\gpsmap\includes\pointsxml.php on line 20

Notice: Undefined index: 0 in C:\cacti\plugins\gpsmap\includes\pointsxml.php on line 20

whan adding a Map Template

Code: Select all

Warning: Missing argument 2 for form_selectable_cell(), called in C:\cacti\plugins\gpsmap\gpstemplates.php on line 84 and defined in C:\cacti\lib\html_utility.php  on line 99

Notice: Undefined variable: id in C:\cacti\lib\html_utility.php on line 100
and can't see the map anymore.
Furthermore when I click on IP Analysis or IP Analysis with Coverage, the site asks for a different Google Maps API key.

Thank you in advance.
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

page blank with the new ver of plugin

Post by zorrosam »

hy guys,

i have updated the plugin to 1.5 version ... but after that operation i can't generate any maps. The page become blank.

With the 1.4 ver i has no problems .... the map was great ....

I have copied all the files of the new ver into the old folder ...

In cacti all the coordinated are saved ...

Anyone of the forum can help me?

thanks!

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

Post by spiffydudex »

Thanks for the feedback guys, I really appreciate it. I can only test for one server configuration, so please if you receive errors post them. I will address them ASAP.
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Post by spiffydudex »

nobi67 wrote:

Code: Select all

Notice: Undefined index: 0 in C:\cacti\plugins\gpsmap\includes\pointsxml.php on line 20
For this issue, it seems like you have a host but have not selected a template to use for it yet. I have made fixes in the pointsxml.php to address this issue.
nobi67 wrote: when adding a Map Template

Code: Select all

Warning: Missing argument 2 for form_selectable_cell(), called in C:\cacti\plugins\gpsmap\gpstemplates.php on line 84 and defined in C:\cacti\lib\html_utility.php  on line 99
Notice: Undefined variable: id in C:\cacti\lib\html_utility.php on line 100
This was a small error in the display of the templates. It should make the template. I have made changes to the code to remove the warning.
nobi67 wrote: Furthermore when I click on IP Analysis or IP Analysis with Coverage, the site asks for a different Google Maps API key.

Thank you in advance.
This is the code to display the setup.

Code: Select all

if(($apiKey =="")||($initialLong=="")||($initialLat=="")){
	$show = 'setup';
}
Make sure you have an API key that is valid for your site and have set the initial Latitude and Longitude.


Download the attachment and see if that clears up your notices and warnings.
zorrosam wrote:hey guys,
i have updated the plugin to 1.5 version ... but after that operation i can't generate any maps. The page become blank.
With the 1.4 ver i has no problems .... the map was great ....
I have copied all the files of the new ver into the old folder ...
In cacti all the coordinated are saved ...
Anyone of the forum can help me?

thanks!
zorro
Have you uninstall the old plugin and then installed/enabled the new one? It needs to set several new hooks for it to work correctly.
Attachments
gpsmap1.52.zip
(34.21 KiB) Downloaded 160 times
nobi67
Posts: 6
Joined: Wed Apr 21, 2010 9:45 am

Post by nobi67 »

Hi spiffydudex,
no more errors but I'm still having a problem with the map display.
If I don't define any Map Template everything works fine, but when I define a Template I can't display the map anymore, see attachements.
It looks as if the Map and the Host templates don't match, any clue about it ?

Many thanks
Attachments
without MAP Template.jpg
without MAP Template.jpg (487.51 KiB) Viewed 5348 times
with Map teplate.jpg
with Map teplate.jpg (117.88 KiB) Viewed 5348 times
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

after upgrade to 1.52 no hosts on my map .... but xml is ok

Post by zorrosam »

hi spiddy!

now the map is displayed ... but without hosts!

The xml file is generated correctly ... and populated with all the coordinated tha i set on my hosts.

Why the map is generated but without hosts?

The key is the same that i set with the 1.4 version ... and i remember you the it worked.

... anyway ... the only difference now is the templates that i have defined for some group of different hosts.

let me know!

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

Post by armstrongzhao »

Does the Google API support IP? I don't have website. I only have an IP address.

I applied for a Google API key with an IP address. And paste it in the Google API Key of Cacti settings.

Does it should work?

What I get is http 500 error.

And does Cacti on Win2003 support the plugin?

I have the anwser.
I use the GPS MAP 1.52 instead of 1.4, then it works well.
Last edited by armstrongzhao on Mon Apr 26, 2010 12:12 pm, edited 1 time in total.
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Post by spiffydudex »

armstrongzhao wrote:Does the Google API support IP? I don't have website. I only have an IP address.

I applied for a Google API key with an IP address. And paste it in the Google API Key of Cacti settings.

Does it should work?

What I get is http 500 error.

And does Cacti on Win2003 support the plugin?
I believe it should. support IP address.

I have not tested on a Windows hosting environment, although i think it should work just fine.
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Re: after upgrade to 1.52 no hosts on my map .... but xml is

Post by spiffydudex »

zorrosam wrote:hi spiddy!

now the map is displayed ... but without hosts!
The xml file is generated correctly ... and populated with all the coordinated tha i set on my hosts.
Why the map is generated but without hosts?
The key is the same that i set with the 1.4 version ... and i remember you the it worked.
... anyway ... the only difference now is the templates that i have defined for some group of different hosts.

let me know!

zorro
the API key should be the same as the old one. The XML file should be untouched. The Map Templates make some changes to the output of Javascript, which is then displayed in the browser.

I think I found your error, possibly...
When creating a map template, I left one of the image selections blank. This produced a non-functioning map. This is because I didn't set to check for correct input after the SQL call for the images.

When creating a template try filling all of the image selection boxes and see if that solves the problem.

If you use Firefox or Chrome, are there any errors in the error console? If there are please post them.

For Firefox this is under Tools menu.

For Chrome if you right-click on the page and select "Inspect Element". In the new window at the bottom corner there might be a red X. click that and that will show errors.

For IE there is a long process of installing the developer toolkit that can be installed with a google search.
nobi67
Posts: 6
Joined: Wed Apr 21, 2010 9:45 am

Post by nobi67 »

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.
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

.... argh

Post by zorrosam »

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.
so ... seems that the new function for create host template doesn't work properly?!

spiddy! help your boys! :-)
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

Re: .... argh

Post by zorrosam »

zorrosam wrote:
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.
so ... seems that the new function for create host template doesn't work properly?!

spiddy! help your boys! :-)
this is the error in my firefox :

Warning: Unknown property 'border-radius'. Declaration dropped.
Source File: https://achille/cacti/include/main.css
Line: 127
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

Re: .... argh

Post by zorrosam »

zorrosam wrote:
zorrosam wrote:
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.
so ... seems that the new function for create host template doesn't work properly?!

spiddy! help your boys! :-)
this is the error in my firefox :

Warning: Unknown property 'border-radius'. Declaration dropped.
Source File: https://achille/cacti/include/main.css
Line: 127
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
spiffydudex
Cacti User
Posts: 97
Joined: Thu Jul 24, 2008 11:21 am
Location: Hallsville, TX
Contact:

Re: .... argh

Post by spiffydudex »

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

Who is online

Users browsing this forum: No registered users and 0 guests