Merge remote-tracking branch 'origin/develop' into ent-3731-Bug_en_reports_SLA_mensual

Former-commit-id: 78e83edbfbec6e25c305dc5aa5f400d098bc4801
This commit is contained in:
Daniel Barbero Martin 2019-03-21 08:29:51 +01:00
commit 8551abc51e
32 changed files with 460 additions and 76 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.732-190319
Version: 7.0NG.732-190321
Architecture: all
Priority: optional
Section: admin

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.732"
PI_BUILD="190319"
PI_BUILD="190321"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{190319}
{190321}
ViewReadme
{Yes}

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.732-190319
Version: 7.0NG.732-190321
Architecture: all
Priority: optional
Section: admin

View File

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

View File

View File

@ -0,0 +1,3 @@
/godmode/servers/recorn_script.php
/godmode/servers/manage_recontask_form.php
/godmode/servers/manage_recontask.php

View File

@ -369,7 +369,24 @@ if ($create_modules) {
if ($row['server_type'] == 13) {
$module_type_name = db_get_value_filter('nombre', 'ttipo_modulo', ['id_tipo' => $values['id_tipo_modulo']]);
$new_module_configuration_data = "module_begin\nmodule_name ".io_safe_input($name)."\nmodule_description ".io_safe_output($values['descripcion'])."\nmodule_type ".$module_type_name."\nmodule_snmp\nmodule_version ".$snmp_version."\nmodule_oid ".$conf_oid."\nmodule_community ".$values['snmp_community']."\nmodule_end";
$new_module_configuration_data = "module_begin\nmodule_name ".io_safe_input($name)."\nmodule_description ".io_safe_output($values['descripcion'])."\nmodule_type ".$module_type_name."\nmodule_snmp\nmodule_version ".$snmp_version."\nmodule_oid ".$conf_oid."\nmodule_community ".$values['snmp_community'];
if ($snmp_version == '3') {
$new_module_configuration_data .= "\nmodule_secname ".$snmp3_auth_user;
$new_module_configuration_data .= "\nmodule_seclevel ".$snmp3_security_level;
if ($snmp3_security_level=='authNoPriv' || $snmp3_security_level=='authPriv') {
$new_module_configuration_data .= "\nmodule_authpass ".$snmp3_auth_pass;
$new_module_configuration_data .= "\nmodule_authproto ".$snmp3_auth_method;
}
if ($snmp3_security_level=='authPriv') {
$new_module_configuration_data .= "\nmodule_privproto ".$snmp3_privacy_method;
$new_module_configuration_data .= "\nmodule_privpass ".$snmp3_privacy_pass;
}
}
$new_module_configuration_data .= "\nmodule_end";
config_agents_add_module_in_conf($id_agent, $new_module_configuration_data);
}

View File

@ -1,23 +1,39 @@
<?php
/**
* Extension to manage a list of gateways and the node address where they should
* point to.
*
* @category Update Manager Offline
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org 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.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org 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; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
// ui_require_css_file('update_manager', 'godmode/update_manager/');
check_login();
// ui_require_css_file('update_manager', 'godmode/update_manager/');
if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
if (! check_acl($config['id_user'], 0, 'PM')
&& ! is_user_admin($config['id_user'])
) {
db_pandora_audit('ACL Violation', 'Trying to access Setup Management');
include 'general/noaccess.php';
return;
@ -27,7 +43,8 @@ $baseurl = ui_get_full_url(false, false, false, false);
?>
<!-- Add the stylesheet here cause somehow the 'ui_require_css_file' is not working on the metaconsole and there is no time to fix it -->
<!-- Add the stylesheet here cause somehow the 'ui_require_css_file'
is not working on the metaconsole and there is no time to fix it -->
<link rel="stylesheet" type="text/css" href="<?php echo $baseurl; ?>/godmode/update_manager/update_manager.css">
<script type="text/javascript">

View File

@ -1,16 +1,32 @@
<?php
/**
* Extension to manage a list of gateways and the node address where they should
* point to.
*
* @category Update Manager Ajax
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org 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.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org 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.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
check_login();
@ -44,6 +60,7 @@ $check_update_free_package = (bool) get_parameter('check_update_free_package');
$install_free_package = (bool) get_parameter('install_free_package');
$search_minor = (bool) get_parameter('search_minor');
$unzip_free_package = (bool) get_parameter('unzip_free_package');
$delete_desired_files = (bool) get_parameter('delete_desired_files');
if ($upload_file) {
ob_clean();
@ -243,8 +260,15 @@ if ($install_package) {
return;
}
update_manager_enterprise_set_version($version);
db_pandora_audit('Update '.get_product_name(), "Update version: $version of ".get_product_name().' by '.$config['id_user']);
enterprise_hook(
'update_manager_enterprise_set_version',
[$version]
);
db_pandora_audit(
'Update '.get_product_name(),
"Update version: $version of ".get_product_name().' by '.$config['id_user']
);
$return['status'] = 'success';
echo json_encode($return);
@ -591,3 +615,143 @@ if ($install_free_package) {
return;
}
/*
* Result info:
* Types of status:
* -1 -> Not exits file.
* 0 -> File or directory deleted successfully.
* 1 -> Problem delete file or directory.
* 2 -> Not found file or directory.
* 3 -> Don`t read file deleet_files.txt.
* 4 -> "deleted" folder could not be created.
* 5 -> "deleted" folder was created.
* 6 -> The "delete files" could not be the "delete" folder.
* 7 -> The "delete files" is moved to the "delete" folder.
* Type:
* f -> File
* d -> Dir.
* route: Path.
*/
if ($delete_desired_files === true) {
global $config;
// Initialize result.
$result = [];
$result['status_list'] = [];
// Flag exist folder "deleted".
$exist_deleted = true;
// Route delete_files.txt.
$route_delete_files = $config['homedir'];
$route_delete_files .= '/extras/delete_files/delete_files.txt';
// Route directory deleted.
$route_dir_deleted = $config['homedir'];
$route_dir_deleted .= '/extras/delete_files/deleted/';
// Check isset directory deleted
// if it does not exist, try to create it.
if (is_dir($route_dir_deleted) === false) {
$res_mkdir = mkdir($route_dir_deleted, 0777, true);
$res = [];
if ($res_mkdir !== true) {
$exist_deleted = false;
$res['status'] = 4;
} else {
$res['status'] = 5;
}
$res['type'] = 'd';
$res['path'] = $url_to_delete;
array_push($result['status_list'], $res);
}
// Check isset delete_files.txt.
if (file_exists($route_delete_files) === true && $exist_deleted === true) {
// Open file.
$file_read = fopen($route_delete_files, 'r');
// Check if read delete_files.txt.
if ($file_read !== false) {
while ($file_to_delete = stream_get_line($file_read, 65535, "\n")) {
$file_to_delete = trim($file_to_delete);
$url_to_delete = $config['homedir'].'/'.$file_to_delete;
// Check is dir or file or not exists.
if (is_dir($url_to_delete) === true) {
$rmdir_recursive = rmdir_recursive(
$url_to_delete,
$result['status_list']
);
array_push(
$result['status_list'],
$rmdir_recursive
);
} else if (file_exists($url_to_delete) === true) {
$unlink = unlink($url_to_delete);
$res = [];
$res['status'] = ($unlink === true) ? 0 : 1;
$res['type'] = 'f';
$res['path'] = $url_to_delete;
array_push($result['status_list'], $res);
} else {
$res = [];
$res['status'] = 2;
$res['path'] = $url_to_delete;
array_push($result['status_list'], $res);
}
}
} else {
$res = [];
$res['status'] = 3;
$res['path'] = $url_to_delete;
array_push($result['status_list'], $res);
}
// Close file.
fclose($route_delete_files);
// Move delete_files.txt to dir extras/deleted/.
$count_scandir = count(scandir($route_dir_deleted));
$route_move = $route_dir_deleted.'/delete_files_'.$count_scandir.'.txt';
$res_rename = rename(
$route_delete_files,
$route_move
);
$res = [];
$res['status'] = ($res_rename === true) ? 7 : 6;
$res['type'] = 'f';
$res['path'] = $route_move;
array_push($result['status_list'], $res);
} else {
if ($exist_deleted === true) {
$res = [];
$res['status'] = -1;
array_push($result['status_list'], $res);
}
}
// Translation diccionary neccesary.
$result['translation'] = [
'title' => __('Delete files'),
'not_file' => __('The oum has no files to remove'),
'not_found' => __('Not found'),
'not_deleted' => __('Not deleted'),
'not_read' => __('The file delete_file.txt can not be read'),
'folder_deleted_f' => __('\'deleted\' folder could not be created'),
'folder_deleted_t' => __('\'deleted\' folder was created'),
'move_file_f' => __(
'The "delete files" could not be the "delete" folder'
),
'move_file_d' => __(
'The "delete files" is moved to the "delete" folder'
),
];
echo json_encode($result);
return;
}

View File

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

View File

@ -1,20 +1,30 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
/**
* @package Include
* @subpackage UI
* Extension to manage a list of gateways and the node address where they should
* point to.
*
* @category Functions Update Manager
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org 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.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
@ -988,13 +998,61 @@ function update_manger_set_deleted_message($message_id)
{
global $config;
$rollback = db_get_value('description', 'tupdate', 'svn_version', $message_id);
$rollback = db_get_value(
'description',
'tupdate',
'svn_version',
$message_id
);
$users_read = json_decode($rollback, true);
$users_read[$config['id_user']] = 1;
$rollback = json_encode($users_read);
db_process_sql_update('tupdate', ['description' => $rollback ], ['svn_version' => $message_id]);
db_process_sql_update(
'tupdate',
['description' => $rollback ],
['svn_version' => $message_id]
);
// Mark as read too
// Mark as read too.
update_manger_set_read_message($message_id, 1);
}
/**
* Function recursive delete directory.
*
* @param string $dir Directory to delete.
* @param array $result Array result state and message.
*
* @return array Return result array with status 0 valid or 1 false and
* type 'f' file and 'd' dir and route path file or directory.
*/
function rmdir_recursive(string $dir, array &$result)
{
foreach (scandir($dir) as $file) {
if ('.' === $file || '..' === $file) {
continue;
}
if (is_dir($dir.'/'.$file) === true) {
rmdir_recursive($dir.'/'.$file, $result);
} else {
$unlink = unlink($dir.'/'.$file);
$res = [];
$res['status'] = ($unlink === true) ? 0 : 1;
$res['type'] = 'f';
$res['path'] = $dir.'/'.$file;
array_push($result, $res);
}
}
$rmdir = rmdir($dir);
$res = [];
$res['status'] = ($rmdir === true) ? 0 : 1;
$res['type'] = 'd';
$res['path'] = $dir;
array_push($result, $res);
return $result;
}

View File

@ -1,3 +1,7 @@
/*
globals $, jQuery
*/
var correct_install_progress = true;
function form_upload(homeurl) {
@ -1246,11 +1250,11 @@ function check_install_package(package, homeurl) {
data: parameters,
dataType: "json",
success: function(data) {
// Print the updated files and take the scroll to the bottom
$("#log_zone").html(data.info);
// Print the updated files and take the scroll to the bottom.
$("#log_zone").append(data.info);
$("#log_zone").scrollTop($("#log_zone").prop("scrollHeight"));
// Change the progress bar
// Change the progress bar.
if (
$("#form-offline_update ul")
.find("li")
@ -1271,14 +1275,19 @@ function check_install_package(package, homeurl) {
.trigger("change");
}
// The class loading is present until the update ends
// The class loading is present until the update ends.
var isInstalling = $("#form-offline_update ul")
.find("li")
.hasClass("loading");
if (data.progress < 100 && isInstalling) {
// Recursive call to check the update status
// Recursive call to check the update status.
check_install_package(package, homeurl);
}
if (!isInstalling) {
//Check if exist remove files.
delete_desired_files(homeurl);
}
}
});
}
@ -2290,3 +2299,107 @@ function remove_rr_file_to_extras(homeurl) {
success: function(data) {}
});
}
/**
* Function delete files desired and add extras/delete_files.txt.
*
* @param string homeurl Url.
*/
function delete_desired_files(homeurl) {
var home_url = typeof homeurl !== "undefined" ? homeurl + "/" : "";
var parameters = {
page: "include/ajax/update_manager.ajax",
delete_desired_files: 1
};
jQuery.ajax({
data: parameters,
type: "POST",
url: home_url + "ajax.php",
dataType: "json",
success: function(data) {
var translation = data.translation;
// Print the deleted files.
// Print title.
$("#log_zone").append(
"</br></br><span class='log_zone_line bolder';>" +
translation.title +
": </span></br></br>"
);
$.each(data.status_list, function(key, value) {
var log_zone_line_class = "log_zone_line ";
var msg = "";
switch (value.status) {
case -1:
//Not exits file.
msg = translation.not_file;
break;
case 0:
//File or directory deleted successfully.
if (value.type === "f") {
log_zone_line_class += "";
} else {
log_zone_line_class += "bolder";
}
msg = value.path;
break;
case 1:
//Problem delete file or directory.
if (value.type === "f") {
log_zone_line_class += "log_zone_line_error";
} else {
log_zone_line_class += "log_zone_line_error bolder";
}
msg = value.path + " ( " + translation.not_deleted + " ) ";
break;
case 2:
//Not found file or directory.
if (value.type === "f") {
log_zone_line_class += "log_zone_line_error";
} else {
log_zone_line_class += "log_zone_line_error bolder";
}
msg = value.path + " ( " + translation.not_found + " ) ";
break;
case 3:
//Don`t read file deleet_files.txt.
log_zone_line_class += "log_zone_line_error bolder";
msg = translation.not_read;
break;
case 4:
//"deleted" folder could not be created.
log_zone_line_class += "log_zone_line_error bolder";
msg = value.path + " ( " + translation.folder_deleted_f + " ) ";
break;
case 5:
//"deleted" folder was created.
log_zone_line_class += "bolder";
msg = translation.folder_deleted_t;
break;
case 6:
//The "delete files" could not be the "delete" folder.
log_zone_line_class += "log_zone_line_error bolder";
msg = value.path + " ( " + translation.move_file_f + " ) ";
break;
case 7:
//The "delete files" is moved to the "delete" folder.
log_zone_line_class += "bolder";
msg = translation.move_file_d;
break;
default:
// It can not come without state.
break;
}
//Print line.
$("#log_zone").append(
"<span class='" + log_zone_line_class + "' >" + msg + "</span><br>"
);
});
}
});
}

View File

@ -3920,7 +3920,19 @@ div.simple_value > a > span.text p {
font-size: 18pt;
}
span.log_zone_line {
font-size: 12px;
}
span.log_zone_line_error {
color: #fc4444;
}
/* global */
.bolder {
font-weight: bolder;
}
.readonly {
background-color: #dedede !important;
}

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.732-190319
Version: 7.0NG.732-190321
Architecture: all
Priority: optional
Section: admin

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -34,7 +34,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.732 PS190319";
my $version = "7.0NG.732 PS190321";
# Pandora server configuration
my %conf;

View File

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