GPS Maps for Cacti

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
routeip
Posts: 4
Joined: Mon Jul 09, 2012 2:48 pm

Re: GPS Maps for Cacti

Post by routeip »

Im pretty much lost in the updated code and javascript. I added kmz overlays in the early code of this but I'm lost on how to do it with the latest. Anyone have any pointers?
routeip
Posts: 4
Joined: Mon Jul 09, 2012 2:48 pm

Re: GPS Maps for Cacti

Post by routeip »

if you downloaded my update please download again. the first was broken
routeip
Posts: 4
Joined: Mon Jul 09, 2012 2:48 pm

Re: GPS Maps for Cacti

Post by routeip »

Anyone good with google map api v3?

I have tried like hell to get click able overlays working with the new code and can not.
I had it working with the v2 api. google is all it brains completely rewrote everything is seems.
xbatmanx
Posts: 1
Joined: Fri May 22, 2015 1:50 pm

Re: GPS Maps for Cacti

Post by xbatmanx »

gpsmap.jpg
gpsmap.jpg (152.93 KiB) Viewed 12905 times
Hey guys... I am fairly new to Cacti & GPSMap... I have most of it working as needed.. only I dont know how to get rid of this gray overlay that displays IP information and is basically taking over almost 50% of my map view...


Can anyone point me in the correct direction.. so I can get my Map view without the gray overlay


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

Re: GPS Maps for Cacti

Post by Rno »

I wrote a simple plugin who display a Google map with all device on it.
The coordinate are taken from snmp location, and the format is:
either
latitude , longitude, <empty>
or
country , city, street

I take only the first three parameters, for now it only work with google map, the key is optional, and has to be entered under setting -> misc

If you hold the mouse on a pin, it will display the device name and the address as returned by Google.
When you import it for the first time, you have to click on the 'system utility' section, on 'Rebuild mapping table' that will populated the address table, taken from you device snmp location field.
Beware that google only allow 2500 queries a day, so that mean 2500 devices max allowed, since each device has to be geocoded to find the address on the same format.

So far only working and tested on 0x8.8h, I will write it to match 1.x soon. Also check that you php config allow the server to queries outside URL:allow_url_fopen = On


You can find it here:
https://github.com/arno-st/Map/tree/cacti-0.8x


Open to any question or remark, and I will try to make more versatile if I can.
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 »

snmp location can be also a latitude longitude value like that:
<lat>;<long>

and the address will be geocoded from Google
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,,,
I am trying to install plugin on 0.8.8h.
I have copied paste folder in /var/www/cacti/plugins and check chmod and chown... same as other plugins
I can't see plugin under Configuration -> Plugin Management.

Thanks.
anmomin1
Cacti User
Posts: 63
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

Post by anmomin1 »

I am running into issue trying to get GPS MAPS on cacti 0.8.8h with no luck,,
I copied folder to /var/www/cacti/plugins that I downloaded from https://github.com/wixiweb/cacti-gpsmaps
Even chmod 777 to that folder..
Still don't see that plugin under configuration -> Plugin Management

Thanks.
spiffydudex wrote:GPS MAPS

This plugin provides an integration of Google maps with cacti in order to visually map out hosts using previously recorded Latitude and Longitude coordinates. Tracking of IP ranges and addresses and displaying them on the map. Information about each point is displayed when clicked on, with a direct link to the hosts graphs. Additionally there is a function that will allow for overlay mapping of IP ranges to get a coverage map.

***UPDATE ASAP to 1.63***
Google removed certain critical icon files from their servers. In order to continue usage please update!
Remember: DO NOT UNINSTALL THE PLUGIN unless you have backed up your host database! GPS Coordinates will be DELETEDwhen uninstalled.

Version 1.63
-Emergency update.
-Fixed relying on Google for icon files.
-All icons are contained within the images\icons folder
-Made coverage overlays the last part to be rendered.
-Fixed bug where coverage overlays would eat up RAM by causing a invalid for loop.

Newest Version info is on page 12
Download is here http://spiffdev.com/

If you are in need of a good Geocoder:
Zorrosam wrote:coordinates taken from this website http://www.gpsvisualizer.com/geocoder/ seems to be correct.

Please let me know if you come across any bugs. I only have a single development environment so please report any mishaps and I'll do what I can to sort them out.

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

Re: GPS Maps for Cacti

Post by Rno »

anmomin1 wrote:@Rno,,,
I am trying to install plugin on 0.8.8h.
I have copied paste folder in /var/www/cacti/plugins and check chmod and chown... same as other plugins
I can't see plugin under Configuration -> Plugin Management.

Thanks.
What version did you download ?
wha is the righ of the folder ?
Can you sena print screen of ls -l of the plugins directory ?
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
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: GPS Maps for Cacti

Post by netniV »

If you downloaded the cacti gpsmaps from github, that would have been for Cacti 1.1.x or 1.2.x (I haven't checked the INFO requirement).
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
anmomin1
Cacti User
Posts: 63
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

Post by anmomin1 »

Thanks netniV for reponse.. Yes I did download from github... that's the only one I found. is there gpsmaps for 0.8.8h, Plugin Architecture Version: 3.1.

If there is can you please point me to right direction.

Thanks.

netniV wrote:If you downloaded the cacti gpsmaps from github, that would have been for Cacti 1.1.x or 1.2.x (I haven't checked the INFO requirement).
anmomin1
Cacti User
Posts: 63
Joined: Mon May 29, 2017 4:14 pm

Re: GPS Maps for Cacti

Post by anmomin1 »

Hi Rno,
Thanks for response.. I have downloaded from below link:
https://github.com/arno-st/Map/tree/cacti-0.8x

It does mentioned cacti-0.8x
I am running Cacti Version: 0.8.8h, Plugin Architecture Version: 3.1

please find below folder permission: (Same as others working one)

Rno wrote:
anmomin1 wrote:@Rno,,,
I am trying to install plugin on 0.8.8h.
I have copied paste folder in /var/www/cacti/plugins and check chmod and chown... same as other plugins
I can't see plugin under Configuration -> Plugin Management.

Thanks.
What version did you download ?
wha is the righ of the folder ?
Can you sena print screen of ls -l of the plugins directory ?
Attachments
gpsmaps.png
gpsmaps.png (19.77 KiB) Viewed 8737 times
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

Post by Rno »

This download is my own gps map tools, and the folder should be named map

gpsmaps is another one you have to download it from here: https://github.com/wixiweb/cacti-gpsmaps
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 Aug 05, 2019 6:03 am This download is my own gps map tools, and the folder should be named map

gpsmaps is another one you have to download it from here: https://github.com/wixiweb/cacti-gpsmaps
@Rno,

I have installed addons and named fodler to map.. it showing up in cacti now..
I have device added and tried both location
Canada, Edmonton, street address didn't work..
I tried Lattituda 90.0000000;110.0000000 no luck there too..


I went under Utilities -> System Utilities -> Rebuild mapping table and Rebuild host link to coordinate table.

Still no luck...

I checked and permission are setup :
[root@cacti-template plugins]# ls -lh
total 6.9M
drwxrwxrwx. 3 cacti cacti 4.0K Jul 29 13:55 map


[root@cacti-template map]# ls -lh
total 108K
-rwxrwxrwx. 1 cacti cacti 6.3K Jul 25 08:30 general_header.php
drwxrwxrwx. 2 cacti cacti 4.0K Jul 29 12:39 images
-rwxrwxrwx. 1 cacti cacti 27K Jul 25 08:30 LICENSE
-rwxrwxrwx. 1 cacti cacti 5.7K Jul 25 08:30 map.php
-rwxrwxrwx. 1 cacti cacti 31K Jul 25 08:30 markerclusterer.js
-rwxrwxrwx. 1 cacti cacti 824 Jul 25 08:30 README
-rwxrwxrwx. 1 cacti cacti 18K Jul 25 08:30 setup.php
-rwxrwxrwx. 1 cacti cacti 3.8K Jul 25 08:30 wgs84_ch1903.php


what am I missing?
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: GPS Maps for Cacti

Post by Rno »

snmp location has to be in that format:

Country;City;Street_Building;Floor;Room;Rack;RU;Lat;Long


so if you have only lat long:
;;;;;;;Lat;Long

or if you have street address at minimum
Country;City;Street_Building
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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests