GPS Maps for Cacti

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

Post by Rno »

on more question:
when you do you test did you go into: console->device select the device you like to rebuild and select the action Geocode device
Or did you rebuild the coordinate by using the console->System utilities -> rebuild
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

Post by Rno »

I find an error on the action coordinate rebuild, on system utilities part.
And I think you where reaching this one
github has a version 0.37 of setup.php with the correction
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
anmomin1
Cacti User
Posts: 63
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

Post by anmomin1 »

Rno wrote: Thu Sep 19, 2019 5:12 am I find an error on the action coordinate rebuild, on system utilities part.
And I think you where reaching this one
github has a version 0.37 of setup.php with the correction
@Rno Thanks for info...
just want to confirm... new version you want me to download in under following URL?
https://github.com/arno-st/Map/tree/cacti-0.8x
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

Post by Rno »

yes that's correct
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
anmomin1
Cacti User
Posts: 63
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

Post by anmomin1 »

I know google worked last time.. but Now I am getting same following message:

I tried both with API key and without API key

With APIKEY I get following:
MAP: Poller[0] Google Geocoding error: REQUEST_DENIED

without APIKEY I get following:
MAP: Poller[0] Google Geocoding error:

Thanks.
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

Post by Rno »

You need a valid API key, google doesn't accept a query without it anymore:
"You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account"

For the query with API can you PM me the output of the log, and add this line around line 455 and line 524, just after the URL creation.
map_log("GoogleMap URL: ".$url );


So I can do some testing over here what is wrong. Since the output of this :
MAP: Poller[0] Google Geocoding error:

should give the return from GoogleMAP, ans I can' find the reason for nothing. usualy I get something, or a communication problem that give a return page without a valid JSON answer from google.
Putting the previous URL into the log will let you do the query with a browser to see what it answer. But still that is from a user point of view, not from the server itself who do the query when doing a MAP query
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
anmomin1
Cacti User
Posts: 63
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

Post by anmomin1 »

Rno wrote: Fri Oct 04, 2019 12:21 am You need a valid API key, google doesn't accept a query without it anymore:
"You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account"

For the query with API can you PM me the output of the log, and add this line around line 455 and line 524, just after the URL creation.
map_log("GoogleMap URL: ".$url );


So I can do some testing over here what is wrong. Since the output of this :
MAP: Poller[0] Google Geocoding error:

should give the return from GoogleMAP, ans I can' find the reason for nothing. usualy I get something, or a communication problem that give a return page without a valid JSON answer from google.
Putting the previous URL into the log will let you do the query with a browser to see what it answer. But still that is from a user point of view, not from the server itself who do the query when doing a MAP query
@Rno,,, Thanks for all your help..
I got that working found issue related to API not enable for geocode on google. I got that addon in production with many devices,,,
I found in certain area if you have devices more than one, it marks as number of devices (i.e 3 or 4),,, When you click on those numbers you get Green icon with their exact location with zoom in..
But if you have 2 or more device at a particular address then it shows two when you click it doesn't show those devices in two green icon(google pins) hence neither I can't find device name located at that address nor I know the status of any of device at that location when they are up or down..(is that default setting?) Please refer to image
device-at-one-location.png
device-at-one-location.png (9.09 KiB) Viewed 12542 times
Thanks.
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

Post by Rno »

Hello,
Glad it work.
Yes I have the same situation.
I'm not sure it's possible since it's on the same location.
It's works nicely with OpenstreetMap but not sure I can do it with Google.

i will check and let you know
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
anmomin1
Cacti User
Posts: 63
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

Post by anmomin1 »

Rno wrote: Mon Oct 28, 2019 8:51 am Hello,
Glad it work.
Yes I have the same situation.
I'm not sure it's possible since it's on the same location.
It's works nicely with OpenstreetMap but not sure I can do it with Google.

i will check and let you know
Awesome thanks .
Please keep me posted. With Google you can maximize window to full screen and stuff..
With OpenstreetMap I don't see any option to maximize.
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

Post by Rno »

Ok

So I have to include some new library OverlappingMarkerSpiderfier
since Google dosen't provide that.

I'm working on it and will release a new version when it's ok.

It will show something like that

spiderfierdone.png
spiderfierdone.png (88.1 KiB) Viewed 12505 times
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

Post by Rno »

Ok, I just uploaded a new version on github.
0.38 with the spider function.

You have to take setup.php, map.php and oms.min.js (do not forget to make it readeable by your web server.

Let me know if that fit your need.

Ho I alos change the default map size from 800 to 1024pixel with.
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
anmomin1
Cacti User
Posts: 63
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

Post by anmomin1 »

Rno wrote: Tue Oct 29, 2019 8:34 am Ok, I just uploaded a new version on github.
0.38 with the spider function.

You have to take setup.php, map.php and oms.min.js (do not forget to make it readeable by your web server.

Let me know if that fit your need.

Ho I alos change the default map size from 800 to 1024pixel with.
I will download the new version and give it a try and let you know.

Thanks .
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests