diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index fd81afb5d0..cda7e312c9 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 6.0SP3-160908 +Version: 6.0SP3-160909 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 c61b967d1c..99634da295 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="6.0SP3-160908" +pandora_version="6.0SP3-160909" 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 1302b08822..0b190e1b01 100644 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '6.0SP3'; -use constant AGENT_BUILD => '160908'; +use constant AGENT_BUILD => '160909'; # 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 935186e177..fad2d224ef 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 6.0SP3 -%define release 160908 +%define release 160909 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 4a5ee9d5e6..93b73ac83e 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 6.0SP3 -%define release 160908 +%define release 160909 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 45da2eb2fd..2e2ea480ef 100644 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="6.0SP3" -PI_BUILD="160908" +PI_BUILD="160909" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/unix/plugins/grep_log b/pandora_agents/unix/plugins/grep_log index b51d8e0e24..7661a2951d 100755 --- a/pandora_agents/unix/plugins/grep_log +++ b/pandora_agents/unix/plugins/grep_log @@ -53,6 +53,12 @@ my $Idx_size = 0; # Regular expression to be matched my $Reg_exp = ''; +# Flag to show or not summary module +my $summary_flag = 0; + +# Number of coincidences found +my $coincidences = 0; + ############################################################################### # SUB error_msg # Print an error message and exit. @@ -72,7 +78,7 @@ sub error_msg ($) { # Print a help message. ############################################################################### sub print_help () { - print "Usage: $0 \n"; + print "Usage: $0 [--summary]\n"; } ############################################################################### @@ -193,6 +199,7 @@ sub parse_log (;$$) { push @lines, $line; if ($line =~ m/$Reg_exp/i) { push @nl_found, $nl; + $coincidences++; } $nl++; } @@ -236,6 +243,21 @@ sub parse_log (;$$) { return @data; } +############################################################################### +# SUB print_summary +# Print module summary to stdout. +############################################################################### +sub print_summary() { + my $output = "\n"; + $output .= "\n"; + $output .= "\n"; + $output .= "\n"; + $output .= "\n"; + $output .= "\n"; + $output .= "\n"; + print stdout $output; +} + ############################################################################### # SUB parse_log # Print log data to stdout. @@ -245,6 +267,7 @@ sub print_log (@) { # No data if ($#data < 0) { + print_summary() if ($summary_flag == 1); return; } @@ -263,7 +286,9 @@ sub print_log (@) { } # Regular module else { - my $output = "\n"; + my $output; + print_summary() if ($summary_flag == 1); + $output = "\n"; $output .= "\n"; $output .= "\n"; $output .= "\n"; @@ -292,8 +317,15 @@ if ($#ARGV < 2) { $Log_file = $ARGV[0]; $Module_name = $ARGV[1]; $Reg_exp = $ARGV[2]; -my $up_lines = $ARGV[3]; +my $up_lines = $ARGV[3]; my $bot_lines = $ARGV[4]; +my $sum_flag = $ARGV[5]; + +if ( ( defined($up_lines) && ($up_lines eq "--summary")) + || ( defined($bot_lines) && ($bot_lines eq "--summary")) + || ( defined($sum_flag) && ($sum_flag eq "--summary")) ) { + $summary_flag = 1; +} # Create index file storage directory if ( ! -d $Idx_dir) { mkdir($Idx_dir) || error_msg("Error creating directory $Idx_dir: " diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c890ca8fd1..4b8b35badb 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{160908} +{160909} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8fa2b3eb4d..397cad1d39 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 ("6.0SP3(Build 160908)") +#define PANDORA_VERSION ("6.0SP3(Build 160909)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 49757a7e7a..275038644e 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", "(6.0SP3(Build 160908))" + VALUE "ProductVersion", "(6.0SP3(Build 160909))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index f44592825a..3e91e1cf46 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 6.0SP3-160908 +Version: 6.0SP3-160909 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 22c8a44a45..8c29eb1e76 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="6.0SP3-160908" +pandora_version="6.0SP3-160909" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index feb3aab2a5..02e7add756 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC160908'; +$build_version = 'PC160909'; $pandora_version = 'v6.0SP3'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1bf66df896..45311866ae 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@