Merge branch 'develop' into ent-13693-mover-source-script-de-instalacion-a-enterprise-y-crear-nuevo-para-github-con-todos-los

This commit is contained in:
rafael 2024-05-13 11:48:23 +02:00
commit cdbb734f67
72 changed files with 21848 additions and 17417 deletions

View File

@ -38,9 +38,11 @@ mkdir -p %{buildroot}/usr/share/man/man1/
install -m 0755 pandora_agent %{buildroot}%{_bindir}/pandora_agent
install -m 0755 pandora_agent_exec %{buildroot}%{_bindir}/pandora_agent_exec
install -m 0755 tentacle_client %{buildroot}%{_bindir}/tentacle_client
install -m 0755 tentacle_server %{buildroot}%{_bindir}/tentacle_server
install -m 0755 pandora_agent_daemon %{buildroot}/etc/init.d/pandora_agent_daemon
install -m 0644 man/man1/pandora_agent.1.gz %{buildroot}/usr/share/man/man1/pandora_agent.1.gz
install -m 0644 man/man1/tentacle_client.1.gz %{buildroot}/usr/share/man/man1/tentacle_client.1.gz
install -m 0644 man/man1/tentacle_server.1.gz %{buildroot}/usr/share/man/man1/tentacle_server.1.gz
install -m 0600 Linux/pandora_agent.conf %{buildroot}/etc/pandora/pandora_agent.conf
install -d -m 0755 %{buildroot}/etc/pandora/plugins
install -d -m 0755 %{buildroot}/etc/pandora/collections
@ -81,6 +83,7 @@ fi
/usr/bin/pandora_agent
/usr/bin/pandora_agent_exec
/usr/bin/tentacle_client
/usr/bin/tentacle_server
/etc/init.d/pandora_agent_daemon
%defattr(-,pandora,root,770)
@ -96,6 +99,7 @@ fi
%doc
/usr/share/man/man1/pandora_agent.1.gz
/usr/share/man/man1/tentacle_client.1.gz
/usr/share/man/man1/tentacle_server.1.gz
%changelog
* Sun Feb 23 2014 Sancho Lerena <slerena at gmail.com> - 5.0

View File

@ -45,12 +45,14 @@ mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_server $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/init.d/pandora_agent_daemon
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/init.d/pandora_agent_daemon
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_server.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
# Checking old config file (if exists)
if [ -f /etc/pandora/pandora_agent.conf ] ; then
@ -113,6 +115,7 @@ rm -Rf /var/log/pandora/pandora_agent* 2> /dev/null
rm -Rf /usr/share/pandora_agent
rm -Rf /usr/share/man/man1/pandora_agent.1.gz
rm -Rf /usr/share/man/man1/tentacle_client.1.gz
rm -Rf /usr/share/man/man1/tentacle_server.1.gz
exit 0
%files
@ -125,6 +128,7 @@ exit 0
%defattr(755,pandora,root)
/usr/bin/tentacle_client
/usr/bin/tentacle_server
/etc/init.d/pandora_agent_daemon
%docdir %{prefix}/pandora_agents/docs
%{prefix}/pandora_agent
@ -132,4 +136,5 @@ exit 0
%defattr(644,pandora,root)
/usr/share/man/man1/pandora_agent.1.gz
/usr/share/man/man1/tentacle_client.1.gz
/usr/share/man/man1/tentacle_server.1.gz

View File

@ -46,12 +46,14 @@ mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_server $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/init.d/pandora_agent_daemon
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/init.d/pandora_agent_daemon
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_server.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
# Checking old config file (if exists)
if [ -f /etc/pandora/pandora_agent.conf ] ; then
@ -115,6 +117,7 @@ rm -Rf /var/log/pandora/pandora_agent* 2> /dev/null
rm -Rf /usr/share/pandora_agent
rm -Rf /usr/share/man/man1/pandora_agent.1.gz
rm -Rf /usr/share/man/man1/tentacle_client.1.gz
rm -Rf /usr/share/man/man1/tentacle_server.1.gz
exit 0
%files
@ -127,6 +130,7 @@ exit 0
%defattr(755,pandora,root)
/usr/bin/tentacle_client
/usr/bin/tentacle_server
/etc/init.d/pandora_agent_daemon
%docdir %{prefix}/pandora_agents/docs
%{prefix}/pandora_agent
@ -134,4 +138,5 @@ exit 0
%defattr(644,pandora,root)
/usr/share/man/man1/pandora_agent.1.gz
/usr/share/man/man1/tentacle_client.1.gz
/usr/share/man/man1/tentacle_server.1.gz

View File

@ -1757,12 +1757,6 @@ sub check_ssleay_version {
# Main
################################################################################
# Never run as root
if ($> == 0 && $^O ne 'MSWin32') {
print ("Error: for safety reasons $0 cannot be run with root privileges.\n");
exit 1;
}
# Parse command line options
parse_options ();

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.776-240506
Version: 7.0NG.776-240513
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.776-240506"
pandora_version="7.0NG.776-240513"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

Binary file not shown.

View File

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

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240506
%define release 240513
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
@ -53,11 +53,13 @@ mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_server $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/rc.d/init.d/pandora_agent_daemon
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_server.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent.conf $RPM_BUILD_ROOT/usr/share/pandora_agent/pandora_agent.conf.rpmnew
@ -164,9 +166,11 @@ exit 0
%defattr(755,root,root)
/usr/bin/pandora_agent_exec
/usr/bin/tentacle_client
/usr/bin/tentacle_server
/etc/rc.d/init.d/pandora_agent_daemon
%defattr(644,root,root)
/usr/share/man/man1/pandora_agent.1.gz
/usr/share/man/man1/tentacle_client.1.gz
/usr/share/man/man1/tentacle_server.1.gz
%config(noreplace) %{_sysconfdir}/logrotate.d/pandora_agent

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240506
%define release 240513
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version
@ -55,11 +55,13 @@ mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_server $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/rc.d/init.d/pandora_agent_daemon
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_server.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent.conf $RPM_BUILD_ROOT/usr/share/pandora_agent/pandora_agent.conf.rpmnew
@ -161,9 +163,11 @@ exit 0
%defattr(755,root,root)
/usr/bin/pandora_agent_exec
/usr/bin/tentacle_client
/usr/bin/tentacle_server
/etc/rc.d/init.d/pandora_agent_daemon
%defattr(644,root,root)
/usr/share/man/man1/pandora_agent.1.gz
/usr/share/man/man1/tentacle_client.1.gz
/usr/share/man/man1/tentacle_server.1.gz
%config(noreplace) %{_sysconfdir}/logrotate.d/pandora_agent

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240506
%define release 240513
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version
@ -55,11 +55,13 @@ mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_server $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/
#cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/rc.d/init.d/pandora_agent_daemon
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_server.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent.conf $RPM_BUILD_ROOT/usr/share/pandora_agent/pandora_agent.conf.rpmnew
@ -150,8 +152,10 @@ exit 0
%defattr(755,root,root)
/usr/bin/pandora_agent_exec
/usr/bin/tentacle_client
/usr/bin/tentacle_server
%defattr(644,root,root)
/usr/share/man/man1/pandora_agent.1.gz
/usr/share/man/man1/tentacle_client.1.gz
/usr/share/man/man1/tentacle_server.1.gz
%config(noreplace) %{_sysconfdir}/logrotate.d/pandora_agent

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240506
%define release 240513
Summary: Pandora FMS Linux agent, binary version
Name: %{name}
@ -53,11 +53,13 @@ mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_server $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/rc.d/init.d/pandora_agent_daemon
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_server.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent.conf $RPM_BUILD_ROOT/usr/share/pandora_agent/pandora_agent.conf.rpmnew
@ -159,9 +161,11 @@ exit 0
%defattr(755,root,root)
/usr/bin/pandora_agent_exec
/usr/bin/tentacle_client
/usr/bin/tentacle_server
/etc/rc.d/init.d/pandora_agent_daemon
%defattr(644,root,root)
/usr/share/man/man1/pandora_agent.1.gz
/usr/share/man/man1/tentacle_client.1.gz
/usr/share/man/man1/tentacle_server.1.gz
%config(noreplace) %{_sysconfdir}/logrotate.d/pandora_agent

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240506
%define release 240513
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
@ -46,12 +46,14 @@ mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_server $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/init.d/pandora_agent_daemon
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/init.d/pandora_agent_daemon
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_server.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent.conf $RPM_BUILD_ROOT/usr/share/pandora_agent/pandora_agent.conf.rpmnew
@ -147,6 +149,7 @@ rm -Rf /var/log/pandora/pandora_agent* 2> /dev/null
rm -Rf /usr/share/pandora_agent
rm -Rf /usr/share/man/man1/pandora_agent.1.gz
rm -Rf /usr/share/man/man1/tentacle_client.1.gz
rm -Rf /usr/share/man/man1/tentacle_server.1.gz
exit 0
%postun
@ -165,6 +168,7 @@ rm -Rf /etc/logrotate.d/pandora_agent
%defattr(755,pandora,root)
/usr/bin/tentacle_client
/usr/bin/tentacle_server
/etc/init.d/pandora_agent_daemon
%docdir %{prefix}/pandora_agents/docs
%{prefix}/pandora_agent
@ -172,4 +176,5 @@ rm -Rf /etc/logrotate.d/pandora_agent
%defattr(644,pandora,root)
/usr/share/man/man1/pandora_agent.1.gz
/usr/share/man/man1/tentacle_client.1.gz
/usr/share/man/man1/tentacle_server.1.gz

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.776"
PI_BUILD="240506"
PI_BUILD="240513"
OS_NAME=`uname -s`
FORCE=0

View File

@ -1757,12 +1757,6 @@ sub check_ssleay_version {
# Main
################################################################################
# Never run as root
if ($> == 0 && $^O ne 'MSWin32') {
print ("Error: for safety reasons $0 cannot be run with root privileges.\n");
exit 1;
}
# Parse command line options
parse_options ();

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{240506}
{240513}
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.776 Build 240506")
#define PANDORA_VERSION ("7.0NG.776 Build 240513")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.776(Build 240506))"
VALUE "ProductVersion", "(7.0NG.776(Build 240513))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.776-240506
Version: 7.0NG.776-240513
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.776-240506"
pandora_version="7.0NG.776-240513"
package_pear=0
package_pandora=1

View File

@ -7,6 +7,7 @@ prepare stmt from @sqlstmt;
execute stmt;
DROP TABLE IF EXISTS tskin;
DROP TABLE IF EXISTS tnetwork_matrix;
ALTER TABLE tfavmenu_user CONVERT TO CHARACTER SET UTF8MB4;
ALTER TABLE tfiles_repo CONVERT TO CHARACTER SET UTF8MB4;
@ -15,6 +16,8 @@ ALTER TABLE tfiles_repo_group CONVERT TO CHARACTER SET UTF8MB4;
ALTER TABLE `tusuario`
ADD COLUMN `stop_lts_modal` TINYINT NOT NULL DEFAULT 0 AFTER `session_max_time_expire`;
ALTER TABLE `tlayout_template` ADD COLUMN `create_from` INT UNSIGNED NOT NULL DEFAULT 0;
-- START MIGRATION MSSQL --
SET @current_app_type = 12;
SET @short_name = 'pandorafms.mssql';
@ -7764,4 +7767,9 @@ DELETE FROM tconfig WHERE `token` = 'loginhash_pwd';
UPDATE `tdiscovery_apps` SET `version` = '1.5' WHERE `short_name` = 'pandorafms.vmware';
-- Delete Create incident from event, from tevent_response
DELETE FROM tevent_response WHERE name = 'Create&#x20;incident&#x20;from&#x20;event';
UPDATE tconfig_os SET `name` = 'Web&#x20;Server' WHERE `id_os` = 12;
COMMIT;

View File

@ -22,14 +22,18 @@ $msg = __(
$msg .= '<br><br>'.__("There are two types of graphs: The agent's automated graphs and the graphs the user customizes by using one or more modules to do so.");
$url_new = 'index.php?sec=reporting&sec2=godmode/reporting/graph_builder';
$button = '<form action="'.$url_new.'" method="post">
<input type="submit" class="button_task button_task_mini mrgn_0px_imp" value="'.__('Create custom graph').'" />
</form>';
$button = '';
echo ui_print_empty_view(
__('Create custom graph'),
$msg,
'custom-graph.svg',
$button
);
if (check_acl($config['id_user'], 0, 'RW') || check_acl($config['id_user'], 0, 'RM')) {
$url_new = 'index.php?sec=reporting&sec2=godmode/reporting/graph_builder';
$button = '<form action="'.$url_new.'" method="post">
<input type="submit" class="button_task button_task_mini mrgn_0px_imp" value="'.__('Create custom graph').'" />
</form>';
}
echo ui_print_empty_view(
__('Create custom graph'),
$msg,
'custom-graph.svg',
$button
);

View File

@ -437,7 +437,7 @@ if ($is_management_allowed === true
$icon = (string) get_parameter('icon');
$id_parent = (int) get_parameter('id_parent');
$group_pass = (string) get_parameter('group_pass');
$alerts_disabled = (bool) get_parameter('alerts_disabled');
$alerts_disabled = (bool) get_parameter_switch('alerts_enabled', 0);
$custom_id = (string) get_parameter('custom_id');
$description = (string) get_parameter('description');
$contact = (string) get_parameter('contact');
@ -459,7 +459,7 @@ if ($is_management_allowed === true
'nombre' => $name,
'icon' => $icon,
'parent' => $id_parent,
'disabled' => $alerts_disabled,
'disabled' => !$alerts_disabled,
'custom_id' => $custom_id,
'description' => $description,
'contact' => $contact,
@ -493,7 +493,7 @@ if ($is_management_allowed === true && $update_group === true) {
$id_parent = (int) get_parameter('id_parent');
$description = (string) get_parameter('description');
$group_pass = (string) get_parameter('group_pass');
$alerts_enabled = (bool) get_parameter('alerts_enabled');
$alerts_enabled = (bool) get_parameter_switch('alerts_enabled', 0);
$custom_id = (string) get_parameter('custom_id');
$propagate = (bool) get_parameter('propagate');
$description = (string) get_parameter('description');
@ -1108,7 +1108,7 @@ if ($tab == 'tree') {
// Reporting_get_group_stats.
$table->data[$key][3] = ($group['disabled']) ? __('Disabled') : __('Enabled');
$table->data[$key][3] = ($group['disabled'] === '1') ? __('Disabled') : __('Enabled');
$table->data[$key][4] = $group['parent_name'];
$table->data[$key][5] = $group['description'];
if ($is_management_allowed === true) {

View File

@ -481,7 +481,7 @@ if (!empty($graphs)) {
$ActionButtons[] = '</form>';
}
if (!empty($result_graphs)) {
if (!empty($result_graphs) && ($report_w || $report_m)) {
$ActionButtons[] = "<form method='post' id='form_delete' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>";
$ActionButtons[] = html_print_input_hidden('multiple_delete', 1, true);
$ActionButtons[] = html_print_submit_button(

View File

@ -1362,12 +1362,12 @@ $class = 'databox filters';
$result_select = [];
foreach ($os as $item) {
foreach ($os_list as $item) {
$result_select[$item['id_os']] = $item['name'];
}
html_print_select(
$os_list,
$result_select,
'os_selector',
$os_selector,
''
@ -2757,14 +2757,16 @@ if (is_metaconsole() === true) {
<td class="bolder"><?php echo __('Date'); ?></td>
<td class="mx180px">
<?php
$dates = enterprise_hook(
'inventory_get_dates',
[
$idAgentModule,
$idAgent,
$group,
]
);
if (isset($idAgent) === true) {
$dates = enterprise_hook(
'inventory_get_dates',
[
$idAgentModule,
$idAgent,
$group,
]
);
}
if ($dates === ENTERPRISE_NOT_HOOK) {
$dates = [];

View File

@ -160,6 +160,16 @@ class ManageExtensions extends HTML
public function run()
{
global $config;
if (! check_acl($config['id_user'], 0, 'AR')) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access Manage disco packages'
);
include 'general/noaccess.php';
return;
}
// Load styles.
parent::run();
@ -278,52 +288,54 @@ class ManageExtensions extends HTML
$this->printHeader(true)
);
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->size = [];
$table->size[0] = '80%';
$table->align[3] = 'right';
$table->data = [];
$table->data[0][0] = html_print_label_input_block(
__('Load DISCO'),
html_print_div(
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->size = [];
$table->size[0] = '80%';
$table->align[3] = 'right';
$table->data = [];
$table->data[0][0] = html_print_label_input_block(
__('Load DISCO'),
html_print_div(
[
'id' => 'upload_file',
'content' => html_print_input_file(
'file',
true,
['style' => 'width:100%']
),
'class' => 'mrgn_top_15px',
],
true
)
);
$table->data[0][3] = html_print_submit_button(
__('Upload DISCO'),
'upload_button',
false,
[
'id' => 'upload_file',
'content' => html_print_input_file(
'file',
true,
['style' => 'width:100%']
),
'class' => 'mrgn_top_15px',
'class' => 'sub ok float-right',
'icon' => 'next',
],
true
)
);
$table->data[0][3] = html_print_submit_button(
__('Upload DISCO'),
'upload_button',
false,
[
'class' => 'sub ok float-right',
'icon' => 'next',
],
true
);
);
echo '<form id="uploadExtension" enctype="multipart/form-data" action="index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=magextensions" method="POST">';
html_print_input_hidden('upload_disco', 1);
html_print_table($table);
// Auxiliar div ant string for migrate modal.
$modal = '<div id="migrate_modal" class="invisible"></div>';
$modal .= '<div class="invisible" id="msg"></div>';
echo '<form id="uploadExtension" enctype="multipart/form-data" action="index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=magextensions" method="POST">';
html_print_input_hidden('upload_disco', 1);
html_print_table($table);
// Auxiliar div ant string for migrate modal.
$modal = '<div id="migrate_modal" class="invisible"></div>';
$modal .= '<div class="invisible" id="msg"></div>';
echo $modal;
echo $modal;
echo '<div class="action-buttons w700px">';
echo '<div class="action-buttons w700px">';
echo '</div>';
echo '</form>';
echo '</div>';
echo '</form>';
}
echo '<script type="text/javascript">
var page = "'.$this->ajaxController.'";
@ -366,7 +378,7 @@ class ManageExtensions extends HTML
ui_print_datatable(
[
'id' => 'list_extensions',
'class' => 'info_table',
'class' => 'info_table discovery-list-extensions',
'style' => 'width: 99%',
'dom_elements' => 'plfti',
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
@ -723,39 +735,45 @@ class ManageExtensions extends HTML
$data[$key]['short_name'] = $row['short_name'];
$data[$key]['description'] = io_safe_output($row['description']);
$data[$key]['version'] = $row['version'];
$data[$key]['actions'] = '<form name="grupo" method="post" class="rowPair table_action_buttons" action="'.$this->url.'&action=delete">';
$data[$key]['actions'] .= html_print_input_image(
'button_delete',
'images/delete.svg',
'',
'',
true,
[
'onclick' => 'if (!confirm(\''.__('Deleting this application will also delete all the discovery tasks using it. Do you want to delete it?').'\')) return false;',
'class' => 'main_menu_icon invert_filter action_button_hidden',
'title' => 'Delete',
]
);
$data[$key]['actions'] .= html_print_input_hidden('short_name', $row['short_name'], true);
$data[$key]['actions'] .= '</form>';
if ($this->checkFolderConsole($row['short_name']) === true) {
$data[$key]['actions'] .= '<form name="grupo" method="post" class="rowPair table_action_buttons" action="'.$this->url.'&action=sync_server">';
$data[$key]['actions'] = '';
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
$data[$key]['actions'] .= '<form name="grupo" method="post" class="rowPair table_action_buttons" action="'.$this->url.'&action=delete">';
$data[$key]['actions'] .= html_print_input_image(
'button_refresh',
'images/refresh@svg.svg',
'button_delete',
'images/delete.svg',
'',
'',
true,
[
'onclick' => 'if (!confirm(\''.__('Are you sure you want to reapply?').'\')) return false;',
'onclick' => 'if (!confirm(\''.__('Deleting this application will also delete all the discovery tasks using it. Do you want to delete it?').'\')) return false;',
'class' => 'main_menu_icon invert_filter action_button_hidden',
'title' => 'Refresh',
'title' => 'Delete',
]
);
$data[$key]['actions'] .= html_print_input_hidden('sync_action', 'refresh', true);
$data[$key]['actions'] .= html_print_input_hidden('short_name', $row['short_name'], true);
$data[$key]['actions'] .= '</form>';
}
if ($this->checkFolderConsole($row['short_name']) === true) {
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
$data[$key]['actions'] .= '<form name="grupo" method="post" class="rowPair table_action_buttons" action="'.$this->url.'&action=sync_server">';
$data[$key]['actions'] .= html_print_input_image(
'button_refresh',
'images/refresh@svg.svg',
'',
'',
true,
[
'onclick' => 'if (!confirm(\''.__('Are you sure you want to reapply?').'\')) return false;',
'class' => 'main_menu_icon invert_filter action_button_hidden',
'title' => 'Refresh',
]
);
$data[$key]['actions'] .= html_print_input_hidden('sync_action', 'refresh', true);
$data[$key]['actions'] .= html_print_input_hidden('short_name', $row['short_name'], true);
$data[$key]['actions'] .= '</form>';
}
} else {
$data[$key]['actions'] .= html_print_image(
'images/error_red.png',

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>loop v2@svg</title>
<g id="loop-v2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group" fill="#3F3F3F">
<path d="M20,10 C20,14.418278 16.418278,18 12,18 L11,18 L11,16 L12,16 C15.3137085,16 18,13.3137085 18,10 C18,6.92328108 15.6842046,4.38744515 12.7005882,4.04046651 L14,3 L12.7999684,2.03949706 C16.8426417,2.44086199 20,5.85171073 20,10 Z M9,2 L9,4 L8,4 C4.6862915,4 2,6.6862915 2,10 C2,13.0774099 4.31683558,15.6136938 7.30142194,15.9597669 L6,17 L7.19902859,17.9604033 C3.15683607,17.5585739 0,14.1479462 0,10 C0,5.581722 3.581722,2 8,2 L9,2 Z" id="Path-107" transform="translate(10, 10) scale(-1, -1) translate(-10, -10)"></path>
<polygon id="Path-106" points="8 0 8 6 12 3"></polygon>
<polygon id="Path-106" transform="translate(10, 17) scale(-1, 1) translate(-10, -17)" points="8 14 8 20 12 17"></polygon>
</g>
<path d="M0.292893219,0.292893219 C0.683417511,-0.0976310729 1.31658249,-0.0976310729 1.70710678,0.292893219 L1.79912396,0.384910402 C1.85821492,0.444001355 1.91326052,0.499046961 1.96703474,0.552821173 L2.08705149,0.672837932 C2.1271221,0.712908533 2.1676478,0.753434236 2.20979886,0.795585301 L2.38984567,0.975632111 C2.40603428,0.99182072 2.42257686,1.0083633 2.43951675,1.02530319 L2.94454935,1.53033579 C2.99669098,1.58247741 3.05180882,1.63759526 3.11024963,1.69603607 L4.94491536,3.5307018 C5.06686811,3.65265454 5.19457102,3.78035746 5.32837086,3.91415729 L5.97279454,4.55858098 L6.20710678,4.79289322 C6.53523178,5.12101822 6.84284897,5.42863541 7.13325424,5.71904068 L7.5563652,6.14215164 C7.62486954,6.21065598 7.69240112,6.27818756 7.75901146,6.3447979 L8.33502121,6.92080765 C8.39656754,6.98235397 8.45734711,7.04313354 8.51741142,7.10319786 L8.86962624,7.45541267 C8.92703552,7.51282196 8.98383255,7.56961899 9.04006882,7.62585525 L9.37116928,7.95695572 C9.4253685,8.01115494 9.47910996,8.06489639 9.53244514,8.11823158 L10.9113152,9.49710159 C11.0117027,9.59748917 11.1123192,9.69810562 11.2135765,9.79936295 L11.6749508,10.2607372 C11.7790577,10.3648441 11.8844234,10.4702099 11.99146,10.5772465 L12.4857933,11.0715797 C12.7117455,11.2975319 12.9468529,11.5326393 13.1944115,11.7801979 L14.4035942,12.9893806 C14.7690041,13.3547905 15.1615936,13.7473801 15.5878002,14.1735867 L17.2784931,15.8642796 C17.5881874,16.1739738 17.9127647,16.4985512 18.2536156,16.839402 L19.326379,17.9121655 L19.7071068,18.2928932 C20.0976311,18.6834175 20.0976311,19.3165825 19.7071068,19.7071068 C19.3165825,20.0976311 18.6834175,20.0976311 18.2928932,19.7071068 C18.163987,19.5782005 18.0370949,19.4513084 17.9121655,19.326379 L16.839402,18.2536156 C16.4985512,17.9127647 16.1739738,17.5881874 15.8642796,17.2784931 L14.1735867,15.5878002 C13.7473801,15.1615936 13.3547905,14.7690041 12.9893806,14.4035942 L11.7801979,13.1944115 C11.5326393,12.9468529 11.2975319,12.7117455 11.0715797,12.4857933 L10.5772465,11.99146 C10.4702099,11.8844234 10.3648441,11.7790577 10.2607372,11.6749508 L9.79936295,11.2135765 C9.69810562,11.1123192 9.59748917,11.0117027 9.49710159,10.9113152 L8.11823158,9.53244514 C8.06489639,9.47910996 8.01115494,9.4253685 7.95695572,9.37116928 L7.62585525,9.04006882 C7.56961899,8.98383255 7.51282196,8.92703552 7.45541267,8.86962624 L7.10319786,8.51741142 C7.04313354,8.45734711 6.98235397,8.39656754 6.92080765,8.33502121 L6.3447979,7.75901146 C6.27818756,7.69240112 6.21065598,7.62486954 6.14215164,7.5563652 L5.71904068,7.13325424 C5.42863541,6.84284897 5.12101822,6.53523178 4.79289322,6.20710678 C4.71310598,6.12731955 4.63501635,6.04922991 4.55858098,5.97279454 L3.91415729,5.32837086 C3.78035746,5.19457102 3.65265454,5.06686811 3.5307018,4.94491536 L1.69603607,3.11024963 C1.63759526,3.05180882 1.58247741,2.99669098 1.53033579,2.94454935 L1.02530319,2.43951675 C1.0083633,2.42257686 0.99182072,2.40603428 0.975632111,2.38984567 L0.795585301,2.20979886 C0.753434236,2.1676478 0.712908533,2.1271221 0.672837932,2.08705149 L0.552821173,1.96703474 C0.499046961,1.91326052 0.444001355,1.85821492 0.384910402,1.79912396 L0.292893219,1.70710678 C-0.0976310729,1.31658249 -0.0976310729,0.683417511 0.292893219,0.292893219 Z" id="Path-99" fill="#3F3F3F" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -1,11 +1,13 @@
<svg>
<g id="zoom_default">
<g>
<g id="zoom_default">
<g>
<path fill="#999999" d="M29,21.915c0,3.895-3.189,7.086-7.087,7.086H7.087C3.191,29.001,0,25.812,0,21.915V7.088
C0,3.19,3.188,0,7.087,0h14.826C25.809,0,29,3.188,29,7.088V21.915z"/>
<g>
<path fill="#999999"
d="M29,21.915c0,3.895-3.189,7.086-7.087,7.086H7.087C3.191,29.001,0,25.812,0,21.915V7.088
C0,3.19,3.188,0,7.087,0h14.826C25.809,0,29,3.188,29,7.088V21.915z" />
</g>
</g>
<text transform="matrix(1 0 0 1 8.0737 21.2432)" fill="#FFFFFF" font-size="19" x="2" y="-3">
D</text>
</g>
<text transform="matrix(1 0 0 1 8.0737 21.2432)" fill="#FFFFFF" font-size="19">D</text>
</g>
</svg>
</svg>

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 381 B

View File

@ -37,7 +37,7 @@ if ($change_label === '1') {
$label = get_parameter('label', '');
$source = get_parameter('source', 0);
$user = get_parameter('user', '');
$value = get_parameter('value', 0) ? 1 : 0;
$value = get_parameter('value', 0);
$user_info = get_user_info($config['id_user']);
if ((bool) $user_info['is_admin'] === false && $config['id_user'] !== $user) {
return false;

View File

@ -145,6 +145,11 @@ if ($create_net_scan) {
}
if ($create_mail_alert) {
if ((bool) check_acl($config['id_user'], 0, 'LM') === false) {
ui_print_error_message(__('Unauthorized'));
return;
}
include_once '../functions_alerts.php';
$id_action = db_get_row_filter('talert_actions', ['name' => 'Email to '.$config['id_user']], 'id')['id'];
if (!$id_action) {

View File

@ -85,6 +85,13 @@ class SnmpConsole extends HTML
*/
private $filter_free_search;
/**
* Filter alias.
*
* @var string
*/
private $filter_alias_search;
/**
* Filter status.
*
@ -135,7 +142,8 @@ class SnmpConsole extends HTML
int $filter_group_by,
int $filter_hours_ago,
int $filter_trap_type,
int $refr
int $refr,
string $filter_alias_search
) {
global $config;
@ -157,6 +165,7 @@ class SnmpConsole extends HTML
$this->filter_alert = $filter_alert;
$this->filter_severity = $filter_severity;
$this->filter_free_search = $filter_free_search;
$this->filter_alias_search = $filter_alias_search;
$this->filter_status = $filter_status;
$this->filter_group_by = $filter_group_by;
$this->filter_hours_ago = $filter_hours_ago;
@ -375,13 +384,21 @@ class SnmpConsole extends HTML
'style' => 'widht:100%',
],
[
'label' => __('Free search'),
'label' => __('Search').ui_print_help_tip(__('It will search through the contents of the raw trap, which does not include the agent name. You can search by the next values: IP, OID, Value, Text, Description, User ID and Source.'), true),
'type' => 'text',
'id' => 'filter_free_search',
'input_class' => 'filter_input_datatable',
'name' => 'filter_free_search',
'value' => $this->filter_free_search,
],
[
'label' => __('Search Alias').ui_print_help_tip(__('It will search by the agent alias. This option could make the system slower.'), true),
'type' => 'text',
'id' => 'filter_alias_search',
'input_class' => 'filter_input_datatable',
'name' => 'filter_alias_search',
'value' => $this->filter_alias_search,
],
[
'label' => __('Status'),
'type' => 'select',
@ -449,7 +466,7 @@ class SnmpConsole extends HTML
1000,
],
],
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar snmp-console-filter',
]
);
} catch (Exception $e) {
@ -554,10 +571,6 @@ class SnmpConsole extends HTML
$filters = get_parameter('filter', []);
// Build ranges.
if (empty($filters['filter_hours_ago']) === true) {
$filters['filter_hours_ago'] = 8;
}
$now_timestamp = time();
$interval_seconds = ($filters['filter_hours_ago'] * 3600);
$ago_timestamp = ($now_timestamp - $interval_seconds);
@ -577,118 +590,148 @@ class SnmpConsole extends HTML
ob_start();
$data = [];
$user_groups = users_get_groups($config['id_user'], 'AR', false);
$prea = array_keys($user_groups);
$ids = join(',', $prea);
$whereSubquery = '';
$sql = 'SELECT
*
FROM
ttrap
%s
WHERE 1=1
%s
ORDER BY
timestamp DESC
LIMIT %d, %d';
$user_in_group_wo_agents = db_get_value_sql('select count(DISTINCT(id_usuario)) from tusuario_perfil where id_usuario ="'.$config['id_user'].'" and id_perfil = 1 and id_grupo in (select id_grupo from tgrupo where id_grupo in ('.$ids.') and id_grupo not in (select id_grupo from tagente))');
if ($user_in_group_wo_agents == 0) {
$sql_count = 'SELECT
COUNT(`ttrap`.`id_trap`)
FROM
ttrap
%s
WHERE 1=1
%s';
if (users_is_admin() === false || users_can_manage_group_all('AR') === false) {
$user_groups = users_get_groups($config['id_user'], 'AR', false);
$rows = db_get_all_rows_filter(
'tagente',
['id_grupo' => array_keys($user_groups)],
['id_agente']
);
$id_agents = [];
foreach ($rows as $row) {
$id_agents[] = $row['id_agente'];
}
if (!empty($id_agents)) {
if (empty($id_agents) === false) {
$address_by_user_groups = agents_get_addresses($id_agents);
foreach ($address_by_user_groups as $i => $a) {
$address_by_user_groups[$i] = '"'.$a.'"';
}
}
} else {
$rows = db_get_all_rows_filter(
'tagente',
[],
['id_agente']
if (empty($address_by_user_groups) === true) {
$address_by_user_groups = [];
array_unshift($address_by_user_groups, '""');
}
$whereSubquery .= sprintf(
'AND (
`ttrap`.`source` IN (%s) OR
`ttrap`.`source`=""
)',
implode(',', $address_by_user_groups)
);
$id_agents = [];
foreach ($rows as $row) {
$id_agents[] = $row['id_agente'];
}
$all_address_agents = agents_get_addresses($id_agents);
foreach ($all_address_agents as $i => $a) {
$all_address_agents[$i] = '"'.$a.'"';
}
}
if (empty($address_by_user_groups)) {
$address_by_user_groups = [];
array_unshift($address_by_user_groups, '""');
if ($filters['filter_alias_search'] !== '') {
$sql_join = '
LEFT JOIN `tagente`
ON `tagente`.`direccion` = `ttrap`.`source`
LEFT JOIN `taddress_agent`
ON `tagente`.`id_agente` = `taddress_agent`.`id_agent`
LEFT JOIN `taddress`
ON `taddress_agent`.`id_a` = `taddress`.`id_a`
';
} else {
$sql_join = '';
}
if (empty($all_address_agents)) {
$all_address_agents = [];
array_unshift($all_address_agents, '""');
}
$sql = 'SELECT * FROM ttrap
WHERE (
`source` IN ('.implode(',', $address_by_user_groups).") OR
`source`='' OR
`source` NOT IN (".implode(',', $all_address_agents).')
)
%s
ORDER BY timestamp DESC
LIMIT %d,%d';
$whereSubquery = '';
if ($filters['filter_alert'] != -1) {
$whereSubquery .= ' AND alerted = '.$filters['filter_alert'];
$whereSubquery .= ' AND `ttrap`.`alerted` = '.$filters['filter_alert'];
}
$filters['filter_severity'] = (int) $filters['filter_severity'];
if ($filters['filter_severity'] != -1) {
// There are two special severity values aimed to match two different trap standard severities
// in database: warning/critical and critical/normal.
if ($filters['filter_severity'] !== EVENT_CRIT_OR_NORMAL
&& $filters['filter_severity'] !== EVENT_CRIT_WARNING_OR_CRITICAL
&& $filters['filter_severity'] !== EVENT_CRIT_NOT_NORMAL
if ($filters['filter_severity'] != EVENT_CRIT_OR_NORMAL
&& $filters['filter_severity'] != EVENT_CRIT_WARNING_OR_CRITICAL
) {
// Test if enterprise is installed to search oid in text or oid field in ttrap.
$whereSubquery .= ' AND severity = '.$filters['filter_severity'];
if ($config['enterprise_installed']) {
$whereSubquery .= ' AND (
(`ttrap`.`alerted` = 0 AND `ttrap`.`severity` = '.$filters['filter_severity'].') OR
(`ttrap`.`alerted` = 1 AND `ttrap`.`priority` = '.$filters['filter_severity'].'))';
} else {
$whereSubquery .= ' AND (
(`ttrap`.`alerted` = 0 AND 1 = '.$filters['filter_severity'].') OR
(`ttrap`.`alerted` = 1 AND `ttrap`.`priority` = '.$filters['filter_severity'].'))';
}
} else if ($filters['filter_severity'] === EVENT_CRIT_WARNING_OR_CRITICAL) {
// Test if enterprise is installed to search oid in text or oid field in ttrap.
$whereSubquery .= ' AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.' OR severity = '.EVENT_CRIT_WARNING_OR_CRITICAL.')';
if ($config['enterprise_installed']) {
$whereSubquery .= ' AND (
(`ttrap`.`alerted` = 0 AND (`ttrap`.`severity` = '.EVENT_CRIT_WARNING.' OR `ttrap`.`severity` = '.EVENT_CRIT_CRITICAL.')) OR
(`ttrap`.`alerted` = 1 AND (`ttrap`.`priority` = '.EVENT_CRIT_WARNING.' OR `ttrap`.`priority` = '.EVENT_CRIT_CRITICAL.')))';
} else {
$whereSubquery .= ' AND (
(`ttrap`.`alerted` = 1 AND (`ttrap`.`priority` = '.EVENT_CRIT_WARNING.' OR `ttrap`.`priority` = '.EVENT_CRIT_CRITICAL.')))';
}
} else if ($filters['filter_severity'] === EVENT_CRIT_OR_NORMAL) {
// Test if enterprise is installed to search oid in text or oid field in ttrap.
$whereSubquery .= ' AND (severity = '.EVENT_CRIT_NORMAL.' OR severity = '.EVENT_CRIT_CRITICAL.' OR severity = '.EVENT_CRIT_OR_NORMAL.')';
} else if ($filters['filter_severity'] === EVENT_CRIT_NOT_NORMAL) {
// Test if enterprise is installed to search oid in text or oid field in ttrap.
$whereSubquery .= ' AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.' OR severity = '.EVENT_CRIT_NOT_NORMAL.')';
if ($config['enterprise_installed']) {
$whereSubquery .= ' AND (
(`ttrap`.`alerted` = 0 AND (`ttrap`.`severity` = '.EVENT_CRIT_NORMAL.' OR `ttrap`.`severity` = '.EVENT_CRIT_CRITICAL.')) OR
(`ttrap`.`alerted` = 1 AND (`ttrap`.`priority` = '.EVENT_CRIT_NORMAL.' OR `ttrap`.`priority` = '.EVENT_CRIT_CRITICAL.')))';
} else {
$whereSubquery .= ' AND (
(`ttrap`.`alerted` = 1 AND (`ttrap`.`priority` = '.EVENT_CRIT_NORMAL.' OR `ttrap`.`priority` = '.EVENT_CRIT_CRITICAL.')))';
}
}
}
if ($filters['filter_free_search'] !== '') {
$free_search_str = io_safe_output($filters['filter_free_search']);
$whereSubquery .= '
AND (source LIKE "%'.$free_search_str.'%" OR
oid LIKE "%'.$free_search_str.'%" OR
oid_custom LIKE "%'.$free_search_str.'%" OR
type_custom LIKE "%'.$free_search_str.'%" OR
value LIKE "%'.$free_search_str.'%" OR
value_custom LIKE "%'.$free_search_str.'%" OR
id_usuario LIKE "%'.$free_search_str.'%" OR
text LIKE "%'.$free_search_str.'%" OR
description LIKE "%'.$free_search_str.'%")';
AND (`ttrap`.`source` LIKE "%'.$free_search_str.'%" OR
`ttrap`.`oid` LIKE "%'.$free_search_str.'%" OR
`ttrap`.`oid_custom` LIKE "%'.$free_search_str.'%" OR
`ttrap`.`type_custom` LIKE "%'.$free_search_str.'%" OR
`ttrap`.`value` LIKE "%'.$free_search_str.'%" OR
`ttrap`.`value_custom` LIKE "%'.$free_search_str.'%" OR
`ttrap`.`id_usuario` LIKE "%'.$free_search_str.'%" OR
`ttrap`.`text` LIKE "%'.$free_search_str.'%" OR
`ttrap`.`description` LIKE "%'.$free_search_str.'%")';
}
if ($filters['filter_alias_search'] !== '') {
$alias_search = io_safe_output($filters['filter_alias_search']);
$whereSubquery .= '
AND `tagente`.`alias` LIKE "%'.$alias_search.'%"';
}
if ($filters['filter_status'] != -1) {
$whereSubquery .= ' AND status = '.$filters['filter_status'];
$whereSubquery .= ' AND `ttrap`.`status` = '.$filters['filter_status'];
}
if ($date_from_trap != '') {
if ($time_from_trap != '') {
$whereSubquery .= '
AND (utimestamp > '.$ago_timestamp.')
AND (`ttrap`.`utimestamp` > '.$ago_timestamp.')
';
} else {
$whereSubquery .= '
AND (UNIX_TIMESTAMP(timestamp) > UNIX_TIMESTAMP("'.$date_from_trap.' 23:59:59"))
AND (UNIX_TIMESTAMP(`ttrap`.`timestamp`) > UNIX_TIMESTAMP("'.$date_from_trap.' 23:59:59"))
';
}
}
@ -696,37 +739,31 @@ class SnmpConsole extends HTML
if ($date_to_trap != '') {
if ($time_to_trap) {
$whereSubquery .= '
AND (utimestamp < '.$now_timestamp.')
AND (`ttrap`.`utimestamp` < '.$now_timestamp.')
';
} else {
$whereSubquery .= '
AND (UNIX_TIMESTAMP(timestamp) < UNIX_TIMESTAMP("'.$date_to_trap.' 23:59:59"))
AND (UNIX_TIMESTAMP(`ttrap`.`timestamp`) < UNIX_TIMESTAMP("'.$date_to_trap.' 23:59:59"))
';
}
}
if ($filters['filter_trap_type'] == 5) {
$whereSubquery .= ' AND type NOT IN (0, 1, 2, 3, 4)';
$whereSubquery .= ' AND `ttrap`.`type` NOT IN (0, 1, 2, 3, 4)';
} else if ($filters['filter_trap_type'] != -1) {
$whereSubquery .= ' AND type = '.$filters['filter_trap_type'];
$whereSubquery .= ' AND `ttrap`.`type` = '.$filters['filter_trap_type'];
}
$where_without_group = '';
if ($filters['filter_group_by']) {
$where_without_group = $whereSubquery;
$whereSubquery .= ' GROUP BY source,oid';
$whereSubquery .= ' GROUP BY `ttrap`.`source`,`ttrap`.`oid`,`ttrap`.`id_trap`';
} else if ($filters['filter_alias_search'] !== '') {
$whereSubquery .= ' GROUP BY `ttrap`.`id_trap`';
}
$sql = sprintf($sql, $whereSubquery, $start, $length);
$sql_count = 'SELECT COUNT(id_trap) FROM ttrap
WHERE (
source IN ('.implode(',', $address_by_user_groups).") OR
source='' OR
source NOT IN (".implode(',', $all_address_agents).')
)
%s';
$sql_count = sprintf($sql_count, $whereSubquery);
$sql = sprintf($sql, $sql_join, $whereSubquery, $start, $length);
$sql_count = sprintf($sql_count, $sql_join, $whereSubquery);
$traps = db_get_all_rows_sql($sql, true);
$total = (int) db_get_value_sql($sql_count, false, false);
@ -781,8 +818,8 @@ class SnmpConsole extends HTML
$tmp->snmp_agent .= '<a class="'.$severity_class.'" href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$tmp->source.'" title="'.__('Create agent').'">'.$tmp->source.'</a>';
} else {
$tmp->snmp_agent .= '<div class="'.$severity_class.' snmp-div"><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'" title="'.__('View agent details').'">';
$tmp->snmp_agent .= '<strong>'.$agent['alias'].'</strong></a>'.ui_print_help_tip($tmp->source, true);
'</div>';
$tmp->snmp_agent .= '<strong>'.$agent['alias'].ui_print_help_tip($tmp->source, true);
'</strong></a></div>';
}
// Enterprise string.
@ -819,7 +856,13 @@ class SnmpConsole extends HTML
// User ID.
$tmp->user_id = '<div class="'.$severity_class.' snmp-div">';
if (empty($status) === false) {
$tmp->user_id .= '<a href="index.php?sec=workspace&sec2=operation/users/user_edit&ver='.$tmp->id_usuario.'">'.substr($tmp->id_usuario, 0, 8).'</a>';
if (users_is_admin($config['id_user']) === true || check_acl($config['id_user'], 0, 'UM') === true) {
$url = ui_get_full_url('index.php?sec=gusuarios&sec2=godmode/users/configure_user&edit_user=1&pure=0&id_user='.$tmp->id_usuario);
$tmp->user_id .= '<a href="'.$url.'">'.substr($tmp->id_usuario, 0, 8).'</a>';
} else {
$tmp->user_id .= substr($tmp->id_usuario, 0, 8);
}
if (!empty($tmp->id_usuario)) {
$tmp->user_id .= ui_print_help_tip(get_user_fullname($tmp->id_usuario), true);
}
@ -1129,25 +1172,42 @@ class SnmpConsole extends HTML
$whereSubquery .= ' AND alerted = '.$$alert;
}
$severity = (int) $severity;
if ($severity !== -1) {
if ($severity != -1) {
// There are two special severity values aimed to match two different trap standard severities
// in database: warning/critical and critical/normal.
if ($severity !== EVENT_CRIT_OR_NORMAL
&& $severity !== EVENT_CRIT_WARNING_OR_CRITICAL
&& $severity !== EVENT_CRIT_NOT_NORMAL
if ($severity != EVENT_CRIT_OR_NORMAL
&& $severity != EVENT_CRIT_WARNING_OR_CRITICAL
) {
// Test if enterprise is installed to search oid in text or oid field in ttrap.
$whereSubquery .= ' AND severity = '.$severity;
if ($config['enterprise_installed']) {
$whereSubquery .= ' AND (
(alerted = 0 AND severity = '.$severity.') OR
(alerted = 1 AND priority = '.$severity.'))';
} else {
$whereSubquery .= ' AND (
(alerted = 0 AND 1 = '.$severity.') OR
(alerted = 1 AND priority = '.$severity.'))';
}
} else if ($severity === EVENT_CRIT_WARNING_OR_CRITICAL) {
// Test if enterprise is installed to search oid in text or oid field in ttrap.
$whereSubquery .= ' AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.' OR severity = '.EVENT_CRIT_WARNING_OR_CRITICAL.')';
if ($config['enterprise_installed']) {
$whereSubquery .= ' AND (
(alerted = 0 AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.')) OR
(alerted = 1 AND (priority = '.EVENT_CRIT_WARNING.' OR priority = '.EVENT_CRIT_CRITICAL.')))';
} else {
$whereSubquery .= ' AND (
(alerted = 1 AND (priority = '.EVENT_CRIT_WARNING.' OR priority = '.EVENT_CRIT_CRITICAL.')))';
}
} else if ($severity === EVENT_CRIT_OR_NORMAL) {
// Test if enterprise is installed to search oid in text or oid field in ttrap.
$whereSubquery .= ' AND (severity = '.EVENT_CRIT_NORMAL.' OR severity = '.EVENT_CRIT_CRITICAL.' OR severity = '.EVENT_CRIT_OR_NORMAL.')';
} else if ($severity === EVENT_CRIT_NOT_NORMAL) {
// Test if enterprise is installed to search oid in text or oid field in ttrap.
$whereSubquery .= ' AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.' OR severity = '.EVENT_CRIT_NOT_NORMAL.')';
if ($config['enterprise_installed']) {
$whereSubquery .= ' AND (
(alerted = 0 AND (severity = '.EVENT_CRIT_NORMAL.' OR severity = '.EVENT_CRIT_CRITICAL.')) OR
(alerted = 1 AND (priority = '.EVENT_CRIT_NORMAL.' OR priority = '.EVENT_CRIT_CRITICAL.')))';
} else {
$whereSubquery .= ' AND (
(alerted = 1 AND (priority = '.EVENT_CRIT_NORMAL.' OR priority = '.EVENT_CRIT_CRITICAL.')))';
}
}
}

View File

@ -378,6 +378,8 @@ class WelcomeWindow extends Wizard
'class' => 'modal',
];
$output = '';
if (check_acl($config['id_user'], 0, 'PM')) {
$flag_um = false;
$flag_cm = false;
@ -590,6 +592,18 @@ class WelcomeWindow extends Wizard
if ($flag_um === false || $flag_cm === false || $flag_su === false || $flag_lv === false) {
$flag_task = true;
}
} else {
$output .= html_print_div(
[
'class' => 'flex-column-start welcome-message-no-pm',
'content' => '
<h2>'.__('Hi!').'</h2>
<p class="mrgn_btn_5px">'.__('It seems you are new to Pandora FMS.').'<br />
'.__('If you want to watch videos on how to use Pandora FMS, you can visit our ').'<a href="https://www.youtube.com/@PandoraFMS" target="_blank"><b>'.__('YouTube channel.').'</b></a></p>
<p class="mrgn_top_5px">'.__('Are you familiar with ').'<a href="https://pandorafms.com/es/producto/elearning/" target="_blank"><b>'.__('our eLearning system?').'</b></a>'.__(' It\'s completely free for PAO (Operation) and PAT (Administration) courses. Learn how to use Pandora FMS at your own pace.').'</p>',
],
true
);
}
// Task to do.
@ -610,12 +624,20 @@ class WelcomeWindow extends Wizard
],
];
$fields['load_demo_data'] = __('Load demo data');
$fields['wizard_agent'] = __('Agent installation wizard');
$fields['check_web'] = __('Create WEB monitoring');
$fields['check_connectivity'] = __('Create network monitoring');
$fields['check_net'] = __('Discover my network');
$fields['check_mail_alert'] = __('Create email alert');
if (users_is_admin() === true) {
$fields['load_demo_data'] = __('Load demo data');
}
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
$fields['wizard_agent'] = __('Agent installation wizard');
$fields['check_web'] = __('Create WEB monitoring');
$fields['check_connectivity'] = __('Create network monitoring');
$fields['check_net'] = __('Discover my network');
}
if ((bool) check_acl($config['id_user'], 0, 'LM') === true) {
$fields['check_mail_alert'] = __('Create email alert');
}
$inputs[] = [
'wrapper' => 'div',
@ -649,10 +671,16 @@ class WelcomeWindow extends Wizard
],
];
$output = $this->printForm(
$output = html_print_div(
[
'form' => $form,
'inputs' => $inputs,
'content' => $output.$this->printForm(
[
'form' => $form,
'inputs' => $inputs,
],
true
),
'class' => 'column-left w50p',
],
true
);

View File

@ -22,7 +22,7 @@ use DI\ContainerBuilder;
/*
* Pandora build version and version
*/
$build_version = 'PC240506';
$build_version = 'PC240513';
$pandora_version = 'v7.0NG.776';
// Do not overwrite default timezone set if defined.

View File

@ -258,6 +258,7 @@ define('VISUAL_MAP_STATUS_NORMAL', 0);
define('VISUAL_MAP_STATUS_WARNING', 2);
define('VISUAL_MAP_STATUS_UNKNOWN', 3);
define('VISUAL_MAP_STATUS_WARNING_ALERT', 10);
define('VISUAL_MAP_STATUS_LOOPING', 33);
// Wizard.
define('VISUAL_MAP_WIZARD_PARENTS_NONE', 0);
define('VISUAL_MAP_WIZARD_PARENTS_ITEM_MAP', 1);

View File

@ -989,3 +989,54 @@ function cron_list_table()
ui_print_info_message(['no_close' => true, 'message' => __('There are no jobs') ]);
}
}
/**
* GetNextExecutionCron give string and return datetime with the date of the next execution
*
* @param string $cron String with cron.
*
* @return DateTime Datetime with the next execution.
*/
function GetNextExecutionCron($cron)
{
// Split cron.
$cronsplit = preg_split('/\s+/', $cron);
// Set dates to use.
$current_day = new DateTime();
$next_execution = new DateTime();
// Monthly schedule.
if ($cronsplit[2] !== '*') {
$next_execution->setDate($current_day->format('Y'), $current_day->format('m'), $cronsplit[2]);
$next_execution->setTime($cronsplit[1], $cronsplit[0]);
if ($next_execution->format('Y-m-d H:i') <= $current_day->format('Y-m-d H:i')) {
$next_execution->setDate($current_day->format('Y'), ($current_day->format('m') + 1), $cronsplit[2]);
}
return $next_execution;
}
// Weekly schedule.
if ($cronsplit[4] !== '*') {
$next_execution->setISODate($current_day->format('Y'), $current_day->format('W'), $cronsplit[4]);
$next_execution->setTime($cronsplit[1], $cronsplit[0]);
if ($next_execution->format('Y-m-d H:i') <= $current_day->format('Y-m-d H:i')) {
$next_execution->setISODate($current_day->format('Y'), ($current_day->format('W') + 1), $cronsplit[4]);
}
return $next_execution;
}
// Daily schedule.
if ($cronsplit[2] === '*' && $cronsplit[3] === '*' && $cronsplit[4] === '*') {
$next_execution->setTime($cronsplit[1], $cronsplit[0]);
if ($next_execution->format('Y-m-d H:i') <= $current_day->format('Y-m-d H:i')) {
$next_execution->setDate($current_day->format('Y'), $current_day->format('m'), ($current_day->format('d') + 1));
}
return $next_execution;
}
return $next_execution;
}

View File

@ -120,6 +120,19 @@ function upload_file($upload_file_or_zip, $default_real_directory, $destination_
$upload_zip = (bool) get_parameter('upload_zip');
}
// Validate file size vs collection_max_size token.
if ($_FILES['file']['size'] > (int) $config['collection_max_size']) {
$upload_file = false;
$config['filemanager']['message'] = ui_print_error_message(
__(
'File of collection is bigger than the limit (%s bytes)',
$config['collection_max_size'],
'',
true
)
);
}
// Upload file.
if ($upload_file === true) {
if (isset($_FILES['file']) === true && empty($_FILES['file']['name']) === false) {

View File

@ -3509,7 +3509,7 @@ function graph_custom_sql_graph(
}
if ((int) $ttl === 2) {
$options['dataLabel'] = ['display' => 'auto'];
$options['dataLabel'] = ['display' => true];
if ($layout !== false && is_array($layout) === true) {
$options['layout'] = $layout;

View File

@ -2235,7 +2235,7 @@ function html_print_select_from_sql(
foreach ($result as $row) {
$id = array_shift($row);
$value = array_shift($row);
$fields[$id] = $value;
$fields[$id] = io_safe_output($value);
}
return html_print_select(
@ -7942,6 +7942,7 @@ function html_print_select_date_range(
$date_format_js='yy/mm/dd',
$time_format_js='HH:mm:ss',
$id='',
$units_selected='1',
) {
global $config;
@ -8136,7 +8137,7 @@ function html_print_select_date_range(
$output .= html_print_select(
$units,
$name.'_units',
'1',
$units_selected,
'',
'',
0,

View File

@ -680,7 +680,7 @@ function notifications_set_user_label_status($source, $user, $label, $value)
}
$exists = db_process_sql(sprintf('SELECT * FROM tnotification_source_user WHERE id_user = "%s" AND id_source = "%s"', $user, $source));
if (empty($exists['enabled']) && empty($exists['also_mail'])) {
if (empty($exists[0]['enabled']) && empty($exists[0]['also_mail'])) {
$sql = sprintf('DELETE FROM tnotification_source_user WHERE id_user = "%s" AND id_source = "%s"', $user, $source);
db_process_sql($sql);
$exists = false;

View File

@ -3817,10 +3817,18 @@ function reporting_end_of_life($report, $content)
$return['data'] = [];
$external_source = json_decode(
$content['external_source'],
true
);
if (isset($content['external_source']) === true && $content['external_source'] !== 'null') {
$external_source = json_decode(
$content['external_source'],
true
);
} else {
$external_source = [
'end_of_life_date' => $content['end_of_life_date'],
'os_selector' => $content['os_selector'],
'os_version' => $content['os_version'],
];
}
$servers_ids = [0];
@ -3856,26 +3864,38 @@ function reporting_end_of_life($report, $content)
);
$es_os_version = $external_source['os_version'];
$os_selector_name = db_get_value('name', 'tconfig_os', 'id_os', (int) $external_source['os_selector']);
$es_limit_eol_datetime = DateTime::createFromFormat('Y/m/d', $external_source['end_of_life_date']);
// Post-process returned agents to filter agents using correctly formatted fields.
$agents_tmp = [];
foreach ($agents as $idx => $agent) {
if (empty($agent['os_version']) === true) {
$agent['os_version'] = '.*';
}
// Must perform this query and subsequent operations in each iteration (note this is costly) since OS version field may contain HTML entities in BD and decoding can't be fully handled with mysql methods when doing a REGEXP.
$result_end_of_life = db_get_value_sql('SELECT end_of_support FROM tconfig_os_version WHERE "'.io_safe_output($agent['os_version']).'" REGEXP version AND "'.io_safe_output($agent['name']).'" REGEXP product');
$result_end_of_life = db_get_value_sql('SELECT end_of_support FROM tconfig_os_version');
$agent_eol_datetime = DateTime::createFromFormat('Y/m/d', $result_end_of_life);
if ((preg_match('/'.$es_os_version.'/i', $agent['os_version']) || $es_os_version === '') && $result_end_of_life !== false && ($es_limit_eol_datetime === false || $es_limit_eol_datetime >= $agent_eol_datetime)) {
if ((preg_match('/'.$es_os_version.'/i', $agent['os_version']) || $es_os_version === '')
&& $os_selector_name === io_safe_output($agent['name'])
&& $result_end_of_life !== false
&& ($es_limit_eol_datetime === false || $es_limit_eol_datetime >= $agent_eol_datetime)
) {
// Agent matches an existing OS version.
$agents[$idx]['end_of_life'] = $result_end_of_life;
$agents_tmp[] = $agents[$idx];
} else {
// Set agent to be filtered out.
$agents[$idx] = null;
}
}
if ($agents !== false) {
$agents = array_filter($agents);
// TODO:
if ($agents_tmp !== false) {
$agents = $agents_tmp;
}
if (is_metaconsole() === true) {
@ -6128,7 +6148,7 @@ function reporting_alert_get_fired($id_agent_module, $id_alert_template_module,
$datelimit = ($datetime - $period);
$empty = '----------------------------';
$empty = '';
if (empty($firedTimes)) {
$firedTimes = [];
$firedTimes[0]['timestamp'] = $empty;
@ -6192,7 +6212,7 @@ function reporting_alert_report_group($report, $content)
$agent_modules = alerts_get_agent_modules(
$content['id_group'],
(((string) $content['id_group'] === '0') ? true : $content['recursion'])
(((string) $content['id_group'] === '0') ? true : (bool) $content['recursion'])
);
if (empty($alerts)) {
@ -6429,7 +6449,7 @@ function reporting_alert_report_agent($report, $content)
$data_action[$naction]['name'] = $action['name'];
$fired = $action['fired'];
if ($fired == 0 || ($fired <= $datelimit || $fired > $datetime)) {
$data_action[$naction]['fired'] = '----------------------------';
$data_action[$naction]['fired'] = '';
} else {
$data_action[$naction]['fired'] = $fired;
}
@ -6441,7 +6461,7 @@ function reporting_alert_report_agent($report, $content)
$data_action[$naction]['name'] = $action['name'];
$fired = $action['fired'];
if ($fired == 0 || ($fired <= $datelimit || $fired > $datetime)) {
$data_action[$naction]['fired'] = '----------------------------';
$data_action[$naction]['fired'] = '';
} else {
$data_action[$naction]['fired'] = $fired;
}
@ -6453,7 +6473,7 @@ function reporting_alert_report_agent($report, $content)
$data_action[$naction]['name'] = $action['name'];
$fired = $action['fired'];
if ($fired == 0 || ($fired <= $datelimit || $fired > $datetime)) {
$data_action[$naction]['fired'] = '----------------------------';
$data_action[$naction]['fired'] = '';
} else {
$data_action[$naction]['fired'] = $fired;
}
@ -6604,7 +6624,7 @@ function reporting_alert_report_module($report, $content)
$data_action[$naction]['name'] = $action['name'];
$fired = $action['fired'];
if ($fired == 0 || ($fired <= $datelimit || $fired > $datetime)) {
$data_action[$naction]['fired'] = '----------------------------';
$data_action[$naction]['fired'] = '';
} else {
$data_action[$naction]['fired'] = $fired;
}
@ -6616,7 +6636,7 @@ function reporting_alert_report_module($report, $content)
$data_action[$naction]['name'] = $action['name'];
$fired = $action['fired'];
if ($fired == 0 || ($fired <= $datelimit || $fired > $datetime)) {
$data_action[$naction]['fired'] = '----------------------------';
$data_action[$naction]['fired'] = '';
} else {
$data_action[$naction]['fired'] = $fired;
}
@ -6628,7 +6648,7 @@ function reporting_alert_report_module($report, $content)
$data_action[$naction]['name'] = $action['name'];
$fired = $action['fired'];
if ($fired == 0 || ($fired <= $datelimit || $fired > $datetime)) {
$data_action[$naction]['fired'] = '----------------------------';
$data_action[$naction]['fired'] = '';
} else {
$data_action[$naction]['fired'] = $fired;
}
@ -6692,6 +6712,7 @@ function reporting_sql_graph(
switch ($type_sql_graph) {
case 'sql_graph_hbar':
default:
$layout = ['padding' => ['right' => '40']];
$return['type'] = 'sql_graph_hbar';
break;

View File

@ -965,88 +965,88 @@ function reports_get_report_types($template=false, $not_editor=false)
'optgroup' => __('Permissions report'),
'name' => __('Permissions report'),
];
}
$types['ncm_backups'] = [
'optgroup' => __('NCM'),
'name' => __('NCM configuration changes'),
];
$types['ncm'] = [
'optgroup' => __('NCM'),
'name' => __('NCM devices list'),
];
if (enterprise_installed() === true) {
$types['top_n_agents_sh'] = [
'optgroup' => __('Security hardening'),
'name' => __('Top-N agents with the worst score'),
$types['ncm_backups'] = [
'optgroup' => __('NCM'),
'name' => __('NCM configuration changes'),
];
$types['top_n_checks_failed'] = [
'optgroup' => __('Security hardening'),
'name' => __('Top-N most frequent failed checks'),
$types['ncm'] = [
'optgroup' => __('NCM'),
'name' => __('NCM devices list'),
];
$types['top_n_categories_checks'] = [
'optgroup' => __('Security hardening'),
'name' => __('Top-N checks failed by category'),
];
if (enterprise_installed() === true) {
$types['top_n_agents_sh'] = [
'optgroup' => __('Security hardening'),
'name' => __('Top-N agents with the worst score'),
];
$types['vul_by_cat'] = [
'optgroup' => __('Security hardening'),
'name' => __('Vulnerabilities by category'),
];
$types['top_n_checks_failed'] = [
'optgroup' => __('Security hardening'),
'name' => __('Top-N most frequent failed checks'),
];
$types['list_checks'] = [
'optgroup' => __('Security hardening'),
'name' => __('List of checks'),
];
$types['top_n_categories_checks'] = [
'optgroup' => __('Security hardening'),
'name' => __('Top-N checks failed by category'),
];
$types['scoring'] = [
'optgroup' => __('Security hardening'),
'name' => __('Scoring by date'),
];
$types['vul_by_cat'] = [
'optgroup' => __('Security hardening'),
'name' => __('Vulnerabilities by category'),
];
$types['evolution'] = [
'optgroup' => __('Security hardening'),
'name' => __('Evolution'),
];
$types['list_checks'] = [
'optgroup' => __('Security hardening'),
'name' => __('List of checks'),
];
$types['vuls_severity_graph'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Severity graph bar'),
];
$types['scoring'] = [
'optgroup' => __('Security hardening'),
'name' => __('Scoring by date'),
];
$types['vuls_attack_complexity'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Attack complexity doughnut chart'),
];
$types['evolution'] = [
'optgroup' => __('Security hardening'),
'name' => __('Evolution'),
];
$types['vuls_by_packages'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('By packages in pie chart'),
];
$types['vuls_severity_graph'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Severity graph bar'),
];
$types['vuls_by_agent'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Detailed security report'),
];
$types['vuls_attack_complexity'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Attack complexity doughnut chart'),
];
$types['vuls_info_agent'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Vulnerabilities of agent'),
];
$types['vuls_by_packages'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('By packages in pie chart'),
];
$types['top_n_agents_vuls'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Top-N agents with more risk'),
];
$types['vuls_by_agent'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Detailed security report'),
];
$types['top_n_vuls_count'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Top-N common vulnerabilities'),
];
$types['vuls_info_agent'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Vulnerabilities of agent'),
];
$types['top_n_agents_vuls'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Top-N agents with more risk'),
];
$types['top_n_vuls_count'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Top-N common vulnerabilities'),
];
}
}
return $types;

View File

@ -3221,6 +3221,10 @@ function visual_map_get_image_status_element($layoutData, $status=false)
$img .= '_warning.png';
break;
case 33:
$img = 'images/broken_loop.svg';
break;
case 3:
// Unknown.
default:
@ -3886,10 +3890,28 @@ function visual_map_translate_module_status($module_status)
*
* @return integer The status of the given layout.
*/
function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0)
{
function visual_map_get_layout_status(
$layout_id,
$status_data=[],
$depth=0,
$exclude_recursive=[],
&$num_elements_by_status=[
VISUAL_MAP_STATUS_CRITICAL_BAD => 0,
VISUAL_MAP_STATUS_CRITICAL_ALERT => 0,
VISUAL_MAP_STATUS_NORMAL => 0,
VISUAL_MAP_STATUS_WARNING => 0,
VISUAL_MAP_STATUS_UNKNOWN => 0,
VISUAL_MAP_STATUS_WARNING_ALERT => 0,
VISUAL_MAP_STATUS_LOOPING => 0,
]
) {
global $config;
if (in_array($layout_id, $exclude_recursive) === true) {
return VISUAL_MAP_STATUS_LOOPING;
}
$exclude_recursive[] = $layout_id;
// TODO: Implement this limit into the setup.
if ($depth > 10) {
return VISUAL_MAP_STATUS_UNKNOWN;
@ -3951,15 +3973,6 @@ function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0)
sort_by_column($valid_layout_items, 'id_metaconsole');
}
$num_elements_by_status = [
VISUAL_MAP_STATUS_CRITICAL_BAD => 0,
VISUAL_MAP_STATUS_CRITICAL_ALERT => 0,
VISUAL_MAP_STATUS_NORMAL => 0,
VISUAL_MAP_STATUS_WARNING => 0,
VISUAL_MAP_STATUS_UNKNOWN => 0,
VISUAL_MAP_STATUS_WARNING_ALERT => 0,
];
$meta_connected_to = null;
foreach ($valid_layout_items as $layout_item_data) {
@ -4018,7 +4031,9 @@ function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0)
$status = visual_map_get_layout_status(
$layout_item_data['id_layout_linked'],
$layout_item_data,
($depth + 1)
($depth + 1),
$exclude_recursive,
$num_elements_by_status
);
} else if (!empty($layout_item_data['id_agente_modulo'])) {
// Module.
@ -4085,6 +4100,10 @@ function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0)
if (isset($status_data['linked_layout_status_type']) === true) {
// Status calculation.
if (isset($num_elements_by_status[VISUAL_MAP_STATUS_LOOPING]) === true && empty($num_elements_by_status[VISUAL_MAP_STATUS_LOOPING]) === false) {
return VISUAL_MAP_STATUS_LOOPING;
}
switch ($status_data['linked_layout_status_type']) {
default:
case 'default':

File diff suppressed because it is too large Load Diff

View File

@ -1722,3 +1722,16 @@ function show_projection_period() {
$("#div_projection_period").hide();
}
}
// Paused and resume if edit mode is checked.
// eslint-disable-next-line no-unused-vars
function paused_resume_dashboard_countdown() {
$("#checkbox-edit-mode").on("click", function() {
let isChecked = $("#checkbox-edit-mode").is(":checked");
if (isChecked) {
$("#refrcounter").countdown("pause");
} else {
$("#refrcounter").countdown("resume");
}
});
}

View File

@ -2654,6 +2654,18 @@ class Item extends CachedModel
*/
public static function checkLayoutAlertsRecursive(array $item, array $visitedLayouts=[])
{
static $cache = [];
if (isset($cache[$item['id_layout_linked']]) === true && empty($item['id_layout_linked']) === false) {
return $cache[$item['id_layout_linked']];
}
if (in_array($item['id_layout'], $visitedLayouts) === true) {
// Item has no linked layout or it has already been visited (avoid infinite loop caused by circular references).
$cache[$item['id_layout']] = false;
return false;
}
if (isset($item['type']) === true) {
$excludedItemTypes = [
22,
@ -2668,6 +2680,7 @@ class Item extends CachedModel
];
if (in_array($item['type'], $excludedItemTypes) === true) {
$cache[$item['id_layout']] = false;
return false;
}
}
@ -2712,15 +2725,11 @@ class Item extends CachedModel
// Item has a triggered alert.
if ($firedAlert !== false) {
$cache[$item['id_layout']] = true;
return true;
}
}
if ($linkedLayoutID === 0 || in_array($linkedLayoutID, $visitedLayouts) === true) {
// Item has no linked layout or it has already been visited (avoid infinite loop caused by circular references).
return false;
}
$filter = ['id_layout' => $linkedLayoutID];
$linkedLayoutItems = \db_get_all_rows_filter(
@ -2737,15 +2746,18 @@ class Item extends CachedModel
if ($linkedLayoutItems === false) {
// There are no items in the linked visual console. Nothing to check.
$cache[$item['id_layout']] = false;
return false;
}
foreach ($linkedLayoutItems as $linkedLayoutItem) {
if (self::checkLayoutAlertsRecursive($linkedLayoutItem, $visitedLayouts)) {
$cache[$item['id_layout']] = true;
return true;
}
}
$cache[$item['id_layout']] = false;
return false;
}

View File

@ -150,7 +150,7 @@ final class StaticGraph extends Item
// Due to this DB call, this function cannot be unit tested without
// a proper mock.
$data = parent::fetchDataFromDB($filter, $ratio, $widthRatio);
$tooltip_infinite_loop = null;
/*
* Retrieve extra data.
*/
@ -189,41 +189,30 @@ final class StaticGraph extends Item
// There's no need to connect to the metaconsole before searching
// for the image status cause the function itself does that for us.
$imagePath = \visual_map_get_image_status_element($data);
if (str_contains($imagePath, '_bad.png') === true) {
// Critical or critical alert (BAD).
$data['colorStatus'] = COL_CRITICAL;
} else if (str_contains($imagePath, '_ok.png') === true) {
// Normal (OK).
$data['colorStatus'] = COL_NORMAL;
} else if (str_contains($imagePath, '_warning.png') === true) {
// Warning or warning alert.
$data['colorStatus'] = COL_WARNING;
} else if (str_contains($imagePath, 'broken_loop.svg') === true) {
// Default is Grey (Other).
$data['colorStatus'] = COL_UNKNOWN;
$tooltip_infinite_loop = __('Infinite link loop found. Can not determine status.');
} else {
// Default is Grey (Other).
$data['colorStatus'] = COL_UNKNOWN;
}
$data['statusImageSrc'] = \ui_get_full_url(
$imagePath,
false,
false,
false
);
$status = \visual_map_get_status_element($data);
// Magic numbers from the hell.
switch ($status) {
case 1:
case 4:
// Critical or critical alert (BAD).
$data['colorStatus'] = COL_CRITICAL;
break;
case 0:
// Normal (OK).
$data['colorStatus'] = COL_NORMAL;
break;
case 2:
case 10:
// Warning or warning alert.
$data['colorStatus'] = COL_WARNING;
break;
case 3:
// Unknown.
default:
// Default is Grey (Other).
$data['colorStatus'] = COL_UNKNOWN;
break;
}
} else {
$data['colorStatus'] = COL_UNKNOWN;
$imagePath = 'images/console/icons/'.$data['image'].'.png';
@ -295,6 +284,11 @@ final class StaticGraph extends Item
}
}
if (empty($tooltip_infinite_loop) === false) {
$data['lastValue'] = $tooltip_infinite_loop;
$data['showLastValueTooltip'] = 'enabled';
}
return $data;
}

View File

@ -14315,3 +14315,32 @@ div.fixed-bottom-box.tree-view-bottom-modal {
.bg-image-none {
background-image: none !important;
}
.discovery-list-extensions tbody tr td {
height: 30px;
}
.welcome-message-no-pm h2 {
font-size: 20px !important;
margin: 0px;
}
.welcome-message-no-pm p,
.welcome-message-no-pm b {
font-size: 15px !important;
}
.welcome-message-no-pm {
margin-bottom: 30px;
}
.legend_servicemap_title {
cursor: pointer;
}
.legend_servicemap_title td,
.legend_servicemap_title td img {
padding: 0;
}
#container_servicemap #service_map3 {
min-height: 174px;
}

View File

@ -923,6 +923,15 @@ text {
color: #82b92e;
}
div#container_servicemap_legend,
#service_map3 {
border-color: var(--border-color);
}
#container_servicemap > div {
background-color: transparent;
}
#container_servicemap_legend {
position: absolute;
background: #222;
@ -935,6 +944,19 @@ text {
color: var(--text-color);
}
#container_servicemap > #sunburst svg g path {
stroke-width: 0.7 !important;
}
#container_servicemap > #service_map3 svg g text {
fill: var(--text-color);
stroke: transparent;
}
#container_servicemap > #service_map3 svg g[fill="none"] {
stroke: var(--background-2);
}
.notification-subtitle_black {
color: #000;
}

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'>
<?php
$version = '7.0NG.776';
$build = '240506';
$build = '240513';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -46,6 +46,7 @@ $date_init_less = (strtotime(date('Y/m/d')) - SECONDS_1DAY);
$date_init = get_parameter('date_init', date(DATE_FORMAT, $date_init_less));
$time_init = get_parameter('time_init', date(TIME_FORMAT, $date_init_less));
$datetime_init = strtotime($date_init.' '.$time_init);
$date_units = get_parameter('utimestamp_units');
if ($custom_date === '1') {
if ($datetime_init >= $datetime_end) {
$datetime_init = $date_init_less;
@ -55,7 +56,6 @@ if ($custom_date === '1') {
$date_end = date('Y/m/d H:i:s', $datetime_end);
$period = ($datetime_end - $datetime_init);
} else if ($custom_date === '2') {
$date_units = get_parameter('utimestamp_units');
$date_end = date('Y/m/d H:i:s');
$date_init = date('Y/m/d H:i:s', (strtotime($date_end) - ((int) $date_text * (int) $date_units)));
$period = (strtotime($date_end) - strtotime($date_init));
@ -768,7 +768,14 @@ if (is_metaconsole() === false) {
date('H:i:s', $date_init),
date('Y/m/d', $utimestamp),
date('H:i:s', $utimestamp),
$date_text
$date_text,
'w100p',
'Y/m/d',
'H:i:s',
'yy/mm/dd',
'HH:mm:ss',
'',
$date_units
)
);
}

View File

@ -36,6 +36,7 @@ $ajaxPage = $config['homedir'].'/operation/snmpconsole/snmp_view';
$filter_alert = get_parameter('filter_alert', -1);
$filter_severity = get_parameter('filter_severity', -1);
$filter_free_search = get_parameter('filter_free_search', '');
$filter_alias_search = get_parameter('filter_alias_search', '');
$filter_status = get_parameter('filter_status', 0);
$filter_group_by = get_parameter('filter_group_by', 0);
$filter_hours_ago = get_parameter('filter_hours_ago', 8);
@ -54,7 +55,8 @@ try {
$filter_group_by,
$filter_hours_ago,
$filter_trap_type,
$refr
$refr,
$filter_alias_search
);
} catch (Exception $e) {
if ((bool) is_ajax() === true) {

View File

@ -79,30 +79,49 @@ if (is_metaconsole()) {
} else {
$urls['main'] = 'index.php?sec=gusuarios&sec2=godmode/users/user_list';
$urls['notifications'] = 'index.php?sec=workspace&amp;sec2=operation/users/user_edit_notifications';
$buttons = [
'main' => [
'active' => $_GET['sec2'] === 'godmode/users/user_list&tab=user&pure=0',
'text' => "<a href='{$urls['main']}'>".html_print_image(
'images/user.svg',
true,
[
'title' => __('User management'),
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
],
'notifications' => [
'active' => $_GET['sec2'] === 'operation/users/user_edit_notifications',
'text' => "<a href='{$urls['notifications']}'>".html_print_image(
'images/alert@svg.svg',
true,
[
'title' => __('User notifications'),
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
],
];
$buttons = [];
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
$buttons = [
'main' => [
'active' => $_GET['sec2'] === 'godmode/users/user_list&tab=user&pure=0',
'text' => "<a href='{$urls['main']}'>".html_print_image(
'images/user.svg',
true,
[
'title' => __('User management'),
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
],
'notifications' => [
'active' => $_GET['sec2'] === 'operation/users/user_edit_notifications',
'text' => "<a href='{$urls['notifications']}'>".html_print_image(
'images/alert@svg.svg',
true,
[
'title' => __('User notifications'),
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
],
];
} else {
$buttons = [
'notifications' => [
'active' => $_GET['sec2'] === 'operation/users/user_edit_notifications',
'text' => "<a href='{$urls['notifications']}'>".html_print_image(
'images/alert@svg.svg',
true,
[
'title' => __('User notifications'),
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
],
];
}
$tab_name = 'User Management';
$helpers = '';

View File

@ -45,30 +45,38 @@ echo '<div id="user-notifications-wrapper" class="white_box table_div table_thre
$sources = notifications_get_all_sources();
$disabled_flag = false;
$disabled_flag = [];
$user_login = $config['id_user'];
foreach ($sources as $source) {
echo '<div class="table_tbody">';
$table_content = [
$source['description'],
notifications_print_user_switch($source, $id, 'enabled'),
notifications_print_user_switch($source, $id, 'also_mail'),
];
// Enabled notification user.
$users_notification = notifications_get_user_sources(
[
'id_source' => $source['id'],
'id_user' => $user_login,
],
['id_user']
);
$notifications_enabled = notifications_print_user_switch($source, $id, 'enabled');
$notifications_also_mail = notifications_print_user_switch($source, $id, 'also_mail');
if ((boolean) $source['enabled'] === true && $users_notification[0]['id_user'] === $user_login) {
echo '<div class="table_tbody">';
$table_content = [
notifications_print_user_switch($source, $id, 'enabled'),
notifications_print_user_switch($source, $id, 'also_mail'),
];
$notifications_enabled = notifications_print_user_switch($source, $id, 'enabled');
$notifications_also_mail = notifications_print_user_switch($source, $id, 'also_mail');
if ($notifications_enabled['disabled'] == 1 || $notifications_also_mail['disabled'] == 1) {
$disabled_flag = true;
$disabled_flag[] = true;
echo '<div class="table_td">'.$source['description'].'</div>';
echo '<div class="table_td">'.$notifications_enabled['switch'].'</div>';
echo '<div class="table_td">'.$notifications_also_mail['switch'].'</div>';
echo '</div>';
}
echo '<div class="table_td">'.$source['description'].'</div>';
echo '<div class="table_td">'.$notifications_enabled['switch'].'</div>';
echo '<div class="table_td">'.$notifications_also_mail['switch'].'</div>';
echo '</div>';
}
if ((bool) $disabled_flag === true) {
if (count($disabled_flag) === 0) {
ui_print_warning_message(
__('Controls have been disabled by the system administrator')
);

View File

@ -6,7 +6,7 @@
%define debug_package %{nil}
%define name pandorafms_console
%define version 7.0NG.776
%define release 240506
%define release 240513
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -6,7 +6,7 @@
%define debug_package %{nil}
%define name pandorafms_console
%define version 7.0NG.776
%define release 240506
%define release 240513
# 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.776
%define release 240506
%define release 240513
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -3777,6 +3777,7 @@ CREATE TABLE IF NOT EXISTS `tlayout_template` (
`maintenance_mode` TEXT,
`grid_color` VARCHAR(45) NOT NULL DEFAULT '#cccccc',
`grid_size` VARCHAR(45) NOT NULL DEFAULT '10',
`create_from` INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;

View File

@ -176,7 +176,7 @@ INSERT INTO `tconfig_os` (`id_os`, `name`, `description`, `icon_name`, `previous
(9,'Windows','Microsoft Windows OS','windows@os.svg', ''),
(10,'Other','Other SO','other-OS@os.svg', ''),
(11,'Network','Network Agent','network-server@os.svg', ''),
(12,'Web Server','Web Server/Application','network-server@os.svg', ''),
(12,'Web&#x20;Server','Web Server/Application','network-server@os.svg', ''),
(13,'Sensor','Hardware Agent (Sensor)','network-server@os.svg', ''),
(14,'Embedded','Embedded device running an agent','embedded@os.svg', ''),
(15,'Android','Android agent','android@os.svg', ''),
@ -1217,7 +1217,7 @@ INSERT INTO `tagent_custom_fields` VALUES (1,'Serial&#x20;Number',0,0,'',0),(2,'
INSERT INTO `ttag` VALUES (1,'network','Network&#x20;equipment','http://pandorafms.com','','',''),(2,'critical','Critical&#x20;modules','','','',''),(3,'dmz','DMZ&#x20;Network&#x20;Zone','','','',''),(4,'performance','Performance&#x20;anda&#x20;capacity&#x20;modules','','','',''),(5,'configuration','','','','','');
INSERT INTO `tevent_response` VALUES (1,'Ping&#x20;to&#x20;host','Ping&#x20;to&#x20;the&#x20;agent&#x20;host','ping&#x20;-c&#x20;5&#x20;_agent_address_','command',0,620,500,0,'',0,90,0),(3,'Create&#x20;incident&#x20;from&#x20;event','Create&#x20;a&#x20;incident&#x20;from&#x20;the&#x20;event&#x20;with&#x20;the&#x20;standard&#x20;incidents&#x20;system&#x20;of&#x20;Pandora&#x20;FMS','index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;insert_form&amp;from_event=_event_id_','url',0,0,0,1,'',0,90,0),(5,'Restart&#x20;agent','Restart&#x20;the&#x20;agent&#x20;with&#x20;using&#x20;UDP&#x20;protocol.&#x0d;&#x0a;&#x0d;&#x0a;To&#x20;use&#x20;this&#x20;response&#x20;is&#x20;necessary&#x20;to&#x20;have&#x20;installed&#x20;Pandora&#x20;FMS&#x20;server&#x20;and&#x20;console&#x20;in&#x20;the&#x20;same&#x20;machine.','/usr/share/pandora_server/util/udp_client.pl&#x20;_agent_address_&#x20;41122&#x20;&quot;REFRESH&#x20;AGENT&quot;','command',0,620,500,0,'',0,90,0),(6,'Ping&#x20;to&#x20;module&#x20;agent&#x20;host','Ping&#x20;to&#x20;the&#x20;module&#x20;agent&#x20;host','ping&#x20;-c&#x20;5&#x20;_module_address_','command',0,620,500,0,'',0,90,0),(7,'Create&#x20;ticket&#x20;in&#x20;Pandora&#x20;ITSM&#x20;from&#x20;event','Create&#x20;a&#x20;ticket&#x20;in&#x20;Pandora&#x20;ITSM&#x20;from&#x20;an&#x20;event','index.php?sec=manageTickets&amp;sec2=operation/ITSM/itsm&amp;operation=edit&amp;from_event=_event_id_','url',0,0,0,1,'',0,90,1);
INSERT INTO `tevent_response` VALUES (1,'Ping&#x20;to&#x20;host','Ping&#x20;to&#x20;the&#x20;agent&#x20;host','ping&#x20;-c&#x20;5&#x20;_agent_address_','command',0,620,500,0,'',0,90,0),(5,'Restart&#x20;agent','Restart&#x20;the&#x20;agent&#x20;with&#x20;using&#x20;UDP&#x20;protocol.&#x0d;&#x0a;&#x0d;&#x0a;To&#x20;use&#x20;this&#x20;response&#x20;is&#x20;necessary&#x20;to&#x20;have&#x20;installed&#x20;Pandora&#x20;FMS&#x20;server&#x20;and&#x20;console&#x20;in&#x20;the&#x20;same&#x20;machine.','/usr/share/pandora_server/util/udp_client.pl&#x20;_agent_address_&#x20;41122&#x20;&quot;REFRESH&#x20;AGENT&quot;','command',0,620,500,0,'',0,90,0),(6,'Ping&#x20;to&#x20;module&#x20;agent&#x20;host','Ping&#x20;to&#x20;the&#x20;module&#x20;agent&#x20;host','ping&#x20;-c&#x20;5&#x20;_module_address_','command',0,620,500,0,'',0,90,0),(7,'Create&#x20;ticket&#x20;in&#x20;Pandora&#x20;ITSM&#x20;from&#x20;event','Create&#x20;a&#x20;ticket&#x20;in&#x20;Pandora&#x20;ITSM&#x20;from&#x20;an&#x20;event','index.php?sec=manageTickets&amp;sec2=operation/ITSM/itsm&amp;operation=edit&amp;from_event=_event_id_','url',0,0,0,1,'',0,90,1);
INSERT INTO `tupdate_settings` VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');

View File

@ -170,10 +170,6 @@ class JavaScript extends Renderer
if (chart.config.options.title !== undefined ) {
chart.config.options.title.fontColor = "#ffffff";
}
if (chart.config.options.plugins.legend.labels.font !== undefined ) {
chart.config.options.plugins.legend.labels.font.color = "#ffffff";
}
';
}
}

View File

@ -94,5 +94,8 @@ echo $output;
$("#button-add-widget-"+cellId).trigger("click");
}, 500);
}
// Paused and resume if edit mode is checked.
paused_resume_dashboard_countdown();
});
</script>

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.776-240506
Version: 7.0NG.776-240513
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.776-240506"
pandora_version="7.0NG.776-240513"
package_cpan=0
package_pandora=1

View File

@ -1757,12 +1757,6 @@ sub check_ssleay_version {
# Main
################################################################################
# Never run as root
if ($> == 0 && $^O ne 'MSWin32') {
print ("Error: for safety reasons $0 cannot be run with root privileges.\n");
exit 1;
}
# Parse command line options
parse_options ();

View File

@ -1757,12 +1757,6 @@ sub check_ssleay_version {
# Main
################################################################################
# Never run as root
if ($> == 0 && $^O ne 'MSWin32') {
print ("Error: for safety reasons $0 cannot be run with root privileges.\n");
exit 1;
}
# Parse command line options
parse_options ();

View File

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

View File

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

View File

@ -7,7 +7,7 @@
%define debug_package %{nil}
%define name pandorafms_server
%define version 7.0NG.776
%define release 240506
%define release 240513
Summary: Pandora FMS Server
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.776
%define release 240506
%define release 240513
Summary: Pandora FMS Server
Name: %{name}

View File

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

View File

@ -38,7 +38,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.776 Build 240506";
my $version = "7.0NG.776 Build 240513";
# 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.776 Build 240506";
my $version = "7.0NG.776 Build 240513";
# save program name for logging
my $progname = basename($0);
@ -5772,8 +5772,8 @@ sub cli_get_agents() {
}
if($os_name ne '') {
$id_os = get_os_id($dbh, $os_name);
exist_check($id_os,'operative system',$os_name);
$id_os = get_os_id($dbh, safe_input($os_name));
exist_check($id_os,'operative system', $os_name);
$condition .= " AND id_os = $id_os ";
}

View File

@ -1784,12 +1784,6 @@ sub check_ssleay_version {
# Main
################################################################################
# Never run as root
if ($> == 0 && $^O ne 'MSWin32') {
print ("Error: for safety reasons $0 cannot be run with root privileges.\n");
exit 1;
}
# Parse command line options
parse_options ();