Resolved conflict

This commit is contained in:
Daniel Maya 2022-07-13 11:31:18 +02:00
commit e8c7c38c1f
28 changed files with 829 additions and 25 deletions

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.763-220708
Version: 7.0NG.763-220713
Architecture: all
Priority: optional
Section: admin

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.763-220708"
pandora_version="7.0NG.763-220713"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

@ -1015,7 +1015,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.763';
use constant AGENT_BUILD => '220708';
use constant AGENT_BUILD => '220713';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.763
%define release 220708
%define release 220713
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.763
%define release 220708
%define release 220713
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.763"
PI_BUILD="220708"
PI_BUILD="220713"
OS_NAME=`uname -s`
FORCE=0

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{220708}
{220713}
ViewReadme
{Yes}

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.763 Build 220708")
#define PANDORA_VERSION ("7.0NG.763 Build 220713")
string pandora_path;
string pandora_dir;

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.763(Build 220708))"
VALUE "ProductVersion", "(7.0NG.763(Build 220713))"
VALUE "FileVersion", "1.0.0.0"
END
END

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.763-220708
Version: 7.0NG.763-220713
Architecture: all
Priority: optional
Section: admin

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.763-220708"
pandora_version="7.0NG.763-220713"
package_pear=0
package_pandora=1

@ -1,5 +1,28 @@
START TRANSACTION;
CREATE TABLE IF NOT EXISTS `tuser_task` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`function_name` VARCHAR(80) NOT NULL DEFAULT '',
`parameters` TEXT ,
`name` VARCHAR(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE IF NOT EXISTS `tuser_task_scheduled` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '0',
`id_user_task` INT UNSIGNED NOT NULL DEFAULT 0,
`args` TEXT,
`scheduled` ENUM('no','hourly','daily','weekly','monthly','yearly','custom') DEFAULT 'no',
`last_run` INT UNSIGNED DEFAULT 0,
`custom_data` INT NULL DEFAULT 0,
`flag_delete` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`id_grupo` INT UNSIGNED NOT NULL DEFAULT 0,
`enabled` TINYINT UNSIGNED NOT NULL DEFAULT 1,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
ALTER TABLE `tautoconfig` ADD COLUMN `type_execution` VARCHAR(100) NOT NULL DEFAULT 'start';
ALTER TABLE `tautoconfig` ADD COLUMN `type_periodicity` VARCHAR(100) NOT NULL DEFAULT 'weekly';
ALTER TABLE `tautoconfig` ADD COLUMN `monday` TINYINT DEFAULT 0;

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC220708';
$build_version = 'PC220713';
$pandora_version = 'v7.0NG.763';
// Do not overwrite default timezone set if defined.

@ -1,5 +1,7 @@
<?php
global $config;
global $pandora_version;
global $build_version;
require_once __DIR__.'/config.php';

@ -129,7 +129,7 @@
<div style='height: 10px'>
<?php
$version = '7.0NG.763';
$build = '220708';
$build = '220713';
$banner = "v$version Build $build";
error_reporting(0);

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.763
%define release 220708
%define release 220713
# User and Group under which Apache is running
%define httpd_name httpd

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.763
%define release 220708
%define release 220713
# User and Group under which Apache is running
%define httpd_name httpd

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.763
%define release 220708
%define release 220713
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

@ -0,0 +1,779 @@
#!/bin/bash
# IPSLA remote Plugin for Pandora FMS
# (c) ArticaST 2014
# Default values
COMMUNITY="public"
TAG_TABLE_CACHE="/tmp/ipsla_cache"
function help {
echo -e "Cisco IP SLA Server Plugin for Pandora FMS. http://pandorafms.com"
echo -e "Syntax:\n\n-c <community> -t <target> -v <version> [other options]\n"
echo -e "\t\t-c community"
echo -e "\t\t-t target"
echo -e "\t\t-v version"
echo -e "Other options\n";
echo -e "\t\t-s show defined tags for cisco ipsla device and exit"
echo -e "\t\t-l <auth-type> "
echo -e "\t\t-u <user> "
echo -e "\t\t-a <authentication> "
echo -e "\t\t-A <authenticacion-password> "
echo -e "\t\t-x <encryption> "
echo -e "\t\t-X <encryption-pass> "
echo -e "\t\t-g <id> "
echo -e "\t\t-m <module>\n"
echo -e "Available Modules list: \n"
echo -e "\tICPIF - Calculated Planning Impairment Factor for specified tag"
echo -e "\tMOS - Mean Opinion Score"
echo -e "\tPacket_Out_of_Sequence - Packets arriving out of sequence "
echo -e "\tPacket_Late_Arrival - Packets arriving late"
echo -e "\tAverage_Jitter - Average jitter is the estimated average jitter observed in the last XX RTP packets"
echo -e "\tPacketLossSD - Packet loss from source to destination"
echo -e "\tPacketLossDS - Packet loss from destination to source"
echo -e "\tPacketLost - The number of packets that are lost for which we cannot determine the direction "
echo -e "\tNegativesSD - The sum of number of all negative jitter values from packets sent from source to destination "
echo -e "\tNegativesDS - The sum of number of all negative jitter values from packets sent from destination to source"
echo -e "\tPositivesSD - The sum of number of all positive jitter values from packets sent from source to destination"
echo -e "\tPositivesDS - The sum of number of all positive jitter values from packets sent from source to destination"
echo -e "\tRTTMax - Max Round Trip Time"
echo -e "\tRTTMin - Min Round Trip Time"
echo -e "\tOperNumOfRTT - The number of successful round trips"
echo -e "\tOperPacketLossSD - Packet loss from source to destination for jitter tests"
echo -e "\tOperPacketLossDS - Packet loss from destination to source for jitter tests"
echo -e "\tRttOperSense - A sense code for the completion status of the latest RTT operation."
echo -e "\tRttOperCompletionTime - The completion time of the latest RTT operation successfully completed."
echo -e "\tRttOperTime - The value of the agent system time at the time of the latest RTT operation."
echo -e "\tRttOperAddress - A string which specifies the address of the target."
echo -e "\tHTTPOperRTT - Round Trip Time taken to perform HTTP operation. This value is the sum of DNSRTT, TCPConnectRTT and TransactionRTT."
echo -e "\tHTTPOperDNSRTT Round Trip Time taken to perform DNS query within the HTTP operation."
echo -e "\tHTTPOperTCPConnectRTT - Round Trip Time taken to connect to the HTTP server."
echo -e "\tIcmpJitterAvgJitter The average of positive and negative jitter values in Source-to-Destionation and Destination-to-Source direction."
echo -e "\tHTTPOperTransactionRTT - Round Trip Time taken to download the object specified by the URL."
echo -e ""
echo -e " Example execution"
echo -e " snmp version 3: ./pandora_ipsla.sh -t <ip_target> -v 3 -l authPriv -u pandorafms -a MD5 -A pandorafms -x AES -X pandorafms -g jitter -m Average_Jitter"
echo -e " snmp version 2c: ./pandora_ipsla.sh -t <ip_target> -v 2c -c public -g jitter -m Average_Jitter"
echo ""
exit
}
function show_tags {
local TAG_TABLE_CACHE=$TAG_TABLE_CACHE.$TARGET
if [ $version != "3" ]
then
snmpwalk -v 1 -Onq -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE
fi
if [ $version == "3" ]
#if snmp v3 snmpget with v3
then
if [ $auth == "authPriv" ]
# if authpriv snmpget with all parameters
then
snmpwalk -v 3 -Onq -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE
fi
if [ $auth == "authNoPriv" ]
then
snmpget -v 3 -Onq -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE
fi
fi
cat $TAG_TABLE_CACHE
exit
}
function update_tags {
local TAG_TABLE_CACHE=$TAG_TABLE_CACHE.$TARGET
if [ $version != "3" ]
then
snmpwalk -v 1 -Onq -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE
fi
if [ $version == "3" ]
#if snmp v3 snmpget with v3
then
if [ $auth == "authPriv" ]
# if authpriv snmpget with all parameters
then
snmpwalk -v 3 -Onq -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE
fi
if [ $auth == "authNoPriv" ]
then
snmpget -v 3 -Onq -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE
fi
fi
}
function get_index {
cat $TAG_TABLE_CACHE.$TARGET | grep "\"$1\"" | grep -o "[0-9]*\s"
}
# This function requires two arguments. MODULE_TYPE TAG
function get_module {
MODULE_TYPE=$1
update_tags
INDICE=$2
if [ $version != "3" ]
then
if [ "$MODULE_TYPE" == "ICPIF" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE`
fi
if [ "$MODULE_TYPE" == "MOS" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE`
fi
if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE`
fi
if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE`
fi
if [ "$MODULE_TYPE" == "Average_Jitter" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE`
fi
if [ "$MODULE_TYPE" == "PacketLossSD" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
fi
if [ "$MODULE_TYPE" == "PacketLossDS" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
fi
if [ "$MODULE_TYPE" == "PacketLost" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE`
fi
if [ "$MODULE_TYPE" == "NegativesSD" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE`
fi
if [ "$MODULE_TYPE" == "NegativesDS" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE`
fi
if [ "$MODULE_TYPE" == "PositivesSD" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE`
fi
if [ "$MODULE_TYPE" == "PositivesDS" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE`
fi
if [ "$MODULE_TYPE" == "RTTMax" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE`
fi
if [ "$MODULE_TYPE" == "RTTMin" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE`
fi
if [ "$MODULE_TYPE" == "OperNumOfRTT" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE`
fi
if [ "$MODULE_TYPE" == "OperPacketLossSD" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
fi
if [ "$MODULE_TYPE" == "OperPacketLossDS" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperCompletionTime" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperSense" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperTime" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperAddress" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperRTT" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE`
fi
if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ]
then
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE`
fi
fi
if [ $version == "3" ]
#if snmp v3 snmpget with v3
then
if [ $auth == "authPriv" ]
# if authpriv snmpget with all parameters
then
if [ "$MODULE_TYPE" == "ICPIF" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE`
fi
if [ "$MODULE_TYPE" == "MOS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE`
fi
if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE`
fi
if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE`
fi
if [ "$MODULE_TYPE" == "Average_Jitter" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE`
fi
if [ "$MODULE_TYPE" == "PacketLossSD" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
fi
if [ "$MODULE_TYPE" == "PacketLossDS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
fi
if [ "$MODULE_TYPE" == "PacketLost" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE`
fi
if [ "$MODULE_TYPE" == "NegativesSD" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE`
fi
if [ "$MODULE_TYPE" == "NegativesDS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE`
fi
if [ "$MODULE_TYPE" == "PositivesSD" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE`
fi
if [ "$MODULE_TYPE" == "PositivesDS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE`
fi
if [ "$MODULE_TYPE" == "RTTMax" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE`
fi
if [ "$MODULE_TYPE" == "RTTMin" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE`
fi
if [ "$MODULE_TYPE" == "OperNumOfRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE`
fi
if [ "$MODULE_TYPE" == "OperPacketLossSD" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
fi
if [ "$MODULE_TYPE" == "OperPacketLossDS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperCompletionTime" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperSense" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperTime" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperAddress" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE`
fi
if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE`
fi
fi
if [ $auth == "authNoPriv" ]
then
if [ "$hash1" ]
then
if [ "$MODULE_TYPE" == "ICPIF" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE`
fi
if [ "$MODULE_TYPE" == "MOS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE`
fi
if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE`
fi
if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE`
fi
if [ "$MODULE_TYPE" == "Average_Jitter" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE`
fi
if [ "$MODULE_TYPE" == "PacketLossSD" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
fi
if [ "$MODULE_TYPE" == "PacketLossDS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
fi
if [ "$MODULE_TYPE" == "PacketLost" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE`
fi
if [ "$MODULE_TYPE" == "NegativesSD" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE`
fi
if [ "$MODULE_TYPE" == "NegativesDS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE`
fi
if [ "$MODULE_TYPE" == "PositivesSD" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE`
fi
if [ "$MODULE_TYPE" == "PositivesDS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE`
fi
if [ "$MODULE_TYPE" == "RTTMax" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE`
fi
if [ "$MODULE_TYPE" == "RTTMin" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE`
fi
if [ "$MODULE_TYPE" == "OperNumOfRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE`
fi
if [ "$MODULE_TYPE" == "OperPacketLossSD" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
fi
if [ "$MODULE_TYPE" == "OperPacketLossDS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperCompletionTime" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperSense" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperTime" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperAddress" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE`
fi
if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE`
fi
else
if [ "$MODULE_TYPE" == "ICPIF" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE`
fi
if [ "$MODULE_TYPE" == "MOS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE`
fi
if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE`
fi
if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE`
fi
if [ "$MODULE_TYPE" == "Average_Jitter" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE`
fi
if [ "$MODULE_TYPE" == "PacketLossSD" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
fi
if [ "$MODULE_TYPE" == "PacketLossDS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
fi
if [ "$MODULE_TYPE" == "PacketLost" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE`
fi
if [ "$MODULE_TYPE" == "NegativesSD" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE`
fi
if [ "$MODULE_TYPE" == "NegativesDS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE`
fi
if [ "$MODULE_TYPE" == "PositivesSD" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE`
fi
if [ "$MODULE_TYPE" == "PositivesDS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE`
fi
if [ "$MODULE_TYPE" == "RTTMax" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE`
fi
if [ "$MODULE_TYPE" == "RTTMin" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE`
fi
if [ "$MODULE_TYPE" == "OperNumOfRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE`
fi
if [ "$MODULE_TYPE" == "OperPacketLossSD" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
fi
if [ "$MODULE_TYPE" == "OperPacketLossDS" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperCompletionTime" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperSense" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperTime" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE`
fi
if [ "$MODULE_TYPE" == "RttOperAddress" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE`
fi
if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE`
fi
if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ]
then
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE`
fi
fi
fi
fi
echo -n $VALOR | awk '{print $NF}'
exit 0
}
if [ -z "`which snmpwalk`" ]
then
echo "ERROR: snmpwalk is not in the path. Exiting..."
exit -1
fi
if [ $# -eq 0 ]
then
help
fi
# Main parsing code
while getopts ":hc:t:v:l:u:a:A:x:X:sm:g:" optname
do
case "$optname" in
"h")
help
;;
"c")
COMMUNITY=$OPTARG
;;
"t")
TARGET=$OPTARG
;;
"v")
version=$OPTARG
;;
"l")
auth=$OPTARG
;;
"u")
user=$OPTARG
;;
"a")
hash1=$OPTARG
;;
"A")
hash1pass=$OPTARG
;;
"x")
hash2=$OPTARG
;;
"X")
hash2pass=$OPTARG
;;
"g")
TAG=$OPTARG
;;
"s")
SHOWTAGS=1
;;
"m")
MODULE=$OPTARG
;;
?)
help
;;
default)
help
;;
esac
done
# Execution
[ "$SHOWTAGS" ] && echo "Showing avaliables ipsla tags for the device $TARGET and OID 1.3.6.1.4.1.9.9.42.1.2.1.1.3" && show_tags
[ -z "$TARGET" ] && echo "Error missing target ip definition please use -t to difine it or -h to see help" && exit 1
[ -z "$MODULE" ] && echo "Error missing module definition please use -m to difine it or -h to see help" && exit 1
[ -z "$TAG" ] && echo "Error missing id definition please use -g to difine it or -h to see help" && exit 1
[ -z "$version" ] && echo "Error missing snmp version definition please use -v to difine it or -h to see help" && exit 1
get_module $MODULE $TAG
echo "DEBUG"
exit 0
#RttOperSense
# 0:other
# 1:ok
# 2:disconnected
# 3:overThreshold
# 4:timeout
# 5:busy
# 6:notConnected
# 7:dropped
# 8:sequenceError
# 9:verifyError
# 10:applicationSpecific
# 11:dnsServerTimeout
# 12:tcpConnectTimeout
# 13:httpTransactionTimeout
# 14:dnsQueryError
# 15:httpError
# 16:error
# 17:mplsLspEchoTxError
# 18:mplsLspUnreachable
# 19:mplsLspMalformedReq
# 20:mplsLspReachButNotFEC
# 21:enableOk
# 22:enableNoConnect
# 23:enableVersionFail
# 24:enableInternalError
# 25:enableAbort
# 26:enableFail
# 27:enableAuthFail
# 28:enableFormatError
# 29:enablePortInUse
# 30:statsRetrieveOk
# 31:statsRetrieveNoConnect
# 32:statsRetrieveVersionFail
# 33:statsRetrieveInternalError
# 34:statsRetrieveAbort
# 35:statsRetrieveFail
# 36:statsRetrieveAuthFail
# 37:statsRetrieveFormatError
# 38:statsRetrievePortInUse

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.763-220708
Version: 7.0NG.763-220713
Architecture: all
Priority: optional
Section: admin

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.763-220708"
pandora_version="7.0NG.763-220713"
package_cpan=0
package_pandora=1

@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.763";
my $pandora_build = "220708";
my $pandora_build = "220713";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.763";
my $pandora_build = "220708";
my $pandora_build = "220713";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.763
%define release 220708
%define release 220713
Summary: Pandora FMS Server
Name: %{name}

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.763
%define release 220708
%define release 220713
Summary: Pandora FMS Server
Name: %{name}

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.763"
PI_BUILD="220708"
PI_BUILD="220713"
MODE=$1
if [ $# -gt 1 ]; then

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.763 Build 220708";
my $version = "7.0NG.763 Build 220713";
# Pandora server configuration
my %conf;

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.763 Build 220708";
my $version = "7.0NG.763 Build 220713";
# save program name for logging
my $progname = basename($0);