mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
2011-02-07 Sancho Lerena <slerena@artica.es>
* pandora_server/DEBIAN/control, pandora_server/pandora_server.spec, pandora_server/pandora_server.redhat.spec: Added LWP dependency for reverse Geocoding feature. This is included on all distros. * pandora_server/conf/pandora_server.conf, pandora_server/lib/PandoraFMS/Config.pm, pandora_server/lib/PandoraFMS/DataServer.pm: Added support for reverse geocoding using GoogleMaps api. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a25c82dc8b
commit
2bf04d4c39
@ -1,3 +1,15 @@
|
|||||||
|
2011-02-07 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
|
* pandora_server/DEBIAN/control,
|
||||||
|
pandora_server/pandora_server.spec,
|
||||||
|
pandora_server/pandora_server.redhat.spec: Added LWP dependency for
|
||||||
|
reverse Geocoding feature. This is included on all distros.
|
||||||
|
|
||||||
|
* pandora_server/conf/pandora_server.conf,
|
||||||
|
pandora_server/lib/PandoraFMS/Config.pm,
|
||||||
|
pandora_server/lib/PandoraFMS/DataServer.pm: Added support for reverse geocoding using
|
||||||
|
GoogleMaps api.
|
||||||
|
|
||||||
2011-01-31 Sergio Martin <sergio.martin@artica.es>
|
2011-01-31 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* lib/PandoraFMS/DB.pm: Fixed a codification bug with
|
* lib/PandoraFMS/DB.pm: Fixed a codification bug with
|
||||||
|
@ -6,5 +6,5 @@ Section: admin
|
|||||||
Installed-Size: 640
|
Installed-Size: 640
|
||||||
Maintainer: Miguel de Dios <miguel.dedios@artica.es>
|
Maintainer: Miguel de Dios <miguel.dedios@artica.es>
|
||||||
Homepage: http://pandorafms.org/
|
Homepage: http://pandorafms.org/
|
||||||
Depends: perl (>= 5.8), libdbi-perl, libdbd-mysql-perl, libtime-format-perl, libnetaddr-ip-perl, libtime-format-perl, libxml-simple-perl, libhtml-parser-perl, snmp, snmpd, traceroute, xprobe2, nmap, sudo
|
Depends: perl (>= 5.8), libdbi-perl, libdbd-mysql-perl, libtime-format-perl, libnetaddr-ip-perl, libtime-format-perl, libxml-simple-perl, libhtml-parser-perl, snmp, snmpd, traceroute, xprobe2, nmap, sudo, libwww-perl
|
||||||
Description: Pandora FMS is a monitoring system for big IT environments. It uses remote tests, or local agents to grab information. Pandora supports all standard OS (Linux, AIX, HP-UX, Solaris and Windows XP,2000/2003), and support multiple setups in HA enviroments. This is the server package. Server makes the remote checks and process information transfer by Pandora FMS agents to the server.
|
Description: Pandora FMS is a monitoring system for big IT environments. It uses remote tests, or local agents to grab information. Pandora supports all standard OS (Linux, AIX, HP-UX, Solaris and Windows XP,2000/2003), and support multiple setups in HA enviroments. This is the server package. Server makes the remote checks and process information transfer by Pandora FMS agents to the server.
|
||||||
|
@ -272,3 +272,11 @@ max_queue_files 250
|
|||||||
|
|
||||||
# Update parent from the agent xml
|
# Update parent from the agent xml
|
||||||
#update_parent 1
|
#update_parent 1
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This enable realtime reverse geocoding using Google Maps public api.
|
||||||
|
# This requires internet access, and could have performance penalties processing GIS
|
||||||
|
# information due the connetion needed to resolve all GIS input.
|
||||||
|
#
|
||||||
|
# google_maps_description 1
|
||||||
|
|
||||||
|
@ -231,6 +231,7 @@ sub pandora_load_config {
|
|||||||
$pa_config->{"recon_reverse_geolocation_file"} = '/usr/local/share/GeoIP/GeoIPCity.dat'; # 3.1
|
$pa_config->{"recon_reverse_geolocation_file"} = '/usr/local/share/GeoIP/GeoIPCity.dat'; # 3.1
|
||||||
$pa_config->{"recon_location_scatter_radius"} = 50; # 3.1
|
$pa_config->{"recon_location_scatter_radius"} = 50; # 3.1
|
||||||
$pa_config->{"update_parent"} = 0; # 3.1
|
$pa_config->{"update_parent"} = 0; # 3.1
|
||||||
|
$pa_config->{"google_maps_description"} = 0;
|
||||||
|
|
||||||
$pa_config->{"max_queue_files"} = 250;
|
$pa_config->{"max_queue_files"} = 250;
|
||||||
|
|
||||||
@ -547,6 +548,9 @@ sub pandora_load_config {
|
|||||||
elsif ($parametro =~ m/^restart\s+([0-1])/i) {
|
elsif ($parametro =~ m/^restart\s+([0-1])/i) {
|
||||||
$pa_config->{'restart'} = clean_blank($1);
|
$pa_config->{'restart'} = clean_blank($1);
|
||||||
}
|
}
|
||||||
|
elsif ($parametro =~ m/^google_maps_description\s+([0-1])/i) {
|
||||||
|
$pa_config->{'google_maps_description'} = clean_blank($1);
|
||||||
|
}
|
||||||
elsif ($parametro =~ m/^activate_gis\s+([0-1])/i) {
|
elsif ($parametro =~ m/^activate_gis\s+([0-1])/i) {
|
||||||
$pa_config->{'activate_gis'} = clean_blank($1);
|
$pa_config->{'activate_gis'} = clean_blank($1);
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,9 @@ use Time::Local;
|
|||||||
use XML::Simple;
|
use XML::Simple;
|
||||||
use POSIX qw(setsid strftime);
|
use POSIX qw(setsid strftime);
|
||||||
|
|
||||||
|
# For Reverse Geocoding
|
||||||
|
use LWP::Simple;
|
||||||
|
|
||||||
# Default lib dir for RPM and DEB packages
|
# Default lib dir for RPM and DEB packages
|
||||||
use lib '/usr/lib/perl5';
|
use lib '/usr/lib/perl5';
|
||||||
|
|
||||||
@ -229,7 +232,18 @@ sub process_xml_data ($$$$$) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!defined($position_description) ) { #FIXME: Validate the data with a regexp
|
if (!defined($position_description) ) { #FIXME: Validate the data with a regexp
|
||||||
$position_description = ''; # Default value
|
|
||||||
|
# This code gets description (Reverse Geocoding) from a current GPS coordinates using Google maps API
|
||||||
|
# This requires a connection to internet and could be very slow and have a huge impact in performance.
|
||||||
|
# Other methods for reverse geocoding will be supplied in the future (openstreetmaps in a local server)
|
||||||
|
|
||||||
|
if ($pa_config->{'google_maps_description'}){
|
||||||
|
my $content = get ('http://maps.google.com/maps/geo?q='.$latitude.','.$longitude.'&output=csv&sensor=false');
|
||||||
|
my @address = split (/\"/,$content);
|
||||||
|
$position_description = $address[1];
|
||||||
|
} else {
|
||||||
|
$position_description = ''; # Default value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger($pa_config, "Getting GIS Data=timezone_offset=$timezone_offset longitude=$longitude latitude=$latitude altitude=$altitude position_description=$position_description", 8);
|
logger($pa_config, "Getting GIS Data=timezone_offset=$timezone_offset longitude=$longitude latitude=$latitude altitude=$altitude position_description=$position_description", 8);
|
||||||
|
@ -199,6 +199,9 @@ sub pandora_get_os ($) {
|
|||||||
elsif ($command =~ m/embedded/i){
|
elsif ($command =~ m/embedded/i){
|
||||||
return 14;
|
return 14;
|
||||||
}
|
}
|
||||||
|
elsif ($command =~ m/android/i){
|
||||||
|
return 15;
|
||||||
|
}
|
||||||
elsif ($command =~ m/BSD/i){
|
elsif ($command =~ m/BSD/i){
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ Prereq: %{_sbindir}/useradd
|
|||||||
AutoReq: 0
|
AutoReq: 0
|
||||||
Provides: %{name}-%{version}
|
Provides: %{name}-%{version}
|
||||||
Requires: coreutils
|
Requires: coreutils
|
||||||
Requires: perl-DBI perl-DBD-mysql
|
Requires: perl-DBI perl-DBD-mysql perl-libwww-perl
|
||||||
Requires: perl-XML-Simple perl-XML-SAX
|
Requires: perl-XML-Simple perl-XML-SAX
|
||||||
Requires: perl-NetAddr-IP net-snmp net-tools
|
Requires: perl-NetAddr-IP net-snmp net-tools
|
||||||
Requires: nmap wmic sudo
|
Requires: nmap wmic sudo
|
||||||
|
@ -21,7 +21,7 @@ BuildArchitectures: noarch
|
|||||||
Requires(pre): /usr/sbin/useradd
|
Requires(pre): /usr/sbin/useradd
|
||||||
AutoReq: 0
|
AutoReq: 0
|
||||||
Provides: %{name}-%{version}
|
Provides: %{name}-%{version}
|
||||||
Requires: perl-DBI perl-DBD-mysql
|
Requires: perl-DBI perl-DBD-mysql perl-libwww-perl
|
||||||
Requires: perl-NetAddr-IP net-snmp net-tools
|
Requires: perl-NetAddr-IP net-snmp net-tools
|
||||||
Requires: nmap wmic sudo perl-HTML-Tree perl-XML-SAX
|
Requires: nmap wmic sudo perl-HTML-Tree perl-XML-SAX
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user