mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-16 18:34:55 +02:00
Minor changes in PluginTools
Added missing plugins to update_version
This commit is contained in:
parent
f4ef0110b2
commit
623afea5fe
@ -54,22 +54,25 @@ AGENT_WIN_FILE="$CODEHOME/pandora_agents/win32/pandora.cc"
|
|||||||
AGENT_WIN_MPI_FILE="$CODEHOME/pandora_agents/win32/installer/pandora.mpi"
|
AGENT_WIN_MPI_FILE="$CODEHOME/pandora_agents/win32/installer/pandora.mpi"
|
||||||
AGENT_WIN_RC_FILE="$CODEHOME/pandora_agents/win32/versioninfo.rc"
|
AGENT_WIN_RC_FILE="$CODEHOME/pandora_agents/win32/versioninfo.rc"
|
||||||
SATELLITE_FILE="$PANDHOME_ENT/satellite_server/satellite_server.pl"
|
SATELLITE_FILE="$PANDHOME_ENT/satellite_server/satellite_server.pl"
|
||||||
PERL_PLUGIN_FILES="$PANDHOME_ENT/pandora_plugins/NGINX/nginx_requests_queued.pl \
|
PERL_PLUGIN_FILES="$PANDHOME_ENT/pandora_server/util/plugin/vmware-plugin.pl \
|
||||||
|
$PANDHOME_ENT/pandora_plugins/NGINX/nginx_requests_queued.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/Sybase/sybase_plugin.pl \
|
$PANDHOME_ENT/pandora_plugins/Sybase/sybase_plugin.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/JMX/pandora_plugin_jmx.pl \
|
$PANDHOME_ENT/pandora_plugins/SNMP/dynamic_snmp.pl \
|
||||||
|
$PANDHOME_ENT/pandora_plugins/SNMP/snmp_bandwith.pl \
|
||||||
|
$PANDHOME_ENT/pandora_plugins/laboratory/cacti/cacti2pandora.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/MarkLogic/pandora_marklogic.pl \
|
$PANDHOME_ENT/pandora_plugins/MarkLogic/pandora_marklogic.pl \
|
||||||
|
$PANDHOME_ENT/pandora_plugins/MySQL/pandora_mysql.pl \
|
||||||
|
$PANDHOME_ENT/pandora_plugins/JMX/pandora_plugin_jmx.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/Apache/pandora_apache.pl \
|
$PANDHOME_ENT/pandora_plugins/Apache/pandora_apache.pl \
|
||||||
|
$PANDHOME_ENT/pandora_plugins/UX/pandora_ux.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/Oracle/Database/pandora_oracle.pl \
|
$PANDHOME_ENT/pandora_plugins/Oracle/Database/pandora_oracle.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/OpenNebula/pandora_opennebula.pl \
|
$PANDHOME_ENT/pandora_plugins/OpenNebula/pandora_opennebula.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/Nutanix/pandora_nutanix.pl \
|
$PANDHOME_ENT/pandora_plugins/Nutanix/pandora_nutanix.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/MTL/pandora_mtl.pl \
|
$PANDHOME_ENT/pandora_plugins/MTL/pandora_mtl.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/Informix/informix.pl \
|
$PANDHOME_ENT/pandora_plugins/Informix/informix.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/Ruckus/ruckus.pl \
|
$PANDHOME_ENT/pandora_plugins/Docker/docker_services.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/UX/pandora_ux.pl \
|
$PANDHOME_ENT/pandora_plugins/Docker/docker_stats.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/JMX/pandora_plugin_jmx.pl \
|
$PANDHOME_ENT/pandora_plugins/Ruckus/ruckus.pl "
|
||||||
$PANDHOME_ENT/pandora_plugins/SNMP/dynamic_snmp.pl \
|
|
||||||
$PANDHOME_ENT/pandora_plugins/MySQL/pandora_mysql.pl \
|
|
||||||
$PANDHOME_ENT/pandora_server/util/plugin/vmware-plugin.pl "
|
|
||||||
PLUGIN_LIB_FILE="$CODEHOME/pandora_server/lib/PandoraFMS/PluginTools.pm"
|
PLUGIN_LIB_FILE="$CODEHOME/pandora_server/lib/PandoraFMS/PluginTools.pm"
|
||||||
|
|
||||||
# Update version in spec files
|
# Update version in spec files
|
||||||
|
@ -46,6 +46,7 @@ our @EXPORT = qw(
|
|||||||
api_create_tag
|
api_create_tag
|
||||||
api_create_group
|
api_create_group
|
||||||
call_url
|
call_url
|
||||||
|
check_lib_version
|
||||||
decrypt
|
decrypt
|
||||||
empty
|
empty
|
||||||
encrypt
|
encrypt
|
||||||
@ -95,12 +96,34 @@ our @EXPORT = qw(
|
|||||||
my $DevNull = ($^O =~ /win/i)?'/NUL':'/dev/null';
|
my $DevNull = ($^O =~ /win/i)?'/NUL':'/dev/null';
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
# Returns current library version
|
||||||
################################################################################
|
################################################################################
|
||||||
sub get_lib_version {
|
sub get_lib_version {
|
||||||
return $VERSION;
|
return $VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Check version compatibility
|
||||||
|
################################################################################
|
||||||
|
sub check_lib_version {
|
||||||
|
my ($plugin_version) = @_;
|
||||||
|
|
||||||
|
$plugin_version = "0NG.0" if empty($plugin_version);
|
||||||
|
|
||||||
|
my ($main,$oum) = split /NG./, $plugin_version;
|
||||||
|
|
||||||
|
$main = 0 if empty($main) || !looks_like_number($main);
|
||||||
|
$oum = 0 if empty($oum) || !looks_like_number($oum);
|
||||||
|
|
||||||
|
my ($libmain,$liboum) = split /NG./, $pandora_version;
|
||||||
|
|
||||||
|
if (($liboum < $oum)
|
||||||
|
|| ($libmain != $main)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Get current time (milis)
|
# Get current time (milis)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user