GPS Maps for Cacti

Announcements concerning Plugins for Cacti

Moderators: Moderators, Developers

Post Reply
Author
Message
Rno
Cacti User
Posts: 350
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

#316 Post by Rno » Thu Sep 19, 2019 1:59 am

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
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.45, Map 0.37

Test
Cacti 1.2.6
Spine 1.2.6
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.6
Map 1.2.6

Rno
Cacti User
Posts: 350
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

#317 Post by Rno » 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
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.45, Map 0.37

Test
Cacti 1.2.6
Spine 1.2.6
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.6
Map 1.2.6

anmomin1
Cacti User
Posts: 60
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

#318 Post by anmomin1 » Wed Oct 02, 2019 9:19 pm

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 User
Posts: 350
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

#319 Post by Rno » Thu Oct 03, 2019 12:03 am

yes that's correct
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.45, Map 0.37

Test
Cacti 1.2.6
Spine 1.2.6
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.6
Map 1.2.6

anmomin1
Cacti User
Posts: 60
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

#320 Post by anmomin1 » Thu Oct 03, 2019 8:00 pm

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 User
Posts: 350
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

#321 Post by Rno » 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
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.45, Map 0.37

Test
Cacti 1.2.6
Spine 1.2.6
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.6
Map 1.2.6

anmomin1
Cacti User
Posts: 60
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

#322 Post by anmomin1 » Wed Oct 23, 2019 12:05 pm

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 141 times
Thanks.

Rno
Cacti User
Posts: 350
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

#323 Post by Rno » 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
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.45, Map 0.37

Test
Cacti 1.2.6
Spine 1.2.6
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.6
Map 1.2.6

anmomin1
Cacti User
Posts: 60
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

#324 Post by anmomin1 » Mon Oct 28, 2019 12:25 pm

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 User
Posts: 350
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

#325 Post by Rno » Tue Oct 29, 2019 5:05 am

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 104 times
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.45, Map 0.37

Test
Cacti 1.2.6
Spine 1.2.6
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.6
Map 1.2.6

Rno
Cacti User
Posts: 350
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

#326 Post by Rno » 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.
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.45, Map 0.37

Test
Cacti 1.2.6
Spine 1.2.6
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.6
Map 1.2.6

anmomin1
Cacti User
Posts: 60
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

#327 Post by anmomin1 » Thu Nov 07, 2019 9:50 am

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