GPS Maps for Cacti
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 97
- Joined: Thu Jul 24, 2008 11:21 am
- Location: Hallsville, TX
- Contact:
Proposed changes for the GPSMap plugin
-Random bugfixes and code writing errors
-Make code files smaller, currently it is masses of ugliness to sift through.
-Change the file structure layout to make more sense.
-Implement KML exporting
-Allow for untagged devices so that you can have a coverage map on only the required devices.
-Possible implementation of google street view (*this is going to be held of for last*)
-selectable locations in the USA for NOAA data
-differentiate tower from other devices by a differently shaped point.
-Allow lookup of IP address from hostname so that both types of hosts can be used.
-Multiple AP type select
-Possible search by IP or Name (*this is going to be held of for last*)
-Automatic resize to page height.
Things that will not be added
-Street View
Partially complete:
-Multiple AP selections. (This is being rewritten)
-Select Host type display options and differentiate tower from other devices by a differently shaped point. (This is being rewritten)
-Make code files smaller.
-KML exporting. - Only working sometimes?
Completed:
-Change the file structure layout to make more sense. - Alot of this is because of Thold (Thanks Jimmy)
-Random bugfixes and code writing errors. Fixed reported.
-Automatic resize to page height. - Javascript fix.
-Allow for untagged devices so that you can have a coverage map on only the required devices. - Selectable in individual host options.
-Allow lookup of IP address from hostname so that both types of hosts can be used. - This should work for any device that can get a resolved IP address.
Please let me know if there is anything else.
Yes, exams went well. Glad the burden is lifted.
-Random bugfixes and code writing errors
-Make code files smaller, currently it is masses of ugliness to sift through.
-Change the file structure layout to make more sense.
-Implement KML exporting
-Allow for untagged devices so that you can have a coverage map on only the required devices.
-Possible implementation of google street view (*this is going to be held of for last*)
-selectable locations in the USA for NOAA data
-differentiate tower from other devices by a differently shaped point.
-Allow lookup of IP address from hostname so that both types of hosts can be used.
-Multiple AP type select
-Possible search by IP or Name (*this is going to be held of for last*)
-Automatic resize to page height.
Things that will not be added
-Street View
Partially complete:
-Multiple AP selections. (This is being rewritten)
-Select Host type display options and differentiate tower from other devices by a differently shaped point. (This is being rewritten)
-Make code files smaller.
-KML exporting. - Only working sometimes?
Completed:
-Change the file structure layout to make more sense. - Alot of this is because of Thold (Thanks Jimmy)
-Random bugfixes and code writing errors. Fixed reported.
-Automatic resize to page height. - Javascript fix.
-Allow for untagged devices so that you can have a coverage map on only the required devices. - Selectable in individual host options.
-Allow lookup of IP address from hostname so that both types of hosts can be used. - This should work for any device that can get a resolved IP address.
Please let me know if there is anything else.
Yes, exams went well. Glad the burden is lifted.
Last edited by spiffydudex on Mon Jan 18, 2010 10:49 am, edited 6 times in total.
Hi,
Just installed this plugin and i got a following notice error on the top of the page:
"Notice: Undefined offset: 3 in /var/www/cacti-0.8.7e/plugins/gpsmap/gpsmap.php on line 49"
Do i just switch off php notice error msgs or is it bug?
Thx!
--
Cacti Version 0.8.7e
Cacti OS unix
PA.: 2.6
SNMP Version NET-SNMP version: 5.4.1
RRDTool Version RRDTool 1.3.x
PHP Version 5.2.10-2ubuntu6.3
Just installed this plugin and i got a following notice error on the top of the page:
"Notice: Undefined offset: 3 in /var/www/cacti-0.8.7e/plugins/gpsmap/gpsmap.php on line 49"
Do i just switch off php notice error msgs or is it bug?
Thx!
--
Cacti Version 0.8.7e
Cacti OS unix
PA.: 2.6
SNMP Version NET-SNMP version: 5.4.1
RRDTool Version RRDTool 1.3.x
PHP Version 5.2.10-2ubuntu6.3
Sini
PHP Parse error
Dear all I'ìve installed and configured gpsmap plugin but when I click on gpsmap button I've got
PHP Parse error: syntax error, unexpected $end in /srv/www/vhosts/cacti.domain.local/plugins/gpsmap/gpsmap.php on line 329, referer: http://cacti.wamgroup.local/plugins.php ... &id=gpsmap
I've downloaded 1.41 version
thank's
L.
PHP Parse error: syntax error, unexpected $end in /srv/www/vhosts/cacti.domain.local/plugins/gpsmap/gpsmap.php on line 329, referer: http://cacti.wamgroup.local/plugins.php ... &id=gpsmap
I've downloaded 1.41 version
thank's
L.
-
- Cacti User
- Posts: 97
- Joined: Thu Jul 24, 2008 11:21 am
- Location: Hallsville, TX
- Contact:
sini wrote:Hi,
Just installed this plugin and i got a following notice error on the top of the page:
"Notice: Undefined offset: 3 in /var/www/cacti-0.8.7e/plugins/gpsmap/gpsmap.php on line 49"
Do i just switch off php notice error msgs or is it bug?
Thx!
--
Cacti Version 0.8.7e
Cacti OS unix
PA.: 2.6
SNMP Version NET-SNMP version: 5.4.1
RRDTool Version RRDTool 1.3.x
PHP Version 5.2.10-2ubuntu6.3
This is a bug, in that version it could not get IP addresses from regular hostnames.
In the new version I am working on I have more error checking, but in the meantime you can replace this code starting on line 47 and ending on 62... or just ignore the error.
Code: Select all
while($row = mysql_fetch_array($result,MYSQL_BOTH)){
if(isset($row['latitude'])&&isset($row['longitude'])&&($row['latitude'] != '')&&($row['latitude'] != '')&&($row['latitude'] != '0')&&($row['longitude'] != '0')){
list($first, $second, $third, $fourth) = split('[.]',$row["hostname"]);
$status = $row['status'];
if ($status == 3){
$status = "up";
}elseif($status == 1){
$status = "down";
}elseif($status == 2){
$status = "recovering";
}else{ $status = "Undefined"; }
if($row['disabled'] == "on"){
$status = "disabled";}
$hostArray[] = new host($row['id'],$row['host_template_id'],$row['latitude'],$row['longitude'],$first.$second.$third.$fourth,$row['description'],$row['hostname'],$row['availability'],$status,$row['cur_time']);
}
}
Code: Select all
while($row = mysql_fetch_array($result,MYSQL_BOTH)){
if(isset($row['latitude'])&&isset($row['longitude'])&&($row['latitude'] != '')&&($row['latitude'] != '')&&($row['latitude'] != '0')&&($row['longitude'] != '0')){
if (list($first, $second, $third, $fourth) = split('[.]',gethostbyname($row["hostname"]))){
$status = $row['status'];
if ($status == 3){
$status = "up";
}elseif($status == 1){
$status = "down";
}elseif($status == 2){
$status = "recovering";
}else{ $status = "Undefined"; }
if($row['disabled'] == "on"){
$status = "disabled";}
$hostArray[] = new host($row['id'],$row['host_template_id'],$row['latitude'],$row['longitude'],$first.$second.$third.$fourth,$row['description'],$row['hostname'],$row['availability'],$status,$row['cur_time']);
}
}
}
This could be a number of things. Something I hope to fix in the new version. I really don't know what it could be. Which reminds me, I need to add a debug option so that it will display checkpoints.lupick wrote:PHP Parse error: syntax error, unexpected $end in /srv/www/vhosts/cacti.domain.local/plugins/gpsmap/gpsmap.php on line 329, referer: http://cacti.wamgroup.local/plugins.php ... &id=gpsmap
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
maybe that eroroccurs as the gpsmap.php file only contains a
instead of the
at line 323 ?
Code: Select all
<?
Code: Select all
<?php
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
-
- Cacti User
- Posts: 97
- Joined: Thu Jul 24, 2008 11:21 am
- Location: Hallsville, TX
- Contact:
You can try that, I was under the impression that using the full " <?php " made a new instance of the php engine. I am probably wrong as most of my PHP skills are self taught.phalek wrote:maybe that eroroccurs as the gpsmap.php file only contains a
instead of theCode: Select all
<?
at line 323 ?Code: Select all
<?php
Give it a try and report back.
Thank You that solve the main page notice error but when i click on "IP Analysis" link i got these notice warnings:spiffydudex wrote: This is a bug, in that version it could not get IP addresses from regular hostnames.
In the new version I am working on I have more error checking, but in the meantime you can replace this code starting on line 47 and ending on 62... or just ignore the error.
With this codeCode: Select all
while($row = mysql_fetch_array($result,MYSQL_BOTH)){ if(isset($row['latitude'])&&isset($row['longitude'])&&($row['latitude'] != '')&&($row['latitude'] != '')&&($row['latitude'] != '0')&&($row['longitude'] != '0')){ list($first, $second, $third, $fourth) = split('[.]',$row["hostname"]); $status = $row['status']; if ($status == 3){ $status = "up"; }elseif($status == 1){ $status = "down"; }elseif($status == 2){ $status = "recovering"; }else{ $status = "Undefined"; } if($row['disabled'] == "on"){ $status = "disabled";} $hostArray[] = new host($row['id'],$row['host_template_id'],$row['latitude'],$row['longitude'],$first.$second.$third.$fourth,$row['description'],$row['hostname'],$row['availability'],$status,$row['cur_time']); } }
Code: Select all
while($row = mysql_fetch_array($result,MYSQL_BOTH)){ if(isset($row['latitude'])&&isset($row['longitude'])&&($row['latitude'] != '')&&($row['latitude'] != '')&&($row['latitude'] != '0')&&($row['longitude'] != '0')){ if (list($first, $second, $third, $fourth) = split('[.]',gethostbyname($row["hostname"]))){ $status = $row['status']; if ($status == 3){ $status = "up"; }elseif($status == 1){ $status = "down"; }elseif($status == 2){ $status = "recovering"; }else{ $status = "Undefined"; } if($row['disabled'] == "on"){ $status = "disabled";} $hostArray[] = new host($row['id'],$row['host_template_id'],$row['latitude'],$row['longitude'],$first.$second.$third.$fourth,$row['description'],$row['hostname'],$row['availability'],$status,$row['cur_time']); } } }
Notice: Undefined offset: 3 in /var/www/cacti-0.8.7e/plugins/gpsmap/gpsmap.php on line 87
Notice: Undefined offset: 3 in /var/www/cacti-0.8.7e/plugins/gpsmap/gpsmap.php on line 112
Code: Select all
<?php
Thx!
--
Cacti Version 0.8.7e
Cacti OS unix
PA.: 2.6
SNMP Version NET-SNMP version: 5.4.1
RRDTool Version RRDTool 1.3.x [/code]
Sini
-
- Cacti User
- Posts: 97
- Joined: Thu Jul 24, 2008 11:21 am
- Location: Hallsville, TX
- Contact:
-
- Cacti User
- Posts: 97
- Joined: Thu Jul 24, 2008 11:21 am
- Location: Hallsville, TX
- Contact:
Well, after playing with how I was going to assign different styles to different hosts. The Thold plugin provided some useful insight on how to assign attributes to portions of hosts. I had to scrap and rewrite a good portion of code, turning this into a much larger debacle than I had anticipated. I like the layout and functionality of what will be the end product, its nice clean and will actually feel a bit more completed.
I should have updated here a bit more, so I am sorry for keep you guys in the dark.
I should have updated here a bit more, so I am sorry for keep you guys in the dark.
Who is online
Users browsing this forum: No registered users and 3 guests