mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Merge remote-tracking branch 'origin/develop' into ent-7653-Nuevo-informe-de-estados-de-modulos-de-agentes
This commit is contained in:
commit
e8d5c77f3c
@ -82,10 +82,10 @@ execute_cmd "[ $PANDORA_SERVER_IP ]" 'Check Server IP Address' 'Please define e
|
||||
# Check OS.
|
||||
OS=$([[ $(grep '^ID_LIKE=' /etc/os-release) ]] && grep ^ID_LIKE= /etc/os-release | cut -d '=' -f2 | tr -d '"' || grep ^ID= /etc/os-release | cut -d '=' -f2 | tr -d '"')
|
||||
|
||||
[[ $OS == 'rhel fedora' ]] && OS_RELEASE=$OS
|
||||
[[ $OS == 'fedora' ]] && OS_RELEASE=$OS
|
||||
[[ $OS == 'centos rhel fedora' ]] && OS_RELEASE=$OS
|
||||
[[ $OS == 'debian' ]] && OS_RELEASE=$OS
|
||||
[[ $OS =~ 'rhel' ]] && OS_RELEASE=$OS
|
||||
[[ $OS =~ 'debian' ]] && OS_RELEASE=$OS
|
||||
#[[ $OS == 'rhel fedora' ]] && OS_RELEASE=$OS
|
||||
#[[ $OS == 'centos rhel fedora' ]] && OS_RELEASE=$OS
|
||||
|
||||
# initialice logfile
|
||||
execute_cmd "echo 'Starting community deployment' > $LOGFILE" "All installer activity is logged on $LOGFILE"
|
||||
@ -113,7 +113,7 @@ execute_cmd "cd $HOME/pandora_deploy_tmp" "Moving to workspace: $HOME/pandora_d
|
||||
|
||||
# Downloading and installing packages
|
||||
|
||||
if [[ $OS_RELEASE == 'rhel fedora' ]] || [[ $OS_RELEASE == 'centos rhel fedora' ]]; then
|
||||
if [[ $OS_RELEASE =~ 'rhel' ]]; then
|
||||
yum install -y perl wget curl perl-Sys-Syslog unzip &>> $LOGFILE
|
||||
echo -e "${cyan}Instaling agent dependencies...${reset}" ${green}OK${reset}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.759-220210
|
||||
Version: 7.0NG.759-220211
|
||||
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.759-220210"
|
||||
pandora_version="7.0NG.759-220211"
|
||||
|
||||
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.759';
|
||||
use constant AGENT_BUILD => '220210';
|
||||
use constant AGENT_BUILD => '220211';
|
||||
|
||||
# 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.759
|
||||
%define release 220210
|
||||
%define release 220211
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.759
|
||||
%define release 220210
|
||||
%define release 220211
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -10,7 +10,7 @@
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.759"
|
||||
PI_BUILD="220210"
|
||||
PI_BUILD="220211"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||
{}
|
||||
|
||||
Version
|
||||
{220210}
|
||||
{220211}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
||||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.759 Build 220210")
|
||||
#define PANDORA_VERSION ("7.0NG.759 Build 220211")
|
||||
|
||||
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.759(Build 220210))"
|
||||
VALUE "ProductVersion", "(7.0NG.759(Build 220211))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-console
|
||||
Version: 7.0NG.759-220210
|
||||
Version: 7.0NG.759-220211
|
||||
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.759-220210"
|
||||
pandora_version="7.0NG.759-220211"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
@ -20,7 +20,7 @@
|
||||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC220210';
|
||||
$build_version = 'PC220211';
|
||||
$pandora_version = 'v7.0NG.759';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
@ -779,19 +779,19 @@ function events_get_all(
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($filter['date_to'])
|
||||
&& !empty($filter['date_to'])
|
||||
&& $filter['date_to'] != '0000-00-00'
|
||||
if (isset($filter['date_to']) === true
|
||||
&& empty($filter['date_to']) === false
|
||||
&& $filter['date_to'] !== '0000-00-00'
|
||||
) {
|
||||
$date_to = $filter['date_to'];
|
||||
}
|
||||
|
||||
if (isset($filter['time_to'])) {
|
||||
if (isset($filter['time_to']) === true) {
|
||||
$time_to = (empty($filter['time_to']) === true) ? '23:59:59' : $filter['time_to'];
|
||||
}
|
||||
|
||||
if (isset($date_to)) {
|
||||
if (!isset($time_to)) {
|
||||
if (isset($date_to) === true) {
|
||||
if (isset($time_to) === false) {
|
||||
$time_to = '23:59:59';
|
||||
}
|
||||
|
||||
@ -802,8 +802,8 @@ function events_get_all(
|
||||
);
|
||||
}
|
||||
|
||||
if (!isset($from)) {
|
||||
if (isset($filter['event_view_hr']) && ($filter['event_view_hr'] > 0)) {
|
||||
if (isset($from) === false) {
|
||||
if (isset($filter['event_view_hr']) === true && ($filter['event_view_hr'] > 0)) {
|
||||
$sql_filters[] = sprintf(
|
||||
' AND utimestamp > UNIX_TIMESTAMP(now() - INTERVAL %d HOUR) ',
|
||||
$filter['event_view_hr']
|
||||
@ -811,20 +811,20 @@ function events_get_all(
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($filter['id_agent']) && $filter['id_agent'] > 0) {
|
||||
if (isset($filter['id_agent']) === true && $filter['id_agent'] > 0) {
|
||||
$sql_filters[] = sprintf(
|
||||
' AND te.id_agente = %d ',
|
||||
$filter['id_agent']
|
||||
);
|
||||
}
|
||||
|
||||
if (!empty($filter['event_type']) && $filter['event_type'] != 'all') {
|
||||
if ($filter['event_type'] == 'warning'
|
||||
|| $filter['event_type'] == 'critical'
|
||||
|| $filter['event_type'] == 'normal'
|
||||
if (empty($filter['event_type']) === false && $filter['event_type'] !== 'all') {
|
||||
if ($filter['event_type'] === 'warning'
|
||||
|| $filter['event_type'] === 'critical'
|
||||
|| $filter['event_type'] === 'normal'
|
||||
) {
|
||||
$sql_filters[] = ' AND event_type LIKE "%'.$filter['event_type'].'%"';
|
||||
} else if ($filter['event_type'] == 'not_normal') {
|
||||
} else if ($filter['event_type'] === 'not_normal') {
|
||||
$sql_filters[] = ' AND (event_type LIKE "%warning%"
|
||||
OR event_type LIKE "%critical%"
|
||||
OR event_type LIKE "%unknown%")';
|
||||
@ -833,9 +833,9 @@ function events_get_all(
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($filter['severity']) && $filter['severity'] > 0) {
|
||||
if (is_array($filter['severity'])) {
|
||||
if (!in_array(-1, $filter['severity'])) {
|
||||
if (isset($filter['severity']) === true && $filter['severity'] > 0) {
|
||||
if (is_array($filter['severity']) === true) {
|
||||
if (in_array(-1, $filter['severity']) === false) {
|
||||
$not_normal = array_search(EVENT_CRIT_NOT_NORMAL, $filter['severity']);
|
||||
if ($not_normal !== false) {
|
||||
unset($filter['severity'][$not_normal]);
|
||||
@ -858,7 +858,7 @@ function events_get_all(
|
||||
$filter['severity'][] = EVENT_CRIT_CRITICAL;
|
||||
}
|
||||
|
||||
if (!empty($filter['severity'])) {
|
||||
if (empty($filter['severity']) === false) {
|
||||
$filter['severity'] = implode(',', $filter['severity']);
|
||||
$sql_filters[] = sprintf(
|
||||
' AND criticity IN (%s)',
|
||||
@ -1015,7 +1015,7 @@ function events_get_all(
|
||||
$EW_groups = users_get_groups($config['id_user'], 'EW', true, true);
|
||||
}
|
||||
|
||||
if (!$user_is_admin && !users_can_manage_group_all('ER')) {
|
||||
if (!$user_is_admin && users_can_manage_group_all('ER') === false) {
|
||||
// Get groups where user have ER grants.
|
||||
$sql_filters[] = sprintf(
|
||||
' AND (te.id_grupo IN ( %s ) OR tasg.id_group IN (%s))',
|
||||
@ -1038,14 +1038,14 @@ function events_get_all(
|
||||
$tagente_table = 'tagente';
|
||||
$tagente_field = 'id_agente';
|
||||
$conditionMetaconsole = '';
|
||||
if (is_metaconsole() && $nodeConnected === false) {
|
||||
if ((is_metaconsole() === true) && ($nodeConnected === false)) {
|
||||
$tagente_table = 'tmetaconsole_agent';
|
||||
$tagente_field = 'id_tagente';
|
||||
$conditionMetaconsole = ' AND ta.id_tmetaconsole_setup = te.server_id ';
|
||||
}
|
||||
|
||||
// Agent alias.
|
||||
if (!empty($filter['agent_alias'])) {
|
||||
if (empty($filter['agent_alias']) === false) {
|
||||
$agent_join_filters[] = sprintf(
|
||||
' AND ta.alias = "%s" ',
|
||||
$filter['agent_alias']
|
||||
@ -1053,7 +1053,7 @@ function events_get_all(
|
||||
}
|
||||
|
||||
// Free search.
|
||||
if (!empty($filter['search'])) {
|
||||
if (empty($filter['search']) === false) {
|
||||
if (isset($config['dbconnection']->server_version)
|
||||
&& $config['dbconnection']->server_version > 50600
|
||||
) {
|
||||
@ -1078,16 +1078,16 @@ function events_get_all(
|
||||
}
|
||||
|
||||
// Id extra.
|
||||
if (!empty($filter['id_extra'])) {
|
||||
if (empty($filter['id_extra']) === false) {
|
||||
$sql_filters[] = sprintf(
|
||||
' AND lower(te.id_extra) like lower("%%%s%%") ',
|
||||
$filter['id_extra']
|
||||
);
|
||||
}
|
||||
|
||||
if (is_metaconsole() && $nodeConnected === false) {
|
||||
if ((is_metaconsole() === true) && ($nodeConnected === false)) {
|
||||
// Id source event.
|
||||
if (!empty($filter['id_source_event'])) {
|
||||
if (empty($filter['id_source_event']) === false) {
|
||||
$sql_filters[] = sprintf(
|
||||
' AND lower(te.id_source_event) like lower("%%%s%%") ',
|
||||
$filter['id_source_event']
|
||||
@ -1096,7 +1096,7 @@ function events_get_all(
|
||||
}
|
||||
|
||||
// User comment.
|
||||
if (!empty($filter['user_comment'])) {
|
||||
if (empty($filter['user_comment']) === false) {
|
||||
// For filter field.
|
||||
$sql_filters[] = sprintf(
|
||||
' AND lower(te.user_comment) like lower("%%%s%%") ',
|
||||
@ -1111,7 +1111,7 @@ function events_get_all(
|
||||
}
|
||||
|
||||
// Source.
|
||||
if (!empty($filter['source'])) {
|
||||
if (empty($filter['source']) === false) {
|
||||
$sql_filters[] = sprintf(
|
||||
' AND lower(te.source) like lower("%%%s%%") ',
|
||||
$filter['source']
|
||||
@ -1119,7 +1119,7 @@ function events_get_all(
|
||||
}
|
||||
|
||||
// Validated or in process by.
|
||||
if (!empty($filter['id_user_ack'])) {
|
||||
if (empty($filter['id_user_ack']) === false) {
|
||||
$sql_filters[] = sprintf(
|
||||
' AND te.id_usuario like lower("%%%s%%") ',
|
||||
$filter['id_user_ack']
|
||||
@ -1128,13 +1128,13 @@ function events_get_all(
|
||||
|
||||
$tag_names = [];
|
||||
// With following tags.
|
||||
if (!empty($filter['tag_with'])) {
|
||||
if (empty($filter['tag_with']) === false) {
|
||||
$tag_with = base64_decode($filter['tag_with']);
|
||||
$tags = json_decode($tag_with, true);
|
||||
if (is_array($tags) && !in_array('0', $tags)) {
|
||||
if (is_array($tags) === true && in_array('0', $tags) === false) {
|
||||
if (!$user_is_admin) {
|
||||
$getUserTags = tags_get_tags_for_module_search();
|
||||
// Prevent false value for array_flip
|
||||
// Prevent false value for array_flip.
|
||||
if ($getUserTags === false) {
|
||||
$getUserTags = [];
|
||||
}
|
||||
@ -1152,7 +1152,7 @@ function events_get_all(
|
||||
|
||||
$_tmp = '';
|
||||
foreach ($tags as $id_tag) {
|
||||
if (!isset($tags_names[$id_tag])) {
|
||||
if (isset($tags_names[$id_tag]) === false) {
|
||||
$tags_names[$id_tag] = tags_get_name($id_tag);
|
||||
}
|
||||
|
||||
@ -1182,18 +1182,22 @@ function events_get_all(
|
||||
$tags_names[$id_tag]
|
||||
);
|
||||
|
||||
if ($tags[0] === $id_tag) {
|
||||
$_tmp .= ')) ';
|
||||
} else {
|
||||
$_tmp .= ') ';
|
||||
}
|
||||
}
|
||||
|
||||
$sql_filters[] = $_tmp.')';
|
||||
$sql_filters[] = $_tmp;
|
||||
}
|
||||
}
|
||||
|
||||
// Without following tags.
|
||||
if (!empty($filter['tag_without'])) {
|
||||
if (empty($filter['tag_without']) === false) {
|
||||
$tag_without = base64_decode($filter['tag_without']);
|
||||
$tags = json_decode($tag_without, true);
|
||||
if (is_array($tags) && !in_array('0', $tags)) {
|
||||
if (is_array($tags) === true && in_array('0', $tags) === false) {
|
||||
if (!$user_is_admin) {
|
||||
$user_tags = array_flip(tags_get_tags_for_module_search());
|
||||
if ($user_tags != null) {
|
||||
@ -1208,7 +1212,7 @@ function events_get_all(
|
||||
}
|
||||
|
||||
foreach ($tags as $id_tag) {
|
||||
if (!isset($tags_names[$id_tag])) {
|
||||
if (isset($tags_names[$id_tag]) === false) {
|
||||
$tags_names[$id_tag] = tags_get_name($id_tag);
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@
|
||||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.759';
|
||||
$build = '220210';
|
||||
$build = '220211';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.759
|
||||
%define release 220210
|
||||
%define release 220211
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.759
|
||||
%define release 220210
|
||||
%define release 220211
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.759
|
||||
%define release 220210
|
||||
%define release 220211
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-server
|
||||
Version: 7.0NG.759-220210
|
||||
Version: 7.0NG.759-220211
|
||||
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.759-220210"
|
||||
pandora_version="7.0NG.759-220211"
|
||||
|
||||
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.759";
|
||||
my $pandora_build = "220210";
|
||||
my $pandora_build = "220211";
|
||||
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.759";
|
||||
my $pandora_build = "220210";
|
||||
my $pandora_build = "220211";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.759
|
||||
%define release 220210
|
||||
%define release 220211
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.759
|
||||
%define release 220210
|
||||
%define release 220211
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
@ -9,7 +9,7 @@
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.759"
|
||||
PI_BUILD="220210"
|
||||
PI_BUILD="220211"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
||||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.759 Build 220210";
|
||||
my $version = "7.0NG.759 Build 220211";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
||||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.759 Build 220210";
|
||||
my $version = "7.0NG.759 Build 220211";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user