From 88316a5c83fadb4eacfa41e57430553cb1e8c2ad Mon Sep 17 00:00:00 2001 From: rafael Date: Tue, 7 Mar 2023 14:39:02 +0100 Subject: [PATCH 01/17] 10298 adding multiconfig server support for init.d --- pandora_server/util/pandora_server | 197 ++++++++++++++++++++--------- 1 file changed, 140 insertions(+), 57 deletions(-) diff --git a/pandora_server/util/pandora_server b/pandora_server/util/pandora_server index 3aa70431d1..4d9e3f0c38 100755 --- a/pandora_server/util/pandora_server +++ b/pandora_server/util/pandora_server @@ -32,9 +32,12 @@ fi # this script to another name, editing PANDORA_HOME to the new .conf export PANDORA_HOME="/etc/pandora/pandora_server.conf" +export PANDORA_HOME_EXTRA="/etc/pandora/conf.d" export PANDORA_DAEMON=/usr/bin/pandora_server export PANDORA_HA=/usr/bin/pandora_ha export PID_DIR=/var/run +export INCLUDE_EXTRA_CONFS=0 +declare -A SERVERS_NAMES # Environment variables if [ -f /etc/pandora/pandora_server.env ]; then @@ -94,6 +97,71 @@ function pidof_pandora_ha () { echo $PANDORA_PID } +function pidof_secondary_server () { + # $1 is mandatory to check secondary server conf file + # This sets COLUMNS to XXX chars, because if command is run + # in a "strech" term, ps aux don't report more than COLUMNS + # characters and this will not work. + COLUMNS=300 + local conf_file=$1 + SEC_PANDORA_PID=`ps aux | grep "$PANDORA_DAEMON" | grep "$conf_file" | grep -v grep | tail -1 | awk '{ print $2 }'` + echo $SEC_PANDORA_PID +} + +function extra_confs () { + + # Check server name, from primary conf file. + local primary_server_name=$(grep servername $PANDORA_HOME | grep -v '^#' | tail -1 | awk '{ print $2 }') + [ "$primary_server_name" ] || primary_server_name=$(hostname) + SERVERS_NAMES["$PANDORA_HOME"]=$primary_server_name + + # Read all extra confs discarting .templates + if [[ -d $PANDORA_HOME_EXTRA ]]; then + local EXTRA_CONF=($(ls $PANDORA_HOME_EXTRA | grep .conf | grep -v .template)) + else + return 0 + fi + + # Return 0 if no extra confs found + if [[ ${#EXTRA_CONF[@]} = 0 ]]; then + return 0 + fi + + # declare array + INCLUDE_EXTRA_CONFS=0 + + # Loop all secondary servers confs + for conf in ${EXTRA_CONF[@]} ; do + local tmp_server_name='' + local mastery='' + + # Check servername + tmp_server_name=$(grep servername $PANDORA_HOME_EXTRA/$conf | grep -v '^#' | tail -1 | awk '{ print $2 }') + if [ "$tmp_server_name" == '' ]; then + echo "Error: The config file $conf has no sever name defined, servername is mandatory for secondary servers" + rc_exit + fi + + if [ "$tmp_server_name" == "$SERVERS_NAMES[$PANDORA_HOME]" ]; then + echo "Error: The config file $PANDORA_HOME_EXTRA/$conf has the same servername as the primary server, servername should be unique for secondary servers" + rc_exit + fi + + # check other confs servernames (todo) + + # Check mastery + mastery=$(grep master $PANDORA_HOME_EXTRA/$conf | grep -v '^#' | tail -1 | awk '{ print $2 }') + if [[ $mastery -ne 0 ]]; then + echo "Error: The config file $PANDORA_HOME_EXTRA/$conf has the same servername master value higer than 0, master should be disable for secondary servers" + rc_exit + fi + + SERVERS_NAMES["$PANDORA_HOME_EXTRA/$conf"]=$tmp_server_name + + done + + INCLUDE_EXTRA_CONFS=1 +} # Main script @@ -104,6 +172,8 @@ then rc_exit fi +extra_confs # check if extra confs are defined + case "$1" in start) PANDORA_PID=`pidof_pandora_ha` @@ -173,71 +243,84 @@ case "$1" in fi ;; start-server) - PANDORA_PID=`pidof_pandora` - if [ ! -z "$PANDORA_PID" ] - then - echo "$PANDORA_RB_PRODUCT_NAME Server is currently running on this machine with PID ($PANDORA_PID)." - rc_exit # running start on a service already running - fi + _couter=0 + for key in ${!SERVERS_NAMES[@]}; do + unset SEC_PID + SEC_PID=$(pidof_secondary_server $key) + if [ ! -z "$SEC_PID" ] ; then + echo "${SERVERS_NAMES[$key]} ($key) Server is currently running on this machine with PID ($SEC_PID)." + _counter+=1 + fi + done + if [[ _counter -gt 0 ]]; then rc_exit ; fi # running start on a service already running export PERL_LWP_SSL_VERIFY_HOSTNAME=0 - $PANDORA_DAEMON $PANDORA_HOME -D - sleep 1 - - PANDORA_PID=`pidof_pandora` - - if [ ! -z "$PANDORA_PID" ] - then - echo "$PANDORA_RB_PRODUCT_NAME Server is now running with PID $PANDORA_PID" - rc_status -v - else - echo "Cannot start $PANDORA_RB_PRODUCT_NAME Server. Aborted." - echo "Check $PANDORA_RB_PRODUCT_NAME log files at '/var/log/pandora/pandora_server.error & pandora_server.log'" - rc_failed 7 # program is not running - fi + _couter=0 + for key in ${!SERVERS_NAMES[@]}; do + $PANDORA_DAEMON $key -D + sleep 1 + unset SEC_PID + SEC_PID=$(pidof_secondary_server $key) + if [ ! -z "$SEC_PID" ] ; then + echo "${SERVERS_NAMES[$key]} Server is now running with PID $SEC_PID" + _counter+=1 + else + echo "Cannot ${SERVERS_NAMES[$key]} start Server. Aborted." + echo "Check ${SERVERS_NAMES[$key]} log files at /var/log/pandora/pandora_server.error & pandora_server.log" + echo "error" + rc_failed 7 # program is not running + fi + done + if [[ _counter > 0 ]]; then rc_status -v ; fi ;; stop-server) - PANDORA_PID=`pidof_pandora` - if [ -z "$PANDORA_PID" ] - then - echo "$PANDORA_RB_PRODUCT_NAME Server is not running, cannot stop it." - rc_exit # running stop on a service already stopped or not running - else - echo "Stopping $PANDORA_RB_PRODUCT_NAME Server" - kill $PANDORA_PID > /dev/null 2>&1 - COUNTER=0 - - while [ $COUNTER -lt $MAXWAIT ] - do - _PID=`pidof_pandora` - if [ "$_PID" != "$PANDORA_PID" ] - then - COUNTER=$MAXWAIT - fi - COUNTER=`expr $COUNTER + 1` - sleep 1 - done - - # Send a KILL -9 signal to process, if it's alive after 60secs, we need - # to be sure is really dead, and not pretending... - if [ "$_PID" = "$PANDORA_PID" ] - then - kill -9 $PANDORA_PID > /dev/null 2>&1 + _couter=0 + for key in ${!SERVERS_NAMES[@]}; do + unset PANDORA_PID + PANDORA_PID=$(pidof_secondary_server $key) + if [ -z "$PANDORA_PID" ] ; then + echo "${SERVERS_NAMES[$key]} ($key) Server is not running, cannot stop it." + else + echo "Stopping ${SERVERS_NAMES[$key]} ($key) Server" + kill $PANDORA_PID > /dev/null 2>&1 + COUNTER=0 + while [ $COUNTER -lt $MAXWAIT ] + do + _PID=$(pidof_secondary_server $key) + if [ "$_PID" != "$PANDORA_PID" ] + then + COUNTER=$MAXWAIT + fi + COUNTER=`expr $COUNTER + 1` + sleep 1 + done + # Send a KILL -9 signal to process, if it's alive after 60secs, we need + # to be sure is really dead, and not pretending... + if [ "$_PID" = "$PANDORA_PID" ] + then + kill -9 $PANDORA_PID > /dev/null 2>&1 + fi fi - rc_status -v - fi + + done + rc_status -v ;; status-server) - PANDORA_PID=`pidof_pandora` - if [ -z "$PANDORA_PID" ] - then - echo "$PANDORA_RB_PRODUCT_NAME Server is not running." - rc_failed 7 # program is not running - else - echo "$PANDORA_RB_PRODUCT_NAME Server is running with PID $PANDORA_PID." - rc_status - fi + _couter=0 + for key in ${!SERVERS_NAMES[@]}; do + unset SEC_PID + SEC_PID=$(pidof_secondary_server $key) + if [ -z "$SEC_PID" ] ; then + echo "${SERVERS_NAMES[$key]} ($key) Server is not running." + _counter+=1 + else + echo "${SERVERS_NAMES[$key]} ($key) Server is running with PID: $SEC_PID." + fi + done + if [[ _counter -gt 0 ]]; then rc_failed 7 ; fi # program is not running + rc_status # all running ok + ;; force-reload-server|restart-server) $0 stop-server From 73350f6451725d38ec980cce76493990fbe16f7c Mon Sep 17 00:00:00 2001 From: rafael Date: Tue, 7 Mar 2023 19:37:04 +0100 Subject: [PATCH 02/17] 10298 adding detailed info for general status for debbuging and fix some error codes --- pandora_server/util/pandora_server | 117 ++++++++++++++++------------- 1 file changed, 65 insertions(+), 52 deletions(-) diff --git a/pandora_server/util/pandora_server b/pandora_server/util/pandora_server index 4d9e3f0c38..1e612c968f 100755 --- a/pandora_server/util/pandora_server +++ b/pandora_server/util/pandora_server @@ -36,7 +36,6 @@ export PANDORA_HOME_EXTRA="/etc/pandora/conf.d" export PANDORA_DAEMON=/usr/bin/pandora_server export PANDORA_HA=/usr/bin/pandora_ha export PID_DIR=/var/run -export INCLUDE_EXTRA_CONFS=0 declare -A SERVERS_NAMES # Environment variables @@ -127,40 +126,64 @@ function extra_confs () { return 0 fi - # declare array - INCLUDE_EXTRA_CONFS=0 - # Loop all secondary servers confs for conf in ${EXTRA_CONF[@]} ; do + tmp_server_name=$(grep servername $PANDORA_HOME_EXTRA/$conf | grep -v '^#' | tail -1 | awk '{ print $2 }') + SERVERS_NAMES["$PANDORA_HOME_EXTRA/$conf"]=$tmp_server_name + done + + INCLUDE_EXTRA_CONFS=1 +} + +function check_extra_confs () { + [ "$1" ] || echo Error no defined conf found local tmp_server_name='' local mastery='' + tmp_server_name=$(grep servername $1 | grep -v '^#' | tail -1 | awk '{ print $2 }') # Check servername - tmp_server_name=$(grep servername $PANDORA_HOME_EXTRA/$conf | grep -v '^#' | tail -1 | awk '{ print $2 }') if [ "$tmp_server_name" == '' ]; then - echo "Error: The config file $conf has no sever name defined, servername is mandatory for secondary servers" + echo "Error: The config file $1 has no sever name defined, servername is mandatory for secondary servers" rc_exit fi if [ "$tmp_server_name" == "$SERVERS_NAMES[$PANDORA_HOME]" ]; then - echo "Error: The config file $PANDORA_HOME_EXTRA/$conf has the same servername as the primary server, servername should be unique for secondary servers" + echo "Error: The config file $1 has the same servername as the primary server, servername should be unique for secondary servers" rc_exit fi # check other confs servernames (todo) + local _count=0 + for name in ${!SERVERS_NAMES[@]}; do + [[ ${SERVERS_NAMES[$name]} == $tmp_server_name ]] && _count=`expr $_count + 1` + if [[ $_count -gt 1 ]] ; then + echo "Error: The config file $1 has the same servername as the another secondary server, servername should be unique for secondary servers" + rc_exit + fi + done # Check mastery - mastery=$(grep master $PANDORA_HOME_EXTRA/$conf | grep -v '^#' | tail -1 | awk '{ print $2 }') + mastery=$(grep master $1 | grep -v '^#' | tail -1 | awk '{ print $2 }') if [[ $mastery -ne 0 ]]; then - echo "Error: The config file $PANDORA_HOME_EXTRA/$conf has the same servername master value higer than 0, master should be disable for secondary servers" + echo "Error: The config file $1 has the same servername master value higer than 0, master should be disable for secondary servers" rc_exit fi - SERVERS_NAMES["$PANDORA_HOME_EXTRA/$conf"]=$tmp_server_name - - done - - INCLUDE_EXTRA_CONFS=1 +} + +function server_status () { + local _couter=0 + for key in ${!SERVERS_NAMES[@]}; do + unset SEC_PID + SEC_PID=$(pidof_secondary_server $key) + if [ -z "$SEC_PID" ] ; then + echo "${SERVERS_NAMES[$key]} ($key) Server is not running." + _couter=`expr $_couter + 1` + else + echo "${SERVERS_NAMES[$key]} ($key) Server is running with PID: $SEC_PID." + fi + done + [[ $_couter -gt 0 ]] && rc_failed 7 || rc_status -v } # Main script @@ -172,7 +195,7 @@ then rc_exit fi -extra_confs # check if extra confs are defined +extra_confs # check for config files case "$1" in start) @@ -236,42 +259,45 @@ case "$1" in if [ -z "$PANDORA_PID" ] then echo "$PANDORA_RB_PRODUCT_NAME HA is not running." - rc_failed 7 # program is not running + server_status + rc_failed 7 # program is not running else echo "$PANDORA_RB_PRODUCT_NAME HA is running with PID $PANDORA_PID." - rc_status + server_status + rc_status -v fi ;; start-server) - _couter=0 + _count=0 for key in ${!SERVERS_NAMES[@]}; do + [[ $key != "/etc/pandora/pandora_server.conf" ]] && check_extra_confs $key unset SEC_PID SEC_PID=$(pidof_secondary_server $key) if [ ! -z "$SEC_PID" ] ; then echo "${SERVERS_NAMES[$key]} ($key) Server is currently running on this machine with PID ($SEC_PID)." - _counter+=1 - fi - done - if [[ _counter -gt 0 ]]; then rc_exit ; fi # running start on a service already running - - export PERL_LWP_SSL_VERIFY_HOSTNAME=0 - _couter=0 - for key in ${!SERVERS_NAMES[@]}; do - $PANDORA_DAEMON $key -D - sleep 1 - unset SEC_PID - SEC_PID=$(pidof_secondary_server $key) - if [ ! -z "$SEC_PID" ] ; then - echo "${SERVERS_NAMES[$key]} Server is now running with PID $SEC_PID" - _counter+=1 + continue else - echo "Cannot ${SERVERS_NAMES[$key]} start Server. Aborted." - echo "Check ${SERVERS_NAMES[$key]} log files at /var/log/pandora/pandora_server.error & pandora_server.log" - echo "error" - rc_failed 7 # program is not running + + export PERL_LWP_SSL_VERIFY_HOSTNAME=0 + $PANDORA_DAEMON $key -D + sleep 1 + unset SEC_PID + SEC_PID=$(pidof_secondary_server $key) + if [ ! -z "$SEC_PID" ] ; then + echo "${SERVERS_NAMES[$key]} Server is now running with PID $SEC_PID" + else + echo "Cannot ${SERVERS_NAMES[$key]} start Server. Aborted." + echo "Check ${SERVERS_NAMES[$key]} log files at '/var/log/pandora/pandora_server.error' & 'pandora_server.log'" + _count=`expr $_count + 1` + fi fi done - if [[ _counter > 0 ]]; then rc_status -v ; fi + + if [[ _count -gt 0 ]]; then + rc_failed 7 + else + rc_status -v + fi ;; stop-server) @@ -307,20 +333,7 @@ case "$1" in rc_status -v ;; status-server) - _couter=0 - for key in ${!SERVERS_NAMES[@]}; do - unset SEC_PID - SEC_PID=$(pidof_secondary_server $key) - if [ -z "$SEC_PID" ] ; then - echo "${SERVERS_NAMES[$key]} ($key) Server is not running." - _counter+=1 - else - echo "${SERVERS_NAMES[$key]} ($key) Server is running with PID: $SEC_PID." - fi - done - if [[ _counter -gt 0 ]]; then rc_failed 7 ; fi # program is not running - rc_status # all running ok - + server_status ;; force-reload-server|restart-server) $0 stop-server From db5451a26b423e9397949e6d478ff7ea206c9f03 Mon Sep 17 00:00:00 2001 From: rafael Date: Wed, 8 Mar 2023 11:46:03 +0100 Subject: [PATCH 03/17] 10298 Adding conf.d directory creation to the installer, create a .template example conf, adding condition to pandora ha to just monitor and manage the primary pandora_server --- .../conf/pandora_server_sec.conf.template | 738 ++++++++++++++++++ pandora_server/pandora_server_installer | 7 + pandora_server/util/pandora_ha.pl | 2 +- 3 files changed, 746 insertions(+), 1 deletion(-) create mode 100644 pandora_server/conf/pandora_server_sec.conf.template diff --git a/pandora_server/conf/pandora_server_sec.conf.template b/pandora_server/conf/pandora_server_sec.conf.template new file mode 100644 index 0000000000..90d71af5fd --- /dev/null +++ b/pandora_server/conf/pandora_server_sec.conf.template @@ -0,0 +1,738 @@ +############################################################################# +# Pandora FMS Server Parameters +# Pandora FMS, the Flexible Monitoring System. +# Version 7.0NG.769 +# Licensed under GPL license v2, +# (c) 2003-2021 Artica Soluciones Tecnologicas +# http://www.pandorafms.com +# Please change it for your setup needs +############################################################################# + +# Servername: Name of this server +# if not given, it takes hostname. It's preferable to setup one +# because machine name could change by some reason. + +servername greystone_sec + +# incomingdir: Defines directory where incoming data packets are stored +# You could set directory relative to base path or absolute, starting with / + +incomingdir /var/spool/pandora/data_in + +# log_file: Main logfile for pandora_server +# You could set file relative to base path or absolute, starting with / + +log_file /var/log/pandora/pandora_server.log + +# Log file for Pandora FMS SNMP console. Its generated by NetSNMP Trap daemon +# If you change it, please update the file /etc/logrotate.d/pandora_server accordingly. + +snmp_logfile /var/log/pandora/pandora_snmptrap.log + +# Error logfile: aux logfile for pandora_server errors (in Daemon mode) +# You could set file relative to base path or absolute, starting with / + +errorlog_file /var/log/pandora/pandora_server.error + +# daemon: Runs in daemon mode (background) if 1, if 0 runs in foreground +# this could be also configured on commandline with -D option + +# daemon 1 + +# dbengine: mysql +dbengine mysql + +# Database credentials. A VERY important configuration. +# This must be the same credentials used by your Pandora FMS Console +# but could be different if your console is not running in the same +# host than the server. Check your console setup in /include/config.php + +# dbname: Database name (pandora by default) + +dbname pandora + +# dbuser: Database user name (pandora by default) + +dbuser pandora + +# dbpass: Database password + +dbpass pandora + +# dbhost: Database hostname or IP address + +dbhost 127.0.0.1 + +# dbport: Database port number +# Default value depends on the dbengine (mysql: 3306) +#dbport 3306 + +# dbssl: Enable (1) or disable (0) SSL for the database connection. + +dbssl 0 + +# dbsslcafile: Path to a file in PEM format that contains a list of trusted SSL certificate authorities. + +# dbsslcafile + +# dbsslcapath: Path to a directory that contains trusted SSL certificate authority certificates in PEM format. + +# dbsslcapath + +# verbosity: level of detail on errors/messages (0 default, 1 verbose, 2 debug.... 10 noisy) +# -v in command line (verbose) or -d (debug). Set this to 10 when try to locate problems and +# set to 1 or 3 on production enviroments. + +verbosity 3 + +# Master Server priority. The running server with the highest master value will +# be the master. Ties are broken at random. If set to 0, this server will +# never become master. +master 0 + +# Activate Pandora SNMP console (depending on snmptrapd) + +snmpconsole 0 + +# snmpconsole_threads: number of SNMP console threads for processing SNMP traps. + +snmpconsole_threads 1 + +# If set to 1, traps from the same source will never be processed in parallel. 0 by default. +#snmpconsole_lock 0 + +# Time between consecutive reads of the SNMP log file in seconds. Defaults to server_threshold. +#snmpconsole_threshold 5 + +# Attempt to translate variable bindings when processing SNMP traps. 1 enabled, 0 disabled. 0 by default. (ENTERPRISE ONLY). + +translate_variable_bindings 0 + +# Attempt to translate enterprise strings when processing SNMP traps. 1 enabled, 0 disabled. 1 by default. (ENTERPRISE ONLY). + +translate_enterprise_strings 0 + +# snmptrapd will ignore authenticationFailure traps if set to 1. + +snmp_ignore_authfailure 1 + +# snmptrapd will read the PDU source address instead of the agent-addr field is set to 1. + +snmp_pdu_address 0 + +# Path to the snmp_trapd binary. If set to manual, the server will not attemp to start snmp_trapd. + +#snmp_trapd manual + +# SNMP Trap forwarding. Go to https://pandorafms.com/manual/ for more information. +#snmp_forward_trap 1 +#snmp_forward_ip 192.168.1.145 +#snmp_forward_version 1 +#snmp_forward_secName +#snmp_forward_engineid +#snmp_forward_authProtocol +#snmp_forward_authPassword +#snmp_forward_privProtocol +#snmp_forward_privPassword +#snmp_forward_secLevel +#snmp_forward_community + +# Activate (1) Pandora Network Server + +networkserver 0 + +# Activate (1) Pandora Data Server + +dataserver 0 + +# Enable (1) or disable (0) the Data Server smart queue, which gives priority +# to new data coming from agents at the expense of buffered XML files. +dataserver_smart_queue 1 + +# Activate (1) Pandora FMS Discovery server + +discoveryserver 0 + +# Discovery SAP (PANDORA FMS ENTERPRISE ONLY) +# java /usr/bin/java + +# Discovery SAP utils (PANDORA FMS ENTERPRISE ONLY) +# sap_utils /usr/share/pandora_server/util/recon_scripts/SAP + +# Discovery Microsoft SQL ODBC driver (PANDORA FMS ENTERPRISE ONLY) +# mssql_driver ODBC Driver 17 for SQL Server + +# pluginserver : 1 or 0. Set to 1 to activate plugin server with this setup + +pluginserver 0 + +# Pandora FMS Plugin exec tool filepath (by default at /usr/bin) + +plugin_exec /usr/bin/timeout + +# predictionserver : 1 or 0. Set to 1 to activate prediction server with this setup +# DISABLED BY DEFAULT + +predictionserver 0 + +# wmiserver : 1 or 0. Set to 1 to activate WMI server with this setup +# DISABLED BY DEFAULT + +wmiserver 0 + +# Network timeout (in seconds) for timeout in network connections for Network agents + +network_timeout 4 + +# Network timeout (in seconds) for timeout in remote execution commands (PANDORA FMS ENTERPRISE ONLY). + +rcmd_timeout 10 + +# Pandora FMS remote execution commands timeout tool filepath (by default at /usr/bin) + +rcmd_timeout_bin /usr/bin/timeout + +# Remote execution modules, ssh_launcher extra option (PANDORA FMS ENTERPRISE ONLY). +ssh_launcher /usr/share/pandora_server/util/ssh_launcher.sh + +# Server keepalive (in seconds) + +server_keepalive 45 + +# Log server thread status to disk (always set to 0, except when debugging). + +thread_log 0 + +# Server Threshold: defines number of seconds of main loop (in sec) + +server_threshold 5 + +# Network threads: Do not set too high (~40). Each threads make a network module check. + +network_threads 4 + +# icmp_checks x : defines number of pings for each icmp_proc module type. at least one of +# that ping should be 1 to report 1. Setting this to 1 will make all icmp montioring faster but +# with more probability of failure. + +icmp_checks 1 + +# Number of ICMP packets to send per request. +icmp_packets 2 + +# tcp specific options : +# tcp_checks: number of tcp retries if first attempt fails. +# tcp_timeout: specific timeout for tcp connections + +tcp_checks 1 +tcp_timeout 10 + +# snmp specific options : +# snmp_checks: number of snmp request retries if first attempt fails. +# snmp_timeout: specific timeout for snmp request. + +snmp_checks 1 +snmp_timeout 4 + +# snmp_proc_deadresponse 1 (default): Return DOWN if cannot contact +# or receive NULL from a SNMP PROC module. + +snmp_proc_deadresponse 1 + +# plugin_threads: Specify number of plugin server threads for processing plugin calls + +plugin_threads 1 + +# plugin_timeout: Specify number of seconds calling plugin exec waiting for response +# after this time, call is aborted and result is "unknown". + +plugin_timeout 12 + +# wmi_timeout : specific timeout for wmi request. + +wmi_timeout 7 + +# wmi_threads: Specify number of WMI server threads for processing WMI remote calls + +wmi_threads 1 + +# WMI client binary (wmic by default). + +#wmi_client pandorawmic + +# recon_threads. Each thread will scan a different scantask. + +recon_threads 1 + +# dataserver_threads: Number of threads for data server (XML processing threads) + +dataserver_threads 1 + +# mta_address: External Mailer (MTA) IP Address to be used by Pandora FMS internal email capabilities +# If not set, the MTA configuration specified in the Pandora FMS Console will be used. + +#mta_address localhost + +# mta_port, this is the mail server port (default 25) + +#mta_port 25 + +# mta_user MTA User (if needed for auth, FQD or simple user, depending on your server) + +#mta_user myuser@mydomain.com + +# mta_pass MTA Pass (if needed for auth) + +#mta_pass mypassword + +# mta_auth MTA Auth system (if needed, it supports LOGIN, PLAIN, CRAM-MD5, DIGEST-MD) + +#mta_auth LOGIN + +# mta_from Email address that sends the mail, by default is pandora@localhost +# probably you need to change it to avoid problems with your antispam + +#mta_from Pandora FMS + +# SMTP encryption protocol (none, ssl, starttls) + +#mta_encryption none + +# Set 1 if want eMail deliver alert in separate mail (default). +# Set 0 if want eMail deliver shared mail by all destination. +mail_in_separate 1 + + +# xprobe2: Optional package to detect OS types using advanced TCP/IP +# fingerprinting tecniques, much more accurates than stadard nmap. +# If not provided, nmap is used insted xprobe2 + +xprobe2 /usr/bin/xprobe2 + +# nmap: If provided, is used to detect OS type with recon server using +# advanded OS fingerprint technique. Xprobe2 gives more accurate results +# Nmap is also used to do TCP port scanning in detected host. + +nmap /usr/bin/nmap + +# Default path is /usr/sbin/fping for installation default in distro Centos , if you are installing in other distribution, +# you install fping in /usr/bin/fping and change the path in this line. +# Path to the fping binary. Used by the Enterprise ICMP Server. +fping /usr/sbin/fping +# fping /usr/bin/fping + +# A value that specifies how aggressive nmap should be from 1 to 5. 1 means slower but more reliable, 5 means faster but less reliable. 2 by default. +nmap_timing_template 2 + +# Like nmap_timing_template, but applies to Satellite Server and Recon Server network scans. 3 by default. +recon_timing_template 3 + +# snmpget: Needed to do SNMP checks. By default is on /usr/bin/snmpget + +snmpget /usr/bin/snmpget + +# Location of the braa binary needed by the Enterprise SNMP Server +# /usr/bin/braa by default (PANDORA FMS ENTERPRISE ONLY). + +braa /usr/bin/braa + +# Number of retries before braa hands a module over to the Network Server (PANDORA FMS ENTERPRISE ONLY). + +braa_retries 3 + +# Location of the pandorafsnmp binary needed by the Enterprise SNMP Server. +# /usr/bin/pandorafsnmp by default (PANDORA FMS ENTERPRISE ONLY). + +fsnmp /usr/bin/pandorafsnmp + +# Default group id for new agents created with Pandora FMS Data Server +# If this token is enabled and Agent is setup with a fixed group, server settings will override agent settings +# If this token is disabled and group is not provided in the agent, or provided group doesn't exist, agent data +# will be dropped. We use the Group ID #10 (Unknown) for a "valid" default value, please change as your own decision. + +autocreate_group 10 + +# Works like autocreate_group, except the name of the group is specified (instead of its id). Do not set both. +#autocreate_group_name Unknown + +# If set to 1, new agents will be added to the group specified by autocreate_group (the group specified by the agent will be used as fallback). +# If set to 0, new agents will be added to the group specified by the agent (the group specified by autocreate_group will be used as fallback). + +autocreate_group_force 0 + +# Set to 1 if want to autocreate agents with Pandora FMS Data Server, +# set to 0 to disable (for security purposes, for example). + +autocreate 1 + +# max_log_size: Specify max size of Pandora FMS server log file (1MB by default). If +# log file grows above this limit, is renamed to "pandora_server.log.0". + +max_log_size 1048576 + +# max_log_generation: Specify max generation count (between 1 and 9) of Pandora FMS server log files. +max_log_generation 1 + +# max_queue_files (5000 by default) +# When server have more than max_queue_files in incoming directory, skips the read +# the directory to avoid filesystem overhead. + +max_queue_files 5000 + +# If set to 0, the timestamp attribute in XML data files will be ignored and the system time will be used instead. + +# use_xml_timestamp 1 + +# Pandora FMS will autorestart itself each XXX seconds, use this if you experience problems with +# shutting down threads, or other stability problems. + +# auto_restart 86400 + +# Pandora FMS will restart after restart_delay seconds on critical errors. + +restart 1 +restart_delay 60 + +# More information about GIS Setup in /usr/share/pandora_server/util/gis.README +# Flag to activate GIS (positional information for agents and maps) +# by default it is desactivated + +#activate_gis 0 + +# Radius of error in meters to consider two gis locations as the same location. + +#location_error 50 + +# Recon reverse geolocation file. This is the database with the reverse +# geolocation information using MaxMind GPL GeoLiteCity.dat format). +# Comment it to disable the IP geolocation on agent creation. + +#recon_reverse_geolocation_file /usr/local/share/GeoIP/GeoIPCity.dat + +# Radius (in meters) of the circle in where the agents will be place randomly +# when finded by a recon task. Center of the circle is guessed +# by geolocating the IP. + +#recon_location_scatter_radius 1000 + +# Pandora Server self-monitoring (embedded agent) (by default enabled) + +self_monitoring 1 + +# Self monitoring interval (in seconds). +self_monitoring_interval 300 + +# Update parent from the agent xml + +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. +# NOTE: If you dont pay the service to google, they will ban your IP in a few days. + +# google_maps_description 1 + +# This enable realtime reverse geocoding using Openstreet Maps public api. +# This requires internet access, and could have performance penalties processing GIS +# information due the connetion needed to resolve all GIS input. +# You can alter the code to use a local (your own) openstreet maps server. + +# openstreetmaps_description 1 + +# Enable (1) or disable (0) Pandora FMS Web Server/Goliat. + +webserver 0 + +# Number of threads for the Web Server/Goliat. + +web_threads 1 + +# Default timeout (in seconds) for web modules. + +web_timeout 60 + +# Uncomment to perform web checks with LWP instead of CURL. +#web_engine lwp + +# Enable (1) or disable (0) Pandora FMS Inventory Server. + +inventoryserver 0 + +# Number of threads for the Inventory Server. + +inventory_threads 1 + +# Enable (1) or disable (0) Pandora FMS Export Server (PANDORA FMS ENTERPRISE ONLY). + +exportserver 0 + +# Number of threads for the Export Server (PANDORA FMS ENTERPRISE ONLY). + +export_threads 1 + +# Enable (1) or disable (0) Pandora FMS Event Server (PANDORA FMS ENTERPRISE ONLY). + +eventserver 0 + +# Enable (1) or disable (0) Pandora FMS Correlation Server (PANDORA FMS ENTERPRISE ONLY). + +correlationserver 0 + +# Time in seconds to re-evaluate correlation alerts pool (PANDORA FMS ENTERPRISE ONLY). + +correlation_threshold 30 + +# Correlated alerts, event window in seconds (3600 by default) (PANDORA FMS ENTERPRISE ONLY). + +event_window 3600 + +# Correlated Alerts, log window in seconds (3600 by default) (PANDORA FMS ENTERPRISE ONLY). + +log_window 3600 + +# Pre-load windows on start with available information. (PANDORA FMS ENTERPRISE ONLY). +#preload_windows 0 + +# Correlated Alerts, group cache ttl (in seconds). Set to 0 to disable. (PANDORA FMS ENTERPRISE ONLY). +#event_server_cache_ttl 10 + +# Log retrieving, items per request. (High values could make elasticsearch crash) +#elastic_query_size 10 + +# If set to 1, an alert will not be fired if the last event it generated is in 'in-process' status. + +event_inhibit_alerts 0 + +# Enable (1) or disable (0) Pandora FMS Enterprise ICMP Server (PANDORA FMS ENTERPRISE ONLY). +# You need nmap 5.20 or higher in order to use this ! + +icmpserver 0 + +# Number of threads for the Enterprise ICMP Server (PANDORA FMS ENTERPRISE ONLY). + +icmp_threads 4 + +# Enable (1) or disable (0) Pandora FMS Enterprise SNMP Server (PANDORA FMS ENTERPRISE ONLY). +# Check braa tool is running and operative. + +snmpserver 0 + +# Number of threads for the Enterprise SNMP Server (PANDORA FMS ENTERPRISE ONLY). + +snmp_threads 4 + +# Block size for block producer/consumer servers, that is, the number of modules +# per block (15 by default) (PANDORA FMS ENTERPRISE ONLY). + +block_size 20 + +# If set to 1, process XML data files in a stack instead of a queue. 0 by default. +# WARNING: Incremental modules will not work properly if dataserver_lifo is set to 1!!! + +dataserver_lifo 0 + +# If set to 1, the policy manager is enabled and the server is listening the policy queue. +# 0 by default (PANDORA FMS ENTERPRISE ONLY) + +policy_manager 1 + +# If set to 1, new events validate older event for the same module. This will +# affect the performance of the server. This was the "normal behaviour" on previous (4.x) versions. +# disable only if you really know what you are doing !!. + +event_auto_validation 1 + +# If defined, events generated by Pandora FMS will be written to the specified text file. +#event_file /var/log/pandora/pandora_events.txt + +# Set the maximum number of traps that will be processed from a single source in a +# configured time interval. +snmp_storm_protection 25 + +# Time interval for snmp_storm protection (in seconds). +snmp_storm_timeout 10 + +# Silenced time period in seconds, when trap storm is detected +snmp_storm_silence_period 300 + +# Default texts for some events. The macros _module_ and _data_ are supported. +#text_going_down_normal Module '_module_' is going to NORMAL (_data_) +#text_going_up_critical Module '_module_' is going to CRITICAL (_data_) +#text_going_up_warning Module '_module_' is going to WARNING (_data_) +#text_going_down_warning Module '_module_' is going to WARNING (_data_) +#text_going_unknown Module '_module_' is going to UNKNOWN + +# Events older that the specified time (in seconds) will be auto-validated. Set to 0 to disable this feature. +event_expiry_time 0 + +# Only events more recent than the specified time window (in seconds) will be auto-validated. This value must +# be greater than event_expiry_time. +#event_expiry_window 86400 + +# If set to 1, SNMP modules run by the Network Server will be claimed back by +# the SNMP Enterprise Server when pandora_db is run. +claim_back_snmp_modules 1 + +# If set to 1 asynchronous modules that do not receive data for twice their +# interval will become normal. Set to 0 to disable. +async_recovery 1 + +# Console API credentials. +# Required for some features like the module graphs macros. + +# console_api_url: Api URL (http://localhost/pandora_console/include/api.php by default) +# console_api_url http://localhost/pandora_console/include/api.php + +# console_api_pass: Api pass +# console_api_pass 1234 + +# Passphrase used to generate the key for password encryption (PANDORA FMS ENTERPRISE ONLY). +#encryption_passphrase passphrase + +# Enable (1) or disable (0) events related to the unknown module status. +unknown_events 1 + +# Time interval (as a multiple of the module interval) before a module becomes unknown. Twice the module's interval by default. +#unknown_interval 2 + +# Number of unknown modules that will be processed per iteration. +unknown_block_size 1000 + +# Maximum executing time of an alert (in seconds) +global_alert_timeout 15 + +# If set to 1 allows PandoraFMS Server to be configured via the web console (PANDORA FMS ENTERPRISE ONLY). +remote_config 0 + +# Remote address to send the configuration file (PANDORA FMS ENTERPRISE ONLY). +remote_config_address localhost + +# Remote port to send the configuration file (PANDORA FMS ENTERPRISE ONLY). +#remote_config_port 41121 + +# Extra options for the Tentacle client to send the configuration file (PANDORA FMS ENTERPRISE ONLY). +#remote_config_opts + +# Module status change events will not be generated and module alerts will not +# be executed for the specified number of seconds since the server starts up. +warmup_event_interval 0 + +# Modules will not become unknown (so no unknown events will be generated) and +# keepalive modules will not be updated for the specified number of seconds +# since the server starts up. +warmup_unknown_interval 300 + +# Directory were additional enc files for the XML parser are located. +enc_dir /usr/share/pandora_server/enc/ + +# The number of times dynamic_min and dynamic_max will be recalculated per dynamic_interval. +# Go to https://pandorafms.com/manual/ for more information. +dynamic_updates 5 +#dynamic_warning +#dynamic_constant + +# Periodically update unknown modules (1), instead of only once (0). Periodic +# updates may affect server performance. +unknown_updates 0 + +# Enable (1) or disable (0) the Pandora FMS WUX Server (PANDORA FMS ENTERPRISE ONLY). +wuxserver 0 + +# Host of the Selenium Grid Server. +#wux_host localhost + +# Port of the Selenium Grid Server. +#wux_port 4444 + +# Maximum timeout to connect to a target web site, also for communications with a Selenium Grid server. +#wux_webagent_timeout 15 + +# Force closing previous sessions on remote wux_host, only for Selenium Grid server 3. +#clean_wux_sessions 1 + +# Enable (1) or disable (0) the Pandora FMS Syslog Server (PANDORA FMS ENTERPRISE ONLY) disabled by default. +syslogserver 0 + +# Full path to syslog's output file (PANDORA FMS ENTERPRISE ONLY). +syslog_file /var/log/messages + +# Number of threads for the Syslog Server (PANDORA FMS ENTERPRISE ONLY). +syslog_threads 2 + +# Maximum number of lines queued by the Syslog Server's producer on each run (PANDORA FMS ENTERPRISE ONLY). +syslog_max 65535 + +# Sync Server +#syncserver + +# Port tentacle server +#sync_port 41121 + +# Sync certificate path of the authenticating CA +#sync_ca /home/cacert.pem + +# Sync server certificate path +#sync_cert /home/tentaclecert.pem + +# Sync server certificate private key path +#sync_key /home/tentaclekey.pem + +# Sync number of attempts +#sync_retries 3 + +# Sync timeout +#sync_timeout 10 + +# Address +# sync_address + +# Network manager configuration server (PANDORA FMS ENTERPRISE ONLY). +#ncmserver 0 + +# Threads for NCM server (PANDORA FMS ENTERPRISE ONLY). +ncmserver_threads 1 + +# NCM utility to avoid Net::SSH::Expect issues in multi-threaded environments. +ncm_ssh_utility /usr/share/pandora_server/util/ncm_ssh_extension + +# Pandora FMS Daemon Watchdog execution interval in seconds (PANDORA FMS ENTERPRISE ONLY). +ha_interval 30 + +# Pandora FMS Daemon Watchdog monitoring interval in seconds. Must be a multiple of ha_interval (PANDORA FMS ENTERPRISE ONLY). +ha_monitoring_interval 60 + +# Enable (1) or disable (0) Pandora FMS Alert Server. +alertserver 0 + +# Pandora FMS Alert Server threads. +alertserver_threads 4 + +# Generate an hourly warning event if alert execution is being delayed more than alertserver_warn seconds. +alertserver_warn 180 + +# If set to 1, alerts are queued for the Pandora FMS Alert Server.If alertserver is set to 1, alerts are always queued. +alertserver_queue 0 + +# Pandora FMS HA MySQL cluster splitbrain auto-recovery (PANDORA FMS ENTERPRISE ONLY) +# IMPORTANT! Please understand and configure all settings from pandora_console/index.php?sec=gservers&sec2=enterprise/godmode/servers/HA_cluster&tab=setup +# before enable this feature. +#splitbrain_autofix 0 + +# Pandora FMS HA MySQL cluster splitbrain auto-recovery settings (PANDORA FMS ENTERPRISE ONLY) +# Maximum number of retries +#ha_max_splitbrain_retries 2 +# Maximum number of retries to verify resync status. +#ha_max_resync_wait_retries 3 +# Maximum number of seconds waiting while verifying resync status. +#ha_resync_sleep 10 + +# Enable (1) or disable (0) the Tentacle Server watchdog (enabled by default). + +tentacle_service_watchdog 1 + +# Enable (1) or disable (0) the parameter of mysql ssl certification (mysql_ssl_verify_server_cert) (enabled by default). + +verify_mysql_ssl_cert 1 diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 6479a6943a..d4ff0a428d 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -26,6 +26,7 @@ PANDORA_SERVER=/etc/init.d/pandora_server TENTACLE_SERVER=/etc/init.d/tentacle_serverd PANDORA_CFG_FILE=$PANDORA_CFG_DIR/pandora_server.conf PANDORA_CFG_FILE_DIST=conf/pandora_server.conf.new +PANDORA_CFG_FILE_DIST_SEC=conf/pandora_server_sec.conf.template PANDORA_INIT_SCRIPT=util/pandora_server TENTACLE_CFG_DIR=/etc/tentacle TENTACLE_CFG_FILE=$TENTACLE_CFG_DIR/tentacle_server.conf @@ -348,6 +349,12 @@ install () { chmod 770 $DESTDIR$PANDORA_CFG_FILE fi + echo "Creating sec setup directory in $PANDORA_CFG_DIR/conf.d" + mkdir -p $DESTDIR$PANDORA_CFG_DIR/conf.d 2> /dev/null + echo cp $PANDORA_CFG_FILE_DIST_SEC $DESTDIR$PANDORA_CFG_DIR/conf.d/ + cp $PANDORA_CFG_FILE_DIST_SEC $DESTDIR$PANDORA_CFG_DIR/conf.d/ + + echo "Installing Pandora Server manual" [ -d $DESTDIR$MANDIR ] || mkdir -p $DESTDIR$MANDIR cp man/man1/pandora_server.1.gz $DESTDIR$MANDIR diff --git a/pandora_server/util/pandora_ha.pl b/pandora_server/util/pandora_ha.pl index 9e44812908..378f864afa 100755 --- a/pandora_server/util/pandora_ha.pl +++ b/pandora_server/util/pandora_ha.pl @@ -192,7 +192,7 @@ sub ha_keep_pandora_running($$) { if ($OSNAME eq "freebsd") { $control_command = "status_server"; } - my $pid = `$Pandora_Service $control_command | awk '{print \$NF*1}' | tr -d '\.'`; + my $pid = `$Pandora_Service $control_command | grep -v /conf.d/ | awk '{print \$NF*1}' | tr -d '\.'`; if ( ($pid > 0) && ($component_last_contact > 0)) { # service running but not all components From d315d4cda7ba32a081cc0a05703d2d74daaadcaa Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 14 Mar 2023 13:16:58 +0100 Subject: [PATCH 04/17] #10633 added token for control check conexion interval --- pandora_console/godmode/setup/setup_general.php | 8 ++++++++ pandora_console/include/functions_config.php | 8 ++++++++ .../include/javascript/connection_check.js | 11 ++++++----- pandora_console/index.php | 1 + 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index d19d3587c6..91bab6902b 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -595,6 +595,14 @@ $table->data[$i++][1] = html_print_checkbox_switch( true ); +$table->data[$i][0] = __('Check conexion interval'); +$table->data[$i++][1] = html_print_input_number( + [ + 'name' => 'check_conexion_interval', + 'min' => 90, + 'value' => $config['check_conexion_interval'], + ] +); echo '
'; echo '
'; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 24d2de537d..0c564e0458 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -368,6 +368,10 @@ function config_update_config() $error_update[] = __('Enable console report'); } + if (config_update_value('check_conexion_interval', get_parameter('check_conexion_interval'), true) === false) { + $error_update[] = __('Check conexion interval'); + } + if (config_update_value('unique_ip', get_parameter('unique_ip'), true) === false) { $error_update[] = __('Unique IP'); } @@ -2281,6 +2285,10 @@ function config_process_config() config_update_value('reporting_console_enable', 0); } + if (!isset($config['check_conexion_interval'])) { + config_update_value('check_conexion_interval', 180); + } + if (!isset($config['elasticsearch_ip'])) { config_update_value('elasticsearch_ip', ''); } diff --git a/pandora_console/include/javascript/connection_check.js b/pandora_console/include/javascript/connection_check.js index 66027b6de0..f791a36232 100644 --- a/pandora_console/include/javascript/connection_check.js +++ b/pandora_console/include/javascript/connection_check.js @@ -4,16 +4,17 @@ * Connection Check * -------------------------------------- */ - -checkConnection(1); +$(document).ready(function() { + checkConnection(get_php_value("check_conexion_interval")); +}); /** * Performs connection tests every minutes and add connection listeners * @param {integer} time in minutes */ -function checkConnection(minutes) { - var cicle = minutes * 60 * 1000; +function checkConnection(seconds) { + var cicle = seconds * 1000; var checkConnection = setInterval(handleConnection, cicle); // Connection listeters. @@ -48,7 +49,7 @@ function handleConnection() { // If test connection file is not found, do not show message. if (err.status != 404) { connected = false; - msg = err; + msg = err.statusText; } else { connected = true; } diff --git a/pandora_console/index.php b/pandora_console/index.php index a2c9d62167..9751c46043 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1487,6 +1487,7 @@ echo html_print_div( ); // Connection lost alert. +set_js_value('check_conexion_interval', $config['check_conexion_interval']); ui_require_javascript_file('connection_check'); set_js_value('absolute_homeurl', ui_get_full_url(false, false, false, false)); $conn_title = __('Connection with server has been lost'); From e0c5921d59aa46fdb439db17405d1dd0fcfe8f75 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Wed, 15 Mar 2023 09:01:49 +0100 Subject: [PATCH 05/17] #10633 fixed size icon connection_check --- pandora_console/include/functions_ui.php | 2 +- pandora_console/include/styles/pandora.css | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 2413d872ef..4bbeb5fbda 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -7047,7 +7047,7 @@ function ui_print_message_dialog($title, $text, $id='', $img='', $text_button='' echo '
'; echo '
'; echo '
'; - echo html_print_image($img, true, ['alt' => $title, 'border' => 0]); + echo html_print_image($img, true, ['alt' => $title, 'border' => 0, 'class' => 'icon_connection_check']); echo '
'; echo '
'; echo '
'; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 4324dc0175..bd1fdf052e 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -11664,3 +11664,9 @@ div.ui-dialog-buttonset > button.ui-button.ui-corner-all.ui-widget:active { background-color: #0d312f; border-color: #0d312f; } + +.icon_connection_check { + width: 65px !important; + height: 65px !important; + margin-top: 10px; +} From 4b3bf70eb514cb6b0fd64621cb684231cc02ff16 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 15 Mar 2023 12:04:28 +0100 Subject: [PATCH 06/17] #10451 Fixed phardata --- .../lib/UpdateManager/UI/Manager.php | 4 +++- .../resources/javascript/umc_offline.js | 21 +++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/pandora_console/update_manager_client/lib/UpdateManager/UI/Manager.php b/pandora_console/update_manager_client/lib/UpdateManager/UI/Manager.php index 7c56dec08d..9c6abff902 100644 --- a/pandora_console/update_manager_client/lib/UpdateManager/UI/Manager.php +++ b/pandora_console/update_manager_client/lib/UpdateManager/UI/Manager.php @@ -623,7 +623,9 @@ class Manager if ($server_update === false) { $return['files'] = Client::checkOUMContent($file_path); } else { - $return['files'] = Client::checkTGZContent($file_path); + // Commented line for memory limit problems. + // $return['files'] = Client::checkTGZContent($file_path); + $return['files'] = null; } if (session_status() !== PHP_SESSION_ACTIVE) { diff --git a/pandora_console/update_manager_client/resources/javascript/umc_offline.js b/pandora_console/update_manager_client/resources/javascript/umc_offline.js index 027908ded7..a32dfc1e5c 100644 --- a/pandora_console/update_manager_client/resources/javascript/umc_offline.js +++ b/pandora_console/update_manager_client/resources/javascript/umc_offline.js @@ -172,18 +172,21 @@ function form_upload(url, auth, current_package) { log_zone.html("
" + texts.uploadSuccess + "
"); log_zone.append("
" + texts.uploadMessage + "
"); log_zone.append("
" + texts.clickToStart + "
"); - var file_list = - "

" + texts.fileList + "

"; - if (res.files) { - res.files.forEach(function(e) { - file_list += "
" + e + "
"; - }); + if (res.files !== null) { + var file_list = + "

" + texts.fileList + "

"; + + if (res.files) { + res.files.forEach(function(e) { + file_list += "
" + e + "
"; + }); + } + + file_list += "
"; + log_zone.append(file_list); } - file_list += "
"; - log_zone.append(file_list); - // Show messages $("#log_zone").slideDown(400, function() { $("#log_zone").height(200); From 284e20fc8a1deeae3e5942c466e8eb193a47c867 Mon Sep 17 00:00:00 2001 From: Calvo Date: Fri, 17 Mar 2023 10:58:58 +0100 Subject: [PATCH 07/17] Unified default netflow interval and deleted from console setup --- pandora_console/godmode/setup/setup_netflow.php | 12 ++++-------- pandora_console/include/functions_config.php | 8 -------- pandora_server/lib/PandoraFMS/Config.pm | 2 +- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/pandora_console/godmode/setup/setup_netflow.php b/pandora_console/godmode/setup/setup_netflow.php index fbecfa766d..e986f79244 100644 --- a/pandora_console/godmode/setup/setup_netflow.php +++ b/pandora_console/godmode/setup/setup_netflow.php @@ -46,12 +46,8 @@ $table->data[0][] = html_print_label_input_block( html_print_input_text('netflow_path', $config['netflow_path'], false, 50, 200, true) ); -$table->data[0][] = html_print_label_input_block( - __('Daemon interval'), - html_print_input_text('netflow_interval', $config['netflow_interval'], false, 50, 200, true) -); -$table->data[1][] = html_print_label_input_block( +$table->data[0][] = html_print_label_input_block( __('Daemon binary path'), html_print_input_text('netflow_daemon', $config['netflow_daemon'], false, 50, 200, true) ); @@ -61,7 +57,7 @@ $table->data[1][] = html_print_label_input_block( html_print_input_text('netflow_nfdump', $config['netflow_nfdump'], false, 50, 200, true) ); -$table->data[2][] = html_print_label_input_block( +$table->data[1][] = html_print_label_input_block( __('Nfexpire binary path'), html_print_input_text('netflow_nfexpire', $config['netflow_nfexpire'], false, 50, 200, true) ); @@ -71,7 +67,7 @@ $table->data[2][] = html_print_label_input_block( html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true) ); -$table->data[3][] = html_print_label_input_block( +$table->data[2][] = html_print_label_input_block( __('Disable custom live view filters'), html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true) ); @@ -82,7 +78,7 @@ $table->data[3][] = html_print_label_input_block( ); $onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;"; -$table->data[4][] = html_print_label_input_block( +$table->data[3][] = html_print_label_input_block( __('Name resolution for IP address'), html_print_checkbox_switch_extended('netflow_get_ip_hostname', 1, $config['netflow_get_ip_hostname'], false, $onclick, '', true) ); diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 057572a863..ce5cae371b 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1505,10 +1505,6 @@ function config_update_config() $error_update[] = __('Data storage path'); } - if (config_update_value('netflow_interval', (int) get_parameter('netflow_interval'), true) === false) { - $error_update[] = __('Daemon interval'); - } - if (config_update_value('netflow_daemon', get_parameter('netflow_daemon'), true) === false) { $error_update[] = __('Daemon binary path'); } @@ -2778,10 +2774,6 @@ function config_process_config() config_update_value('netflow_path', $default); } - if (!isset($config['netflow_interval'])) { - config_update_value('netflow_interval', SECONDS_10MINUTES); - } - if (!isset($config['netflow_daemon'])) { config_update_value('netflow_daemon', '/usr/bin/nfcapd'); } diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 5f08898b08..66c62da2f7 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -141,7 +141,7 @@ sub pandora_get_sharedconfig ($$) { # Netflow configuration options $pa_config->{"activate_netflow"} = pandora_get_tconfig_token ($dbh, 'activate_netflow', 0); $pa_config->{"netflow_path"} = pandora_get_tconfig_token ($dbh, 'netflow_path', '/var/spool/pandora/data_in/netflow'); - $pa_config->{"netflow_interval"} = pandora_get_tconfig_token ($dbh, 'netflow_interval', 300); + $pa_config->{"netflow_interval"} = pandora_get_tconfig_token ($dbh, 'netflow_interval', 3600); $pa_config->{"netflow_daemon"} = pandora_get_tconfig_token ($dbh, 'netflow_daemon', '/usr/bin/nfcapd'); # Log module configuration From 68f417f3f3bc28e324eb73763eb61392a2e689d2 Mon Sep 17 00:00:00 2001 From: slerena Date: Wed, 29 Mar 2023 18:24:18 +0000 Subject: [PATCH 08/17] Improved legibility for warning messages (warning class). --- pandora_console/include/styles/pandora.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index b4d57e1c79..9759a24306 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -1648,7 +1648,7 @@ table.info_box.warning { } .warning * { - color: #f3b200; + color: #8d4100; } .help { From d1e29075a3594f062570857f4f8468683fedb0df Mon Sep 17 00:00:00 2001 From: slerena Date: Wed, 29 Mar 2023 18:25:00 +0000 Subject: [PATCH 09/17] Change header copyright and other details --- pandora_console/include/styles/pandora.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 9759a24306..d8eec9b1b1 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -15,8 +15,8 @@ * |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______| * * ============================================================================ - * Copyright (c) 2005-2021 Artica Soluciones Tecnologicas - * Please see http://pandorafms.org for full contribution list + * Copyright (c) 2005-2023 Pandora FMS + * Please see https://pandorafms.com for full contribution list * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation for version 2. From 392139d22d2c9e57554d1ad5553f71555cc8ee9a Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 30 Mar 2023 01:00:16 +0200 Subject: [PATCH 10/17] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 74e0af2009..ce7f261fb8 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.770-230329 +Version: 7.0NG.770-230330 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index b811cd3723..01499b516c 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.770-230329" +pandora_version="7.0NG.770-230330" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index dab99b4711..ba2d92f954 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1023,7 +1023,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.770'; -use constant AGENT_BUILD => '230329'; +use constant AGENT_BUILD => '230330'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index df2f094194..37260dc4ea 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.770 -%define release 230329 +%define release 230330 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 06fe72b342..6b0c9c4c19 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.770 -%define release 230329 +%define release 230330 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index fbcef5e8ad..25f4bbff8b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.770" -PI_BUILD="230329" +PI_BUILD="230330" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 30df9148e5..f8a720b9a0 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230329} +{230330} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 3b69dd0af1..d330ab6c9e 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.770 Build 230329") +#define PANDORA_VERSION ("7.0NG.770 Build 230330") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 9786f5bb3a..2b8c5c52c2 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.770(Build 230329))" + VALUE "ProductVersion", "(7.0NG.770(Build 230330))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2035eda646..2132e41504 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.770-230329 +Version: 7.0NG.770-230330 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 884edecb5b..09dea86864 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.770-230329" +pandora_version="7.0NG.770-230330" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index bd150fc852..a98acabbf4 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC230329'; +$build_version = 'PC230330'; $pandora_version = 'v7.0NG.770'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1ae3824e7a..04954a578d 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index d2b00dd849..e5402e4baf 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.770 -%define release 230329 +%define release 230330 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 95323c1fe4..e23d4a759b 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.770 -%define release 230329 +%define release 230330 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 70be237d28..21f86ebcd7 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.770" -PI_BUILD="230329" +PI_BUILD="230330" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 8995679d6f..2346b270a7 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.770 Build 230329"; +my $version = "7.0NG.770 Build 230330"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 8266fd883d..728b705371 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.770 Build 230329"; +my $version = "7.0NG.770 Build 230330"; # save program name for logging my $progname = basename($0); From 2035d9831b569d0eb4662db2b45e8298d567780e Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 30 Mar 2023 13:02:36 +0200 Subject: [PATCH 11/17] #10378 permanent closed menu --- pandora_console/general/main_menu.php | 72 +++++++++++++++++---------- 1 file changed, 45 insertions(+), 27 deletions(-) diff --git a/pandora_console/general/main_menu.php b/pandora_console/general/main_menu.php index 1f9a204d95..800324b076 100644 --- a/pandora_console/general/main_menu.php +++ b/pandora_console/general/main_menu.php @@ -1,4 +1,5 @@ '; const id_selected = ''; if (id_selected != '') { var menuType_val = localStorage.getItem("menuType"); - if (menuType_val === 'classic') { + const closedMenuId = localStorage.getItem("closedMenuId"); + if (menuType_val === 'classic' && + (closedMenuId === '' || `icon_${id_selected}` !== closedMenuId) + ) { $(`ul#subicon_${id_selected}`).show(); + // Arrow. + $(`#icon_${id_selected}`).children().first().children().last().removeClass('arrow_menu_down'); + $(`#icon_${id_selected}`).children().first().children().last().addClass('arrow_menu_up'); } - // Arrow. - $(`#icon_${id_selected}`).children().first().children().last().removeClass('arrow_menu_down'); - $(`#icon_${id_selected}`).children().first().children().last().addClass('arrow_menu_up'); // Span. $(`#icon_${id_selected}`).children().first().children().eq(1).addClass('span_selected'); @@ -272,11 +276,11 @@ echo '
'; table_hover = $(this); handsIn = 1; openTime = new Date().getTime(); - $("ul#sub"+table_hover[0].id).show(); + $("ul#sub" + table_hover[0].id).show(); get_menu_items(table_hover); if (typeof(table_noHover) != 'undefined') { - if ("ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id ) { - $("ul#sub"+table_noHover[0].id).hide(); + if ("ul#sub" + table_hover[0].id != "ul#sub" + table_noHover[0].id) { + $("ul#sub" + table_noHover[0].id).hide(); } } } @@ -287,9 +291,9 @@ echo '
'; handsIn = 0; setTimeout(function() { opened = new Date().getTime() - openTime; - if(opened > 2500 && handsIn == 0) { + if (opened > 2500 && handsIn == 0) { openTime = 4000; - $("ul#sub"+table_noHover[0].id).hide(); + $("ul#sub" + table_noHover[0].id).hide(); } }, 2500); } @@ -301,10 +305,10 @@ echo '
'; table_hover2 = $(this); handsIn2 = 1; openTime2 = new Date().getTime(); - $("#sub"+table_hover2[0].id).show(); - if( typeof(table_noHover2) != 'undefined') { - if ( "ul#sub"+table_hover2[0].id != "ul#sub"+table_noHover2[0].id ) { - $("ul#sub"+table_noHover2[0].id).hide(); + $("#sub" + table_hover2[0].id).show(); + if (typeof(table_noHover2) != 'undefined') { + if ("ul#sub" + table_hover2[0].id != "ul#sub" + table_noHover2[0].id) { + $("ul#sub" + table_noHover2[0].id).hide(); } } } @@ -314,10 +318,10 @@ echo '
'; table_noHover2 = table_hover2; handsIn2 = 0; setTimeout(function() { - opened = new Date().getTime() - openTime2; - if(opened >= 3000 && handsIn2 == 0) { + opened = new Date().getTime() - openTime2; + if (opened >= 3000 && handsIn2 == 0) { openTime2 = 4000; - $("ul#sub"+table_hover2[0].id).hide(); + $("ul#sub" + table_hover2[0].id).hide(); } }, 3500); } @@ -328,12 +332,12 @@ echo '
'; if (!click_display && menuType_val === 'collapsed') { openTime = 4000; - if( typeof(table_hover) != 'undefined') { - $("ul#sub"+table_hover[0].id).hide(); + if (typeof(table_hover) != 'undefined') { + $("ul#sub" + table_hover[0].id).hide(); } - if( typeof(table_hover2) != 'undefined') { - $("ul#sub"+table_hover2[0].id).hide(); + if (typeof(table_hover2) != 'undefined') { + $("ul#sub" + table_hover2[0].id).hide(); } } }); @@ -350,14 +354,22 @@ echo ''; } var menuType_val = localStorage.getItem("menuType"); + const closedMenuId = localStorage.getItem("closedMenuId"); - if (classes.includes('selected') === true) { + if (classes.includes('selected') === true + && (closedMenuId === '' || closedMenuId !== id) + ) { if (menuType_val === 'collapsed' && $(`ul#sub${id}`).is(':hidden')) { $(`ul#sub${id}`).show(); get_menu_items(table_hover); } else { $(`#${id}`).removeClass('selected'); $(`ul#sub${id}`).hide(); + + const liSelected = $(`ul#sub${id}`).find('.selected'); + if (liSelected.length > 0) { + localStorage.setItem("closedMenuId", id); + } // Arrow. table_hover.children().first().children().last().removeClass('arrow_menu_up'); table_hover.children().first().children().last().addClass('arrow_menu_down'); @@ -376,6 +388,12 @@ echo ''; } else { $(`ul#sub${id}`).show(); $(`#${id}`).addClass('selected'); + + const liSelected = $(`ul#sub${id}`).find('.selected'); + if (liSelected.length > 0) { + localStorage.setItem("closedMenuId", ''); + } + // Arrow. $(this).children().last().removeClass('arrow_menu_down'); $(this).children().last().addClass('arrow_menu_up'); @@ -415,7 +433,7 @@ echo ''; } }); - $('.sub_subMenu').click(function (event) { + $('.sub_subMenu').click(function(event) { event.stopPropagation(); }); @@ -432,10 +450,10 @@ echo ''; var index = item.index(); var top_submenu = menu_calculate_top(index, item_height); - top_submenu = top_submenu+'px'; - $('#'+id_submenu+' ul.submenu').css('position', 'fixed'); - $('#'+id_submenu+' ul.submenu').css('top', top_submenu); - $('#'+id_submenu+' ul.submenu').css('left', '60px'); + top_submenu = top_submenu + 'px'; + $('#' + id_submenu + ' ul.submenu').css('position', 'fixed'); + $('#' + id_submenu + ' ul.submenu').css('top', top_submenu); + $('#' + id_submenu + ' ul.submenu').css('left', '60px'); } @@ -456,4 +474,4 @@ echo ''; return height_logo + height_tabs + padding_menu + height_position; } }); - + \ No newline at end of file From 72e35de00eed5534d300f0b6d2f9016154d4b9b2 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 30 Mar 2023 16:49:17 +0200 Subject: [PATCH 12/17] fixed styles --- pandora_console/pandoradb_data.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index eabbb48d59..6dc7c86328 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -118,10 +118,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_header', ''), ('custom_report_front_footer', ''), -('MR', 61), +('MR', 62), ('identification_reminder', 1), ('identification_reminder_timestamp', 0), -('current_package', 769), +('current_package', 770), ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'), ('custom_docs_logo', 'default_docs.png'), ('custom_support_logo', 'default_support.png'), From 3a2cbb7a6294db3b48eb4639775c94f7107653fe Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Thu, 30 Mar 2023 16:50:30 +0200 Subject: [PATCH 13/17] Datatables & styles fix --- .../godmode/users/user_management.php | 7 +- pandora_console/include/ajax/audit_log.php | 19 +- pandora_console/include/functions_ui.php | 522 +++++++++--------- .../lib/Dashboard/Widgets/ModulesByStatus.php | 1 + pandora_console/include/styles/tables.css | 14 +- .../operation/agentes/alerts_status.php | 50 +- 6 files changed, 328 insertions(+), 285 deletions(-) diff --git a/pandora_console/godmode/users/user_management.php b/pandora_console/godmode/users/user_management.php index 43e41745de..9e648a7a03 100644 --- a/pandora_console/godmode/users/user_management.php +++ b/pandora_console/godmode/users/user_management.php @@ -764,10 +764,9 @@ html_print_table($userManagementTable); $vcard_data = []; $vcard_data['version'] = '3.0'; -$vcard_data['firstName'] = $user_info['firstname']; -$vcard_data['lastName'] = $user_info['lastname']; -$vcard_data['middleName'] = ($user_info['middlename'] === '1') ? '' : $user_info['middlename']; -$vcard_data['nickname'] = $user_info['fullname']; +$vcard_data['firstName'] = $user_info['fullname']; +$vcard_data['lastName'] = ''; +$vcard_data['middleName'] = ''; $vcard_data['workPhone'] = $user_info['phone']; $vcard_data['email'] = $user_info['email']; $vcard_data['organization'] = io_safe_output(get_product_name()); diff --git a/pandora_console/include/ajax/audit_log.php b/pandora_console/include/ajax/audit_log.php index 4d92704852..dbb842047c 100644 --- a/pandora_console/include/ajax/audit_log.php +++ b/pandora_console/include/ajax/audit_log.php @@ -160,7 +160,7 @@ if ($load_filter_modal) { true, '', false, - 'margin-left:5px; width:'.$filter_id_width.';' + 'width:'.$filter_id_width.';' ); $table->rowclass[] = 'display-grid'; @@ -169,8 +169,9 @@ if ($load_filter_modal) { 'load_filter', false, [ - 'class' => 'mini w25p', - 'style' => 'margin-left: 73%', + 'class' => 'mini w30p', + 'icon' => 'load', + 'style' => 'margin-left: 208px; width: 130px;', 'onclick' => 'load_filter_values();', ], true @@ -189,7 +190,7 @@ function show_filter() { draggable: true, modal: false, closeOnEscape: true, - width: 500 + width: 380 }); } @@ -293,8 +294,9 @@ if ($save_filter_modal) { 'save_filter', false, [ - 'class' => 'mini w25p', - 'style' => 'margin-left: 56%', + 'class' => 'mini ', + 'icon' => 'save', + 'style' => 'margin-left: 175px; width: 125px;', 'onclick' => 'save_new_filter();', ], true @@ -330,8 +332,9 @@ if ($save_filter_modal) { 'update_filter', false, [ - 'class' => 'mini w25p', - 'style' => 'margin-left: 56%', + 'class' => 'mini ', + 'icon' => 'save', + 'style' => 'margin-left: 155px; width: 145px;', 'onclick' => 'save_update_filter();', ], true diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index da2c86f941..1ad803be44 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3628,6 +3628,11 @@ function ui_print_datatable(array $parameters) $parameters['csv'] = 1; } + $dom_elements = '"plfrtiB"'; + if (isset($parameters['dom_elements'])) { + $dom_elements = '"'.$parameters['dom_elements'].'"'; + } + $filter = ''; // Datatable filter. if (isset($parameters['form']) && is_array($parameters['form'])) { @@ -3790,6 +3795,34 @@ function ui_print_datatable(array $parameters) } $table .= ''; + + if (isset($parameters['data_element']) === true) { + $table .= ''; + foreach ($parameters['data_element'] as $row) { + $table .= ''; + foreach ($row as $td_data) { + $table .= ''.$td_data.''; + } + + $table .= ''; + } + + $table .= ''; + + $js = ''; + } + $table .= ''; $pagination_class = 'pandora_pagination'; @@ -3813,279 +3846,276 @@ function ui_print_datatable(array $parameters) $export_columns = ',columns: \'th:not(:last-child)\''; } - if (isset($parameters['ajax_url'])) { - $type_data = 'ajax: { - url: "'.ui_get_full_url('ajax.php', false, false, false).'", - type: "POST", - dataSrc: function (json) { - if($("#'.$form_id.'_search_bt") != undefined) { - $("#'.$form_id.'_loading").remove(); - } + if (isset($parameters['data_element']) === false) { + if (isset($parameters['ajax_url'])) { + $type_data = 'ajax: { + url: "'.ui_get_full_url('ajax.php', false, false, false).'", + type: "POST", + dataSrc: function (json) { + if($("#'.$form_id.'_search_bt") != undefined) { + $("#'.$form_id.'_loading").remove(); + } - if (json.error) { - console.error(json.error); - $("#error-'.$table_id.'").html(json.error); - $("#error-'.$table_id.'").dialog({ - title: "Filter failed", - width: 630, - resizable: true, - draggable: true, - modal: false, - closeOnEscape: true, - buttons: { - "Ok" : function () { - $(this).dialog("close"); + if (json.error) { + console.error(json.error); + $("#error-'.$table_id.'").html(json.error); + $("#error-'.$table_id.'").dialog({ + title: "Filter failed", + width: 630, + resizable: true, + draggable: true, + modal: false, + closeOnEscape: true, + buttons: { + "Ok" : function () { + $(this).dialog("close"); + } } - } - }).parent().addClass("ui-state-error"); - } else {'; + }).parent().addClass("ui-state-error"); + } else {'; - if (isset($parameters['ajax_return_operation']) === true - && empty($parameters['ajax_return_operation']) === false - && isset($parameters['ajax_return_operation_function']) === true - && empty($parameters['ajax_return_operation_function']) === false - ) { - $type_data .= ' - if (json.'.$parameters['ajax_return_operation'].' !== undefined) { - '.$parameters['ajax_return_operation_function'].'(json.'.$parameters['ajax_return_operation'].'); - } - '; - } + if (isset($parameters['ajax_return_operation']) === true + && empty($parameters['ajax_return_operation']) === false + && isset($parameters['ajax_return_operation_function']) === true + && empty($parameters['ajax_return_operation_function']) === false + ) { + $type_data .= ' + if (json.'.$parameters['ajax_return_operation'].' !== undefined) { + '.$parameters['ajax_return_operation_function'].'(json.'.$parameters['ajax_return_operation'].'); + } + '; + } + + if (isset($parameters['ajax_postprocess'])) { + $type_data .= ' + if (json.data) { + json.data.forEach(function(item) { + '.$parameters['ajax_postprocess'].' + }); + } else { + json.data = {}; + }'; + } - if (isset($parameters['ajax_postprocess'])) { $type_data .= ' - if (json.data) { - json.data.forEach(function(item) { - '.$parameters['ajax_postprocess'].' + return json.data; + } + }, + data: function (data) { + if($("#button-'.$form_id.'_search_bt") != undefined) { + var loading = \''.html_print_image( + 'images/spinner.gif', + true, + [ + 'id' => $form_id.'_loading', + 'class' => 'loading-search-datatables-button', + ] + ).'\'; + $("#button-'.$form_id.'_search_bt").parent().append(loading); + } + + inputs = $("#'.$form_id.' :input"); + + values = {}; + inputs.each(function() { + values[this.name] = $(this).val(); + }) + + $.extend(data, { + filter: values,'."\n"; + + if (is_array($parameters['ajax_data'])) { + foreach ($parameters['ajax_data'] as $k => $v) { + $type_data .= $k.':'.json_encode($v).",\n"; + } + } + + $type_data .= 'page: "'.$parameters['ajax_url'].'" }); - } else { - json.data = {}; - }'; + + return data; + } + },'; + } else { + $type_data = 'data: '.json_encode($parameters['data_element']).','; } - $type_data .= ' - return json.data; - } - }, - data: function (data) { - if($("#button-'.$form_id.'_search_bt") != undefined) { - var loading = \''.html_print_image( - 'images/spinner.gif', - true, - [ - 'id' => $form_id.'_loading', - 'class' => 'loading-search-datatables-button', - ] - ).'\'; - $("#button-'.$form_id.'_search_bt").parent().append(loading); - } + $serverside = 'true'; + if (isset($parameters['data_element'])) { + $serverside = 'false'; + } - inputs = $("#'.$form_id.' :input"); + // Javascript controller. + $js = ''; } - if (isset($parameters['csv']) === true) { - $js."'$('#".$table_id."').on( 'buttons-processing', function ( e, indicator ) { - if ( indicator ) { - console.log('a'); - } - else { - console.log('b'); - }"; - } - - $js .= '$("table#'.$table_id.'").removeClass("invisible"); - });'; - $js .= ' - $(function() { - $(document).on("preInit.dt", function (ev, settings) { - $("div.dataTables_length").hide(); - $("div.dt-buttons").hide(); - }); - }); - - '; - - $js .= ''; - // Order. $info_msg_arr = []; $info_msg_arr['message'] = $emptyTable; diff --git a/pandora_console/include/lib/Dashboard/Widgets/ModulesByStatus.php b/pandora_console/include/lib/Dashboard/Widgets/ModulesByStatus.php index 53d996607c..01a8781606 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/ModulesByStatus.php +++ b/pandora_console/include/lib/Dashboard/Widgets/ModulesByStatus.php @@ -453,6 +453,7 @@ class ModulesByStatus extends Widget 1000, ], ], + 'dom_elements' => 'frtilp', ] ); } catch (\Exception $e) { diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index eea7815b59..fc421444d5 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -816,10 +816,6 @@ div[id^="auto-os-"] > img { height: 20px; } -.dataTables_paginate { - margin-right: 10px; -} - .w22px { width: 22px; } @@ -838,3 +834,13 @@ td.FF-thresholds-pdd { padding: 0px !important; padding-left: 13px !important; } + +div.grid-stack-item-content a.pandora_pagination, +a.mini-pandora-pagination { + padding: 7px; + font-size: 9pt; +} + +input.mini-search-input { + height: 30px; +} diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index d970c5aa65..f0ae9b033d 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -434,35 +434,39 @@ if ($agent_view_page === true) { ); } -if (((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) check_acl($config['id_user'], $id_group, 'LM') === true)) { - if ($agent_view_page === true) { - html_print_div( - [ - 'class' => 'action-buttons pdd_b_10px pdd_r_5px w100p', - 'content' => html_print_submit_button( +if (is_metaconsole() === false) { + if (((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) check_acl($config['id_user'], $id_group, 'LM') === true)) { + if ($agent_view_page === true) { + html_print_div( + [ + 'class' => 'action-buttons pdd_b_10px pdd_r_5px w100p', + 'content' => html_print_submit_button( + __('Validate'), + 'alert_validate', + false, + [ + 'icon' => 'wand', + 'mode' => 'secondary mini', + ], + true + ), + ] + ); + } else { + html_print_action_buttons( + html_print_submit_button( __('Validate'), 'alert_validate', false, - [ - 'icon' => 'wand', - 'mode' => 'secondary mini', - ], + [ 'icon' => 'wand' ], true ), - ] - ); - } else { - html_print_action_buttons( - html_print_submit_button( - __('Validate'), - 'alert_validate', - false, - [ 'icon' => 'wand' ], - true - ), - ['type' => 'form_action'] - ); + ['type' => 'form_action'] + ); + } } +} else { + html_print_action_buttons(''); } $html_content = ob_get_clean(); From 5e273ad4d520c4344df300808cf54223d29744d2 Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 30 Mar 2023 18:05:05 +0000 Subject: [PATCH 14/17] Updated default colors to reflect pandorafms official color palette (2023) --- pandora_console/pandoradb_data.sql | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 6dc7c86328..bbd71497a3 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -51,16 +51,16 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('show_lastalerts','1'), ('style','pandora'), ('graph_image_height', '250'), -('graph_color1', '#99dd00'), -('graph_color2', '#336600'), -('graph_color3', '#3399cc'), -('graph_color4', '#ff66cc'), -('graph_color5', '#CC0000'), -('graph_color6', '#0033FF'), -('graph_color7', '#ff6600'), -('graph_color8', '#330066'), -('graph_color9', '#ffff00'), -('graph_color10', '#99ffff'), +('graph_color1', '#1c7973'), +('graph_color2', '#82b92f'), +('graph_color3', '#e82a2a'), +('graph_color4', '#5c63a3'), +('graph_color5', '#f5a623'), +('graph_color6', '#14524f'), +('graph_color7', '#024eff'), +('graph_color8', '#18c7c5'), +('graph_color9', '#ec7175'), +('graph_color10', '#c0ccdc'), ('trap2agent', '0'), ('date_format', 'F j, Y, g:i a'), ('event_view_hr', 8), From 3d84aea29e4dbc55dd8b477a21b0055da31771df Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 30 Mar 2023 18:11:03 +0000 Subject: [PATCH 15/17] Updated color4 --- pandora_console/pandoradb_data.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index bbd71497a3..03ac46b18c 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -54,7 +54,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('graph_color1', '#1c7973'), ('graph_color2', '#82b92f'), ('graph_color3', '#e82a2a'), -('graph_color4', '#5c63a3'), +('graph_color4', '#8577cf'), ('graph_color5', '#f5a623'), ('graph_color6', '#14524f'), ('graph_color7', '#024eff'), From a0828ac25cb965e5fdf980930c6e24b6f6ff5809 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 31 Mar 2023 01:00:22 +0200 Subject: [PATCH 16/17] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ce7f261fb8..8ded19869c 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.770-230330 +Version: 7.0NG.770-230331 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 01499b516c..57992ca3b4 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.770-230330" +pandora_version="7.0NG.770-230331" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index ba2d92f954..62137aff06 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1023,7 +1023,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.770'; -use constant AGENT_BUILD => '230330'; +use constant AGENT_BUILD => '230331'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 37260dc4ea..667866396d 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.770 -%define release 230330 +%define release 230331 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 6b0c9c4c19..b0377aa0a5 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.770 -%define release 230330 +%define release 230331 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 25f4bbff8b..5addb64b2f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.770" -PI_BUILD="230330" +PI_BUILD="230331" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f8a720b9a0..389a17a13f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230330} +{230331} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d330ab6c9e..f1938ebc0e 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.770 Build 230330") +#define PANDORA_VERSION ("7.0NG.770 Build 230331") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 2b8c5c52c2..82649a0112 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.770(Build 230330))" + VALUE "ProductVersion", "(7.0NG.770(Build 230331))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2132e41504..0e72a599e7 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.770-230330 +Version: 7.0NG.770-230331 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 09dea86864..13ac984604 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.770-230330" +pandora_version="7.0NG.770-230331" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a98acabbf4..c018e753f7 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC230330'; +$build_version = 'PC230331'; $pandora_version = 'v7.0NG.770'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 04954a578d..f46d0f2898 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index e5402e4baf..4ed6471ef1 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.770 -%define release 230330 +%define release 230331 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index e23d4a759b..b8384f1386 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.770 -%define release 230330 +%define release 230331 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index e49ff29e45..b60b80ced9 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.770" -PI_BUILD="230330" +PI_BUILD="230331" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 2346b270a7..4a540bbce0 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.770 Build 230330"; +my $version = "7.0NG.770 Build 230331"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 728b705371..476e34f3fa 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.770 Build 230330"; +my $version = "7.0NG.770 Build 230331"; # save program name for logging my $progname = basename($0); From d6a1155dbb414d2a63349dc2e63f5b0e200fac1a Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 31 Mar 2023 08:45:54 +0200 Subject: [PATCH 17/17] fixed styles --- pandora_console/general/news_dialog.php | 31 +++++++++++++++---------- pandora_console/godmode/setup/news.php | 16 ++++++++++--- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/pandora_console/general/news_dialog.php b/pandora_console/general/news_dialog.php index 82986e2c89..f44eb97faa 100644 --- a/pandora_console/general/news_dialog.php +++ b/pandora_console/general/news_dialog.php @@ -39,7 +39,6 @@ if (!empty($news)) { // Prints news dialog template echo ''; -ui_require_javascript_file('encode_decode_base64'); -?> + ui_require_javascript_file('encode_decode_base64'); + ?>