Merge remote-tracking branch 'origin/develop' into ent-9662-second-round
This commit is contained in:
commit
8458716ba9
|
@ -174,7 +174,7 @@ execute_cmd "dnf module disable -y mysql" "Disabiling mysql module"
|
||||||
|
|
||||||
if [ "$MYVER" -eq '80' ] ; then
|
if [ "$MYVER" -eq '80' ] ; then
|
||||||
execute_cmd "percona-release setup ps80 -y" "Enabling mysql80 module"
|
execute_cmd "percona-release setup ps80 -y" "Enabling mysql80 module"
|
||||||
execute_cmd "dnf install -y percona-server-server percona-xtrabackup-24" "Installing Percona Server 80"
|
execute_cmd "dnf install -y percona-server-server percona-xtrabackup-80" "Installing Percona Server 80"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$MYVER" -ne '80' ] ; then
|
if [ "$MYVER" -ne '80' ] ; then
|
||||||
|
|
|
@ -155,7 +155,7 @@ execute_cmd "apt install -y gnupg2 lsb-release ./percona-release_latest.generic_
|
||||||
execute_cmd "percona-release setup ps80" "Configuring Percona repository for MySQL8"
|
execute_cmd "percona-release setup ps80" "Configuring Percona repository for MySQL8"
|
||||||
|
|
||||||
echo -en "${cyan}Installing Percona Server for MySQL8...${reset}"
|
echo -en "${cyan}Installing Percona Server for MySQL8...${reset}"
|
||||||
env DEBIAN_FRONTEND=noninteractive apt install -y percona-server-server &>> "$LOGFILE"
|
env DEBIAN_FRONTEND=noninteractive apt install -y percona-server-server percona-xtrabackup-80 &>> "$LOGFILE"
|
||||||
check_cmd_status "Error Installing MySql Server"
|
check_cmd_status "Error Installing MySql Server"
|
||||||
|
|
||||||
#Configuring Database
|
#Configuring Database
|
||||||
|
|
|
@ -65,6 +65,12 @@ check_root_permissions () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_tarball () {
|
||||||
|
tar xvzf $1
|
||||||
|
cd unix && ./pandora_agent_installer --install
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
install_autodiscover () {
|
install_autodiscover () {
|
||||||
local arch=$1
|
local arch=$1
|
||||||
wget http://firefly.artica.es/projects/autodiscover-linux.zip
|
wget http://firefly.artica.es/projects/autodiscover-linux.zip
|
||||||
|
@ -145,14 +151,17 @@ if [[ $OS_RELEASE =~ 'rhel' ]] || [[ $OS_RELEASE =~ 'fedora' ]]; then
|
||||||
$package_manager_cmd install -y http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm &>> $LOGFILE
|
$package_manager_cmd install -y http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm &>> $LOGFILE
|
||||||
echo -en "${cyan}Installing Pandora FMS agent...${reset}"
|
echo -en "${cyan}Installing Pandora FMS agent...${reset}"
|
||||||
check_cmd_status 'Error installing Pandora FMS agent'
|
check_cmd_status 'Error installing Pandora FMS agent'
|
||||||
|
[[ $PANDORA_AGENT_SSL ]] && execute_cmd "$package_manager_cmd install -y perl-IO-Socket-SSL" "Installing SSL libraries for encrypted connection"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $OS_RELEASE == 'debian' ]]; then
|
if [[ $OS_RELEASE == 'debian' ]]; then
|
||||||
execute_cmd "apt update" 'Updating repos'
|
execute_cmd "apt update" 'Updating repos'
|
||||||
execute_cmd "apt install -y perl wget curl unzip procps python3 python3-pip" 'Installing agent dependencies'
|
execute_cmd "apt install -y perl wget curl unzip procps python3 python3-pip" 'Installing agent dependencies'
|
||||||
execute_cmd 'wget http://firefly.artica.es/pandorafms/latest/Debian_Ubuntu/pandorafms.agent_linux_7.0NG.deb' 'Downloading Pandora FMS agent dependencies'
|
execute_cmd 'wget http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz' 'Downloading Pandora FMS agent package'
|
||||||
execute_cmd 'apt install -y ./pandorafms.agent_linux_7.0NG.deb' 'Installing Pandora FMS agent'
|
execute_cmd 'install_tarball pandorafms_agent_linux-7.0NG.tar.gz' 'Installing Pandora FMS agent'
|
||||||
|
[[ $PANDORA_AGENT_SSL ]] && execute_cmd 'apt install -y libio-socket-ssl-perl' "Installing SSL libraries for encrypted connection"
|
||||||
|
cd $HOME/pandora_deploy_tmp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Configuring Agente
|
# Configuring Agente
|
||||||
|
@ -165,6 +174,7 @@ fi
|
||||||
[[ $PANDORA_AGENT_ALIAS ]] && sed -i "s/^#agent_alias.*$/agent_alias $PANDORA_AGENT_ALIAS/g" $PANDORA_AGENT_CONF
|
[[ $PANDORA_AGENT_ALIAS ]] && sed -i "s/^#agent_alias.*$/agent_alias $PANDORA_AGENT_ALIAS/g" $PANDORA_AGENT_CONF
|
||||||
[[ $PANDORA_SECONDARY_GROUPS ]] && sed -i "s/^# secondary_groups.*$/secondary_groups $PANDORA_SECONDARY_GROUPS/g" $PANDORA_AGENT_CONF
|
[[ $PANDORA_SECONDARY_GROUPS ]] && sed -i "s/^# secondary_groups.*$/secondary_groups $PANDORA_SECONDARY_GROUPS/g" $PANDORA_AGENT_CONF
|
||||||
[[ $TIMEZONE ]] && ln -sfn /usr/share/zoneinfo/$TIMEZONE /etc/localtime
|
[[ $TIMEZONE ]] && ln -sfn /usr/share/zoneinfo/$TIMEZONE /etc/localtime
|
||||||
|
[[ $PANDORA_AGENT_SSL ]] && sed -i "s/^#server_ssl.*$/server_ssl $PANDORA_AGENT_SSL/g" $PANDORA_AGENT_CONF
|
||||||
|
|
||||||
|
|
||||||
#installing autodiscover
|
#installing autodiscover
|
||||||
|
|
|
@ -238,7 +238,7 @@ execute_cmd "dnf module disable -y mysql" "Disabiling mysql module"
|
||||||
|
|
||||||
if [ "$MYVER" -eq '80' ] ; then
|
if [ "$MYVER" -eq '80' ] ; then
|
||||||
execute_cmd "percona-release setup ps80 -y" "Enabling mysql80 module"
|
execute_cmd "percona-release setup ps80 -y" "Enabling mysql80 module"
|
||||||
execute_cmd "dnf install -y percona-server-server percona-xtrabackup-24" "Installing Percona Server 80"
|
execute_cmd "dnf install -y percona-server-server percona-xtrabackup-80" "Installing Percona Server 80"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$MYVER" -ne '80' ] ; then
|
if [ "$MYVER" -ne '80' ] ; then
|
||||||
|
|
|
@ -273,6 +273,7 @@ server_dependencies=" \
|
||||||
libencode-perl \
|
libencode-perl \
|
||||||
cron \
|
cron \
|
||||||
libgeo-ip-perl \
|
libgeo-ip-perl \
|
||||||
|
arping \
|
||||||
openjdk-8-jdk "
|
openjdk-8-jdk "
|
||||||
execute_cmd "apt install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
execute_cmd "apt install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
||||||
|
|
||||||
|
@ -385,7 +386,7 @@ execute_cmd "apt install -y gnupg2 lsb-release ./percona-release_latest.generic_
|
||||||
execute_cmd "percona-release setup ps80" "Configuring Percona repository for MySQL8"
|
execute_cmd "percona-release setup ps80" "Configuring Percona repository for MySQL8"
|
||||||
|
|
||||||
echo -en "${cyan}Installing Percona Server for MySQL8...${reset}"
|
echo -en "${cyan}Installing Percona Server for MySQL8...${reset}"
|
||||||
env DEBIAN_FRONTEND=noninteractive apt install -y percona-server-server &>> "$LOGFILE"
|
env DEBIAN_FRONTEND=noninteractive apt install -y percona-server-server percona-xtrabackup-80 &>> "$LOGFILE"
|
||||||
check_cmd_status "Error Installing MySql Server"
|
check_cmd_status "Error Installing MySql Server"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -967,17 +967,19 @@ foreach ($simple_alerts as $alert) {
|
||||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
||||||
$policyInfo = policies_is_alert_in_policy2($alert['id'], false);
|
$policyInfo = policies_is_alert_in_policy2($alert['id'], false);
|
||||||
$module_linked = policies_is_module_linked($alert['id_agent_module']);
|
$module_linked = policies_is_module_linked($alert['id_agent_module']);
|
||||||
if (is_array($policyInfo) === false && $module_linked === false) {
|
if ((is_array($policyInfo) === false && $module_linked === false)
|
||||||
|
|| (is_array($policyInfo) === false && $module_linked === '1')
|
||||||
|
) {
|
||||||
$data[$index['policy']] = '';
|
$data[$index['policy']] = '';
|
||||||
} else {
|
} else {
|
||||||
$module_linked = policies_is_module_linked($alert['id_agent_module']);
|
$module_linked = policies_is_module_linked($alert['id_agent_module']);
|
||||||
if ($module_linked === '0') {
|
if ($module_linked === '0') {
|
||||||
$img = 'images/unlinkpolicy.png';
|
$img = 'images/unlinkpolicy.png';
|
||||||
} else {
|
} else {
|
||||||
$img = 'images/policies_mc.png';
|
$img = 'images/policy@svg.svg';
|
||||||
}
|
}
|
||||||
|
|
||||||
$data[1] .= ' <a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&pure='.$pure.'&id='.$policyInfo['id'].'">'.html_print_image($img, true, ['title' => $policyInfo['name']]).'</a>';
|
$data[1] .= ' <a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&pure='.$pure.'&id='.$policyInfo['id'].'">'.html_print_image($img, true, ['title' => $policyInfo['name'], 'class' => 'invert_filter main_menu_icon']).'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1246,20 +1246,22 @@ function ui_format_alert_row(
|
||||||
|
|
||||||
$policyInfo = policies_is_alert_in_policy2($alert['id'], false);
|
$policyInfo = policies_is_alert_in_policy2($alert['id'], false);
|
||||||
$module_linked = policies_is_module_linked($alert['id_agent_module']);
|
$module_linked = policies_is_module_linked($alert['id_agent_module']);
|
||||||
if (is_array($policyInfo) === false && $module_linked === false) {
|
if ((is_array($policyInfo) === false && $module_linked === false)
|
||||||
|
|| (is_array($policyInfo) === false && $module_linked === '1')
|
||||||
|
) {
|
||||||
$data[$index['policy']] = '';
|
$data[$index['policy']] = '';
|
||||||
} else {
|
} else {
|
||||||
$module_linked = policies_is_module_linked($alert['id_agent_module']);
|
$module_linked = policies_is_module_linked($alert['id_agent_module']);
|
||||||
if ($module_linked === '0') {
|
if ($module_linked === '0') {
|
||||||
$img = 'images/unlinkpolicy.png';
|
$img = 'images/unlinkpolicy.png';
|
||||||
} else {
|
} else {
|
||||||
$img = 'images/policies_mc.png';
|
$img = 'images/policy@svg.svg';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_metaconsole() === false) {
|
if (is_metaconsole() === false) {
|
||||||
$data[$index['policy']] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id='.$policyInfo['id'].'">'.html_print_image($img, true, ['title' => $policyInfo['name']]).'</a>';
|
$data[$index['policy']] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id='.$policyInfo['id'].'">'.html_print_image($img, true, ['title' => $policyInfo['name'], 'class' => 'invert_filter main_menu_icon']).'</a>';
|
||||||
} else {
|
} else {
|
||||||
$data[$index['policy']] = '<a href="?sec=gmodules&sec2=advanced/policymanager&id='.$policyInfo['id'].'">'.html_print_image($img, true, ['title' => $policyInfo['name']]).'</a>';
|
$data[$index['policy']] = '<a href="?sec=gmodules&sec2=advanced/policymanager&id='.$policyInfo['id'].'">'.html_print_image($img, true, ['title' => $policyInfo['name'], 'class' => 'invert_filter main_menu_icon']).'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@ Where OPTIONS could be:
|
||||||
-uniqid Use custom temporary file name.
|
-uniqid Use custom temporary file name.
|
||||||
-inUsage Show only input usage (in percentage) - 1, or not 0.
|
-inUsage Show only input usage (in percentage) - 1, or not 0.
|
||||||
-outUsage Show only output usage (in percentage) - 1, or not 0.
|
-outUsage Show only output usage (in percentage) - 1, or not 0.
|
||||||
|
-f We treat unkonwn duplex as full duplex.
|
||||||
|
|
||||||
Note: You can also use snmpget/snmpwalk argument notation,
|
Note: You can also use snmpget/snmpwalk argument notation,
|
||||||
e.g. -v is equal to -version, -c to -community, etc.
|
e.g. -v is equal to -version, -c to -community, etc.
|
||||||
|
|
Loading…
Reference in New Issue