mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch 'develop' into ent-2010-error-de-ACLs-en-custom-graphs-y-reports
This commit is contained in:
commit
061df6495c
@ -1,3 +1,4 @@
|
|||||||
|
# Dockerfile for the Pandora FMS image.
|
||||||
FROM debian:jessie
|
FROM debian:jessie
|
||||||
|
|
||||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "__MSG_name__",
|
"name": "__MSG_name__",
|
||||||
"version": "1.0",
|
"version": "2.0",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"description": "__MSG_description__",
|
"description": "Pandora FMS Event viewer Chrome extension",
|
||||||
"homepage_url": "http://pandorafms.com",
|
"homepage_url": "http://pandorafms.com",
|
||||||
"browser_action": {
|
"browser_action": {
|
||||||
"default_title": "__MSG_default_title__",
|
"default_title": "__MSG_default_title__",
|
||||||
"default_icon": "images/icon.png",
|
"default_icon": "images/icon.png",
|
||||||
"default_popup": "popup.html"
|
"default_popup": "popup.html"
|
||||||
},
|
},
|
||||||
"background": {
|
"background": {
|
||||||
"page": "background.html"
|
"page": "background.html"
|
||||||
},
|
},
|
||||||
|
50
extras/docker/Dockerfile
Normal file
50
extras/docker/Dockerfile
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
FROM pandorafms/pandorafms-base
|
||||||
|
|
||||||
|
# Build variables.
|
||||||
|
ARG BRANCH=develop
|
||||||
|
ARG DB_PASS=pandora
|
||||||
|
|
||||||
|
# Clone the Pandora FMS repo.
|
||||||
|
RUN git clone --depth 1 -b "$BRANCH" https://github.com/pandorafms/pandorafms.git /tmp/pandorafms
|
||||||
|
|
||||||
|
# Install the Pandora FMS Server.
|
||||||
|
RUN cd /tmp/pandorafms/pandora_server && \
|
||||||
|
yes | ./pandora_server_installer --install && \
|
||||||
|
sed -i "s/^dbuser.*/dbuser root/" /etc/pandora/pandora_server.conf && \
|
||||||
|
sed -i "s/^dbpass.*/dbpass $DB_PASS/" /etc/pandora/pandora_server.conf
|
||||||
|
|
||||||
|
# Install the Pandora FMS Agent.
|
||||||
|
RUN cd /tmp/pandorafms/pandora_agents/unix && \
|
||||||
|
./pandora_agent_installer --install
|
||||||
|
|
||||||
|
# Set the server's name in Apache's configuration file to avoid warnings.
|
||||||
|
RUN sed -i "s/#ServerName.*/ServerName localhost:80/" /etc/httpd/conf/httpd.conf
|
||||||
|
|
||||||
|
# Install the Pandora FMS Console.
|
||||||
|
RUN service mysqld start && \
|
||||||
|
/usr/bin/mysqladmin -u root password "$DB_PASS" && \
|
||||||
|
service httpd start && \
|
||||||
|
cp -r /tmp/pandorafms/pandora_console /var/www/html && \
|
||||||
|
chown -R apache.apache /var/www/html/pandora_console/ && \
|
||||||
|
python /tmp/pandorafms/tests/install_console.py
|
||||||
|
|
||||||
|
# Redirect HTTP requests to / to the Pandora FMS Console.
|
||||||
|
RUN echo '<meta http-equiv="refresh" content="0;url=/pandora_console">' > /var/www/html/index.html
|
||||||
|
|
||||||
|
# Create the entrypoint script.
|
||||||
|
RUN echo -e '#/bin/bash\n \
|
||||||
|
service mysqld start &&\n \
|
||||||
|
service httpd start &&\n \
|
||||||
|
service crond start &&\n \
|
||||||
|
/etc/init.d/pandora_agent_daemon start && \
|
||||||
|
/etc/init.d/pandora_server start && \
|
||||||
|
tail -f /var/log/pandora/pandora_server.log' \
|
||||||
|
>> /entrypoint.sh && \
|
||||||
|
chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
# Clean-up.
|
||||||
|
RUN rm -rf /tmp/pandorafms
|
||||||
|
RUN yum clean all
|
||||||
|
|
||||||
|
EXPOSE 80 3306 41121
|
||||||
|
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
3
extras/docker/build_and_push.sh
Executable file
3
extras/docker/build_and_push.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
docker build --rm=true --build-arg BRANCH="develop" --build-arg DB_PASS="pandora" -t pandorafms/pandorafms:7 . && \
|
||||||
|
docker push pandorafms/pandorafms:7
|
@ -56,6 +56,7 @@ AGENT_WIN_RC_FILE="$CODEHOME/pandora_agents/win32/versioninfo.rc"
|
|||||||
SATELLITE_FILE="$PANDHOME_ENT/satellite_server/satellite_server.pl"
|
SATELLITE_FILE="$PANDHOME_ENT/satellite_server/satellite_server.pl"
|
||||||
PERL_PLUGIN_FILES="$PANDHOME_ENT/pandora_plugins/NGINX/nginx_requests_queued.pl \
|
PERL_PLUGIN_FILES="$PANDHOME_ENT/pandora_plugins/NGINX/nginx_requests_queued.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/Sybase/sybase_plugin.pl \
|
$PANDHOME_ENT/pandora_plugins/Sybase/sybase_plugin.pl \
|
||||||
|
$PANDHOME_ENT/pandora_plugins/JMX/pandora_plugin_jmx.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/MarkLogic/pandora_marklogic.pl \
|
$PANDHOME_ENT/pandora_plugins/MarkLogic/pandora_marklogic.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/Apache/pandora_apache.pl \
|
$PANDHOME_ENT/pandora_plugins/Apache/pandora_apache.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/Oracle/Database/pandora_oracle.pl \
|
$PANDHOME_ENT/pandora_plugins/Oracle/Database/pandora_oracle.pl \
|
||||||
@ -65,7 +66,10 @@ $PANDHOME_ENT/pandora_plugins/MTL/pandora_mtl.pl \
|
|||||||
$PANDHOME_ENT/pandora_plugins/Informix/informix.pl \
|
$PANDHOME_ENT/pandora_plugins/Informix/informix.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/Ruckus/ruckus.pl \
|
$PANDHOME_ENT/pandora_plugins/Ruckus/ruckus.pl \
|
||||||
$PANDHOME_ENT/pandora_plugins/UX/pandora_ux.pl \
|
$PANDHOME_ENT/pandora_plugins/UX/pandora_ux.pl \
|
||||||
$PANDHOME_ENT/pandora_server/util/plugins/vmware-plugin.pl "
|
$PANDHOME_ENT/pandora_plugins/JMX/pandora_plugin_jmx.pl \
|
||||||
|
$PANDHOME_ENT/pandora_plugins/SNMP/dynamic_snmp.pl \
|
||||||
|
$PANDHOME_ENT/pandora_plugins/MySQL/pandora_mysql.pl \
|
||||||
|
$PANDHOME_ENT/pandora_server/util/plugin/vmware-plugin.pl "
|
||||||
PLUGIN_LIB_FILE="$CODEHOME/pandora_server/lib/PandoraFMS/PluginTools.pm"
|
PLUGIN_LIB_FILE="$CODEHOME/pandora_server/lib/PandoraFMS/PluginTools.pm"
|
||||||
|
|
||||||
# Update version in spec files
|
# Update version in spec files
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, AIX version
|
# Version 7.0NG.723, AIX version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, FreeBSD Version
|
# Version 7.0NG.723, FreeBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, HP-UX Version
|
# Version 7.0NG.723, HP-UX Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, GNU/Linux
|
# Version 7.0NG.723, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, GNU/Linux
|
# Version 7.0NG.723, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, Solaris Version
|
# Version 7.0NG.723, Solaris Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Base config file for Pandora FMS Windows Agent
|
# Base config file for Pandora FMS Windows Agent
|
||||||
# (c) 2006-2010 Artica Soluciones Tecnologicas
|
# (c) 2006-2010 Artica Soluciones Tecnologicas
|
||||||
# Version 7.0NG.719
|
# Version 7.0NG.723
|
||||||
|
|
||||||
# This program is Free Software, you can redistribute it and/or modify it
|
# This program is Free Software, you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||||
|
Binary file not shown.
@ -102,7 +102,7 @@ my $SERVICE_NAME="Tentacle Server";
|
|||||||
my $SERVICE_PARAMS=join(' ', @ARGV);
|
my $SERVICE_PARAMS=join(' ', @ARGV);
|
||||||
|
|
||||||
# Program version
|
# Program version
|
||||||
our $VERSION = '0.6.1';
|
our $VERSION = '0.6.2';
|
||||||
|
|
||||||
# IPv4 address to listen on
|
# IPv4 address to listen on
|
||||||
my @t_addresses = ('0', '0.0.0.0');
|
my @t_addresses = ('0', '0.0.0.0');
|
||||||
@ -217,6 +217,7 @@ sub print_help {
|
|||||||
print ("\t-d\t\tRun as daemon.\n");
|
print ("\t-d\t\tRun as daemon.\n");
|
||||||
print ("\t-e cert\t\tOpenSSL certificate file. Enables SSL.\n");
|
print ("\t-e cert\t\tOpenSSL certificate file. Enables SSL.\n");
|
||||||
print ("\t-f ca_cert\tVerify that the peer certificate is signed by a ca.\n");
|
print ("\t-f ca_cert\tVerify that the peer certificate is signed by a ca.\n");
|
||||||
|
print ("\t-F config_file\tConfiguration file full path.\n");
|
||||||
print ("\t-h\t\tShow help.\n");
|
print ("\t-h\t\tShow help.\n");
|
||||||
print ("\t-I\t\tEnable insecure operations (file listing and moving).\n");
|
print ("\t-I\t\tEnable insecure operations (file listing and moving).\n");
|
||||||
print ("\t-i\t\tFilters.\n");
|
print ("\t-i\t\tFilters.\n");
|
||||||
@ -278,11 +279,13 @@ sub daemonize {
|
|||||||
################################################################################
|
################################################################################
|
||||||
sub parse_options {
|
sub parse_options {
|
||||||
my %opts;
|
my %opts;
|
||||||
|
my $CONF = {};
|
||||||
|
my $token_value;
|
||||||
my $tmp;
|
my $tmp;
|
||||||
my @t_addresses_tmp;
|
my @t_addresses_tmp;
|
||||||
|
|
||||||
# Get options
|
# Get options
|
||||||
if (getopts ('a:b:c:de:f:g:hIi:k:l:m:op:qr:s:S:t:TvVwx:', \%opts) == 0 || defined ($opts{'h'})) {
|
if (getopts ('a:b:c:de:f:F:g:hIi:k:l:m:op:qr:s:S:t:TvVwx:', \%opts) == 0 || defined ($opts{'h'})) {
|
||||||
print_help ();
|
print_help ();
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
@ -304,10 +307,16 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Configuration file
|
||||||
|
if (defined($opts{'F'})) {
|
||||||
|
parse_config_file($opts{'F'}, $CONF);
|
||||||
|
}
|
||||||
|
|
||||||
# Address
|
# Address
|
||||||
if (defined ($opts{'a'})) {
|
$token_value = get_config_value($opts{'a'}, $CONF->{'addresses'});
|
||||||
|
if (defined ($token_value)) {
|
||||||
@t_addresses = ();
|
@t_addresses = ();
|
||||||
@t_addresses_tmp = split(/,/, $opts{'a'});
|
@t_addresses_tmp = split(/,/, $token_value);
|
||||||
|
|
||||||
foreach my $t_address (@t_addresses_tmp) {
|
foreach my $t_address (@t_addresses_tmp) {
|
||||||
$t_address =~ s/^ *(.*?) *$/$1/;
|
$t_address =~ s/^ *(.*?) *$/$1/;
|
||||||
@ -323,15 +332,17 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Maximum simultaneous connections
|
# Maximum simultaneous connections
|
||||||
if (defined ($opts{'c'})) {
|
$token_value = get_config_value($opts{'c'}, $CONF->{'max_connections'});
|
||||||
$t_max_conn = $opts{'c'};
|
if (defined ($token_value)) {
|
||||||
|
$t_max_conn = $token_value;
|
||||||
if ($t_max_conn !~ /^\d+$/ || $t_max_conn < 1) {
|
if ($t_max_conn !~ /^\d+$/ || $t_max_conn < 1) {
|
||||||
error ("Invalid number of maximum simultaneous connections.");
|
error ("Invalid number of maximum simultaneous connections.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run as daemon
|
# Run as daemon
|
||||||
if (defined ($opts{'d'})) {
|
$token_value = get_config_value($opts{'d'}, $CONF->{'daemon'}, 1);
|
||||||
|
if (defined ($token_value)) {
|
||||||
if ($^ eq 'MSWin32') {
|
if ($^ eq 'MSWin32') {
|
||||||
error ("-d flag not available for this OS.");
|
error ("-d flag not available for this OS.");
|
||||||
}
|
}
|
||||||
@ -340,11 +351,12 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Enable SSL
|
# Enable SSL
|
||||||
if (defined ($opts{'e'})) {
|
$token_value = get_config_value($opts{'e'}, $CONF->{'ssl_cert'});
|
||||||
|
if (defined ($token_value)) {
|
||||||
|
|
||||||
require IO::Socket::SSL;
|
require IO::Socket::SSL;
|
||||||
|
|
||||||
$t_ssl_cert = $opts{'e'};
|
$t_ssl_cert = $token_value;
|
||||||
if (! -f $t_ssl_cert) {
|
if (! -f $t_ssl_cert) {
|
||||||
error ("File $t_ssl_cert does not exist.");
|
error ("File $t_ssl_cert does not exist.");
|
||||||
}
|
}
|
||||||
@ -353,21 +365,24 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Verify peer certificate
|
# Verify peer certificate
|
||||||
if (defined ($opts{'f'})) {
|
$token_value = get_config_value($opts{'f'}, $CONF->{'ssl_ca'});
|
||||||
$t_ssl_ca = $opts{'f'};
|
if (defined ($token_value)) {
|
||||||
|
$t_ssl_ca = $token_value;
|
||||||
if (! -f $t_ssl_ca) {
|
if (! -f $t_ssl_ca) {
|
||||||
error ("File $t_ssl_ca does not exist.");
|
error ("File $t_ssl_ca does not exist.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Insecure mode
|
# Insecure mode
|
||||||
if (defined ($opts{'I'})) {
|
$token_value = get_config_value($opts{'I'}, $CONF->{'insecure'}, 1);
|
||||||
|
if (defined ($token_value)) {
|
||||||
$t_insecure = 1;
|
$t_insecure = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Filters (regexp:dir;regexp:dir...)
|
# Filters (regexp:dir;regexp:dir...)
|
||||||
if (defined ($opts{'i'})) {
|
$token_value = get_config_value($opts{'i'}, $CONF->{'filters'});
|
||||||
my @filters = split (';', $opts{'i'});
|
if (defined ($token_value)) {
|
||||||
|
my @filters = split (';', $token_value);
|
||||||
foreach my $filter (@filters) {
|
foreach my $filter (@filters) {
|
||||||
my ($regexp, $dir) = split (':', $filter);
|
my ($regexp, $dir) = split (':', $filter);
|
||||||
next unless defined ($regexp) && defined ($dir);
|
next unless defined ($regexp) && defined ($dir);
|
||||||
@ -381,51 +396,58 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# SSL private key file
|
# SSL private key file
|
||||||
if (defined ($opts{'k'})) {
|
$token_value = get_config_value($opts{'k'}, $CONF->{'ssl_key'});
|
||||||
$t_ssl_key = $opts{'k'};
|
if (defined ($token_value)) {
|
||||||
|
$t_ssl_key = $token_value;
|
||||||
if (! -f $t_ssl_key) {
|
if (! -f $t_ssl_key) {
|
||||||
error ("File $t_ssl_key does not exist.");
|
error ("File $t_ssl_key does not exist.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Maximum file size
|
# Maximum file size
|
||||||
if (defined ($opts{'m'})) {
|
$token_value = get_config_value($opts{'m'}, $CONF->{'max_size'});
|
||||||
$t_max_size = $opts{'m'};
|
if (defined ($token_value)) {
|
||||||
|
$t_max_size = $token_value;
|
||||||
if ($t_max_size !~ /^\d+$/ || $t_max_size < 1) {
|
if ($t_max_size !~ /^\d+$/ || $t_max_size < 1) {
|
||||||
error ("Invalid maximum file size.");
|
error ("Invalid maximum file size.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# File overwrite
|
# File overwrite
|
||||||
if (defined ($opts{'o'})) {
|
$token_value = get_config_value($opts{'o'}, $CONF->{'overwrite'}, 1);
|
||||||
|
if (defined ($token_value)) {
|
||||||
$t_overwrite = 1;
|
$t_overwrite = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Port
|
# Port
|
||||||
if (defined ($opts{'p'})) {
|
$token_value = get_config_value($opts{'p'}, $CONF->{'port'});
|
||||||
$t_port = $opts{'p'};
|
if (defined ($token_value)) {
|
||||||
|
$t_port = $token_value;
|
||||||
if ($t_port !~ /^\d+$/ || $t_port < 1 || $t_port > 65535) {
|
if ($t_port !~ /^\d+$/ || $t_port < 1 || $t_port > 65535) {
|
||||||
error ("Port $t_port is not valid.");
|
error ("Port $t_port is not valid.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Quiet mode
|
# Quiet mode
|
||||||
if (defined ($opts{'q'})) {
|
$token_value = get_config_value($opts{'q'}, $CONF->{'quiet'}, 1);
|
||||||
|
if (defined ($token_value)) {
|
||||||
$t_quiet = 1;
|
$t_quiet = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Retries
|
# Retries
|
||||||
if (defined ($opts{'r'})) {
|
$token_value = get_config_value($opts{'r'}, $CONF->{'retries'});
|
||||||
$t_retries = $opts{'r'};
|
if (defined ($token_value)) {
|
||||||
|
$t_retries = $token_value;
|
||||||
if ($t_retries !~ /^\d+$/ || $t_retries < 1) {
|
if ($t_retries !~ /^\d+$/ || $t_retries < 1) {
|
||||||
error ("Invalid number of retries for network operations.");
|
error ("Invalid number of retries for network operations.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Storage directory
|
# Storage directory
|
||||||
if (defined ($opts{'s'})) {
|
$token_value = get_config_value($opts{'s'}, $CONF->{'directory'});
|
||||||
|
if (defined ($token_value)) {
|
||||||
|
|
||||||
$t_directory = $opts{'s'};
|
$t_directory = $token_value;
|
||||||
|
|
||||||
# Check that directory exists
|
# Check that directory exists
|
||||||
if (! -d $t_directory) {
|
if (! -d $t_directory) {
|
||||||
@ -444,25 +466,36 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (! defined($opts{'b'})) {
|
$token_value = get_config_value($opts{'b'}, $CONF->{'proxy_ip'});
|
||||||
|
if (! defined($token_value)) {
|
||||||
print_help ();
|
print_help ();
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Timeout
|
# Timeout
|
||||||
if (defined ($opts{'t'})) {
|
$token_value = get_config_value($opts{'t'}, $CONF->{'timeout'});
|
||||||
$t_timeout = $opts{'t'};
|
if (defined ($token_value)) {
|
||||||
|
$t_timeout = $token_value;
|
||||||
if ($t_timeout !~ /^\d+$/ || $t_timeout < 1) {
|
if ($t_timeout !~ /^\d+$/ || $t_timeout < 1) {
|
||||||
error ("Invalid timeout for network operations.");
|
error ("Invalid timeout for network operations.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Read verbose from config file
|
||||||
|
if (defined($CONF->{'verbose'})) {
|
||||||
|
if ($CONF->{'verbose'} eq "1") {
|
||||||
|
$t_log = 1;
|
||||||
|
} elsif ($CONF->{'verbose'} eq "2") {
|
||||||
|
$t_log = 1;
|
||||||
|
$t_log_hard = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
# Be verbose
|
# Be verbose
|
||||||
if (defined ($opts{'v'})) {
|
if (defined ($opts{'v'})) {
|
||||||
$t_log = 1;
|
$t_log = 1;
|
||||||
|
$t_log_hard = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Be verbose hard
|
# Be verbose hard
|
||||||
if (defined ($opts{'V'})) {
|
if (defined ($opts{'V'})) {
|
||||||
$t_log = 1;
|
$t_log = 1;
|
||||||
@ -470,18 +503,21 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# SSL private key password
|
# SSL private key password
|
||||||
if (defined ($opts{'w'})) {
|
$token_value = get_config_value($opts{'w'}, $CONF->{'ssl_password'}, 1);
|
||||||
|
if (defined ($token_value)) {
|
||||||
$t_ssl_pwd = ask_passwd ("Enter private key file password: ", "Enter private key file password again for confirmation: ");
|
$t_ssl_pwd = ask_passwd ("Enter private key file password: ", "Enter private key file password again for confirmation: ");
|
||||||
}
|
}
|
||||||
|
|
||||||
# Server password
|
# Server password
|
||||||
if (defined ($opts{'x'})) {
|
$token_value = get_config_value($opts{'x'}, $CONF->{'password'});
|
||||||
$t_pwd = $opts{'x'};
|
if (defined ($token_value)) {
|
||||||
|
$t_pwd = $token_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Proxy IP address
|
#Proxy IP address
|
||||||
if (defined ($opts{'b'})) {
|
$token_value = get_config_value($opts{'b'}, $CONF->{'proxy_ip'});
|
||||||
$t_proxy_ip = $opts{'b'};
|
if (defined ($token_value)) {
|
||||||
|
$t_proxy_ip = $token_value;
|
||||||
if ($t_proxy_ip !~ /^[a-zA-Z\.]+$/ && ($t_proxy_ip !~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/
|
if ($t_proxy_ip !~ /^[a-zA-Z\.]+$/ && ($t_proxy_ip !~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/
|
||||||
|| $1 < 0 || $1 > 255 || $2 < 0 || $2 > 255
|
|| $1 < 0 || $1 > 255 || $2 < 0 || $2 > 255
|
||||||
|| $3 < 0 || $3 > 255 || $4 < 0 || $4 > 255) &&
|
|| $3 < 0 || $3 > 255 || $4 < 0 || $4 > 255) &&
|
||||||
@ -491,15 +527,17 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Proxy Port
|
# Proxy Port
|
||||||
if (defined ($opts{'g'})) {
|
$token_value = get_config_value($opts{'g'}, $CONF->{'proxy_port'});
|
||||||
$t_proxy_port = $opts{'g'};
|
if (defined ($token_value)) {
|
||||||
|
$t_proxy_port = $token_value;
|
||||||
if ($t_proxy_port !~ /^\d+$/ || $t_proxy_port < 1 || $t_proxy_port > 65535) {
|
if ($t_proxy_port !~ /^\d+$/ || $t_proxy_port < 1 || $t_proxy_port > 65535) {
|
||||||
error ("Proxy port $t_port is not valid.");
|
error ("Proxy port $t_port is not valid.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# TCP wrappers support
|
# TCP wrappers support
|
||||||
if (defined ($opts{'T'})) {
|
$token_value = get_config_value($opts{'T'}, $CONF->{'use_libwrap'}, 1);
|
||||||
|
if (defined ($token_value)) {
|
||||||
if ($t_libwrap_installed) {
|
if ($t_libwrap_installed) {
|
||||||
$t_use_libwrap = 1;
|
$t_use_libwrap = 1;
|
||||||
} else {
|
} else {
|
||||||
@ -531,9 +569,76 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Get the config file
|
# Get the config file
|
||||||
if (defined ($opts{'l'})) {
|
$token_value = get_config_value($opts{'l'}, $CONF->{'log_file'});
|
||||||
$log_file = $opts{'l'};
|
if (defined ($token_value)) {
|
||||||
|
$log_file = $token_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# No command lines config values
|
||||||
|
|
||||||
|
# Get the block size
|
||||||
|
if (defined ($CONF->{'block_size'})) {
|
||||||
|
if ($t_port !~ /^\d+$/ || $t_port < 1) {
|
||||||
|
error ("Invalid block size: " . $CONF->{'block_size'} . ".");
|
||||||
|
}
|
||||||
|
$t_block_size = $CONF->{'block_size'};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Configuration file invalid chars
|
||||||
|
if (defined ($CONF->{'invalid_chars'})) {
|
||||||
|
$t_invalid_chars = $CONF->{'invalid_chars'};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## SUB parse_config_file
|
||||||
|
## Get all options from a config file.
|
||||||
|
################################################################################
|
||||||
|
sub parse_config_file {
|
||||||
|
my ($config_file, $CONF) = @_;
|
||||||
|
|
||||||
|
# File should be writable
|
||||||
|
if (! -r $config_file) {
|
||||||
|
print "Configuration file $config_file is not readable.\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Open the file
|
||||||
|
my $FH;
|
||||||
|
if (! open ($FH, "< $config_file")) {
|
||||||
|
print "Cannot open configuration file $config_file.\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Read the file and only get the well formed lines
|
||||||
|
while (<$FH>) {
|
||||||
|
my $buffer_line = $_;
|
||||||
|
if ($buffer_line =~ /^[a-zA-Z]/){ # begins with letters
|
||||||
|
if ($buffer_line =~ m/([\w\-\_\.]+)\s+(.*)/){
|
||||||
|
$CONF->{$1} = $2 unless $2 eq "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
close ($FH);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## SUB parse_config_file
|
||||||
|
## Search in command line options and config hash from configuration file
|
||||||
|
## to get a value (command line is a priority)
|
||||||
|
################################################################################
|
||||||
|
sub get_config_value {
|
||||||
|
my ($cmd_value, $conf_value, $bool) = @_;
|
||||||
|
$bool = 0 unless defined($bool);
|
||||||
|
|
||||||
|
return $cmd_value if defined($cmd_value);
|
||||||
|
# The boolean type value is 1 or undef (0 should be translated like undefP)
|
||||||
|
if ($bool && defined($conf_value)) {
|
||||||
|
return undef if ($conf_value ne "1");
|
||||||
|
}
|
||||||
|
return $conf_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -929,14 +1034,14 @@ sub recv_file {
|
|||||||
# Check file name
|
# Check file name
|
||||||
if ($base_name =~ /[$t_invalid_chars]/) {
|
if ($base_name =~ /[$t_invalid_chars]/) {
|
||||||
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " has an invalid file name");
|
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " has an invalid file name");
|
||||||
send_data ("SEND ERR\n");
|
send_data ("SEND ERR (invalid file name)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check file size, empty files are not allowed
|
# Check file size, empty files are not allowed
|
||||||
if ($size < 1 || $size > $t_max_size) {
|
if ($size < 1 || $size > $t_max_size) {
|
||||||
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " is too big");
|
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " is too big");
|
||||||
send_data ("SEND ERR\n");
|
send_data ("SEND ERR (file is too big)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -946,7 +1051,7 @@ sub recv_file {
|
|||||||
# Check if file exists
|
# Check if file exists
|
||||||
if (-f $file && $t_overwrite == 0) {
|
if (-f $file && $t_overwrite == 0) {
|
||||||
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " already exists");
|
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " already exists");
|
||||||
send_data ("SEND ERR\n");
|
send_data ("SEND ERR (file already exists)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -979,7 +1084,7 @@ sub send_file {
|
|||||||
# Check file name
|
# Check file name
|
||||||
if ($base_name =~ /[$t_invalid_chars]/) {
|
if ($base_name =~ /[$t_invalid_chars]/) {
|
||||||
print_log ("Requested file '$base_name' from " . $t_client_socket->sockhost () . " has an invalid file name");
|
print_log ("Requested file '$base_name' from " . $t_client_socket->sockhost () . " has an invalid file name");
|
||||||
send_data ("RECV ERR\n");
|
send_data ("RECV ERR (file has an invalid file name)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -989,7 +1094,7 @@ sub send_file {
|
|||||||
# Check if file exists
|
# Check if file exists
|
||||||
if (! -f $file) {
|
if (! -f $file) {
|
||||||
print_log ("Requested file '$file' from " . $t_client_socket->sockhost () . " does not exist");
|
print_log ("Requested file '$file' from " . $t_client_socket->sockhost () . " does not exist");
|
||||||
send_data ("RECV ERR\n");
|
send_data ("RECV ERR (file does not exist)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Fichero de configuracion base de agentes de Pandora
|
# Fichero de configuracion base de agentes de Pandora
|
||||||
# Base config file for Pandora agents
|
# Base config file for Pandora agents
|
||||||
# Version 7.0NG.719, AIX version
|
# Version 7.0NG.723, AIX version
|
||||||
|
|
||||||
# General Parameters
|
# General Parameters
|
||||||
# ==================
|
# ==================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Fichero de configuracion base de agentes de Pandora
|
# Fichero de configuracion base de agentes de Pandora
|
||||||
# Base config file for Pandora agents
|
# Base config file for Pandora agents
|
||||||
# Version 7.0NG.719
|
# Version 7.0NG.723
|
||||||
# FreeBSD/IPSO version
|
# FreeBSD/IPSO version
|
||||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Fichero de configuracion base de agentes de Pandora
|
# Fichero de configuracion base de agentes de Pandora
|
||||||
# Base config file for Pandora agents
|
# Base config file for Pandora agents
|
||||||
# Version 7.0NG.719, HPUX Version
|
# Version 7.0NG.723, HPUX Version
|
||||||
|
|
||||||
# General Parameters
|
# General Parameters
|
||||||
# ==================
|
# ==================
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719
|
# Version 7.0NG.723
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2010 Artica Soluciones Tecnologicas
|
# (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||||
# please visit http://pandora.sourceforge.net
|
# please visit http://pandora.sourceforge.net
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719
|
# Version 7.0NG.723
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2009 Artica Soluciones Tecnologicas
|
# (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||||
# please visit http://pandora.sourceforge.net
|
# please visit http://pandora.sourceforge.net
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719
|
# Version 7.0NG.723
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# please visit http://pandora.sourceforge.net
|
# please visit http://pandora.sourceforge.net
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Fichero de configuracion base de agentes de Pandora
|
# Fichero de configuracion base de agentes de Pandora
|
||||||
# Base config file for Pandora agents
|
# Base config file for Pandora agents
|
||||||
# Version 7.0NG.719, Solaris version
|
# Version 7.0NG.723, Solaris version
|
||||||
|
|
||||||
# General Parameters
|
# General Parameters
|
||||||
# ==================
|
# ==================
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, AIX version
|
# Version 7.0NG.723, AIX version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
@ -102,6 +102,9 @@ transfer_mode tentacle
|
|||||||
# Agent mode: Learn (default), No-learn, Autodisable
|
# Agent mode: Learn (default), No-learn, Autodisable
|
||||||
# agent_mode autodisable
|
# agent_mode autodisable
|
||||||
|
|
||||||
|
# Secondary groups. You can select several groups separated by comma.
|
||||||
|
# secondary_groups Group1,Group2
|
||||||
|
|
||||||
# Secondary server configuration
|
# Secondary server configuration
|
||||||
# ==============================
|
# ==============================
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.719-180302
|
Version: 7.0NG.723-180530
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.719-180302"
|
pandora_version="7.0NG.723-180530"
|
||||||
|
|
||||||
echo "Test if you has the tools for to make the packages."
|
echo "Test if you has the tools for to make the packages."
|
||||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, GNU/Linux
|
# Version 7.0NG.723, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
@ -143,6 +143,9 @@ transfer_mode tentacle
|
|||||||
# Agent mode: Learn (default), No-learn, Autodisable
|
# Agent mode: Learn (default), No-learn, Autodisable
|
||||||
# agent_mode autodisable
|
# agent_mode autodisable
|
||||||
|
|
||||||
|
# Secondary groups. You can select several groups separated by comma.
|
||||||
|
# secondary_groups Group1,Group2
|
||||||
|
|
||||||
# Secondary server configuration
|
# Secondary server configuration
|
||||||
# ==============================
|
# ==============================
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, FreeBSD Version
|
# Version 7.0NG.723, FreeBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
@ -153,6 +153,9 @@ xml_buffer 1
|
|||||||
# Minimum available bytes in the temporal directory to enable the XML buffer
|
# Minimum available bytes in the temporal directory to enable the XML buffer
|
||||||
temporal_min_size 1024
|
temporal_min_size 1024
|
||||||
|
|
||||||
|
# Secondary groups. You can select several groups separated by comma.
|
||||||
|
# secondary_groups Group1,Group2
|
||||||
|
|
||||||
#Secondary server configuration
|
#Secondary server configuration
|
||||||
#==============================
|
#==============================
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, HP-UX Version
|
# Version 7.0NG.723, HP-UX Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
@ -104,6 +104,9 @@ transfer_mode tentacle
|
|||||||
# Agent mode: Learn (default), No-learn, Autodisable
|
# Agent mode: Learn (default), No-learn, Autodisable
|
||||||
# agent_mode autodisable
|
# agent_mode autodisable
|
||||||
|
|
||||||
|
# Secondary groups. You can select several groups separated by comma.
|
||||||
|
# secondary_groups Group1,Group2
|
||||||
|
|
||||||
# Secondary server configuration
|
# Secondary server configuration
|
||||||
# ==============================
|
# ==============================
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, GNU/Linux
|
# Version 7.0NG.723, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
@ -167,6 +167,9 @@ temporal_min_size 1024
|
|||||||
# the eHorus agent's identifying key
|
# the eHorus agent's identifying key
|
||||||
ehorus_conf /etc/ehorus/ehorus_agent.conf
|
ehorus_conf /etc/ehorus/ehorus_agent.conf
|
||||||
|
|
||||||
|
# Secondary groups. You can select several groups separated by comma.
|
||||||
|
# secondary_groups Group1,Group2
|
||||||
|
|
||||||
# Secondary server configuration
|
# Secondary server configuration
|
||||||
# ==============================
|
# ==============================
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, GNU/Linux
|
# Version 7.0NG.723, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, NetBSD Version
|
# Version 7.0NG.723, NetBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
@ -116,6 +116,9 @@ transfer_mode tentacle
|
|||||||
# Agent mode: Learn (default), No-learn, Autodisable
|
# Agent mode: Learn (default), No-learn, Autodisable
|
||||||
# agent_mode autodisable
|
# agent_mode autodisable
|
||||||
|
|
||||||
|
# Secondary groups. You can select several groups separated by comma.
|
||||||
|
# secondary_groups Group1,Group2
|
||||||
|
|
||||||
# Secondary server configuration
|
# Secondary server configuration
|
||||||
# ==============================
|
# ==============================
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.719, Solaris Version
|
# Version 7.0NG.723, Solaris Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
@ -107,6 +107,9 @@ transfer_mode tentacle
|
|||||||
# Agent mode: Learn (default), No-learn, Autodisable
|
# Agent mode: Learn (default), No-learn, Autodisable
|
||||||
# agent_mode autodisable
|
# agent_mode autodisable
|
||||||
|
|
||||||
|
# Secondary groups. You can select several groups separated by comma.
|
||||||
|
# secondary_groups Group1,Group2
|
||||||
|
|
||||||
# Secondary server configuration
|
# Secondary server configuration
|
||||||
# ==============================
|
# ==============================
|
||||||
|
|
||||||
|
@ -41,8 +41,8 @@ my $Sem = undef;
|
|||||||
# Semaphore used to control the number of threads
|
# Semaphore used to control the number of threads
|
||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.719';
|
use constant AGENT_VERSION => '7.0NG.723';
|
||||||
use constant AGENT_BUILD => '180302';
|
use constant AGENT_BUILD => '180530';
|
||||||
|
|
||||||
# Agent log default file size maximum and instances
|
# Agent log default file size maximum and instances
|
||||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||||
@ -3065,7 +3065,11 @@ while (1) {
|
|||||||
if (defined ($Conf{'parent_agent_name'})) {
|
if (defined ($Conf{'parent_agent_name'})) {
|
||||||
$xml_header .= "' parent_agent_name='" .$Conf{'parent_agent_name'};
|
$xml_header .= "' parent_agent_name='" .$Conf{'parent_agent_name'};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defined ($Conf{'secondary_groups'})) {
|
||||||
|
$xml_header .= "' secondary_groups='" .$Conf{'secondary_groups'};
|
||||||
|
}
|
||||||
|
|
||||||
if (defined ($Conf{'agent_mode'})) {
|
if (defined ($Conf{'agent_mode'})) {
|
||||||
if ($Conf{'agent_mode'} =~ m/no.?learn/ig) {
|
if ($Conf{'agent_mode'} =~ m/no.?learn/ig) {
|
||||||
$xml_header .= "' agent_mode='0";
|
$xml_header .= "' agent_mode='0";
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
#Pandora FMS Linux Agent
|
#Pandora FMS Linux Agent
|
||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.719
|
%define version 7.0NG.723
|
||||||
%define release 180302
|
%define release 180530
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
#Pandora FMS Linux Agent
|
#Pandora FMS Linux Agent
|
||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.719
|
%define version 7.0NG.723
|
||||||
%define release 180302
|
%define release 180530
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.719"
|
PI_VERSION="7.0NG.723"
|
||||||
PI_BUILD="180302"
|
PI_BUILD="180530"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -215,6 +215,7 @@ sub print_log (@) {
|
|||||||
$output .= "<source><![CDATA[" . $Module_name . "]]></source>\n";
|
$output .= "<source><![CDATA[" . $Module_name . "]]></source>\n";
|
||||||
$output .= "<data><![CDATA[";
|
$output .= "<data><![CDATA[";
|
||||||
foreach my $line (@data) {
|
foreach my $line (@data) {
|
||||||
|
$line =~ s/\]\]/]]]]><![CDATA[/g;
|
||||||
$output .= $line;
|
$output .= $line;
|
||||||
}
|
}
|
||||||
$output .= "]]></data>";
|
$output .= "]]></data>";
|
||||||
@ -229,6 +230,7 @@ sub print_log (@) {
|
|||||||
$output .= "<type><![CDATA[async_string]]></type>\n";
|
$output .= "<type><![CDATA[async_string]]></type>\n";
|
||||||
$output .= "<datalist>\n";
|
$output .= "<datalist>\n";
|
||||||
foreach my $line (@data) {
|
foreach my $line (@data) {
|
||||||
|
$line =~ s/\]\]/]]]]><![CDATA[/g;
|
||||||
$output .= "<data><value><![CDATA[$line]]></value></data>\n";
|
$output .= "<data><value><![CDATA[$line]]></value></data>\n";
|
||||||
}
|
}
|
||||||
$output .= "</datalist>\n";
|
$output .= "</datalist>\n";
|
||||||
|
@ -201,6 +201,8 @@ sub get_software_module_data ($$) {
|
|||||||
$module{'program'} =~ s/;/,/g;
|
$module{'program'} =~ s/;/,/g;
|
||||||
$module{'version'} =~ s/;/,/g;
|
$module{'version'} =~ s/;/,/g;
|
||||||
$module{'description'} =~ s/;/,/g;
|
$module{'description'} =~ s/;/,/g;
|
||||||
|
# Replace ellipsis character to avoid encoding errors
|
||||||
|
$module{'description'} =~ s/…/.../g;
|
||||||
$module{'_keys'} = ['program', 'version','description'];
|
$module{'_keys'} = ['program', 'version','description'];
|
||||||
push (@{$modules->{$name}}, \%module);
|
push (@{$modules->{$name}}, \%module);
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ my $SERVICE_NAME="Tentacle Server";
|
|||||||
my $SERVICE_PARAMS=join(' ', @ARGV);
|
my $SERVICE_PARAMS=join(' ', @ARGV);
|
||||||
|
|
||||||
# Program version
|
# Program version
|
||||||
our $VERSION = '0.6.1';
|
our $VERSION = '0.6.2';
|
||||||
|
|
||||||
# IPv4 address to listen on
|
# IPv4 address to listen on
|
||||||
my @t_addresses = ('0', '0.0.0.0');
|
my @t_addresses = ('0', '0.0.0.0');
|
||||||
@ -217,6 +217,7 @@ sub print_help {
|
|||||||
print ("\t-d\t\tRun as daemon.\n");
|
print ("\t-d\t\tRun as daemon.\n");
|
||||||
print ("\t-e cert\t\tOpenSSL certificate file. Enables SSL.\n");
|
print ("\t-e cert\t\tOpenSSL certificate file. Enables SSL.\n");
|
||||||
print ("\t-f ca_cert\tVerify that the peer certificate is signed by a ca.\n");
|
print ("\t-f ca_cert\tVerify that the peer certificate is signed by a ca.\n");
|
||||||
|
print ("\t-F config_file\tConfiguration file full path.\n");
|
||||||
print ("\t-h\t\tShow help.\n");
|
print ("\t-h\t\tShow help.\n");
|
||||||
print ("\t-I\t\tEnable insecure operations (file listing and moving).\n");
|
print ("\t-I\t\tEnable insecure operations (file listing and moving).\n");
|
||||||
print ("\t-i\t\tFilters.\n");
|
print ("\t-i\t\tFilters.\n");
|
||||||
@ -278,11 +279,13 @@ sub daemonize {
|
|||||||
################################################################################
|
################################################################################
|
||||||
sub parse_options {
|
sub parse_options {
|
||||||
my %opts;
|
my %opts;
|
||||||
|
my $CONF = {};
|
||||||
|
my $token_value;
|
||||||
my $tmp;
|
my $tmp;
|
||||||
my @t_addresses_tmp;
|
my @t_addresses_tmp;
|
||||||
|
|
||||||
# Get options
|
# Get options
|
||||||
if (getopts ('a:b:c:de:f:g:hIi:k:l:m:op:qr:s:S:t:TvVwx:', \%opts) == 0 || defined ($opts{'h'})) {
|
if (getopts ('a:b:c:de:f:F:g:hIi:k:l:m:op:qr:s:S:t:TvVwx:', \%opts) == 0 || defined ($opts{'h'})) {
|
||||||
print_help ();
|
print_help ();
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
@ -304,10 +307,16 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Configuration file
|
||||||
|
if (defined($opts{'F'})) {
|
||||||
|
parse_config_file($opts{'F'}, $CONF);
|
||||||
|
}
|
||||||
|
|
||||||
# Address
|
# Address
|
||||||
if (defined ($opts{'a'})) {
|
$token_value = get_config_value($opts{'a'}, $CONF->{'addresses'});
|
||||||
|
if (defined ($token_value)) {
|
||||||
@t_addresses = ();
|
@t_addresses = ();
|
||||||
@t_addresses_tmp = split(/,/, $opts{'a'});
|
@t_addresses_tmp = split(/,/, $token_value);
|
||||||
|
|
||||||
foreach my $t_address (@t_addresses_tmp) {
|
foreach my $t_address (@t_addresses_tmp) {
|
||||||
$t_address =~ s/^ *(.*?) *$/$1/;
|
$t_address =~ s/^ *(.*?) *$/$1/;
|
||||||
@ -323,15 +332,17 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Maximum simultaneous connections
|
# Maximum simultaneous connections
|
||||||
if (defined ($opts{'c'})) {
|
$token_value = get_config_value($opts{'c'}, $CONF->{'max_connections'});
|
||||||
$t_max_conn = $opts{'c'};
|
if (defined ($token_value)) {
|
||||||
|
$t_max_conn = $token_value;
|
||||||
if ($t_max_conn !~ /^\d+$/ || $t_max_conn < 1) {
|
if ($t_max_conn !~ /^\d+$/ || $t_max_conn < 1) {
|
||||||
error ("Invalid number of maximum simultaneous connections.");
|
error ("Invalid number of maximum simultaneous connections.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run as daemon
|
# Run as daemon
|
||||||
if (defined ($opts{'d'})) {
|
$token_value = get_config_value($opts{'d'}, $CONF->{'daemon'}, 1);
|
||||||
|
if (defined ($token_value)) {
|
||||||
if ($^ eq 'MSWin32') {
|
if ($^ eq 'MSWin32') {
|
||||||
error ("-d flag not available for this OS.");
|
error ("-d flag not available for this OS.");
|
||||||
}
|
}
|
||||||
@ -340,11 +351,12 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Enable SSL
|
# Enable SSL
|
||||||
if (defined ($opts{'e'})) {
|
$token_value = get_config_value($opts{'e'}, $CONF->{'ssl_cert'});
|
||||||
|
if (defined ($token_value)) {
|
||||||
|
|
||||||
require IO::Socket::SSL;
|
require IO::Socket::SSL;
|
||||||
|
|
||||||
$t_ssl_cert = $opts{'e'};
|
$t_ssl_cert = $token_value;
|
||||||
if (! -f $t_ssl_cert) {
|
if (! -f $t_ssl_cert) {
|
||||||
error ("File $t_ssl_cert does not exist.");
|
error ("File $t_ssl_cert does not exist.");
|
||||||
}
|
}
|
||||||
@ -353,21 +365,24 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Verify peer certificate
|
# Verify peer certificate
|
||||||
if (defined ($opts{'f'})) {
|
$token_value = get_config_value($opts{'f'}, $CONF->{'ssl_ca'});
|
||||||
$t_ssl_ca = $opts{'f'};
|
if (defined ($token_value)) {
|
||||||
|
$t_ssl_ca = $token_value;
|
||||||
if (! -f $t_ssl_ca) {
|
if (! -f $t_ssl_ca) {
|
||||||
error ("File $t_ssl_ca does not exist.");
|
error ("File $t_ssl_ca does not exist.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Insecure mode
|
# Insecure mode
|
||||||
if (defined ($opts{'I'})) {
|
$token_value = get_config_value($opts{'I'}, $CONF->{'insecure'}, 1);
|
||||||
|
if (defined ($token_value)) {
|
||||||
$t_insecure = 1;
|
$t_insecure = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Filters (regexp:dir;regexp:dir...)
|
# Filters (regexp:dir;regexp:dir...)
|
||||||
if (defined ($opts{'i'})) {
|
$token_value = get_config_value($opts{'i'}, $CONF->{'filters'});
|
||||||
my @filters = split (';', $opts{'i'});
|
if (defined ($token_value)) {
|
||||||
|
my @filters = split (';', $token_value);
|
||||||
foreach my $filter (@filters) {
|
foreach my $filter (@filters) {
|
||||||
my ($regexp, $dir) = split (':', $filter);
|
my ($regexp, $dir) = split (':', $filter);
|
||||||
next unless defined ($regexp) && defined ($dir);
|
next unless defined ($regexp) && defined ($dir);
|
||||||
@ -381,51 +396,58 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# SSL private key file
|
# SSL private key file
|
||||||
if (defined ($opts{'k'})) {
|
$token_value = get_config_value($opts{'k'}, $CONF->{'ssl_key'});
|
||||||
$t_ssl_key = $opts{'k'};
|
if (defined ($token_value)) {
|
||||||
|
$t_ssl_key = $token_value;
|
||||||
if (! -f $t_ssl_key) {
|
if (! -f $t_ssl_key) {
|
||||||
error ("File $t_ssl_key does not exist.");
|
error ("File $t_ssl_key does not exist.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Maximum file size
|
# Maximum file size
|
||||||
if (defined ($opts{'m'})) {
|
$token_value = get_config_value($opts{'m'}, $CONF->{'max_size'});
|
||||||
$t_max_size = $opts{'m'};
|
if (defined ($token_value)) {
|
||||||
|
$t_max_size = $token_value;
|
||||||
if ($t_max_size !~ /^\d+$/ || $t_max_size < 1) {
|
if ($t_max_size !~ /^\d+$/ || $t_max_size < 1) {
|
||||||
error ("Invalid maximum file size.");
|
error ("Invalid maximum file size.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# File overwrite
|
# File overwrite
|
||||||
if (defined ($opts{'o'})) {
|
$token_value = get_config_value($opts{'o'}, $CONF->{'overwrite'}, 1);
|
||||||
|
if (defined ($token_value)) {
|
||||||
$t_overwrite = 1;
|
$t_overwrite = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Port
|
# Port
|
||||||
if (defined ($opts{'p'})) {
|
$token_value = get_config_value($opts{'p'}, $CONF->{'port'});
|
||||||
$t_port = $opts{'p'};
|
if (defined ($token_value)) {
|
||||||
|
$t_port = $token_value;
|
||||||
if ($t_port !~ /^\d+$/ || $t_port < 1 || $t_port > 65535) {
|
if ($t_port !~ /^\d+$/ || $t_port < 1 || $t_port > 65535) {
|
||||||
error ("Port $t_port is not valid.");
|
error ("Port $t_port is not valid.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Quiet mode
|
# Quiet mode
|
||||||
if (defined ($opts{'q'})) {
|
$token_value = get_config_value($opts{'q'}, $CONF->{'quiet'}, 1);
|
||||||
|
if (defined ($token_value)) {
|
||||||
$t_quiet = 1;
|
$t_quiet = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Retries
|
# Retries
|
||||||
if (defined ($opts{'r'})) {
|
$token_value = get_config_value($opts{'r'}, $CONF->{'retries'});
|
||||||
$t_retries = $opts{'r'};
|
if (defined ($token_value)) {
|
||||||
|
$t_retries = $token_value;
|
||||||
if ($t_retries !~ /^\d+$/ || $t_retries < 1) {
|
if ($t_retries !~ /^\d+$/ || $t_retries < 1) {
|
||||||
error ("Invalid number of retries for network operations.");
|
error ("Invalid number of retries for network operations.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Storage directory
|
# Storage directory
|
||||||
if (defined ($opts{'s'})) {
|
$token_value = get_config_value($opts{'s'}, $CONF->{'directory'});
|
||||||
|
if (defined ($token_value)) {
|
||||||
|
|
||||||
$t_directory = $opts{'s'};
|
$t_directory = $token_value;
|
||||||
|
|
||||||
# Check that directory exists
|
# Check that directory exists
|
||||||
if (! -d $t_directory) {
|
if (! -d $t_directory) {
|
||||||
@ -444,25 +466,36 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (! defined($opts{'b'})) {
|
$token_value = get_config_value($opts{'b'}, $CONF->{'proxy_ip'});
|
||||||
|
if (! defined($token_value)) {
|
||||||
print_help ();
|
print_help ();
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Timeout
|
# Timeout
|
||||||
if (defined ($opts{'t'})) {
|
$token_value = get_config_value($opts{'t'}, $CONF->{'timeout'});
|
||||||
$t_timeout = $opts{'t'};
|
if (defined ($token_value)) {
|
||||||
|
$t_timeout = $token_value;
|
||||||
if ($t_timeout !~ /^\d+$/ || $t_timeout < 1) {
|
if ($t_timeout !~ /^\d+$/ || $t_timeout < 1) {
|
||||||
error ("Invalid timeout for network operations.");
|
error ("Invalid timeout for network operations.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Read verbose from config file
|
||||||
|
if (defined($CONF->{'verbose'})) {
|
||||||
|
if ($CONF->{'verbose'} eq "1") {
|
||||||
|
$t_log = 1;
|
||||||
|
} elsif ($CONF->{'verbose'} eq "2") {
|
||||||
|
$t_log = 1;
|
||||||
|
$t_log_hard = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
# Be verbose
|
# Be verbose
|
||||||
if (defined ($opts{'v'})) {
|
if (defined ($opts{'v'})) {
|
||||||
$t_log = 1;
|
$t_log = 1;
|
||||||
|
$t_log_hard = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Be verbose hard
|
# Be verbose hard
|
||||||
if (defined ($opts{'V'})) {
|
if (defined ($opts{'V'})) {
|
||||||
$t_log = 1;
|
$t_log = 1;
|
||||||
@ -470,18 +503,21 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# SSL private key password
|
# SSL private key password
|
||||||
if (defined ($opts{'w'})) {
|
$token_value = get_config_value($opts{'w'}, $CONF->{'ssl_password'}, 1);
|
||||||
|
if (defined ($token_value)) {
|
||||||
$t_ssl_pwd = ask_passwd ("Enter private key file password: ", "Enter private key file password again for confirmation: ");
|
$t_ssl_pwd = ask_passwd ("Enter private key file password: ", "Enter private key file password again for confirmation: ");
|
||||||
}
|
}
|
||||||
|
|
||||||
# Server password
|
# Server password
|
||||||
if (defined ($opts{'x'})) {
|
$token_value = get_config_value($opts{'x'}, $CONF->{'password'});
|
||||||
$t_pwd = $opts{'x'};
|
if (defined ($token_value)) {
|
||||||
|
$t_pwd = $token_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Proxy IP address
|
#Proxy IP address
|
||||||
if (defined ($opts{'b'})) {
|
$token_value = get_config_value($opts{'b'}, $CONF->{'proxy_ip'});
|
||||||
$t_proxy_ip = $opts{'b'};
|
if (defined ($token_value)) {
|
||||||
|
$t_proxy_ip = $token_value;
|
||||||
if ($t_proxy_ip !~ /^[a-zA-Z\.]+$/ && ($t_proxy_ip !~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/
|
if ($t_proxy_ip !~ /^[a-zA-Z\.]+$/ && ($t_proxy_ip !~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/
|
||||||
|| $1 < 0 || $1 > 255 || $2 < 0 || $2 > 255
|
|| $1 < 0 || $1 > 255 || $2 < 0 || $2 > 255
|
||||||
|| $3 < 0 || $3 > 255 || $4 < 0 || $4 > 255) &&
|
|| $3 < 0 || $3 > 255 || $4 < 0 || $4 > 255) &&
|
||||||
@ -491,15 +527,17 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Proxy Port
|
# Proxy Port
|
||||||
if (defined ($opts{'g'})) {
|
$token_value = get_config_value($opts{'g'}, $CONF->{'proxy_port'});
|
||||||
$t_proxy_port = $opts{'g'};
|
if (defined ($token_value)) {
|
||||||
|
$t_proxy_port = $token_value;
|
||||||
if ($t_proxy_port !~ /^\d+$/ || $t_proxy_port < 1 || $t_proxy_port > 65535) {
|
if ($t_proxy_port !~ /^\d+$/ || $t_proxy_port < 1 || $t_proxy_port > 65535) {
|
||||||
error ("Proxy port $t_port is not valid.");
|
error ("Proxy port $t_port is not valid.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# TCP wrappers support
|
# TCP wrappers support
|
||||||
if (defined ($opts{'T'})) {
|
$token_value = get_config_value($opts{'T'}, $CONF->{'use_libwrap'}, 1);
|
||||||
|
if (defined ($token_value)) {
|
||||||
if ($t_libwrap_installed) {
|
if ($t_libwrap_installed) {
|
||||||
$t_use_libwrap = 1;
|
$t_use_libwrap = 1;
|
||||||
} else {
|
} else {
|
||||||
@ -531,9 +569,76 @@ sub parse_options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Get the config file
|
# Get the config file
|
||||||
if (defined ($opts{'l'})) {
|
$token_value = get_config_value($opts{'l'}, $CONF->{'log_file'});
|
||||||
$log_file = $opts{'l'};
|
if (defined ($token_value)) {
|
||||||
|
$log_file = $token_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# No command lines config values
|
||||||
|
|
||||||
|
# Get the block size
|
||||||
|
if (defined ($CONF->{'block_size'})) {
|
||||||
|
if ($t_port !~ /^\d+$/ || $t_port < 1) {
|
||||||
|
error ("Invalid block size: " . $CONF->{'block_size'} . ".");
|
||||||
|
}
|
||||||
|
$t_block_size = $CONF->{'block_size'};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Configuration file invalid chars
|
||||||
|
if (defined ($CONF->{'invalid_chars'})) {
|
||||||
|
$t_invalid_chars = $CONF->{'invalid_chars'};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## SUB parse_config_file
|
||||||
|
## Get all options from a config file.
|
||||||
|
################################################################################
|
||||||
|
sub parse_config_file {
|
||||||
|
my ($config_file, $CONF) = @_;
|
||||||
|
|
||||||
|
# File should be writable
|
||||||
|
if (! -r $config_file) {
|
||||||
|
print "Configuration file $config_file is not readable.\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Open the file
|
||||||
|
my $FH;
|
||||||
|
if (! open ($FH, "< $config_file")) {
|
||||||
|
print "Cannot open configuration file $config_file.\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Read the file and only get the well formed lines
|
||||||
|
while (<$FH>) {
|
||||||
|
my $buffer_line = $_;
|
||||||
|
if ($buffer_line =~ /^[a-zA-Z]/){ # begins with letters
|
||||||
|
if ($buffer_line =~ m/([\w\-\_\.]+)\s+(.*)/){
|
||||||
|
$CONF->{$1} = $2 unless $2 eq "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
close ($FH);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## SUB parse_config_file
|
||||||
|
## Search in command line options and config hash from configuration file
|
||||||
|
## to get a value (command line is a priority)
|
||||||
|
################################################################################
|
||||||
|
sub get_config_value {
|
||||||
|
my ($cmd_value, $conf_value, $bool) = @_;
|
||||||
|
$bool = 0 unless defined($bool);
|
||||||
|
|
||||||
|
return $cmd_value if defined($cmd_value);
|
||||||
|
# The boolean type value is 1 or undef (0 should be translated like undefP)
|
||||||
|
if ($bool && defined($conf_value)) {
|
||||||
|
return undef if ($conf_value ne "1");
|
||||||
|
}
|
||||||
|
return $conf_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -929,14 +1034,14 @@ sub recv_file {
|
|||||||
# Check file name
|
# Check file name
|
||||||
if ($base_name =~ /[$t_invalid_chars]/) {
|
if ($base_name =~ /[$t_invalid_chars]/) {
|
||||||
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " has an invalid file name");
|
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " has an invalid file name");
|
||||||
send_data ("SEND ERR\n");
|
send_data ("SEND ERR (invalid file name)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check file size, empty files are not allowed
|
# Check file size, empty files are not allowed
|
||||||
if ($size < 1 || $size > $t_max_size) {
|
if ($size < 1 || $size > $t_max_size) {
|
||||||
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " is too big");
|
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " is too big");
|
||||||
send_data ("SEND ERR\n");
|
send_data ("SEND ERR (file is too big)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -946,7 +1051,7 @@ sub recv_file {
|
|||||||
# Check if file exists
|
# Check if file exists
|
||||||
if (-f $file && $t_overwrite == 0) {
|
if (-f $file && $t_overwrite == 0) {
|
||||||
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " already exists");
|
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " already exists");
|
||||||
send_data ("SEND ERR\n");
|
send_data ("SEND ERR (file already exists)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -979,7 +1084,7 @@ sub send_file {
|
|||||||
# Check file name
|
# Check file name
|
||||||
if ($base_name =~ /[$t_invalid_chars]/) {
|
if ($base_name =~ /[$t_invalid_chars]/) {
|
||||||
print_log ("Requested file '$base_name' from " . $t_client_socket->sockhost () . " has an invalid file name");
|
print_log ("Requested file '$base_name' from " . $t_client_socket->sockhost () . " has an invalid file name");
|
||||||
send_data ("RECV ERR\n");
|
send_data ("RECV ERR (file has an invalid file name)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -989,7 +1094,7 @@ sub send_file {
|
|||||||
# Check if file exists
|
# Check if file exists
|
||||||
if (! -f $file) {
|
if (! -f $file) {
|
||||||
print_log ("Requested file '$file' from " . $t_client_socket->sockhost () . " does not exist");
|
print_log ("Requested file '$file' from " . $t_client_socket->sockhost () . " does not exist");
|
||||||
send_data ("RECV ERR\n");
|
send_data ("RECV ERR (file does not exist)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Base config file for Pandora FMS Windows Agent
|
# Base config file for Pandora FMS Windows Agent
|
||||||
# (c) 2006-2017 Artica Soluciones Tecnologicas
|
# (c) 2006-2017 Artica Soluciones Tecnologicas
|
||||||
# Version 7.0NG.719
|
# Version 7.0NG.723
|
||||||
|
|
||||||
# This program is Free Software, you can redistribute it and/or modify it
|
# This program is Free Software, you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||||
@ -104,6 +104,9 @@ xml_buffer 1
|
|||||||
#It try to find the EKID and set it like a custom field.
|
#It try to find the EKID and set it like a custom field.
|
||||||
ehorus_conf "C:\Program Files\ehorus_agent\ehorus_agent.conf"
|
ehorus_conf "C:\Program Files\ehorus_agent\ehorus_agent.conf"
|
||||||
|
|
||||||
|
# Secondary groups. You can select several groups separated by comma.
|
||||||
|
# secondary_groups Group1,Group2
|
||||||
|
|
||||||
# Secondary server configuration
|
# Secondary server configuration
|
||||||
# ==============================
|
# ==============================
|
||||||
|
|
||||||
|
Binary file not shown.
@ -3,7 +3,7 @@ AllowLanguageSelection
|
|||||||
{Yes}
|
{Yes}
|
||||||
|
|
||||||
AppName
|
AppName
|
||||||
{Pandora FMS Windows Agent v7.0NG.719}
|
{Pandora FMS Windows Agent v7.0NG.723}
|
||||||
|
|
||||||
ApplicationID
|
ApplicationID
|
||||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||||
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{180302}
|
{180530}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
@ -532,6 +532,7 @@ Pandora_Module::getXml () {
|
|||||||
try {
|
try {
|
||||||
data_clean = strreplace (this->getDataOutput (data),
|
data_clean = strreplace (this->getDataOutput (data),
|
||||||
"%", "%%" );
|
"%", "%%" );
|
||||||
|
data_clean = strreplace (data_clean, "]]>", "]]><![CDATA[");
|
||||||
} catch (Module_Exception e) {
|
} catch (Module_Exception e) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -542,6 +543,7 @@ Pandora_Module::getXml () {
|
|||||||
data = data_list->front ();
|
data = data_list->front ();
|
||||||
try {
|
try {
|
||||||
data_clean = strreplace (this->getDataOutput (data), "%", "%%" );
|
data_clean = strreplace (this->getDataOutput (data), "%", "%%" );
|
||||||
|
data_clean = strreplace (data_clean, "]]>", "]]><![CDATA[");
|
||||||
module_xml += data_clean;
|
module_xml += data_clean;
|
||||||
|
|
||||||
} catch (Module_Exception e) {
|
} catch (Module_Exception e) {
|
||||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define PANDORA_VERSION ("7.0NG.719(Build 180302)")
|
#define PANDORA_VERSION ("7.0NG.723(Build 180530)")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -635,6 +635,7 @@ Pandora_Windows_Service::getXmlHeader () {
|
|||||||
"\" os_version=\"" + os_version +
|
"\" os_version=\"" + os_version +
|
||||||
"\" group=\"" + conf->getValue ("group") +
|
"\" group=\"" + conf->getValue ("group") +
|
||||||
"\" parent_agent_name=\"" + conf->getValue ("parent_agent_name") +
|
"\" parent_agent_name=\"" + conf->getValue ("parent_agent_name") +
|
||||||
|
"\" secondary_groups=\"" + conf->getValue ("secondary_groups") +
|
||||||
"\" agent_mode=\"" + agent_mode +
|
"\" agent_mode=\"" + agent_mode +
|
||||||
"\">\n";
|
"\">\n";
|
||||||
return xml;
|
return xml;
|
||||||
|
@ -11,7 +11,7 @@ BEGIN
|
|||||||
VALUE "LegalCopyright", "Artica ST"
|
VALUE "LegalCopyright", "Artica ST"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(7.0NG.719(Build 180302))"
|
VALUE "ProductVersion", "(7.0NG.723(Build 180530))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -5,6 +5,7 @@ WORKDIR /pandorafms/pandora_console
|
|||||||
|
|
||||||
ADD pandoradb.sql /docker-entrypoint-initdb.d
|
ADD pandoradb.sql /docker-entrypoint-initdb.d
|
||||||
ADD pandoradb_data.sql /docker-entrypoint-initdb.d
|
ADD pandoradb_data.sql /docker-entrypoint-initdb.d
|
||||||
|
RUN chown mysql /docker-entrypoint-initdb.d
|
||||||
|
|
||||||
ENV MYSQL_DATABASE=pandora
|
ENV MYSQL_DATABASE=pandora
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.719-180302
|
Version: 7.0NG.723-180530
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.719-180302"
|
pandora_version="7.0NG.723-180530"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -45,13 +45,14 @@ RUN yum install -y \
|
|||||||
php-zip \
|
php-zip \
|
||||||
nmap \
|
nmap \
|
||||||
net-snmp-utils \
|
net-snmp-utils \
|
||||||
|
mod_ssl \
|
||||||
xprobe2
|
xprobe2
|
||||||
|
|
||||||
#Clone the repo
|
#Clone the repo
|
||||||
RUN git clone -b develop https://github.com/pandorafms/pandorafms.git /tmp/pandorafms
|
RUN git clone -b develop https://github.com/pandorafms/pandorafms.git /tmp/pandorafms
|
||||||
|
|
||||||
#Exposing ports for: HTTP, SNMP Traps, Tentacle protocol
|
#Exposing ports for: HTTP, SNMP Traps, Tentacle protocol
|
||||||
EXPOSE 80 162/udp 41121
|
EXPOSE 80 162/udp 443 41121
|
||||||
|
|
||||||
# Simple startup script to avoid some issues observed with container restart
|
# Simple startup script to avoid some issues observed with container restart
|
||||||
ADD docker_entrypoint.sh /entrypoint.sh
|
ADD docker_entrypoint.sh /entrypoint.sh
|
||||||
|
@ -46,8 +46,19 @@ if (isset ($_GET["loginhash"])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$public_hash = get_parameter('hash', false);
|
||||||
|
|
||||||
// Check user
|
// Check user
|
||||||
//check_login ();
|
if ($public_hash == false) {
|
||||||
|
check_login();
|
||||||
|
} else {
|
||||||
|
enterprise_include_once('include/functions_dashboard.php');
|
||||||
|
if (dashboard_check_public_hash($public_hash) === false) {
|
||||||
|
db_pandora_audit("Invalid public hash", "Trying to access public dashboard");
|
||||||
|
require ("general/noaccess.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
define ('AJAX', true);
|
define ('AJAX', true);
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ function mainAgentsAlerts() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
$refr = get_parameter('refr', 30); // By default 30 seconds
|
$refr = (int) get_parameter('refr', 30); // By default 30 seconds
|
||||||
$show_modules = (bool) get_parameter ("show_modules",0);
|
$show_modules = (bool) get_parameter ("show_modules",0);
|
||||||
$group_id = get_parameter('group_id', 0);
|
$group_id = get_parameter('group_id', 0);
|
||||||
$offset = get_parameter('offset', 0);
|
$offset = get_parameter('offset', 0);
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
$refr = get_parameter('refresh', 0); // By default 30 seconds
|
$refr = (int) get_parameter('refresh', 0); // By default 30 seconds
|
||||||
function mainAgentsModules() {
|
function mainAgentsModules() {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ function mainAgentsModules() {
|
|||||||
$updated_time = $updated_info;
|
$updated_time = $updated_info;
|
||||||
|
|
||||||
$modulegroup = get_parameter('modulegroup', 0);
|
$modulegroup = get_parameter('modulegroup', 0);
|
||||||
$refr = get_parameter('refresh', 0); // By default 30 seconds
|
$refr = (int) get_parameter('refresh', 0); // By default 30 seconds
|
||||||
|
|
||||||
$recursion = get_parameter('recursion', 0);
|
$recursion = get_parameter('recursion', 0);
|
||||||
$group_id = (int)get_parameter('group_id', 0);
|
$group_id = (int)get_parameter('group_id', 0);
|
||||||
|
@ -101,7 +101,7 @@ function extension_api_checker() {
|
|||||||
$table->data[] = $row;
|
$table->data[] = $row;
|
||||||
|
|
||||||
$row = array();
|
$row = array();
|
||||||
$row[] = __("Pandora Console URL");
|
$row[] = __("%s Console URL", get_product_name());
|
||||||
$row[] = html_print_input_text('pandora_url', $pandora_url, '', 50, 255, true);
|
$row[] = html_print_input_text('pandora_url', $pandora_url, '', 50, 255, true);
|
||||||
$table->data[] = $row;
|
$table->data[] = $row;
|
||||||
|
|
||||||
|
@ -180,10 +180,10 @@ function extension_db_check_tables_differences($connection_test,
|
|||||||
$diff_tables = array_diff($tables_test, $tables_system);
|
$diff_tables = array_diff($tables_test, $tables_system);
|
||||||
|
|
||||||
ui_print_result_message(
|
ui_print_result_message(
|
||||||
empty($diff_tables),
|
!empty($diff_tables),
|
||||||
__('Successful the DB Pandora has all tables'),
|
__('Success! %s DB contains all tables', get_product_name()),
|
||||||
__('Pandora DB could not retrieve all tables. The missing tables are (%s)',
|
__('%s DB could not retrieve all tables. The missing tables are (%s)',
|
||||||
implode(", ", $diff_tables)));
|
get_product_name(), implode(", ", $diff_tables)));
|
||||||
|
|
||||||
if (!empty($diff_tables)) {
|
if (!empty($diff_tables)) {
|
||||||
foreach ($diff_tables as $table) {
|
foreach ($diff_tables as $table) {
|
||||||
|
@ -134,7 +134,13 @@ function dbmgr_extension_main () {
|
|||||||
ui_print_page_header (__('Database interface'), "images/gm_db.png", false, false, true);
|
ui_print_page_header (__('Database interface'), "images/gm_db.png", false, false, true);
|
||||||
|
|
||||||
echo '<div class="notify">';
|
echo '<div class="notify">';
|
||||||
echo "This is an advanced extension to interface with Pandora FMS database directly from WEB console using native SQL sentences. Please note that <b>you can damage</b> your Pandora FMS installation if you don't know </b>exactly</b> what are you are doing, this means that you can severily damage your setup using this extension. This extension is intended to be used <b>only by experienced users</b> with a depth knowledge of Pandora FMS internals.";
|
echo __("This is an advanced extension to interface with %s database directly from WEB console
|
||||||
|
using native SQL sentences. Please note that <b>you can damage</b> your %s installation
|
||||||
|
if you don't know </b>exactly</b> what are you are doing,
|
||||||
|
this means that you can severily damage your setup using this extension.
|
||||||
|
This extension is intended to be used <b>only by experienced users</b>
|
||||||
|
with a depth knowledge of %s internals.",
|
||||||
|
get_product_name(), get_product_name(), get_product_name());
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
|
@ -167,6 +167,7 @@ function mainInsertData() {
|
|||||||
$params['use_hidden_input_idagent'] = true;
|
$params['use_hidden_input_idagent'] = true;
|
||||||
$params['print_hidden_input_idagent'] = true;
|
$params['print_hidden_input_idagent'] = true;
|
||||||
$params['hidden_input_idagent_id'] = 'hidden-autocomplete_id_agent';
|
$params['hidden_input_idagent_id'] = 'hidden-autocomplete_id_agent';
|
||||||
|
$params['hidden_input_idagent_value'] = $id_agente;
|
||||||
|
|
||||||
$table->data[0][1] = ui_print_agent_autocomplete_input($params);
|
$table->data[0][1] = ui_print_agent_autocomplete_input($params);
|
||||||
|
|
||||||
|
@ -313,23 +313,23 @@ function godmode_net_tools() {
|
|||||||
$table->data = array();
|
$table->data = array();
|
||||||
|
|
||||||
$table->data[0][0] = __("Traceroute path");
|
$table->data[0][0] = __("Traceroute path");
|
||||||
$table->data[0][0] .= ui_print_help_tip(__('If it is empty, Pandora searchs the traceroute system.'), true);
|
$table->data[0][0] .= ui_print_help_tip(__('If empty, %s will search the traceroute system.', get_product_name()), true);
|
||||||
$table->data[0][1] = html_print_input_text('traceroute_path', $traceroute_path, '', 40, 255, true);
|
$table->data[0][1] = html_print_input_text('traceroute_path', $traceroute_path, '', 40, 255, true);
|
||||||
|
|
||||||
$table->data[1][0] = __("Ping path");
|
$table->data[1][0] = __("Ping path");
|
||||||
$table->data[1][0] .= ui_print_help_tip(__('If it is empty, Pandora searchs the ping system.'), true);
|
$table->data[1][0] .= ui_print_help_tip(__('If empty, %s will search the ping system.', get_product_name()), true);
|
||||||
$table->data[1][1] = html_print_input_text('ping_path', $ping_path, '', 40, 255, true);
|
$table->data[1][1] = html_print_input_text('ping_path', $ping_path, '', 40, 255, true);
|
||||||
|
|
||||||
$table->data[2][0] = __("Nmap path");
|
$table->data[2][0] = __("Nmap path");
|
||||||
$table->data[2][0] .= ui_print_help_tip(__('If it is empty, Pandora searchs the nmap system.'), true);
|
$table->data[2][0] .= ui_print_help_tip(__('If empty, %s will search the nmap system.', get_product_name()), true);
|
||||||
$table->data[2][1] = html_print_input_text('nmap_path', $nmap_path, '', 40, 255, true);
|
$table->data[2][1] = html_print_input_text('nmap_path', $nmap_path, '', 40, 255, true);
|
||||||
|
|
||||||
$table->data[3][0] = __("Dig path");
|
$table->data[3][0] = __("Dig path");
|
||||||
$table->data[3][0] .= ui_print_help_tip(__('If it is empty, Pandora searchs the dig system.'), true);
|
$table->data[3][0] .= ui_print_help_tip(__('If empty, %s will search the dig system', get_product_name()), true);
|
||||||
$table->data[3][1] = html_print_input_text('dig_path', $dig_path, '', 40, 255, true);
|
$table->data[3][1] = html_print_input_text('dig_path', $dig_path, '', 40, 255, true);
|
||||||
|
|
||||||
$table->data[4][0] = __("Snmpget path");
|
$table->data[4][0] = __("Snmpget path");
|
||||||
$table->data[4][0] .= ui_print_help_tip(__('If it is empty, Pandora searchs the snmpget system.'), true);
|
$table->data[4][0] .= ui_print_help_tip(__('If empty, %s will search the snmpget system.', get_product_name()), true);
|
||||||
$table->data[4][1] = html_print_input_text('snmpget_path', $snmpget_path, '', 40, 255, true);
|
$table->data[4][1] = html_print_input_text('snmpget_path', $snmpget_path, '', 40, 255, true);
|
||||||
|
|
||||||
echo '<form id="form_setup" method="post" >';
|
echo '<form id="form_setup" method="post" >';
|
||||||
|
@ -69,7 +69,7 @@ function pandoralogs_extension_main () {
|
|||||||
|
|
||||||
ui_print_page_header (__("System logfile viewer"), "images/extensions.png", false, "", true, "" );
|
ui_print_page_header (__("System logfile viewer"), "images/extensions.png", false, "", true, "" );
|
||||||
|
|
||||||
echo "<p>" . __('Use this tool to view your Pandora FMS logfiles directly on the console') . "</p>";
|
echo "<p>" . __('Use this tool to view your %s logfiles directly on the console', get_product_name()) . "</p>";
|
||||||
|
|
||||||
echo "<p>" . __('You can choose the amount of information shown in general setup (Log size limit in system logs viewer extension), ' . $config['max_log_size'] * 1000 . 'B at the moment') . "</p>";
|
echo "<p>" . __('You can choose the amount of information shown in general setup (Log size limit in system logs viewer extension), ' . $config['max_log_size'] * 1000 . 'B at the moment') . "</p>";
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
function pluginreg_extension_main () {
|
function pluginreg_extension_main () {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
check_login();
|
||||||
|
|
||||||
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");
|
db_pandora_audit("ACL Violation", "Trying to access Setup Management");
|
||||||
@ -31,10 +33,10 @@ function pluginreg_extension_main () {
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<div class="text_task">';
|
echo '<div class="text_task">';
|
||||||
echo '<h3>' . __("Plugin registration") . '</h3>';
|
echo '<h3>' . __("Plugin registration") . '</h3>';
|
||||||
echo '<p id="description_task">' .
|
echo '<p id="description_task">' .
|
||||||
__("This extension makes registration of server plugins more easy.
|
__("This extension makes registering server plugins an easier task.
|
||||||
Here you can upload a server plugin in Pandora FMS 3.x zipped format (.pspz).
|
Here you can upload a server plugin in .pspz zipped format.
|
||||||
Please refer to documentation on how to obtain and use Pandora FMS Server Plugins.
|
Please refer to the official documentation on how to obtain and use Server Plugins.
|
||||||
<br><br>You can get more plugins in our <a href='http://pandorafms.com/Library/Library/'>Public Resource Library</a> ") . '</p>';
|
<br><br>You can get more plugins in our <a href='http://pandorafms.com/Library/Library/'>Public Resource Library</a> ") . '</p>';
|
||||||
// Upload form
|
// Upload form
|
||||||
echo "<form name='submit_plugin' method='post' enctype='multipart/form-data'>";
|
echo "<form name='submit_plugin' method='post' enctype='multipart/form-data'>";
|
||||||
|
@ -14,8 +14,10 @@
|
|||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
include_once('include/graphs/fgraph.php');
|
global $config;
|
||||||
include_once('include/functions_snmp_browser.php');
|
|
||||||
|
include_once($config['homedir'] . '/include/graphs/fgraph.php');
|
||||||
|
include_once($config['homedir'] . '/include/functions_snmp_browser.php');
|
||||||
|
|
||||||
function pandora_realtime_graphs () {
|
function pandora_realtime_graphs () {
|
||||||
global $config;
|
global $config;
|
||||||
@ -25,8 +27,11 @@ function pandora_realtime_graphs () {
|
|||||||
$action = get_parameter('action', 'list');
|
$action = get_parameter('action', 'list');
|
||||||
|
|
||||||
$onheader = array();
|
$onheader = array();
|
||||||
|
|
||||||
ui_print_page_header (__("Realtime graphs"), "images/extensions.png", false, "", false, $onheader);
|
$hide_header = get_parameter('hide_header', 0);
|
||||||
|
if (!$hide_header) {
|
||||||
|
ui_print_page_header (__("Realtime graphs"), "images/extensions.png", false, "", false, $onheader);
|
||||||
|
}
|
||||||
|
|
||||||
$chart[time()]['graph'] = '0';
|
$chart[time()]['graph'] = '0';
|
||||||
$interactive_graph = true;
|
$interactive_graph = true;
|
||||||
@ -58,37 +63,51 @@ function pandora_realtime_graphs () {
|
|||||||
$table->style['snmp_oid'] = 'font-weight: bold;';
|
$table->style['snmp_oid'] = 'font-weight: bold;';
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
|
|
||||||
$graph_fields['cpu_load'] = __('Pandora Server CPU');
|
$graph_fields['cpu_load'] = __('%s Server CPU', get_product_name());
|
||||||
$graph_fields['pending_packets'] = __('Pandora Server Pending packets');
|
$graph_fields['pending_packets'] = __('Pending packages from %s Server', get_product_name());
|
||||||
$graph_fields['disk_io_wait'] = __('Pandora Server Disk IO Wait');
|
$graph_fields['disk_io_wait'] = __('%s Server Disk IO Wait', get_product_name());
|
||||||
$graph_fields['apache_load'] = __('Pandora Server Apache load');
|
$graph_fields['apache_load'] = __('%s Server Apache load', get_product_name());
|
||||||
$graph_fields['mysql_load'] = __('Pandora Server MySQL load');
|
$graph_fields['mysql_load'] = __('%s Server MySQL load', get_product_name());
|
||||||
$graph_fields['server_load'] = __('Pandora Server load');
|
$graph_fields['server_load'] = __('%s Server load', get_product_name());
|
||||||
$graph_fields['snmp_interface'] = __('SNMP Interface throughput');
|
$graph_fields['snmp_interface'] = __('SNMP Interface throughput');
|
||||||
|
|
||||||
$graph = get_parameter('graph', 'cpu_load');
|
$graph = get_parameter('graph', 'cpu_load');
|
||||||
$refresh = get_parameter('refresh', '1000');
|
$refresh = get_parameter('refresh', '1000');
|
||||||
|
|
||||||
$data['graph'] = __('Graph') . ' ' . html_print_select ($graph_fields, 'graph', $graph, '', '', 0, true);
|
if ($graph != 'snmp_module') {
|
||||||
|
$data['graph'] = __('Graph') . ' ' . html_print_select ($graph_fields, 'graph', $graph, '', '', 0, true);
|
||||||
|
}
|
||||||
|
|
||||||
$refresh_fields[1000] = human_time_description_raw(1, true, 'large');
|
$refresh_fields[1000] = human_time_description_raw(1, true, 'large');
|
||||||
$refresh_fields[5000] = human_time_description_raw(5, true, 'large');
|
$refresh_fields[5000] = human_time_description_raw(5, true, 'large');
|
||||||
$refresh_fields[10000] = human_time_description_raw(10, true, 'large');
|
$refresh_fields[10000] = human_time_description_raw(10, true, 'large');
|
||||||
$refresh_fields[30000] = human_time_description_raw(30, true, 'large');
|
$refresh_fields[30000] = human_time_description_raw(30, true, 'large');
|
||||||
|
|
||||||
|
if ($graph == 'snmp_module') {
|
||||||
|
$agent_alias = get_parameter('agent_alias', '');
|
||||||
|
$module_name = get_parameter('module_name', '');
|
||||||
|
$module_incremental = get_parameter ('incremental', 0);
|
||||||
|
$data['module_info'] = "$agent_alias: <b>$module_name</b>";
|
||||||
|
|
||||||
|
// Append all the hidden in this cell
|
||||||
|
$data['module_info'] .= html_print_input_hidden ('incremental', $module_incremental, true);
|
||||||
|
$data['module_info'] .= html_print_select (
|
||||||
|
array('snmp_module' => '-'), 'graph', 'snmp_module', '', '', 0, true, false, true, '', false, 'display: none;'
|
||||||
|
);
|
||||||
|
}
|
||||||
$data['refresh'] = __('Refresh interval') . ' ' . html_print_select ($refresh_fields, 'refresh', $refresh, '', '', 0, true);
|
$data['refresh'] = __('Refresh interval') . ' ' . html_print_select ($refresh_fields, 'refresh', $refresh, '', '', 0, true);
|
||||||
$data['incremental'] = __('Incremental') . ' ' . html_print_checkbox ('incremental', 1, 0, true);
|
if ($graph != 'snmp_module') {
|
||||||
|
$data['incremental'] = __('Incremental') . ' ' . html_print_checkbox ('incremental', 1, 0, true);
|
||||||
|
}
|
||||||
$data['reset'] = html_print_button(__('Clear graph'), 'reset', false, 'clearGraph()', 'class="sub delete" style="margin-top:0px;"', true);
|
$data['reset'] = html_print_button(__('Clear graph'), 'reset', false, 'clearGraph()', 'class="sub delete" style="margin-top:0px;"', true);
|
||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
|
|
||||||
|
if ($graph == 'snmp_interface' || $graph == 'snmp_module') {
|
||||||
if ($graph == 'snmp_interface') {
|
$snmp_address = get_parameter('snmp_address', '');
|
||||||
$snmp_address = '';
|
$snmp_community = get_parameter('snmp_community', '');
|
||||||
$snmp_community = '';
|
$snmp_oid = get_parameter('snmp_oid', '');
|
||||||
$snmp_oid = '';
|
$snmp_ver = get_parameter('snmp_ver', '');
|
||||||
$snmp_ver = '1';
|
|
||||||
$snmp_inc = false;
|
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
|
|
||||||
$data['snmp_address'] = __('Target IP') . ' ' . html_print_input_text ('ip_target', $snmp_address, '', 50, 255, true);
|
$data['snmp_address'] = __('Target IP') . ' ' . html_print_input_text ('ip_target', $snmp_address, '', 50, 255, true);
|
||||||
@ -111,23 +130,32 @@ function pandora_realtime_graphs () {
|
|||||||
$data['snmp_ver'] = __('Version') . ' ' . html_print_select ($snmp_versions, 'snmp_version', $snmp_ver, '', '', 0, true);
|
$data['snmp_ver'] = __('Version') . ' ' . html_print_select ($snmp_versions, 'snmp_version', $snmp_ver, '', '', 0, true);
|
||||||
$data['snmp_ver'] .= ' ' . html_print_button (__('SNMP walk'), 'snmp_walk', false, 'snmpBrowserWindow()', 'class="sub next"', true);
|
$data['snmp_ver'] .= ' ' . html_print_button (__('SNMP walk'), 'snmp_walk', false, 'snmpBrowserWindow()', 'class="sub next"', true);
|
||||||
$table->colspan[2]['snmp_ver'] = 2;
|
$table->colspan[2]['snmp_ver'] = 2;
|
||||||
|
|
||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
|
|
||||||
|
// Hide some options in snmp_module graphs
|
||||||
|
if ($graph == 'snmp_module') {
|
||||||
|
$table->rowstyle[1] = "display: none;";
|
||||||
|
$table->rowstyle[2] = "display: none;";
|
||||||
|
}
|
||||||
snmp_browser_print_container (false, '100%', '60%', 'none');
|
snmp_browser_print_container (false, '100%', '60%', 'none');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Print the relative path to AJAX calls:
|
||||||
|
html_print_input_hidden('rel_path', get_parameter('rel_path', ''));
|
||||||
|
|
||||||
|
// Print the form
|
||||||
echo '<form id="realgraph" method="post">';
|
echo '<form id="realgraph" method="post">';
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
||||||
// Define a custom action to save the OID selected in the SNMP browser to the form
|
// Define a custom action to save the OID selected in the SNMP browser to the form
|
||||||
html_print_input_hidden ('custom_action', urlencode (base64_encode(' <a href="javascript:setOID()"><img src="' . ui_get_full_url("images") . '/hand_point.png" title="' . __("Use this OID") . '" style="vertical-align: middle;"></img></a>')), false);
|
html_print_input_hidden ('custom_action', urlencode (base64_encode(' <a href="javascript:setOID()"><img src="' . ui_get_full_url("images") . '/input_filter.disabled.png" title="' . __("Use this OID") . '" style="vertical-align: middle;"></img></a>')), false);
|
||||||
html_print_input_hidden ('incremental_base', '0');
|
html_print_input_hidden ('incremental_base', '0');
|
||||||
|
|
||||||
echo '<script type="text/javascript" src="extensions/realtime_graphs/realtime_graphs.js"></script>';
|
echo '<script type="text/javascript" src="'.ui_get_full_url("extensions/realtime_graphs/realtime_graphs.js").'"></script>';
|
||||||
echo '<script type="text/javascript" src="include/javascript/pandora_snmp_browser.js"></script>';
|
echo '<script type="text/javascript" src="'.ui_get_full_url("include/javascript/pandora_snmp_browser.js").'"></script>';
|
||||||
echo '<link rel="stylesheet" type="text/css" href="extensions/realtime_graphs/realtime_graphs.css"></style>';
|
echo '<link rel="stylesheet" type="text/css" href="'.ui_get_full_url("extensions/realtime_graphs/realtime_graphs.css").'"></style>';
|
||||||
|
|
||||||
// Store servers timezone offset to be retrieved from js
|
// Store servers timezone offset to be retrieved from js
|
||||||
set_js_value('timezone_offset', date('Z', time()));
|
set_js_value('timezone_offset', date('Z', time()));
|
||||||
|
@ -59,6 +59,7 @@ switch($graph) {
|
|||||||
$data = exec("ps aux | grep pandora_server | grep -v grep | awk '{ print $3 }'");
|
$data = exec("ps aux | grep pandora_server | grep -v grep | awk '{ print $3 }'");
|
||||||
break;
|
break;
|
||||||
case 'snmp_interface':
|
case 'snmp_interface':
|
||||||
|
case 'snmp_module':
|
||||||
$snmp_address = $_POST['snmp_address'];
|
$snmp_address = $_POST['snmp_address'];
|
||||||
$snmp_community = $_POST['snmp_community'];
|
$snmp_community = $_POST['snmp_community'];
|
||||||
$snmp_ver = $_POST['snmp_ver'];
|
$snmp_ver = $_POST['snmp_ver'];
|
||||||
|
@ -37,7 +37,7 @@ var plot = $.plot("#" + id, data, options);
|
|||||||
|
|
||||||
|
|
||||||
var refresh = parseInt($('#refresh').val());
|
var refresh = parseInt($('#refresh').val());
|
||||||
var incremental = $('#checkbox-incremental').is(':checked');
|
var incremental = $('#checkbox-incremental').is(':checked') || $('#hidden-incremental').val() == 1;
|
||||||
var incremental_base = 0;
|
var incremental_base = 0;
|
||||||
var last_inc = 0;
|
var last_inc = 0;
|
||||||
var to;
|
var to;
|
||||||
@ -58,9 +58,11 @@ function refresh_graph () {
|
|||||||
postvars['snmp_address'] = $('#text-ip_target').val();
|
postvars['snmp_address'] = $('#text-ip_target').val();
|
||||||
|
|
||||||
postvars['refresh'] = refresh;
|
postvars['refresh'] = refresh;
|
||||||
|
|
||||||
|
var rel_path = $("#hidden-rel_path").val();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "extensions/realtime_graphs/ajax.php",
|
url: rel_path + "extensions/realtime_graphs/ajax.php",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data: postvars,
|
data: postvars,
|
||||||
|
@ -338,8 +338,9 @@ function resource_exportation_extension_main() {
|
|||||||
ui_print_page_header (__('Resource exportation'), "images/extensions.png", false, "", true, "" );
|
ui_print_page_header (__('Resource exportation'), "images/extensions.png", false, "", true, "" );
|
||||||
|
|
||||||
echo "<div class=notify>";
|
echo "<div class=notify>";
|
||||||
echo __("This extension makes exportation of resource template more easy. " .
|
echo __("This extension makes exportation of resource template more easy.") .
|
||||||
"Here you can export as a resource template in Pandora FMS 3.x format (.ptr). ");
|
" " .
|
||||||
|
__("You can export resource templates in .ptr format.");
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
|
@ -855,11 +855,12 @@ function resource_registration_extension_main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "<div class=notify>";
|
echo "<div class=notify>";
|
||||||
printf(__("This extension makes registration of resource template more easy. " .
|
echo __("This extension makes registering resource templates easier.") . " " .
|
||||||
"Here you can upload a resource template in Pandora FMS 3.x format (.ptr). " .
|
__("Here you can upload a resource template in .ptr format.") . " " .
|
||||||
"Please refer to documentation on how to obtain and use Pandora FMS resources. " .
|
__("Please refer to our documentation for more information on how to obtain and use %s resources.", get_product_name()) . " " .
|
||||||
"<br><br>You can get more resurces in our <a href='%s'>Public Resource Library</a>") ,
|
"<br> <br>" .
|
||||||
"http://pandorafms.org/index.php?sec=community&sec2=repository&lng=en");
|
__("You can get more resurces in our <a href='http://pandorafms.com/Library/Library/'>Public Resource Library</a>")
|
||||||
|
;
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
|
@ -10,6 +10,55 @@ START TRANSACTION;
|
|||||||
EXECUTE pr_oum720;
|
EXECUTE pr_oum720;
|
||||||
DEALLOCATE PREPARE pr_oum720;
|
DEALLOCATE PREPARE pr_oum720;
|
||||||
|
|
||||||
INSERT INTO `tconfig_os` (`id_os`, `name`, `description`, `icon_name`) VALUES (21, 'Cluster', 'Cluster agent', 'so_cluster.png');
|
INSERT INTO `tconfig_os` (`id_os`, `name`, `description`, `icon_name`) VALUES (100, 'Cluster', 'Cluster agent', 'so_cluster.png');
|
||||||
|
|
||||||
|
UPDATE `tagente` SET `id_os` = 100 WHERE `id_os` = 21 and (select `id_os` from `tconfig_os` WHERE `id_os` = 21 and `name` = 'Cluster');
|
||||||
|
|
||||||
COMMIT;
|
DELETE FROM `tconfig_os` where `id_os` = 21 and `name` = 'Cluster';
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `tprovisioning`(
|
||||||
|
`id` int unsigned NOT NULL auto_increment,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`description` TEXT default '',
|
||||||
|
`order` int(11) NOT NULL default 0,
|
||||||
|
`config` TEXT default '',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `tprovisioning_rules`(
|
||||||
|
`id` int unsigned NOT NULL auto_increment,
|
||||||
|
`id_provisioning` int unsigned NOT NULL,
|
||||||
|
`order` int(11) NOT NULL default 0,
|
||||||
|
`operator` enum('AND','OR') default 'OR',
|
||||||
|
`type` enum('alias','ip-range') default 'alias',
|
||||||
|
`value` varchar(100) NOT NULL default '',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
FOREIGN KEY (`id_provisioning`) REFERENCES tprovisioning(`id`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
create table IF NOT EXISTS `tmigration_queue`(
|
||||||
|
`id` int unsigned not null auto_increment,
|
||||||
|
`id_source_agent` int unsigned not null,
|
||||||
|
`id_target_agent` int unsigned not null,
|
||||||
|
`id_source_node` int unsigned not null,
|
||||||
|
`id_target_node` int unsigned not null,
|
||||||
|
`priority` int unsigned default 0,
|
||||||
|
`step` int default 0,
|
||||||
|
`running` tinyint(2) default 0,
|
||||||
|
`active_db_only` tinyint(2) default 0,
|
||||||
|
PRIMARY KEY(`id`)
|
||||||
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
create table IF NOT EXISTS `tmigration_module_queue`(
|
||||||
|
`id` int unsigned not null auto_increment,
|
||||||
|
`id_migration` int unsigned not null,
|
||||||
|
`id_source_agentmodule` int unsigned not null,
|
||||||
|
`id_target_agentmodule` int unsigned not null,
|
||||||
|
`last_replication_timestamp` bigint(20) NOT NULL default 0,
|
||||||
|
PRIMARY KEY(`id`),
|
||||||
|
FOREIGN KEY(`id_migration`) REFERENCES tmigration_queue(`id`)
|
||||||
|
ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
|
54
pandora_console/extras/mr/14.sql
Normal file
54
pandora_console/extras/mr/14.sql
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
START TRANSACTION;
|
||||||
|
|
||||||
|
UPDATE `tagente` SET `id_os` = 100 WHERE `id_os` = 21 and (select `id_os` from `tconfig_os` WHERE `id_os` = 21 and `name` = 'Cluster');
|
||||||
|
|
||||||
|
DELETE FROM `tconfig_os` where `id_os` = 21 and `name` = 'Cluster';
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `tagent_secondary_group`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
create table IF NOT EXISTS `tagent_secondary_group`(
|
||||||
|
`id` int unsigned not null auto_increment,
|
||||||
|
`id_agent` int(10) unsigned NOT NULL,
|
||||||
|
`id_group` mediumint(4) unsigned NOT NULL,
|
||||||
|
PRIMARY KEY(`id`),
|
||||||
|
FOREIGN KEY(`id_agent`) REFERENCES tagente(`id_agente`)
|
||||||
|
ON DELETE CASCADE,
|
||||||
|
FOREIGN KEY(`id_group`) REFERENCES tgrupo(`id_grupo`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `tmetaconsole_agent_secondary_group`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
create table IF NOT EXISTS `tmetaconsole_agent_secondary_group`(
|
||||||
|
`id` int unsigned not null auto_increment,
|
||||||
|
`id_agent` int(10) unsigned NOT NULL,
|
||||||
|
`id_tagente` int(10) unsigned NOT NULL,
|
||||||
|
`id_tmetaconsole_setup` int(10) NOT NULL,
|
||||||
|
`id_group` mediumint(4) unsigned NOT NULL,
|
||||||
|
PRIMARY KEY(`id`),
|
||||||
|
FOREIGN KEY(`id_agent`) REFERENCES tmetaconsole_agent(`id_agente`)
|
||||||
|
ON DELETE CASCADE,
|
||||||
|
FOREIGN KEY(`id_group`) REFERENCES tgrupo(`id_grupo`)
|
||||||
|
ON DELETE CASCADE,
|
||||||
|
FOREIGN KEY (`id_tmetaconsole_setup`) REFERENCES tmetaconsole_setup(`id`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
ALTER TABLE tagente ADD COLUMN `update_secondary_groups` tinyint(1) NOT NULL default '0';
|
||||||
|
ALTER TABLE tmetaconsole_agent ADD COLUMN `update_secondary_groups` tinyint(1) NOT NULL default '0';
|
||||||
|
ALTER TABLE tusuario_perfil ADD COLUMN `is_secondary` tinyint(1) NOT NULL default '0';
|
||||||
|
|
||||||
|
SET @st_oum721 = (SELECT IF(
|
||||||
|
(SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'tuser_task_scheduled') > 0,
|
||||||
|
"ALTER TABLE tuser_task_scheduled ADD (id_grupo int(10) unsigned NOT NULL Default 0)",
|
||||||
|
"0"
|
||||||
|
));
|
||||||
|
|
||||||
|
PREPARE pr_oum721 FROM @st_oum721;
|
||||||
|
EXECUTE pr_oum721;
|
||||||
|
DEALLOCATE PREPARE pr_oum721;
|
||||||
|
|
||||||
|
COMMIT;
|
9
pandora_console/extras/mr/15.sql
Normal file
9
pandora_console/extras/mr/15.sql
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
START TRANSACTION;
|
||||||
|
|
||||||
|
ALTER TABLE tcluster DROP FOREIGN KEY tcluster_ibfk_1;
|
||||||
|
|
||||||
|
ALTER TABLE tcluster_agent DROP FOREIGN KEY tcluster_agent_ibfk_1;
|
||||||
|
|
||||||
|
ALTER TABLE tcluster_agent DROP FOREIGN KEY tcluster_agent_ibfk_2;
|
||||||
|
|
||||||
|
COMMIT;
|
9
pandora_console/extras/mr/16.sql
Normal file
9
pandora_console/extras/mr/16.sql
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
START TRANSACTION;
|
||||||
|
|
||||||
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
|
||||||
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
|
||||||
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
|
||||||
|
|
||||||
|
UPDATE talert_actions SET name='Monitoring Event' WHERE name='Pandora FMS Event';
|
||||||
|
|
||||||
|
COMMIT;
|
@ -1123,6 +1123,7 @@ UPDATE talert_actions SET `field4` = 'integria',
|
|||||||
`field9` = 'admin',
|
`field9` = 'admin',
|
||||||
`field10` = '_alert_description_'
|
`field10` = '_alert_description_'
|
||||||
WHERE `id` = 4 AND `id_alert_command` = 11;
|
WHERE `id` = 4 AND `id_alert_command` = 11;
|
||||||
|
UPDATE talert_actions SET name='Monitoring Event' WHERE name='Pandora FMS Event';
|
||||||
ALTER TABLE talert_actions ADD COLUMN `field11` TEXT NOT NULL DEFAULT "";
|
ALTER TABLE talert_actions ADD COLUMN `field11` TEXT NOT NULL DEFAULT "";
|
||||||
ALTER TABLE talert_actions ADD COLUMN `field12` TEXT NOT NULL DEFAULT "";
|
ALTER TABLE talert_actions ADD COLUMN `field12` TEXT NOT NULL DEFAULT "";
|
||||||
ALTER TABLE talert_actions ADD COLUMN `field13` TEXT NOT NULL DEFAULT "";
|
ALTER TABLE talert_actions ADD COLUMN `field13` TEXT NOT NULL DEFAULT "";
|
||||||
@ -1160,10 +1161,23 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge
|
|||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 13);
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 13);
|
||||||
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
|
||||||
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
|
||||||
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
|
||||||
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
||||||
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '720');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '720');
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `tconfig_os`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
INSERT INTO `tconfig_os` (`id_os`, `name`, `description`, `icon_name`) VALUES (100, 'Cluster', 'Cluster agent', 'so_cluster.png');
|
||||||
|
|
||||||
|
UPDATE `tagente` SET `id_os` = 100 WHERE `id_os` = 21 and (select `id_os` from `tconfig_os` WHERE `id_os` = 21 and `name` = 'Cluster');
|
||||||
|
|
||||||
|
DELETE FROM `tconfig_os` where `id_os` = 21 and `name` = 'Cluster';
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- Table `tplanned_downtime_agents`
|
-- Table `tplanned_downtime_agents`
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
@ -1358,6 +1372,7 @@ END IF;
|
|||||||
SET @vv2 = (SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'tuser_task_scheduled');
|
SET @vv2 = (SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'tuser_task_scheduled');
|
||||||
IF @vv2>0 THEN
|
IF @vv2>0 THEN
|
||||||
ALTER TABLE tuser_task_scheduled MODIFY args TEXT NOT NULL;
|
ALTER TABLE tuser_task_scheduled MODIFY args TEXT NOT NULL;
|
||||||
|
ALTER TABLE tuser_task_scheduled ADD (id_grupo int(10) unsigned NOT NULL Default 0);
|
||||||
END IF;
|
END IF;
|
||||||
END;
|
END;
|
||||||
//
|
//
|
||||||
@ -1498,9 +1513,7 @@ create table IF NOT EXISTS `tcluster`(
|
|||||||
`description` text not null default '',
|
`description` text not null default '',
|
||||||
`group` int(10) unsigned NOT NULL default '0',
|
`group` int(10) unsigned NOT NULL default '0',
|
||||||
`id_agent` int(10) unsigned NOT NULL,
|
`id_agent` int(10) unsigned NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`)
|
||||||
FOREIGN KEY (`id_agent`) REFERENCES tagente(`id_agente`)
|
|
||||||
ON UPDATE CASCADE
|
|
||||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
@ -1528,8 +1541,103 @@ create table IF NOT EXISTS `tcluster_agent`(
|
|||||||
`id_cluster` int unsigned not null,
|
`id_cluster` int unsigned not null,
|
||||||
`id_agent` int(10) unsigned not null,
|
`id_agent` int(10) unsigned not null,
|
||||||
PRIMARY KEY (`id_cluster`,`id_agent`),
|
PRIMARY KEY (`id_cluster`,`id_agent`),
|
||||||
FOREIGN KEY (`id_agent`) REFERENCES tagente(`id_agente`)
|
|
||||||
ON UPDATE CASCADE,
|
|
||||||
FOREIGN KEY (`id_cluster`) REFERENCES tcluster(`id`)
|
FOREIGN KEY (`id_cluster`) REFERENCES tcluster(`id`)
|
||||||
ON UPDATE CASCADE
|
ON UPDATE CASCADE
|
||||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `tprovisioning`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
create table IF NOT EXISTS `tprovisioning`(
|
||||||
|
`id` int unsigned NOT NULL auto_increment,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`description` TEXT default '',
|
||||||
|
`order` int(11) NOT NULL default 0,
|
||||||
|
`config` TEXT default '',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `tprovisioning_rules`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
create table IF NOT EXISTS `tprovisioning_rules`(
|
||||||
|
`id` int unsigned NOT NULL auto_increment,
|
||||||
|
`id_provisioning` int unsigned NOT NULL,
|
||||||
|
`order` int(11) NOT NULL default 0,
|
||||||
|
`operator` enum('AND','OR') default 'OR',
|
||||||
|
`type` enum('alias','ip-range') default 'alias',
|
||||||
|
`value` varchar(100) NOT NULL default '',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
FOREIGN KEY (`id_provisioning`) REFERENCES tprovisioning(`id`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `tmigration_queue`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
create table IF NOT EXISTS `tmigration_queue`(
|
||||||
|
`id` int unsigned not null auto_increment,
|
||||||
|
`id_source_agent` int unsigned not null,
|
||||||
|
`id_target_agent` int unsigned not null,
|
||||||
|
`id_source_node` int unsigned not null,
|
||||||
|
`id_target_node` int unsigned not null,
|
||||||
|
`priority` int unsigned default 0,
|
||||||
|
`step` int default 0,
|
||||||
|
`running` tinyint(2) default 0,
|
||||||
|
`active_db_only` tinyint(2) default 0,
|
||||||
|
PRIMARY KEY(`id`)
|
||||||
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `tmigration_module_queue`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
create table IF NOT EXISTS `tmigration_module_queue`(
|
||||||
|
`id` int unsigned not null auto_increment,
|
||||||
|
`id_migration` int unsigned not null,
|
||||||
|
`id_source_agentmodule` int unsigned not null,
|
||||||
|
`id_target_agentmodule` int unsigned not null,
|
||||||
|
`last_replication_timestamp` bigint(20) NOT NULL default 0,
|
||||||
|
PRIMARY KEY(`id`),
|
||||||
|
FOREIGN KEY(`id_migration`) REFERENCES tmigration_queue(`id`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
ON UPDATE CASCADE
|
||||||
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `tagent_secondary_group`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
create table IF NOT EXISTS `tagent_secondary_group`(
|
||||||
|
`id` int unsigned not null auto_increment,
|
||||||
|
`id_agent` int(10) unsigned NOT NULL,
|
||||||
|
`id_group` mediumint(4) unsigned NOT NULL,
|
||||||
|
PRIMARY KEY(`id`),
|
||||||
|
FOREIGN KEY(`id_agent`) REFERENCES tagente(`id_agente`)
|
||||||
|
ON DELETE CASCADE,
|
||||||
|
FOREIGN KEY(`id_group`) REFERENCES tgrupo(`id_grupo`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `tmetaconsole_agent_secondary_group`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
create table IF NOT EXISTS `tmetaconsole_agent_secondary_group`(
|
||||||
|
`id` int unsigned not null auto_increment,
|
||||||
|
`id_agent` int(10) unsigned NOT NULL,
|
||||||
|
`id_tagente` int(10) unsigned NOT NULL,
|
||||||
|
`id_tmetaconsole_setup` int(10) NOT NULL,
|
||||||
|
`id_group` mediumint(4) unsigned NOT NULL,
|
||||||
|
PRIMARY KEY(`id`),
|
||||||
|
FOREIGN KEY(`id_agent`) REFERENCES tmetaconsole_agent(`id_agente`)
|
||||||
|
ON DELETE CASCADE,
|
||||||
|
FOREIGN KEY(`id_group`) REFERENCES tgrupo(`id_grupo`)
|
||||||
|
ON DELETE CASCADE,
|
||||||
|
FOREIGN KEY (`id_tmetaconsole_setup`) REFERENCES tmetaconsole_setup(`id`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
ALTER TABLE tagente ADD COLUMN `update_secondary_groups` tinyint(1) NOT NULL default '0';
|
||||||
|
ALTER TABLE tmetaconsole_agent ADD COLUMN `update_secondary_groups` tinyint(1) NOT NULL default '0';
|
||||||
|
ALTER TABLE tusuario_perfil ADD COLUMN `is_secondary` tinyint(1) NOT NULL default '0';
|
||||||
|
@ -93,15 +93,17 @@ switch ($tipo) {
|
|||||||
|
|
||||||
case "helpmodal":
|
case "helpmodal":
|
||||||
|
|
||||||
echo __("This is the online help for Pandora FMS console. This help is -in best cases- just a brief contextual help, not intented to teach you how to use Pandora FMS. Official documentation of Pandora FMS is about 900 pages, and you probably don't need to read it entirely, but sure, you should download it and take a look.<br><br>
|
echo __("This is the online help for %s console. This help is -in best cases- just a brief contextual help, not intented to teach you how to use %s. Official documentation of %s is about 900 pages, and you probably don't need to read it entirely, but sure, you should download it and take a look.<br><br>
|
||||||
<a href='https://pandorafms.org/en/docs/monitoring-documentation/' target='_blanck' style='color: #82b92e; font-size: 10pt; text-decoration: underline;'>Download the official documentation</a>");
|
<a href='%s' target='_blanck' style='color: #82b92e; font-size: 10pt; text-decoration: underline;'>Download the official documentation</a>",
|
||||||
|
get_product_name(), get_product_name(), get_product_name(), $config['custom_docs_url']);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "noaccess":
|
case "noaccess":
|
||||||
|
|
||||||
echo __('Access to this page is restricted to authorized users only, please contact system administrator if you need assistance. <br/> <br/>
|
echo __('Access to this page is restricted to authorized users only, please contact system administrator if you need assistance. <br> <br>
|
||||||
Please know that all attempts to access this page are recorded in security logs of Pandora System Database');
|
Please know that all attempts to access this page are recorded in security logs of %s System Database.',
|
||||||
|
get_product_name());
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -111,13 +113,13 @@ switch ($tipo) {
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
'<p>' .
|
'<p>' .
|
||||||
__('The Update Manager client is included on Pandora FMS. It helps system administrators update their Pandora FMS automatically, since the Update Manager retrieves new modules, new plugins and new features (even full migrations tools for future versions) automatically.') .
|
__('The Update Manager client is included on %s. It helps system administrators update their %s automatically, since the Update Manager retrieves new modules, new plugins and new features (even full migrations tools for future versions) automatically.', get_product_name(), get_product_name()) .
|
||||||
'</p>' .
|
'</p>' .
|
||||||
'<p>' .
|
'<p>' .
|
||||||
__('<b>OpenSource version updates are automated packages generated each week. These updates come WITHOUT ANY warranty or support. If your system is corrupted or a feature stops working properly, you will need to recover a backup by yourself.</b>') .
|
__('<b>OpenSource version updates are automated packages generated each week. These updates come WITHOUT ANY warranty or support. If your system is corrupted or a feature stops working properly, you will need to recover a backup by yourself.</b>') .
|
||||||
'</p>' .
|
'</p>' .
|
||||||
'<p>' .
|
'<p>' .
|
||||||
__('The Enterprise version comes with a different update system, with fully tested, professionally-supported packages, and our support team is there to help you in case of problems or queries. Update Manager is another feature present in the Enterprise version and not included in the OpenSource version. There are lots of advanced business-oriented features contained in Pandora FMS Enterprise Edition. For more information visit <a href="http://pandorafms.com">pandorafms.com</a>') .
|
__('The Enterprise version comes with a different update system, with fully tested, professionally-supported packages, and our support team is there to help you in case of problems or queries. Update Manager is another feature present in the Enterprise version and not included in the OpenSource version. There are lots of advanced business-oriented features contained in %s Enterprise Edition. For more information visit <a href="http://pandorafms.com">pandorafms.com</a>', get_product_name()) .
|
||||||
'</p>'
|
'</p>'
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -125,13 +127,13 @@ switch ($tipo) {
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
'<p>' .
|
'<p>' .
|
||||||
__('The new <a href="http://updatemanager.sourceforge.net">Update Manager</a> client is shipped with Pandora FMS It helps system administrators to update their Pandora FMS automatically, since the Update Manager does the task of getting new modules, new plugins and new features (even full migrations tools for future versions) automatically.') .
|
__('The new <a href="http://updatemanager.sourceforge.net">Update Manager</a> client is included on %s. It helps system administrators update their %s automatically, since the Update Manager retrieves new modules, new plugins and new features (even full migrations tools for future versions) automatically.', get_product_name(), get_product_name()) .
|
||||||
'</p>' .
|
'</p>' .
|
||||||
'<p>' .
|
'<p>' .
|
||||||
__('Update Manager is one of the most advanced features of Pandora FMS Enterprise version, for more information visit <a href="http://pandorafms.com">http://pandorafms.com</a>.') .
|
__('The Update Manager is one of the most advanced features on the %s Enterprise Edition. For more information visit <a href="http://pandorafms.com">http://pandorafms.com</a>.', get_product_name()) .
|
||||||
'</p>' .
|
'</p>' .
|
||||||
'<p>' .
|
'<p>' .
|
||||||
__('Update Manager sends anonymous information about Pandora FMS usage (number of agents and modules running). To disable it, please remove the remote server address from the Update Manager plugin setup.') .
|
__('Update Manager sends anonymous information about %s usage (number of agents and modules running). To disable it, please remove the remote server address from the Update Manager plugin setup.', get_product_name()) .
|
||||||
'</p>'
|
'</p>'
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -142,13 +144,13 @@ switch ($tipo) {
|
|||||||
<br><br><img style='width:105px' src='".$config['homeurl']."images/logo_oracle.png'><img style='width:105px' src='".$config['homeurl']."images/logo_citrix.png'><img style='width:105px' src='".$config['homeurl']."images/logo_sap.png'><img style='width:105px' src='".$config['homeurl']."images/logo_exchange.png'><br><br><span style='font-style:italic;'>* Todos los logotipos pertenecen a marcas registradas</span>");
|
<br><br><img style='width:105px' src='".$config['homeurl']."images/logo_oracle.png'><img style='width:105px' src='".$config['homeurl']."images/logo_citrix.png'><img style='width:105px' src='".$config['homeurl']."images/logo_sap.png'><img style='width:105px' src='".$config['homeurl']."images/logo_exchange.png'><br><br><span style='font-style:italic;'>* Todos los logotipos pertenecen a marcas registradas</span>");
|
||||||
break;
|
break;
|
||||||
case "massivemodal":
|
case "massivemodal":
|
||||||
echo __("Do you want to consolidate all your system monitoring? Do you have many systems, making it difficult to manage them in a comprehensive manner? Would you like to deploy monitoring, alerts and even local plugins with a single click? Pandora FMS Enterprise Policies are exactly what you need; you'll save time, effort and annoyances. More information <a href='pandorafms.com'>pandorafms.com</a>");
|
echo __("Do you want to consolidate all your system monitoring? Do you have many systems, making it difficult to manage them in a comprehensive manner? Would you like to deploy monitoring, alerts and even local plugins with a single click? %s Enterprise Policies are exactly what you need; you'll save time, effort and annoyances. More information <a href='pandorafms.com'>pandorafms.com</a>", get_product_name());
|
||||||
break;
|
break;
|
||||||
case "eventsmodal":
|
case "eventsmodal":
|
||||||
echo __("Pandora FMS Enterprise also features event correlation. Through correlation you can generate realtime alerts and / or new events based on logical rules. This allows you to automate troubleshooting. If you know the value of working with events, event correlation will take you to a new level.");
|
echo __("%s Enterprise also features event correlation. Through correlation you can generate realtime alerts and / or new events based on logical rules. This allows you to automate troubleshooting. If you know the value of working with events, event correlation will take you to a new level.", get_product_name());
|
||||||
break;
|
break;
|
||||||
case "reportingmodal":
|
case "reportingmodal":
|
||||||
echo __("Report generating on the Enterprise version is also more powerful: it has wizards, you can schedule emails in PDF to be sent according to the schedule you decide, and it has a template system to create personalized reports quickly for each of your customers. It will even allow your customers to generate their own reports from templates created by you. If reports are key to your business, Pandora FMS Enterprise version is for you.");
|
echo __("Report generating on the Enterprise version is also more powerful: it has wizards, you can schedule emails in PDF to be sent according to the schedule you decide, and it has a template system to create personalized reports quickly for each of your customers. It will even allow your customers to generate their own reports from templates created by you. If reports are key to your business, %s Enterprise version is for you.", get_product_name());
|
||||||
break;
|
break;
|
||||||
case "visualmodal":
|
case "visualmodal":
|
||||||
echo __("These options are only effective on the Enterprise version.");
|
echo __("These options are only effective on the Enterprise version.");
|
||||||
|
@ -49,8 +49,17 @@ ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no cl
|
|||||||
echo __('<b>Clusters to guarantee service</b>: these are active - passive (A/P) mode clusters. It means that one of the nodes (or machines that make up the cluster) will be running (primary) and another won\'t (secondary). When the primary goes down, the secondary must take over and give the service instead. Although many of the elements of this cluster are active-passive, it will also have active elements in both of them that indicate that the passive node is "online", so that in the case of a service failure in the master, the active node collects this information.');
|
echo __('<b>Clusters to guarantee service</b>: these are active - passive (A/P) mode clusters. It means that one of the nodes (or machines that make up the cluster) will be running (primary) and another won\'t (secondary). When the primary goes down, the secondary must take over and give the service instead. Although many of the elements of this cluster are active-passive, it will also have active elements in both of them that indicate that the passive node is "online", so that in the case of a service failure in the master, the active node collects this information.');
|
||||||
|
|
||||||
?></p>
|
?></p>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if(check_acl ($config['id_user'], 0, "AW")) {
|
||||||
|
?>
|
||||||
|
|
||||||
<form action="index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&step=1" method="post">
|
<form action="index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&step=1" method="post">
|
||||||
<input style="margin-bottom:20px;" type="submit" class="button_task" value="<?php echo __('Create Cluster'); ?>" />
|
<input style="margin-bottom:20px;" type="submit" class="button_task" value="<?php echo __('Create Cluster'); ?>" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -29,9 +29,10 @@ ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no cu
|
|||||||
</div>
|
</div>
|
||||||
<div class="text_task">
|
<div class="text_task">
|
||||||
<h3> <?php echo __('Create Custom Graph'); ?></h3>
|
<h3> <?php echo __('Create Custom Graph'); ?></h3>
|
||||||
<p id="description_task"> <?php echo __("Graphs are designed to show the data collected by Pandora FMS in a temporary scale defined by the user.
|
<p id="description_task"> <?php echo __("Graphs are designed to show the data collected by %s in a temporary scale defined by the user.
|
||||||
Pandora FMS Graphs display data in real time. They are generated every time the operator requires any of them and display the up-to-date state.
|
%s Graphs display data in real time. They are generated every time the operator requires any of them and display the up-to-date state.
|
||||||
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."); ?></p>
|
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.",
|
||||||
|
get_product_name(), get_product_name()); ?></p>
|
||||||
<form action="index.php?sec=reporting&sec2=godmode/reporting/graph_builder" method="post">
|
<form action="index.php?sec=reporting&sec2=godmode/reporting/graph_builder" method="post">
|
||||||
<input type="submit" class="button_task" value="<?php echo __('Create Custom Graph'); ?>" />
|
<input type="submit" class="button_task" value="<?php echo __('Create Custom Graph'); ?>" />
|
||||||
</form>
|
</form>
|
||||||
|
@ -33,13 +33,13 @@ if ($incident_w || $incident_m) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="text_task">
|
<div class="text_task">
|
||||||
<h3> <?php echo __('Create Incidents'); ?></h3>
|
<h3> <?php echo __('Create Incidents'); ?></h3>
|
||||||
<p id="description_task"> <?php echo __("Besides receiving and processing data to monitor systems or applications,
|
<p id="description_task"> <?php echo __("Besides receiving and processing data to monitor systems or applications,
|
||||||
you're also required to monitor possible incidents which might take place on these systems within the system monitoring process.
|
you're also required to monitor possible incidents which might take place on these subsystems within the system's monitoring process.
|
||||||
For it, the Pandora FMS team has designed an incident manager within which any user is able to open incidents,
|
For it, the %s team has designed an incident manager from which any user is able to open incidents,
|
||||||
explaining what's happened on the network and to update them with comments and files any time in case there is a need to do so.
|
that explain what's happened on the network, and update them with comments and files, at any time, in case there is a need to do so.
|
||||||
This system allows the users to work as a team, along with different roles and work-flow systems which allows an incident to be
|
This system allows users to work as a team, along with different roles and work-flow systems which allow an incident to be
|
||||||
moved from one group to another, and that members from different groups and different people could work on the same incident, sharing information and files.
|
moved from one group to another, and members from different groups and different people could work on the same incident, sharing information and files.
|
||||||
"); ?></p>
|
", get_product_name()); ?></p>
|
||||||
<form action="index.php?sec=workspace&sec2=operation/incidents/incident_detail&insert_form=1" method="post">
|
<form action="index.php?sec=workspace&sec2=operation/incidents/incident_detail&insert_form=1" method="post">
|
||||||
<input type="submit" class="button_task" value="<?php echo __('Create Incidents'); ?>" />
|
<input type="submit" class="button_task" value="<?php echo __('Create Incidents'); ?>" />
|
||||||
</form>
|
</form>
|
||||||
|
@ -33,11 +33,15 @@ if ($vconsoles_write || $vconsoles_manage) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="text_task">
|
<div class="text_task">
|
||||||
<h3> <?php echo __('Create Visual Console'); ?></h3>
|
<h3> <?php echo __('Create Visual Console'); ?></h3>
|
||||||
<p id="description_task"> <?php echo __("Pandora FMS allows you to create visual maps in which each user is able to create his own monitoring map.
|
<p id="description_task"> <?php echo __(
|
||||||
The new visual console editor is much more practical, although the old visual console editor had its advantages.
|
"%s allows users to create visual maps on which each user is able to create his or her " .
|
||||||
Within the new visual console, we've been successful in imitating the sensation and touch of a drawing application like GIMP.
|
"own monitoring map. The new visual console editor is much more practical, although the prior " .
|
||||||
We've also simplified the editor by dividing it into several subject-matter tabs named 'Data', 'Preview', 'Wizard', 'List of Elements' and 'Editor'.
|
"visual console editor had its advantages. On the new visual console, we've been successful in " .
|
||||||
The elements the Pandora FMS Visual Map was designed to handle are 'static image', 'percentage bar', 'module graph' and 'simple value'. "); ?></p>
|
"imitating the sensation and touch of a drawing application like GIMP. We've also simplified the " .
|
||||||
|
"editor by dividing it into several subject-divided tabs named 'Data', 'Preview', 'Wizard', 'List of " .
|
||||||
|
"Elements' and 'Editor'. The items the %s Visual Map was designed to handle are " .
|
||||||
|
"'static images', 'percentage bars', 'module graphs' and 'simple values'.",
|
||||||
|
get_product_name(), get_product_name()); ?></p>
|
||||||
<form action="index.php?sec=network&sec2=godmode/reporting/visual_console_builder" method="post">
|
<form action="index.php?sec=network&sec2=godmode/reporting/visual_console_builder" method="post">
|
||||||
<?php html_print_input_hidden ('edit_layout', 1); ?>
|
<?php html_print_input_hidden ('edit_layout', 1); ?>
|
||||||
<input type="submit" class="button_task" value="<?php echo __('Create Visual Console'); ?>" />
|
<input type="submit" class="button_task" value="<?php echo __('Create Visual Console'); ?>" />
|
||||||
|
@ -26,10 +26,11 @@ ui_require_css_file ('firts_task');
|
|||||||
</div>
|
</div>
|
||||||
<div class="text_task">
|
<div class="text_task">
|
||||||
<h3> <?php echo __('Create Planned Downtime'); ?></h3>
|
<h3> <?php echo __('Create Planned Downtime'); ?></h3>
|
||||||
<p id="description_task"> <?php echo __("Pandora FMS contains a scheduled downtime management system.
|
<p id="description_task"> <?php echo __("%s contains a scheduled downtime management system.
|
||||||
This system was designed to deactivate the alerts in the intervals whenever there is down time by deactivating the agent.
|
This system was designed to deactivate alerts during specific intervals whenever there is down time by deactivating the agent.
|
||||||
If an agent is deactivated, it doesn't collect information. In a down time, the down-time intervals aren't taken into
|
If an agent is deactivated, it doesn't gather information. During down time, down-time intervals aren't taken into
|
||||||
account for most of the metrics or types of reports, because the agents don't contain any data within those intervals. "); ?></p>
|
account for most metrics or report types, because agents don't contain any data within those intervals.",
|
||||||
|
get_product_name()); ?></p>
|
||||||
<form action="index.php?sec=estado&sec2=godmode/agentes/planned_downtime.editor" method="post">
|
<form action="index.php?sec=estado&sec2=godmode/agentes/planned_downtime.editor" method="post">
|
||||||
<input type="submit" class="button_task" value="<?php echo __('Create Planned Downtime'); ?>" />
|
<input type="submit" class="button_task" value="<?php echo __('Create Planned Downtime'); ?>" />
|
||||||
</form>
|
</form>
|
||||||
|
@ -26,9 +26,9 @@ ui_require_css_file ('firts_task');
|
|||||||
</div>
|
</div>
|
||||||
<div class="text_task">
|
<div class="text_task">
|
||||||
<h3> <?php echo __('Create Tags'); ?></h3>
|
<h3> <?php echo __('Create Tags'); ?></h3>
|
||||||
<p id="description_task"> <?php echo __("From Pandora FMS versions 5 and above, the access to modules can be configured by a tags system.
|
<p id="description_task"> <?php echo __("Access to modules can be configured by a tagging system.
|
||||||
Tags are configured on the system and be assigned to the chosen modules.
|
Tags are configured on the system and are assigned to the chosen modules.
|
||||||
The user's access can be limited to modules with certain tags in this way. "); ?></p>
|
A user's access can therefore be restricted to modules with certain tags."); ?></p>
|
||||||
<form action="index.php?sec=gmodules&sec2=godmode/tag/edit_tag&action=new" method="post">
|
<form action="index.php?sec=gmodules&sec2=godmode/tag/edit_tag&action=new" method="post">
|
||||||
<input type="submit" class="button_task" value="<?php echo __('Create Tags'); ?>" />
|
<input type="submit" class="button_task" value="<?php echo __('Create Tags'); ?>" />
|
||||||
</form>
|
</form>
|
||||||
|
@ -45,11 +45,11 @@ else{
|
|||||||
$build_package_version = $current_package;
|
$build_package_version = $current_package;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo sprintf(__('Pandora FMS %s - Build %s - MR %s', $pandora_version, $build_package_version, $config["MR"]));
|
echo sprintf(__('%s %s - Build %s - MR %s', get_product_name(), $pandora_version, $build_package_version, $config["MR"]));
|
||||||
|
|
||||||
echo '</a><br />';
|
echo '</a><br />';
|
||||||
echo '<a class="white footer">'. __('Page generated at') . ' '. date('F j, Y h:i a'); //Always use timestamp here
|
echo '<a class="white footer">'. __('Page generated at') . ' '. date('F j, Y h:i a'); //Always use timestamp here
|
||||||
echo '</a><br /><span style="color:#eff">'.__("® Ártica ST").'</span>';
|
echo '</a><br /><span style="color:#eff">® '.get_copyright_notice().'</span>';
|
||||||
|
|
||||||
if (isset ($config['debug'])) {
|
if (isset ($config['debug'])) {
|
||||||
$cache_info = array();
|
$cache_info = array();
|
||||||
|
@ -31,14 +31,14 @@ config_check();
|
|||||||
$custom_logo = 'images/custom_logo/' . $config['custom_logo'];
|
$custom_logo = 'images/custom_logo/' . $config['custom_logo'];
|
||||||
|
|
||||||
if (!defined ('PANDORA_ENTERPRISE')) {
|
if (!defined ('PANDORA_ENTERPRISE')) {
|
||||||
$logo_title = 'Pandora FMS Opensource';
|
$logo_title = get_product_name() . ' Opensource';
|
||||||
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png';
|
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (file_exists(ENTERPRISE_DIR . '/' . $custom_logo)) {
|
if (file_exists(ENTERPRISE_DIR . '/' . $custom_logo)) {
|
||||||
$custom_logo = ENTERPRISE_DIR . '/' . $custom_logo;
|
$custom_logo = ENTERPRISE_DIR . '/' . $custom_logo;
|
||||||
}
|
}
|
||||||
$logo_title = 'Pandora FMS Enterprise';
|
$logo_title = get_product_name() . ' Enterprise';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo html_print_image($custom_logo, true,
|
echo html_print_image($custom_logo, true,
|
||||||
@ -158,7 +158,7 @@ config_check();
|
|||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($config['tutorial_mode'] !== 'expert') {
|
if ($config['tutorial_mode'] !== 'expert' && !$config['disable_help']) {
|
||||||
$table->data[0]['clippy'] =
|
$table->data[0]['clippy'] =
|
||||||
'<a href="javascript: show_clippy();">' .
|
'<a href="javascript: show_clippy();">' .
|
||||||
html_print_image(
|
html_print_image(
|
||||||
@ -166,8 +166,8 @@ config_check();
|
|||||||
true,
|
true,
|
||||||
array("id" => 'clippy',
|
array("id" => 'clippy',
|
||||||
"class" => 'clippy',
|
"class" => 'clippy',
|
||||||
"alt" => __('Pandora FMS assistant'),
|
"alt" => __('%s assistant', get_product_name()),
|
||||||
'title' => __('Pandora FMS assistant'))) .
|
'title' => __('%s assistant', get_product_name()))) .
|
||||||
'</a>';
|
'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,11 +307,15 @@ config_check();
|
|||||||
$table->data[0][3] = $maintenance_img;
|
$table->data[0][3] = $maintenance_img;
|
||||||
|
|
||||||
// Main help icon
|
// Main help icon
|
||||||
$table->data[0][4] = '<a href="#" class="modalpopup" id="helpmodal">'.html_print_image("images/header_help.png",
|
if (!$config['disable_help']) {
|
||||||
true, array(
|
$table->data[0][4] =
|
||||||
"title" => __('Main help'),
|
'<a href="#" class="modalpopup" id="helpmodal">' .
|
||||||
"id" => "helpmodal",
|
html_print_image("images/header_help.png", true, array(
|
||||||
"class" => "modalpopup")).'</a>';
|
"title" => __('Main help'),
|
||||||
|
"id" => "helpmodal",
|
||||||
|
"class" => "modalpopup")) .
|
||||||
|
'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
// Logout
|
// Logout
|
||||||
$table->data[0][5] = '<a class="white" href="' . ui_get_full_url('index.php?bye=bye') . '">';
|
$table->data[0][5] = '<a class="white" href="' . ui_get_full_url('index.php?bye=bye') . '">';
|
||||||
@ -461,14 +465,9 @@ config_check();
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($_GET["refr"]) {
|
if ($_GET["refr"]) {
|
||||||
$_get_refr = strip_tags($_GET["refr"]);
|
|
||||||
?>
|
?>
|
||||||
refr_time = parseInt("<?php echo $_get_refr; ?>");
|
var refr_time = <?php echo (int) get_parameter("refr", 0); ?>;
|
||||||
if (isNaN(refr_time)) {
|
var t = new Date();
|
||||||
refr_time = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
t = new Date();
|
|
||||||
t.setTime (t.getTime () +
|
t.setTime (t.getTime () +
|
||||||
parseInt(<?php echo $config["refr"] * 1000; ?>));
|
parseInt(<?php echo $config["refr"] * 1000; ?>));
|
||||||
$("#refrcounter").countdown ({until: t,
|
$("#refrcounter").countdown ({until: t,
|
||||||
|
@ -36,10 +36,11 @@ if (is_ajax()) {
|
|||||||
|
|
||||||
// Prints help dialog information
|
// Prints help dialog information
|
||||||
echo '<div id="login_help_dialog" title="' .
|
echo '<div id="login_help_dialog" title="' .
|
||||||
__('Welcome to Pandora FMS') . '" style="">';
|
__('Welcome to %s', get_product_name()) . '" style="">';
|
||||||
|
|
||||||
echo '<div style="font-size: 10pt; margin: 20px;">';
|
echo '<div style="font-size: 10pt; margin: 20px;">';
|
||||||
echo __('If this is your first time with Pandora FMS, we propose you a few links to learn more about Pandora FMS. Monitoring could be overwhelm, but take your time to learn how to use the power of Pandora FMS!');
|
echo __("If this is your first time using %s, we suggest a few links that'll help you learn more about the software. Monitoring can be overwhelming, but take your time to learn how to harness the power of %s!",
|
||||||
|
get_product_name(), get_product_name());
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<div style="">';
|
echo '<div style="">';
|
||||||
@ -70,11 +71,11 @@ echo '<div id="login_help_dialog" title="' .
|
|||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
echo '<td style="border:1px solid #FFF; text-align:center;">';
|
echo '<td style="border:1px solid #FFF; text-align:center;">';
|
||||||
echo '<a href="http://pandorafms.com/pandora/doc/en" target="_blank" style="text-decoration:none;">' .
|
echo '<a href="' . $config['custom_docs_url'] . '" target="_blank" style="text-decoration:none;">' .
|
||||||
html_print_image('images/documentation.png', true,
|
html_print_image('images/documentation.png', true,
|
||||||
array("alt" => __('Documentation'), "border" => 0)) . '</a>';
|
array("alt" => __('Documentation'), "border" => 0)) . '</a>';
|
||||||
echo '<br style="margin-bottom: 40px;" />';
|
echo '<br style="margin-bottom: 40px;" />';
|
||||||
echo '<a style="font-size: 9pt;" href="http://pandorafms.com/pandora/doc/en" target="_blank">' . __('Documentation') . '</span></a>';
|
echo '<a style="font-size: 9pt;" href="' . $config['custom_docs_url'] . '" target="_blank">' . __('Documentation') . '</span></a>';
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
|
@ -138,17 +138,17 @@ if ($email == 'admin@example.com') $email = '';
|
|||||||
|
|
||||||
// Prints accept register license
|
// Prints accept register license
|
||||||
echo '<div id="login_accept_register" title="' .
|
echo '<div id="login_accept_register" title="' .
|
||||||
__('The Pandora FMS community wizard') . '" style="">';
|
__('The %s community wizard', get_product_name()) . '" style="">';
|
||||||
echo '<div style="margin: 5px 0 10px; float: left; padding-left: 15px;">';
|
echo '<div style="margin: 5px 0 10px; float: left; padding-left: 15px;">';
|
||||||
echo html_print_image ('images/pandora_circle_big.png', true);
|
echo html_print_image ('images/pandora_circle_big.png', true);
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<div style="font-size: 12pt; margin: 5px 20px; float: left; padding-top: 23px;">';
|
echo '<div style="font-size: 12pt; margin: 5px 20px; float: left; padding-top: 23px;">';
|
||||||
echo __('Stay up to date with the Pandora FMS community') . ".";
|
echo __('Stay up to date with the %s community', get_product_name()) . ".";
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<div id="license_newsletter">';
|
echo '<div id="license_newsletter">';
|
||||||
echo '<p>' . __("When you subscribe to the Pandora FMS Update Manager service, you accept that we register your Pandora instance as an identifier on the database owned by Artica TS. This data will solely be used to provide you with information about Pandora FMS and will not be conceded to third parties. You'll be able to unregister from said database at any time from the Update Manager options") . '.</p>';
|
echo '<p>' . __("When you subscribe to the %s Update Manager service, you accept that we register your %s instance as an identifier on the database owned by Artica TS. This data will solely be used to provide you with information about %s and will not be conceded to third parties. You can unregister from said database at any time from the Update Manager options.", get_product_name(), get_product_name(), get_product_name()) . '</p>';
|
||||||
echo '<p>' . __("In the same fashion, when subscribed to the newsletter you accept that your email will pass on to a database property of Artica TS. This data will solely be used to provide you with information about Pandora FMS and will not be conceded to third parties. You'll be able to unregister from said database at any time from the newsletter subscription options") . '.</p>';
|
echo '<p>' . __("In the same fashion, when subscribed to the newsletter you accept that your email will pass on to a database property of Artica TS. This data will solely be used to provide you with information about %s and will not be conceded to third parties. You can unregister from said database at any time from the newsletter subscription options.", get_product_name()) . '</p>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<div style="position:absolute; margin: 0 auto; bottom: 0px; padding-top:10px; position:relative; border: 1px solid #FFF;">';
|
echo '<div style="position:absolute; margin: 0 auto; bottom: 0px; padding-top:10px; position:relative; border: 1px solid #FFF;">';
|
||||||
@ -161,7 +161,7 @@ echo '<div id="login_accept_register" title="' .
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<div style="float: left; margin-left: 0px; width: 50%; text-align: left;">';
|
echo '<div style="float: left; margin-left: 0px; width: 50%; text-align: left;">';
|
||||||
html_print_checkbox('register', 1, false, false, false, 'cursor: \'pointer\'');
|
html_print_checkbox('register', 1, false, false, false, 'cursor: \'pointer\'');
|
||||||
echo ' <span style="font-size: 12px;" id="label-register">' .__("Join the Pandora FMS community") . '!</span><br>';
|
echo ' <span style="font-size: 12px;" id="label-register">' .__('Join the %s community!', get_product_name()) . '!</span><br>';
|
||||||
html_print_checkbox('newsletter', 1, false, false, false, 'cursor: \'pointer\'');
|
html_print_checkbox('newsletter', 1, false, false, false, 'cursor: \'pointer\'');
|
||||||
echo ' <span style="font-size: 12px;" id="label-newsletter">' .__("Subscribe to our newsletter") . '</span>';
|
echo ' <span style="font-size: 12px;" id="label-newsletter">' .__("Subscribe to our newsletter") . '</span>';
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
@ -176,7 +176,7 @@ echo '</div>';
|
|||||||
|
|
||||||
// Print yes or not dialog
|
// Print yes or not dialog
|
||||||
echo '<div id="login_registration_yesno" title="' .
|
echo '<div id="login_registration_yesno" title="' .
|
||||||
__('Pandora FMS instance identification wizard') . '" style="">';
|
__("%s instance identification wizard", get_product_name()) . '" style="">';
|
||||||
echo '<div style="font-size: 12pt; margin: 20px;">';
|
echo '<div style="font-size: 12pt; margin: 20px;">';
|
||||||
echo __("Do you want to continue without any registration") . "?";
|
echo __("Do you want to continue without any registration") . "?";
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
@ -50,7 +50,7 @@ if (!isset($login_screen)) {
|
|||||||
switch ($login_screen) {
|
switch ($login_screen) {
|
||||||
case 'login':
|
case 'login':
|
||||||
$logo_link = 'http://www.pandorafms.com';
|
$logo_link = 'http://www.pandorafms.com';
|
||||||
$logo_title = __('Go to Pandora FMS Website');
|
$logo_title = __('Go to %s Website', get_product_name());
|
||||||
break;
|
break;
|
||||||
case 'logout':
|
case 'logout':
|
||||||
case 'double_auth':
|
case 'double_auth':
|
||||||
@ -86,31 +86,39 @@ if (!empty($config['login_background'])) {
|
|||||||
$background_url = "images/backgrounds/" . $config['login_background'];
|
$background_url = "images/backgrounds/" . $config['login_background'];
|
||||||
$login_body_style = "style=\"background-image: url('$background_url');\"";
|
$login_body_style = "style=\"background-image: url('$background_url');\"";
|
||||||
}
|
}
|
||||||
|
// Get the custom icons
|
||||||
|
$docs_logo = ui_get_docs_logo();
|
||||||
|
$support_logo = ui_get_support_logo();
|
||||||
echo '<div id="login_body" ' . $login_body_style . '>';
|
echo '<div id="login_body" ' . $login_body_style . '>';
|
||||||
echo '<div id="header_login">';
|
echo '<div id="header_login">';
|
||||||
echo '<div id="icon_custom_pandora">';
|
echo '<div id="icon_custom_pandora">';
|
||||||
|
|
||||||
if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) {
|
if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) {
|
||||||
if(isset ($config['custom_logo'])){
|
if(isset ($config['custom_logo'])){
|
||||||
echo '<img src="enterprise/images/custom_logo/' . $config['custom_logo'] .'" alt="pandora_console">';
|
echo '<img src="enterprise/images/custom_logo/' . $config['custom_logo'] .'" alt="monitoring_console">';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
echo '<img src="images/custom_logo/pandora_logo_head_4.png" alt="pandora_console">';
|
echo '<img src="images/custom_logo/pandora_logo_head_4.png" alt="monitoring_console">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
echo '<img src="images/custom_logo/pandora_logo_head_3.png" alt="pandora_console">';
|
echo '<img src="images/custom_logo/pandora_logo_head_3.png" alt="monitoring_console">';
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<div id="list_icon_docs_support"><ul>';
|
echo '<div id="list_icon_docs_support"><ul style="line-height: 36px;">';
|
||||||
echo '<li><a href="'.$config['custom_docs_url'].'" target="_blank"><img src="images/icono_docs.png" alt="docs pandora"></a></li>';
|
if ($docs_logo !== false) {
|
||||||
echo '<li>' . __('Docs') . '</li>';
|
echo '<li><a href="'.$config['custom_docs_url'].'" target="_blank"><img src="' . $docs_logo . '" alt="docs"></a></li>';
|
||||||
if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) {
|
}
|
||||||
echo '<li id="li_margin_left"><a href="'.$config['custom_support_url'].'" target="_blank"><img src="images/icono_support.png" alt="support pandora"></a></li>';
|
echo '<li><a style="color: white; font-size:inherit;" href="'.$config['custom_docs_url'].'" target="_blank">' . __('Docs') . '</li>';
|
||||||
} else {
|
if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) {
|
||||||
echo '<li id="li_margin_left"><a href="https://pandorafms.com/monitoring-services/support/" target="_blank"><img src="images/icono_support.png" alt="support pandora"></a></li>';
|
if ($support_logo !== false) {
|
||||||
|
echo '<li id="li_margin_left"><a href="'.$config['custom_support_url'].'" target="_blank"><img src="' . $support_logo .'" alt="support"></a></li>';
|
||||||
|
}
|
||||||
|
echo '<li><a style="color: white; font-size:inherit;" href="'.$config['custom_support_url'].'" target="_blank">' . __('Support') . '</li>';
|
||||||
|
} else {
|
||||||
|
echo '<li id="li_margin_left"><a href="https://pandorafms.com/monitoring-services/support/" target="_blank"><img src="' . $support_logo .'" alt="support"></a></li>';
|
||||||
|
echo '<li>' . __('Support') . '</li>';
|
||||||
}
|
}
|
||||||
echo '<li>' . __('Support') . '</li>';
|
|
||||||
echo '</ul></div>';
|
echo '</ul></div>';
|
||||||
|
|
||||||
|
|
||||||
@ -250,17 +258,17 @@ echo '<div class="login_page">';
|
|||||||
echo '</form></div>';
|
echo '</form></div>';
|
||||||
echo '<div class="login_data">';
|
echo '<div class="login_data">';
|
||||||
echo '<div class ="text_banner_login">';
|
echo '<div class ="text_banner_login">';
|
||||||
echo '<div><span class="span1">';
|
echo '<div><span class="span1 pandora_upper">';
|
||||||
if(file_exists (ENTERPRISE_DIR . "/load_enterprise.php")){
|
if(file_exists (ENTERPRISE_DIR . "/load_enterprise.php")){
|
||||||
if($config['custom_title1_login']){
|
if($config['custom_title1_login']){
|
||||||
echo io_safe_output($config['custom_title1_login']);
|
echo io_safe_output($config['custom_title1_login']);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
echo __('WELCOME TO PANDORA FMS');
|
echo __('WELCOME TO %s', get_product_name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
echo __('WELCOME TO PANDORA FMS');
|
echo __('WELCOME TO %s', get_product_name());
|
||||||
}
|
}
|
||||||
echo '</span></div>';
|
echo '</span></div>';
|
||||||
echo '<div><span class="span2">';
|
echo '<div><span class="span2">';
|
||||||
@ -380,7 +388,7 @@ if ($login_screen == 'logout'){
|
|||||||
echo '<div class="content_message_alert">';
|
echo '<div class="content_message_alert">';
|
||||||
echo '<div class="text_message_alert">';
|
echo '<div class="text_message_alert">';
|
||||||
echo '<h1>'. __('Logged out') .'</h1>';
|
echo '<h1>'. __('Logged out') .'</h1>';
|
||||||
echo '<p>' . __('Your session is over. Please close your browser window to close this Pandora session.') .'</p>';
|
echo '<p>' . __('Your session has ended. Please close your browser window to close this %s session.', get_product_name()) .'</p>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<div class="button_message_alert">';
|
echo '<div class="button_message_alert">';
|
||||||
html_print_submit_button("Ok", 'hide-login-logout', false);
|
html_print_submit_button("Ok", 'hide-login-logout', false);
|
||||||
@ -393,7 +401,7 @@ if ($login_screen == 'logout'){
|
|||||||
switch ($login_screen) {
|
switch ($login_screen) {
|
||||||
case 'error_authconfig':
|
case 'error_authconfig':
|
||||||
case 'error_dbconfig':
|
case 'error_dbconfig':
|
||||||
$title = __('Problem with Pandora FMS database');
|
$title = __('Problem with %s database', get_product_name());
|
||||||
$message = __('Cannot connect to the database, please check your database setup in the <b>include/config.php</b> file.<i><br/><br/>
|
$message = __('Cannot connect to the database, please check your database setup in the <b>include/config.php</b> file.<i><br/><br/>
|
||||||
Probably your database, hostname, user or password values are incorrect or
|
Probably your database, hostname, user or password values are incorrect or
|
||||||
the database server is not running.').'<br /><br />';
|
the database server is not running.').'<br /><br />';
|
||||||
@ -404,21 +412,22 @@ switch ($login_screen) {
|
|||||||
|
|
||||||
if ($error_code == 'error_authconfig') {
|
if ($error_code == 'error_authconfig') {
|
||||||
$message .= '<br/><br/>';
|
$message .= '<br/><br/>';
|
||||||
$message .= __('If you have modified auth system, this problem could be because Pandora cannot override authorization variables from the config database. Remove them from your database by executing:<br><pre>DELETE FROM tconfig WHERE token = "auth";</pre>');
|
$message .= __('If you have modified the auth system, the origin of this problem could be that %s cannot override the authorization variables from the config database. Please remove them from your database by executing:<br><pre>DELETE FROM tconfig WHERE token = "auth";</pre>', get_product_name());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'error_emptyconfig':
|
case 'error_emptyconfig':
|
||||||
$title = __('Empty configuration table');
|
$title = __('Empty configuration table');
|
||||||
$message = __('Cannot load configuration variables from database. Please check your database setup in the
|
$message = __('Cannot load configuration variables from database. Please check your database setup in the
|
||||||
<b>include/config.php</b> file.<i><br><br>
|
<b>include/config.php</b> file.<i><br><br>
|
||||||
Most likely your database schema has been created but there are is no data in it, you have a problem with the database access credentials or your schema is out of date.
|
Most likely your database schema has been created but there are is no data in it, you have a problem with the database access credentials or your schema is out of date.
|
||||||
<br><br>Pandora FMS Console cannot find <i>include/config.php</i> or this file has invalid
|
<br><br>%s Console cannot find <i>include/config.php</i> or this file has invalid
|
||||||
permissions and HTTP server cannot read it. Please read documentation to fix this problem.</i>').'<br /><br />';
|
permissions and HTTP server cannot read it. Please read documentation to fix this problem.</i>',
|
||||||
|
get_product_name()).'<br /><br />';
|
||||||
break;
|
break;
|
||||||
case 'error_noconfig':
|
case 'error_noconfig':
|
||||||
$title = __('No configuration file found');
|
$title = __('No configuration file found');
|
||||||
$message = __('Pandora FMS Console cannot find <i>include/config.php</i> or this file has invalid
|
$message = __('%s Console cannot find <i>include/config.php</i> or this file has invalid
|
||||||
permissions and HTTP server cannot read it. Please read documentation to fix this problem.').'<br /><br />';
|
permissions and HTTP server cannot read it. Please read documentation to fix this problem.', get_product_name()).'<br /><br />';
|
||||||
if (file_exists('install.php')) {
|
if (file_exists('install.php')) {
|
||||||
$link_start = '<a href="install.php">';
|
$link_start = '<a href="install.php">';
|
||||||
$link_end = '</a>';
|
$link_end = '</a>';
|
||||||
@ -433,7 +442,7 @@ switch ($login_screen) {
|
|||||||
case 'error_install':
|
case 'error_install':
|
||||||
$title = __('Installer active');
|
$title = __('Installer active');
|
||||||
$message = __('For security reasons, normal operation is not possible until you delete installer file.
|
$message = __('For security reasons, normal operation is not possible until you delete installer file.
|
||||||
Please delete the <i>./install.php</i> file before running Pandora FMS Console.');
|
Please delete the <i>./install.php</i> file before running %s Console.', get_product_name());
|
||||||
break;
|
break;
|
||||||
case 'error_perms':
|
case 'error_perms':
|
||||||
$title = __('Bad permission for include/config.php');
|
$title = __('Bad permission for include/config.php');
|
||||||
|
@ -66,10 +66,10 @@ if ($email == 'admin@example.com') $email = '';
|
|||||||
|
|
||||||
// Prints first step pandora registration
|
// Prints first step pandora registration
|
||||||
echo '<div id="login_id_dialog" title="' .
|
echo '<div id="login_id_dialog" title="' .
|
||||||
__('Pandora FMS instance identification wizard') . '" style="display: none;">';
|
__('%s instance identification wizard', get_product_name()) . '" style="display: none;">';
|
||||||
|
|
||||||
echo '<div style="font-size: 10pt; margin: 20px;">';
|
echo '<div style="font-size: 10pt; margin: 20px;">';
|
||||||
echo __('Please fill the following information in order to configure your Pandora FMS instance successfully') . '.';
|
echo __('Please fill the following information in order to configure your %s instance successfully', get_product_name()) . '.';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<div style="">';
|
echo '<div style="">';
|
||||||
@ -83,7 +83,7 @@ echo '<div id="login_id_dialog" title="' .
|
|||||||
$table->size[1] = '60%';
|
$table->size[1] = '60%';
|
||||||
$table->border = '5px solid';
|
$table->border = '5px solid';
|
||||||
|
|
||||||
$table->data[0][0] = __('Language code for Pandora');
|
$table->data[0][0] = __('Language code');
|
||||||
$table->data[0][1] = html_print_select_from_sql (
|
$table->data[0][1] = html_print_select_from_sql (
|
||||||
'SELECT id_language, name FROM tlanguage',
|
'SELECT id_language, name FROM tlanguage',
|
||||||
'language', $config['language'] , '', '', '', true);
|
'language', $config['language'] , '', '', '', true);
|
||||||
|
@ -29,8 +29,6 @@ require_once ("include/functions_reporting.php");
|
|||||||
require_once ("include/functions_tactical.php");
|
require_once ("include/functions_tactical.php");
|
||||||
require_once ($config["homedir"] . '/include/functions_graph.php');
|
require_once ($config["homedir"] . '/include/functions_graph.php');
|
||||||
|
|
||||||
//ui_print_page_header (__('Welcome to Pandora FMS Web Console'),'',false,"",false);
|
|
||||||
|
|
||||||
if (tags_has_user_acl_tags()) {
|
if (tags_has_user_acl_tags()) {
|
||||||
ui_print_tags_warning();
|
ui_print_tags_warning();
|
||||||
}
|
}
|
||||||
@ -111,7 +109,7 @@ if (!empty($all_data)) {
|
|||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
$table->headstyle[0] = 'text-align:center;';
|
$table->headstyle[0] = 'text-align:center;';
|
||||||
$table->width = "100%";
|
$table->width = "100%";
|
||||||
$table->head[0] = '<span>' . __('Pandora FMS Overview') . '</span>';
|
$table->head[0] = '<span>' . __('%s Overview', get_product_name()) . '</span>';
|
||||||
$table->head_colspan[0] = 4;
|
$table->head_colspan[0] = 4;
|
||||||
|
|
||||||
// Indicators
|
// Indicators
|
||||||
@ -226,7 +224,7 @@ if (!empty($all_data)) {
|
|||||||
$table->head[2] = __('Date');
|
$table->head[2] = __('Date');
|
||||||
$table->head[3] = __('Source IP');
|
$table->head[3] = __('Source IP');
|
||||||
$table->head[4] = __('Comments');
|
$table->head[4] = __('Comments');
|
||||||
$table->title = '<span>' . __('This is your last activity in Pandora FMS console') . '</span>';
|
$table->title = '<span>' . __('This is your last activity performed on the %s console', get_product_name()) . '</span>';
|
||||||
|
|
||||||
switch ($config["dbtype"]) {
|
switch ($config["dbtype"]) {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
@ -294,198 +292,4 @@ if (!empty($all_data)) {
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
|
||||||
return;
|
|
||||||
// ---------------------------------------------------------------------
|
|
||||||
// Site news !
|
|
||||||
// ---------------------------------------------------------------------
|
|
||||||
|
|
||||||
//echo '<div id="left_column_logon_ok" id="leftcolumn">';
|
|
||||||
echo '<div style="width:30%; float:left;" id="leftcolumn">';
|
|
||||||
|
|
||||||
///////////////
|
|
||||||
// Overview Table
|
|
||||||
///////////////
|
|
||||||
|
|
||||||
$table->class = "databox";
|
|
||||||
$table->cellpadding = 4;
|
|
||||||
$table->cellspacing = 4;
|
|
||||||
$table->head = array ();
|
|
||||||
$table->data = array ();
|
|
||||||
$table->style[0] = 'text-align:center;';
|
|
||||||
$table->width = "100%";
|
|
||||||
$table->head[0] = '<span>' . __('Pandora FMS Overview') . '</span>';
|
|
||||||
$table->head_colspan[0] = 4;
|
|
||||||
|
|
||||||
// Indicators
|
|
||||||
$tdata = array();
|
|
||||||
$tdata[0] = reporting_get_stats_indicators($data);
|
|
||||||
$table->rowclass[] = '';
|
|
||||||
|
|
||||||
$table->data[] = $tdata;
|
|
||||||
|
|
||||||
// Alerts
|
|
||||||
$tdata = array();
|
|
||||||
$tdata[0] = reporting_get_stats_alerts($data);
|
|
||||||
$table->rowclass[] = '';
|
|
||||||
$table->data[] = $tdata;
|
|
||||||
|
|
||||||
// Modules by status
|
|
||||||
$tdata = array();
|
|
||||||
$tdata[0] = reporting_get_stats_modules_status($data);
|
|
||||||
$table->rowclass[] = '';
|
|
||||||
$table->data[] = $tdata;
|
|
||||||
|
|
||||||
// Total agents and modules
|
|
||||||
$tdata = array();
|
|
||||||
$tdata[0] = reporting_get_stats_agents_monitors($data);
|
|
||||||
$table->rowclass[] = '';
|
|
||||||
$table->data[] = $tdata;
|
|
||||||
|
|
||||||
// Users
|
|
||||||
$tdata = array();
|
|
||||||
$tdata[0] = reporting_get_stats_users($data);
|
|
||||||
$table->rowclass[] = '';
|
|
||||||
$table->data[] = $tdata;
|
|
||||||
|
|
||||||
html_print_table($table);
|
|
||||||
unset($table);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Site stats (global!)
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
//echo '<div id="right_column_logon_ok" id="rightcolumn">';
|
|
||||||
echo '<div style="width: 50%; float:left;" id="rightcolumn">';
|
|
||||||
|
|
||||||
$options = array();
|
|
||||||
$options['id_user'] = $config['id_user'];
|
|
||||||
$options['modal'] = false;
|
|
||||||
$options['limit'] = 3;
|
|
||||||
$news = get_news($options);
|
|
||||||
|
|
||||||
|
|
||||||
if (!empty($news)) {
|
|
||||||
//////////////////NEWS BOARD/////////////////////////////
|
|
||||||
echo '<div id="news_board">';
|
|
||||||
|
|
||||||
echo '<table cellpadding="4" cellspacing="4" class="databox">';
|
|
||||||
echo '<tr><th><span>' . __('News board') . '</span></th></tr>';
|
|
||||||
if ($config["prominent_time"] == "timestamp") {
|
|
||||||
$comparation_suffix = "";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$comparation_suffix = __('ago');
|
|
||||||
}
|
|
||||||
foreach ($news as $article) {
|
|
||||||
$text = io_safe_output($article["text"]);
|
|
||||||
|
|
||||||
|
|
||||||
echo '<tr><th><b>'.$article["subject"].'</b></th></tr>';
|
|
||||||
echo '<tr><td>' . __('by') . ' <b>' .
|
|
||||||
$article["author"] . '</b> <i>' . ui_print_timestamp ($article["timestamp"], true).'</i> ' . $comparation_suffix . '</td></tr>';
|
|
||||||
echo '<tr><td class="datos">';
|
|
||||||
echo nl2br($text);
|
|
||||||
echo '</td></tr>';
|
|
||||||
}
|
|
||||||
echo '</table>';
|
|
||||||
echo '</div>'; // News board
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo '<br><br>';
|
|
||||||
|
|
||||||
//////////////////END OF NEWS BOARD/////////////////////////////
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////LAST ACTIVITY/////////////////////////////
|
|
||||||
|
|
||||||
// Show last activity from this user
|
|
||||||
echo '<div id="activity">';
|
|
||||||
|
|
||||||
$table->width = '100%'; //Don't specify px
|
|
||||||
$table->data = array ();
|
|
||||||
$table->size = array ();
|
|
||||||
$table->size[2] = '150px';
|
|
||||||
$table->size[3] = '130px';
|
|
||||||
$table->size[5] = '200px';
|
|
||||||
$table->head = array ();
|
|
||||||
$table->head[0] = __('User');
|
|
||||||
$table->head[1] = '';
|
|
||||||
$table->head[2] = __('Action');
|
|
||||||
$table->head[3] = __('Date');
|
|
||||||
$table->head[4] = __('Source IP');
|
|
||||||
$table->head[5] = __('Comments');
|
|
||||||
$table->title = '<span>' . __('This is your last activity in Pandora FMS console') . '</span>';
|
|
||||||
|
|
||||||
switch ($config["dbtype"]) {
|
|
||||||
case "mysql":
|
|
||||||
$sql = sprintf ("SELECT id_usuario,accion,fecha,ip_origen,descripcion,utimestamp
|
|
||||||
FROM tsesion
|
|
||||||
WHERE (`utimestamp` > UNIX_TIMESTAMP(NOW()) - " . SECONDS_1WEEK . ")
|
|
||||||
AND `id_usuario` = '%s' ORDER BY `utimestamp` DESC LIMIT 10", $config["id_user"]);
|
|
||||||
break;
|
|
||||||
case "postgresql":
|
|
||||||
$sql = sprintf ("SELECT \"id_usuario\", accion, fecha, \"ip_origen\", descripcion, utimestamp
|
|
||||||
FROM tsesion
|
|
||||||
WHERE (\"utimestamp\" > ceil(date_part('epoch', CURRENT_TIMESTAMP)) - " . SECONDS_1WEEK . ")
|
|
||||||
AND \"id_usuario\" = '%s' ORDER BY \"utimestamp\" DESC LIMIT 10", $config["id_user"]);
|
|
||||||
break;
|
|
||||||
case "oracle":
|
|
||||||
$sql = sprintf ("SELECT id_usuario, accion, fecha, ip_origen, descripcion, utimestamp
|
|
||||||
FROM tsesion
|
|
||||||
WHERE ((utimestamp > ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (" . SECONDS_1DAY . ")) - " . SECONDS_1WEEK . ")
|
|
||||||
AND id_usuario = '%s') AND rownum <= 10 ORDER BY utimestamp DESC", $config["id_user"]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sessions = db_get_all_rows_sql ($sql);
|
|
||||||
|
|
||||||
if ($sessions === false)
|
|
||||||
$sessions = array ();
|
|
||||||
|
|
||||||
foreach ($sessions as $session) {
|
|
||||||
$data = array ();
|
|
||||||
|
|
||||||
switch ($config["dbtype"]) {
|
|
||||||
case "mysql":
|
|
||||||
case "oracle":
|
|
||||||
$session_id_usuario = $session['id_usuario'];
|
|
||||||
$session_ip_origen = $session['ip_origen'];
|
|
||||||
break;
|
|
||||||
case "postgresql":
|
|
||||||
$session_id_usuario = $session['id_usuario'];
|
|
||||||
$session_ip_origen = $session['ip_origen'];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$data[0] = '<strong>' . $session_id_usuario . '</strong>';
|
|
||||||
$data[1] = ui_print_session_action_icon ($session['accion'], true);
|
|
||||||
$data[2] = $session['accion'];
|
|
||||||
$data[3] = ui_print_help_tip($session['fecha'], true) . human_time_comparation($session['utimestamp'], 'tiny');
|
|
||||||
$data[4] = $session_ip_origen;
|
|
||||||
$data[5] = io_safe_output ($session['descripcion']);
|
|
||||||
|
|
||||||
array_push ($table->data, $data);
|
|
||||||
}
|
|
||||||
echo "<div style='width:100%; overflow-x:auto;'>";
|
|
||||||
html_print_table ($table);
|
|
||||||
unset($table);
|
|
||||||
echo "</div>";
|
|
||||||
echo "</div>"; // activity
|
|
||||||
|
|
||||||
//////////////////END OF LAST ACTIVIYY/////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "</div>";
|
|
||||||
echo "<div style='clear:both'></div>";
|
|
||||||
?>
|
|
@ -112,7 +112,7 @@ position:absolute;background:black;opacity:0.6;z-index:-1;left:0px;top:0px;width
|
|||||||
|
|
||||||
<div class='modalheade'>
|
<div class='modalheade'>
|
||||||
<span class='modalheadertex'>
|
<span class='modalheadertex'>
|
||||||
You don't have access to this page
|
<?php echo __("You don't have access to this page");?>
|
||||||
</span>
|
</span>
|
||||||
<img class='modalclose cerrar' src='<?php echo $config['homeurl'];?>images/icono_cerrar.png'>
|
<img class='modalclose cerrar' src='<?php echo $config['homeurl'];?>images/icono_cerrar.png'>
|
||||||
|
|
||||||
@ -121,8 +121,11 @@ position:absolute;background:black;opacity:0.6;z-index:-1;left:0px;top:0px;width
|
|||||||
<div class='modalconten'>
|
<div class='modalconten'>
|
||||||
<img class='modalcontentim' src='<?php echo $config['homeurl'];?>images/access_denied.png'>
|
<img class='modalcontentim' src='<?php echo $config['homeurl'];?>images/access_denied.png'>
|
||||||
<div class='modalcontenttex'>
|
<div class='modalcontenttex'>
|
||||||
Access to this page is restricted to authorized users only, please contact system administrator if you need assistance. <br/> <br/>
|
<?php
|
||||||
Please know that all attempts to access this page are recorded in security logs of Pandora System Database
|
echo __("Access to this page is restricted to authorized users only, please contact system administrator if you need assistance.");
|
||||||
|
echo "<br/> <br/>";
|
||||||
|
echo __("Please know that all attempts to access this page are recorded in security logs of %s System Database", get_product_name());
|
||||||
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ require_once ("../include/functions_html.php");
|
|||||||
?>
|
?>
|
||||||
<html style="height:100%; margin-top: 25px; margin-left: 15px; margin-right: 15px; background-color: #333;"><head><title>
|
<html style="height:100%; margin-top: 25px; margin-left: 15px; margin-right: 15px; background-color: #333;"><head><title>
|
||||||
<?php
|
<?php
|
||||||
echo __('Pandora FMS help system');
|
echo __('%s help system', get_product_name());
|
||||||
?>
|
?>
|
||||||
</title>
|
</title>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
@ -61,11 +61,12 @@ foreach ($files as $file) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$logo = ui_get_custom_header_logo(true);
|
||||||
|
|
||||||
if (! $id || ! file_exists ($help_file)) {
|
if (! $id || ! file_exists ($help_file)) {
|
||||||
echo '<div id="main_help" style="background-color: #fff;text-align:center; padding-top: 15px; padding-bottom: 15px; ">';
|
echo '<div id="main_help" style="background-color: #fff;text-align:center; padding-top: 15px; padding-bottom: 15px; ">';
|
||||||
if (!is_metaconsole()) {
|
if (!is_metaconsole()) {
|
||||||
echo html_print_image('images/pandora_tinylogo.png', true, array("border" => '0'));
|
echo html_print_image($logo, true, array("border" => '0'));
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<div style="font-family: verdana, arial; font-size: 11px; text-align:left; background-color: #fff;">';
|
echo '<div style="font-family: verdana, arial; font-size: 11px; text-align:left; background-color: #fff;">';
|
||||||
@ -77,7 +78,7 @@ if (! $id || ! file_exists ($help_file)) {
|
|||||||
echo "<div style='text-align: center; background-color: #fff'>";
|
echo "<div style='text-align: center; background-color: #fff'>";
|
||||||
|
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
echo '<div class="msg" style="padding-left: 30px;padding-right: 30px;padding-bottom: 15px;">'.__('Pandora FMS help system has been called with a help reference that currently don\'t exist. There is no help content to show.').'</div></div></div>';
|
echo '<div class="msg" style="padding-left: 30px;padding-right: 30px;padding-bottom: 15px;">'.__("%s help system has been called with a help reference that currently don't exist. There is no help content to show.", get_product_name()).'</div></div></div>';
|
||||||
echo '<br /><br />';
|
echo '<br /><br />';
|
||||||
echo '<div style="text-align: center; padding: 5px; font-family: verdana, arial; font-size: 11px;">';
|
echo '<div style="text-align: center; padding: 5px; font-family: verdana, arial; font-size: 11px;">';
|
||||||
include ('footer.php');
|
include ('footer.php');
|
||||||
@ -86,16 +87,11 @@ if (! $id || ! file_exists ($help_file)) {
|
|||||||
|
|
||||||
/* Show help */
|
/* Show help */
|
||||||
echo '<div id="main_help_new" style="background-color: #fff">';
|
echo '<div id="main_help_new" style="background-color: #fff">';
|
||||||
if (empty($config['enterprise_installed'])) {
|
if (!empty($config['enterprise_installed']) && is_metaconsole()) {
|
||||||
echo html_print_image('images/pandora_tinylogo_open.png', true, array("border" => '0'));
|
echo '<img src="' . $config["homeurl"] . $logo . '">';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (is_metaconsole()) {
|
echo html_print_image($logo, true, array("border" => '0'));
|
||||||
echo '<img src="'.$config["homeurl"].'images/pandora_tinylogo.png">';
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
echo html_print_image('images/pandora_tinylogo.png', true, array("border" => '0'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<div id="main_help_new_content" style="height: auto ! important;overfloat: auto;">';
|
echo '<div id="main_help_new_content" style="height: auto ! important;overfloat: auto;">';
|
||||||
|
@ -17,171 +17,181 @@
|
|||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
require_once ($config["homedir"] . '/include/functions_graph.php');
|
require_once($config["homedir"] . '/include/functions_graph.php');
|
||||||
|
|
||||||
check_login ();
|
check_login();
|
||||||
|
|
||||||
$enterprise_include = enterprise_include_once('godmode/admin_access_logs.php');
|
$enterprise_include = enterprise_include_once('godmode/admin_access_logs.php');
|
||||||
|
|
||||||
if (! check_acl ($config['id_user'], 0, "PM")) {
|
if (! check_acl($config['id_user'], 0, "PM")) {
|
||||||
db_pandora_audit( "ACL Violation",
|
db_pandora_audit("ACL Violation", "Trying to access audit view");
|
||||||
"Trying to access event viewer");
|
require("general/noaccess.php");
|
||||||
require ("general/noaccess.php");
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_print_page_header (__('Pandora audit')." » ".__('Review Logs'), "images/gm_log.png", false, "", true );
|
$offset = (int) get_parameter("offset");
|
||||||
|
$filter_type = (string) get_parameter("filter_type");
|
||||||
|
$filter_user = (string) get_parameter("filter_user");
|
||||||
|
$filter_text = (string) get_parameter("filter_text");
|
||||||
|
$filter_period = get_parameter("filter_period", null);
|
||||||
|
$filter_period = ($filter_period !== null) ? (int) $filter_period : 24;
|
||||||
|
$filter_ip = (string) get_parameter("filter_ip");
|
||||||
|
|
||||||
$offset = get_parameter ("offset", 0);
|
$filter_query = "&filter_type=" . $filter_type
|
||||||
$tipo_log = get_parameter ("tipo_log", 'all');
|
. "&filter_user=" . $filter_user
|
||||||
$user_filter = get_parameter('user_filter', 'all');
|
. "&filter_text=" . $filter_text
|
||||||
$filter_text = get_parameter('filter_text', '');
|
. "&filter_period=" . $filter_period
|
||||||
$filter_hours_old = get_parameter('filter_hours_old', 24);
|
. "&filter_ip=" . $filter_ip;
|
||||||
$filter_ip = get_parameter('filter_ip', '');
|
|
||||||
|
|
||||||
echo "<table width='100%' border='0' cellspacing='4' cellpadding='4' class='databox filters'>";
|
$csv_url = ui_get_full_url(false, false, false, false)
|
||||||
echo '<tr><td class="datost">';
|
. 'index.php?sec=gextensions&sec2=godmode/audit_log_csv'
|
||||||
echo '<div style="float: left; width: 400px;">';
|
. $filter_query;
|
||||||
echo '<b>'.__('Filter').'</b><br><br>';
|
$csv_img = html_print_image("images/csv_mc.png", true, array ("title" => __('Export to CSV')));
|
||||||
|
$header_buttons = array(
|
||||||
|
'csv' => array(
|
||||||
|
'active' => false,
|
||||||
|
'text' => '<a href="' . $csv_url . '">' . $csv_img . '</a>'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$rows = db_get_all_rows_sql ("SELECT DISTINCT(accion)
|
ui_print_page_header(__('%s audit', get_product_name()) . " » " . __('Review Logs'), "images/gm_log.png", false, "", true, $header_buttons);
|
||||||
FROM tsesion");
|
|
||||||
if (empty ($rows)) {
|
|
||||||
$rows = array ();
|
|
||||||
}
|
|
||||||
$actions = array ();
|
|
||||||
|
|
||||||
foreach ($rows as $row) {
|
$table = new stdClass();
|
||||||
$actions[$row["accion"]] = $row["accion"];
|
$table->class = "databox filters";
|
||||||
}
|
$table->cellstyle = array();
|
||||||
echo '<form name="query_sel" method="post" action="index.php?sec=glog&sec2=godmode/admin_access_logs">';
|
$table->cellstyle[0] = array();
|
||||||
$table = null;
|
$table->cellstyle[1] = array();
|
||||||
$table->width = '100%';
|
$table->cellstyle[0][0] = "text-align: right;";
|
||||||
|
$table->cellstyle[0][1] = "text-align: left;";
|
||||||
|
$table->cellstyle[0][2] = "text-align: right;";
|
||||||
|
$table->cellstyle[0][3] = "text-align: left;";
|
||||||
|
$table->cellstyle[0][4] = "text-align: right;";
|
||||||
|
$table->cellstyle[0][5] = "text-align: left;";
|
||||||
|
$table->cellstyle[1][0] = "text-align: right;";
|
||||||
|
$table->cellstyle[1][1] = "text-align: left;";
|
||||||
|
$table->cellstyle[1][2] = "text-align: right;";
|
||||||
|
$table->cellstyle[1][3] = "text-align: left;";
|
||||||
|
$table->cellstyle[1][5] = "text-align: right;";
|
||||||
$table->data = array();
|
$table->data = array();
|
||||||
$table->data[0][0] = __('Action');
|
|
||||||
$table->data[0][1] = html_print_select ($actions, 'tipo_log', $tipo_log, '', __('All'), 'all', true);
|
|
||||||
$table->data[1][0] = __('User');
|
|
||||||
$table->data[1][1] = html_print_select_from_sql('SELECT id_user, id_user AS text FROM tusuario', 'user_filter', $user_filter, '', __('All'), 'all', true);
|
|
||||||
$table->data[2][0] = __('Free text for search (*)');
|
|
||||||
$table->data[2][1] = html_print_input_text('filter_text', $filter_text, __('Free text for search (*)'), 20, 40, true);
|
|
||||||
$table->data[3][0] = __('Max. hours old');
|
|
||||||
$table->data[3][1] = html_print_input_text('filter_hours_old', $filter_hours_old, __('Max. hours old'), 3, 6, true);
|
|
||||||
$table->data[4][0] = __('IP');
|
|
||||||
$table->data[4][1] = html_print_input_text('filter_ip', $filter_ip, __('IP'), 15, 15, true);
|
|
||||||
$table->data[5][0] = '';
|
|
||||||
$table->data[5][1] = html_print_submit_button(__('Filter'), 'filter', false, 'class="sub search" style="float: right;"', true);
|
|
||||||
html_print_table($table);
|
|
||||||
echo '</form>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '<div style="float: right; width: 300px;">';
|
|
||||||
|
|
||||||
echo graphic_user_activity(300, 140);
|
$data = array();
|
||||||
|
|
||||||
echo '</div>';
|
$data[0] = "<b>" . __('Search') . "</b>";
|
||||||
echo '<div style="clear:both;"> </div>';
|
$data[1] = html_print_input_text("filter_text", $filter_text, __("Free text for search (*)"), 20, 40, true);
|
||||||
echo '</td></tr></table>';
|
|
||||||
|
|
||||||
|
$data[2] = "<b>" . __("Max. hours old") . "</b>";
|
||||||
|
$data[3] = html_print_input_text("filter_period", $filter_period, __("Max. hours old"), 3, 6, true);
|
||||||
|
|
||||||
|
$data[4] = "<b>" . __("IP") . "</b>";
|
||||||
|
$data[5] = html_print_input_text("filter_ip", $filter_ip, __("IP"), 15, 15, true);
|
||||||
|
|
||||||
$filter = 'WHERE 1 = 1';
|
$table->data[0] = $data;
|
||||||
|
$data = array();
|
||||||
|
|
||||||
if ($tipo_log != 'all') {
|
$actions_sql = "SELECT DISTINCT(accion), accion AS text FROM tsesion";
|
||||||
$filter .= sprintf (" AND accion = '%s'", $tipo_log);
|
$data[0] = "<b>" . __("Action") . "</b>";
|
||||||
}
|
$data[1] = html_print_select_from_sql($actions_sql, "filter_type", $filter_type, "", __("All"), "", true);
|
||||||
switch ($config['dbtype']) {
|
|
||||||
case "mysql":
|
$users_sql = "SELECT id_user, id_user AS text FROM tusuario";
|
||||||
if ($user_filter != 'all') {
|
$data[2] = "<b>" . __("User") . "</b>";
|
||||||
$filter .= sprintf(' AND id_usuario = "%s"', $user_filter);
|
$data[3] = html_print_select_from_sql($users_sql, "filter_user", $filter_user, "", __("All"), "", true);
|
||||||
}
|
|
||||||
|
$data[4] = "";
|
||||||
$filter .= ' AND (accion LIKE "%' . $filter_text . '%" OR descripcion LIKE "%' . $filter_text . '%")';
|
$data[5] = html_print_submit_button(__("Filter"), "filter", false, 'class="sub search"', true);
|
||||||
|
|
||||||
if ($filter_ip != '') {
|
$table->data[1] = $data;
|
||||||
$filter .= sprintf(' AND ip_origen LIKE "%s"', $filter_ip);
|
|
||||||
}
|
$form = '<form name="query_sel" method="post" action="index.php?sec=glog&sec2=godmode/admin_access_logs">';
|
||||||
break;
|
$form .= html_print_table($table, true);
|
||||||
case "postgresql":
|
$form .= '</form>';
|
||||||
case "oracle":
|
ui_toggle($form, __("Filter"), "", false);
|
||||||
if ($user_filter != 'all') {
|
|
||||||
$filter .= sprintf(' AND id_usuario = \'%s\'', $user_filter);
|
// ui_toggle(graphic_user_activity(400, 150), __("Chart"));
|
||||||
}
|
|
||||||
|
$filter = "1=1";
|
||||||
$filter .= ' AND (accion LIKE \'%' . $filter_text . '%\' OR descripcion LIKE \'%' . $filter_text . '%\')';
|
|
||||||
|
if (!empty($filter_type)) {
|
||||||
if ($filter_ip != '') {
|
$filter .= sprintf (" AND accion = '%s'", $filter_type);
|
||||||
$filter .= sprintf(' AND ip_origen LIKE \'%s\'', $filter_ip);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($filter_hours_old != 0) {
|
if (!empty($filter_user)) {
|
||||||
|
$filter .= sprintf(" AND id_usuario = '%s'", $filter_user);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($filter_text)) {
|
||||||
|
$filter .= sprintf(" AND (accion LIKE '%%%s%%' OR descripcion LIKE '%%%s%%')", $filter_text, $filter_text);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($filter_ip)) {
|
||||||
|
$filter .= sprintf(" AND ip_origen LIKE '%%%s%%'", $filter_ip);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($filter_period)) {
|
||||||
switch ($config["dbtype"]) {
|
switch ($config["dbtype"]) {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
$filter .= ' AND fecha >= DATE_ADD(NOW(), INTERVAL -' . $filter_hours_old . ' HOUR)';
|
$filter .= ' AND fecha >= DATE_ADD(NOW(), INTERVAL -' . $filter_period . ' HOUR)';
|
||||||
break;
|
break;
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
$filter .= ' AND fecha >= NOW() - INTERVAL \'' . $filter_hours_old . ' HOUR \'';
|
$filter .= ' AND fecha >= NOW() - INTERVAL \'' . $filter_period . ' HOUR \'';
|
||||||
break;
|
break;
|
||||||
case "oracle":
|
case "oracle":
|
||||||
$filter .= ' AND fecha >= (SYSTIMESTAMP - INTERVAL \'' . $filter_hours_old . '\' HOUR)';
|
$filter .= ' AND fecha >= (SYSTIMESTAMP - INTERVAL \'' . $filter_period . '\' HOUR)';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT COUNT(*) FROM tsesion " . $filter;
|
$count_sql = sprintf("SELECT COUNT(*) FROM tsesion WHERE %s", $filter);
|
||||||
$count = db_get_sql ($sql);
|
$count = (int) db_get_value_sql($count_sql);
|
||||||
$url = "index.php?sec=godmode&sec2=godmode/admin_access_logs&tipo_log=".$tipo_log."&user_filter=".$user_filter."&filter_text=".$filter_text."&filter_hours_old=".$filter_hours_old."&filter_ip=".$filter_ip;
|
$url = "index.php?sec=godmode&sec2=godmode/admin_access_logs" . $filter_query;
|
||||||
|
ui_pagination($count, $url);
|
||||||
ui_pagination ($count, $url);
|
|
||||||
|
|
||||||
switch ($config["dbtype"]) {
|
switch ($config["dbtype"]) {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
$sql = sprintf ("SELECT *
|
$sql = sprintf(
|
||||||
|
"SELECT *
|
||||||
FROM tsesion
|
FROM tsesion
|
||||||
%s
|
WHERE %s
|
||||||
ORDER BY fecha DESC
|
ORDER BY fecha DESC
|
||||||
LIMIT %d, %d", $filter, $offset, $config["block_size"]);
|
LIMIT %d, %d",
|
||||||
|
$filter, $offset, $config["block_size"]
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
$sql = sprintf ("SELECT *
|
$sql = sprintf(
|
||||||
|
"SELECT *
|
||||||
FROM tsesion
|
FROM tsesion
|
||||||
%s
|
WHERE %s
|
||||||
ORDER BY fecha DESC
|
ORDER BY fecha DESC
|
||||||
LIMIT %d OFFSET %d", $filter, $config["block_size"], $offset);
|
LIMIT %d OFFSET %d",
|
||||||
|
$filter, $config["block_size"], $offset
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case "oracle":
|
case "oracle":
|
||||||
$set = array();
|
$set = array();
|
||||||
$set['limit'] = $config["block_size"];
|
$set['limit'] = $config["block_size"];
|
||||||
$set['offset'] = $offset;
|
$set['offset'] = $offset;
|
||||||
$sql = sprintf ("SELECT *
|
$sql = sprintf(
|
||||||
|
"SELECT *
|
||||||
FROM tsesion
|
FROM tsesion
|
||||||
%s
|
WHERE %s
|
||||||
ORDER BY fecha DESC", $filter);
|
ORDER BY fecha DESC",
|
||||||
$result = oracle_recode_query ($sql, $set);
|
$filter
|
||||||
|
);
|
||||||
|
$result = oracle_recode_query($sql, $set);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = db_get_all_rows_sql ($sql);
|
$result = db_get_all_rows_sql($sql);
|
||||||
|
if (empty($result)) $result = array();
|
||||||
// Delete rnum row generated by oracle_recode_query() function
|
|
||||||
if (($config["dbtype"] == 'oracle') && ($result !== false)) {
|
|
||||||
for ($i=0; $i < count($result); $i++) {
|
|
||||||
unset($result[$i]['rnum']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty ($result)) {
|
|
||||||
$result = array ();
|
|
||||||
}
|
|
||||||
|
|
||||||
$table = new stdClass();
|
$table = new stdClass();
|
||||||
$table->cellpadding = 4;
|
$table->cellpadding = 4;
|
||||||
$table->cellspacing = 4;
|
$table->cellspacing = 4;
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->class = "databox data";
|
$table->class = "databox data";
|
||||||
$table->size = array ();
|
$table->size = array();
|
||||||
$table->data = array ();
|
$table->data = array();
|
||||||
$table->head = array ();
|
$table->head = array();
|
||||||
$table->align = array();
|
$table->align = array();
|
||||||
$table->rowclass = array();
|
$table->rowclass = array();
|
||||||
|
|
||||||
@ -192,9 +202,6 @@ $table->head[3] = __('Source IP');
|
|||||||
$table->head[4] = __('Comments');
|
$table->head[4] = __('Comments');
|
||||||
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
||||||
$table->head[5] = enterprise_hook('tableHeadEnterpriseAudit', array('title1'));
|
$table->head[5] = enterprise_hook('tableHeadEnterpriseAudit', array('title1'));
|
||||||
}
|
|
||||||
|
|
||||||
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
|
||||||
$table->head[6] = enterprise_hook('tableHeadEnterpriseAudit', array('title2'));
|
$table->head[6] = enterprise_hook('tableHeadEnterpriseAudit', array('title2'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,106 +211,47 @@ $table->size[3] = 100;
|
|||||||
$table->size[4] = 200;
|
$table->size[4] = 200;
|
||||||
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
||||||
$table->size[5] = enterprise_hook('tableHeadEnterpriseAudit', array('size1'));
|
$table->size[5] = enterprise_hook('tableHeadEnterpriseAudit', array('size1'));
|
||||||
}
|
|
||||||
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
|
||||||
$table->size[6] = enterprise_hook('tableHeadEnterpriseAudit', array('size2'));
|
$table->size[6] = enterprise_hook('tableHeadEnterpriseAudit', array('size2'));
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
|
||||||
$table->align[5] = enterprise_hook('tableHeadEnterpriseAudit', array('align'));
|
$table->align[5] = enterprise_hook('tableHeadEnterpriseAudit', array('align'));
|
||||||
}
|
|
||||||
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
|
||||||
$table->align[6] = enterprise_hook('tableHeadEnterpriseAudit', array('align2'));
|
$table->align[6] = enterprise_hook('tableHeadEnterpriseAudit', array('align2'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->colspan = array();
|
$table->colspan = array();
|
||||||
$table->rowstyle = array();
|
$table->rowstyle = array();
|
||||||
|
|
||||||
|
|
||||||
$rowPair = true;
|
$rowPair = true;
|
||||||
$iterator = 0;
|
$iterator = 0;
|
||||||
|
|
||||||
// Get data
|
// Get data
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
if ($rowPair)
|
|
||||||
$table->rowclass[$iterator] = 'rowPair';
|
|
||||||
else
|
|
||||||
$table->rowclass[$iterator] = 'rowOdd';
|
|
||||||
$rowPair = !$rowPair;
|
|
||||||
$iterator++;
|
$iterator++;
|
||||||
|
|
||||||
|
$table->rowclass[] = $rowPair ? "rowPair" : "rowOdd";
|
||||||
|
$rowPair = !$rowPair;
|
||||||
|
|
||||||
$data = array ();
|
$data = array();
|
||||||
switch ($config['dbtype']) {
|
$data[0] = $row["id_usuario"];
|
||||||
case "mysql":
|
$data[1] = ui_print_session_action_icon($row["accion"], true) . $row["accion"];
|
||||||
case "postgresql":
|
$data[2] = ui_print_help_tip($row["fecha"], true) . ui_print_timestamp($row["utimestamp"], true);
|
||||||
$data[0] = $row["id_usuario"];
|
$data[3] = $row["ip_origen"];
|
||||||
break;
|
$data[4] = $row["descripcion"];
|
||||||
case "oracle":
|
|
||||||
$data[0] = $row["id_usuario"];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$data[1] = ui_print_session_action_icon ($row['accion'], true);
|
|
||||||
$data[1] .= $row["accion"];
|
|
||||||
$data[2] = ui_print_help_tip($row['fecha'], true) . ui_print_timestamp($row['utimestamp'], true);
|
|
||||||
switch ($config['dbtype']) {
|
|
||||||
case "mysql":
|
|
||||||
case "postgresql":
|
|
||||||
$data[3] = $row["ip_origen"];
|
|
||||||
break;
|
|
||||||
case "oracle":
|
|
||||||
$data[3] = $row["ip_origen"];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$data[4] = io_safe_output($row["descripcion"]);
|
|
||||||
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
|
||||||
switch ($config['dbtype']) {
|
|
||||||
case "mysql":
|
|
||||||
case "postgresql":
|
|
||||||
$data[5] = enterprise_hook('cell1EntepriseAudit', array($row['id_sesion']));
|
|
||||||
break;
|
|
||||||
case "oracle":
|
|
||||||
$data[5] = enterprise_hook('cell1EntepriseAudit', array($row['id_sesion']));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
|
||||||
switch ($config['dbtype']) {
|
|
||||||
case "mysql":
|
|
||||||
case "postgresql":
|
|
||||||
$data[6] = enterprise_hook('cell2EntepriseAudit', array($row['id_sesion']));
|
|
||||||
break;
|
|
||||||
case "oracle":
|
|
||||||
$data[6] = enterprise_hook('cell2EntepriseAudit', array($row['id_sesion']));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
array_push ($table->data, $data);
|
|
||||||
|
|
||||||
|
|
||||||
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
||||||
switch ($config['dbtype']) {
|
$data[5] = enterprise_hook("cell1EntepriseAudit", array($row["id_sesion"]));
|
||||||
case "mysql":
|
$data[6] = enterprise_hook("cell2EntepriseAudit", array($row["id_sesion"]));
|
||||||
case "postgresql":
|
}
|
||||||
rowEnterpriseAudit($table, $iterator, $row['id_sesion']);
|
|
||||||
break;
|
$table->data[] = $data;
|
||||||
case "oracle":
|
|
||||||
rowEnterpriseAudit($table, $iterator, $row['id_sesion']);
|
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
||||||
break;
|
rowEnterpriseAudit($table, $iterator, $row["id_sesion"]);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
html_print_table ($table);
|
html_print_table($table);
|
||||||
|
|
||||||
echo '<div style="width: '.$table->width.'" class="action-buttons">';
|
|
||||||
echo '<a href="' .
|
|
||||||
ui_get_full_url(false, false, false, false) . 'index.php?sec=gextensions&sec2=godmode/audit_log_csv&tipo_log='.$tipo_log.'&user_filter='.$user_filter.'&filter_text='.$filter_text.'&filter_hours_old='.$filter_hours_old.'&filter_ip='.$filter_ip.'"'.
|
|
||||||
'>' .
|
|
||||||
html_print_button (__('Export to CSV '), 'export_csv', false, '', 'class=sub upd', true, false). '</a>';
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
||||||
enterprise_hook('enterpriseAuditFooter');
|
enterprise_hook('enterpriseAuditFooter');
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -13,6 +13,16 @@
|
|||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
|
||||||
|
// Load global vars
|
||||||
|
enterprise_include ('godmode/agentes/agent_manager.php');
|
||||||
|
|
||||||
|
require_once ('include/functions_clippy.php');
|
||||||
|
require_once ('include/functions_servers.php');
|
||||||
|
require_once ('include/functions_gis.php');
|
||||||
|
require_once($config['homedir'] . "/include/functions_agents.php");
|
||||||
|
require_once ($config['homedir'] . '/include/functions_users.php');
|
||||||
|
|
||||||
if (is_ajax ()) {
|
if (is_ajax ()) {
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
@ -88,17 +98,28 @@ if (is_ajax ()) {
|
|||||||
|
|
||||||
echo io_json_mb_encode($out);
|
echo io_json_mb_encode($out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// And and remove groups use the same function
|
||||||
|
$add_secondary_groups = get_parameter('add_secondary_groups');
|
||||||
|
$remove_secondary_groups = get_parameter('remove_secondary_groups');
|
||||||
|
if ($add_secondary_groups || $remove_secondary_groups) {
|
||||||
|
$id_agent = get_parameter('id_agent');
|
||||||
|
$groups_to_add = get_parameter('groups');
|
||||||
|
if (enterprise_installed()) {
|
||||||
|
enterprise_include('include/functions_agents.php');
|
||||||
|
$ret = enterprise_hook(
|
||||||
|
'agents_update_secondary_groups',
|
||||||
|
array(
|
||||||
|
$id_agent,
|
||||||
|
$add_secondary_groups ? $groups_to_add : array(),
|
||||||
|
$remove_secondary_groups ? $groups_to_add : array())
|
||||||
|
);
|
||||||
|
// Echo 0 in case of error. 0 Otherwise.
|
||||||
|
echo $ret ? 1 : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Load global vars
|
|
||||||
enterprise_include ('godmode/agentes/agent_manager.php');
|
|
||||||
|
|
||||||
require_once ('include/functions_clippy.php');
|
|
||||||
require_once ('include/functions_servers.php');
|
|
||||||
require_once ('include/functions_gis.php');
|
|
||||||
require_once($config['homedir'] . "/include/functions_agents.php");
|
|
||||||
require_once ($config['homedir'] . '/include/functions_users.php');
|
|
||||||
|
|
||||||
ui_require_javascript_file('openlayers.pandora');
|
ui_require_javascript_file('openlayers.pandora');
|
||||||
|
|
||||||
@ -251,8 +272,13 @@ if(is_array($modules)){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[4][0] = __('Group');
|
$table->data[4][0] = __('Primary group');
|
||||||
$table->data[4][1] = html_print_select_groups(false, "AR", false, 'grupo', $grupo, '', '', 0, true);
|
// Cannot change primary group if user have not permission for that group
|
||||||
|
if (isset($groups[$grupo]) || $new_agent) {
|
||||||
|
$table->data[4][1] = html_print_select_groups(false, "AR", false, 'grupo', $grupo, '', '', 0, true);
|
||||||
|
} else {
|
||||||
|
$table->data[4][1] = groups_get_name($grupo);
|
||||||
|
}
|
||||||
$table->data[4][1] .= ' <span id="group_preview">';
|
$table->data[4][1] .= ' <span id="group_preview">';
|
||||||
$table->data[4][1] .= ui_print_group_icon ($grupo, true);
|
$table->data[4][1] .= ui_print_group_icon ($grupo, true);
|
||||||
$table->data[4][1] .= '</span>';
|
$table->data[4][1] .= '</span>';
|
||||||
@ -303,6 +329,54 @@ $table->style[0] = 'font-weight: bold; ';
|
|||||||
$table->style[4] = 'font-weight: bold;';
|
$table->style[4] = 'font-weight: bold;';
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
|
|
||||||
|
if (enterprise_installed()) {
|
||||||
|
$secondary_groups_selected = enterprise_hook('agents_get_secondary_groups', array($id_agente));
|
||||||
|
$table->data['secondary_groups'][0] = __('Secondary groups');
|
||||||
|
$table->data['secondary_groups'][1] = html_print_select_groups(
|
||||||
|
false, // Use the current user to select the groups
|
||||||
|
"AR", // ACL permission
|
||||||
|
false, // Not all group
|
||||||
|
'secondary_groups', // HTML id
|
||||||
|
'', // No select any by default
|
||||||
|
'', // Javascript onChange code
|
||||||
|
'', // Do not user no selected value
|
||||||
|
0, // Do not use no selected value
|
||||||
|
true, // Return HTML (not echo)
|
||||||
|
true, // Multiple selection
|
||||||
|
true, // Sorting by default
|
||||||
|
'', // CSS classnames (default)
|
||||||
|
false, // Not disabled (default)
|
||||||
|
false, // Inline styles (default)
|
||||||
|
false, // Option style select (default)
|
||||||
|
false, // Do not truncate the users tree (default)
|
||||||
|
'id_grupo', // Key to get as value (default)
|
||||||
|
false, // Not strict user (default)
|
||||||
|
$secondary_groups_selected['plain'] // Do not show the primary group in this selection
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data['secondary_groups'][2] =
|
||||||
|
html_print_input_image ('add_secondary', 'images/darrowright.png', 1, '', true, array (
|
||||||
|
'title' => __('Add secondary groups'),
|
||||||
|
'onclick' => "agent_manager_add_secondary_groups(event, " . $id_agente . ");"
|
||||||
|
)) .
|
||||||
|
'<br /><br /><br /><br />' .
|
||||||
|
html_print_input_image ('remove_secondary', 'images/darrowleft.png', 1, '', true, array (
|
||||||
|
'title' => __('Remove secondary groups'),
|
||||||
|
'onclick' => "agent_manager_remove_secondary_groups(event, " . $id_agente . ");"
|
||||||
|
));
|
||||||
|
|
||||||
|
$table->data['secondary_groups'][3] = html_print_select (
|
||||||
|
$secondary_groups_selected['for_select'], // Values
|
||||||
|
'secondary_groups_selected', // HTML id
|
||||||
|
'', // Selected
|
||||||
|
'', // Javascript onChange code
|
||||||
|
'', // Nothing selected
|
||||||
|
0, // Nothing selected
|
||||||
|
true, // Return HTML (not echo)
|
||||||
|
true // Multiple selection
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Custom ID
|
// Custom ID
|
||||||
$table->data[0][0] = __('Custom ID');
|
$table->data[0][0] = __('Custom ID');
|
||||||
$table->data[0][1] = html_print_input_text ('custom_id', $custom_id, '', 16, 255, true);
|
$table->data[0][1] = html_print_input_text ('custom_id', $custom_id, '', 16, 255, true);
|
||||||
@ -335,8 +409,8 @@ if($id_agente){
|
|||||||
}
|
}
|
||||||
|
|
||||||
$table->data[2][0] = __('Safe operation mode')
|
$table->data[2][0] = __('Safe operation mode')
|
||||||
. ui_print_help_tip(__('This mode allow Pandora FMS to disable all modules
|
. ui_print_help_tip(__('This mode allow %s to disable all modules
|
||||||
of this agent while the selected module is on CRITICAL status'), true);
|
of this agent while the selected module is on CRITICAL status', get_product_name()), true);
|
||||||
$table->data[2][1] = html_print_checkbox('safe_mode', 1, $safe_mode, true);
|
$table->data[2][1] = html_print_checkbox('safe_mode', 1, $safe_mode, true);
|
||||||
$table->data[2][1] .= " " . __('Module') . " " . html_print_select ($safe_mode_modules, "safe_mode_module", $safe_mode_module, "", "", 0, true);
|
$table->data[2][1] .= " " . __('Module') . " " . html_print_select ($safe_mode_modules, "safe_mode_module", $safe_mode_module, "", "", 0, true);
|
||||||
}
|
}
|
||||||
@ -468,7 +542,7 @@ foreach ($fields as $field) {
|
|||||||
. '.<br />'
|
. '.<br />'
|
||||||
. __('The format is: [url=\'url to navigate\']\'text to show\'[/url]')
|
. __('The format is: [url=\'url to navigate\']\'text to show\'[/url]')
|
||||||
. '.<br /><br />'
|
. '.<br /><br />'
|
||||||
. __('e.g.: [url=pandorafms.org]Pandora FMS Community[/url]')
|
. __('e.g.: [url=google.com]Google web search[/url]')
|
||||||
, true);
|
, true);
|
||||||
|
|
||||||
$custom_value = db_get_value_filter('description',
|
$custom_value = db_get_value_filter('description',
|
||||||
@ -574,7 +648,96 @@ ui_require_jquery_file('bgiframe');
|
|||||||
$("#modules_not_learning_mode_context_help").hide();
|
$("#modules_not_learning_mode_context_help").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function agent_manager_add_secondary_groups (event, id_agent) {
|
||||||
|
event.preventDefault();
|
||||||
|
var primary_value = $("#grupo").val()
|
||||||
|
// The selected primary value cannot be selected like secondary
|
||||||
|
if ($("#secondary_groups option:selected[value=" + primary_value + "]").length > 0) {
|
||||||
|
alert("<?php echo __("Primary group cannot be secondary too.");?>")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var selected_items = new Array();
|
||||||
|
$("#secondary_groups option:selected").each(function(){
|
||||||
|
selected_items.push($(this).val())
|
||||||
|
})
|
||||||
|
|
||||||
|
var data = {
|
||||||
|
page: "godmode/agentes/agent_manager",
|
||||||
|
id_agent: id_agent,
|
||||||
|
groups: selected_items,
|
||||||
|
add_secondary_groups: 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make the AJAX call to update the secondary groups
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "ajax.php",
|
||||||
|
dataType: "html",
|
||||||
|
data: data,
|
||||||
|
success: function (data) {
|
||||||
|
if (data == 1) {
|
||||||
|
// Move from one input to the other
|
||||||
|
$("#secondary_groups_selected option[value=0]").remove()
|
||||||
|
$("#secondary_groups option:selected").each(function() {
|
||||||
|
$(this).remove().appendTo("#secondary_groups_selected")
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.error("Error in AJAX call to add secondary groups")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (data) {
|
||||||
|
console.error("Fatal error in AJAX call to add secondary groups")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function agent_manager_remove_secondary_groups (event, id_agent) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var selected_items = new Array();
|
||||||
|
$("#secondary_groups_selected option:selected").each(function(){
|
||||||
|
selected_items.push($(this).val())
|
||||||
|
})
|
||||||
|
|
||||||
|
var data = {
|
||||||
|
page: "godmode/agentes/agent_manager",
|
||||||
|
id_agent: id_agent,
|
||||||
|
groups: selected_items,
|
||||||
|
remove_secondary_groups: 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make the AJAX call to update the secondary groups
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "ajax.php",
|
||||||
|
dataType: "html",
|
||||||
|
data: data,
|
||||||
|
success: function (data) {
|
||||||
|
if (data == 1) {
|
||||||
|
// Remove the groups selected if success
|
||||||
|
$("#secondary_groups_selected option:selected").each(function(){
|
||||||
|
$(this).remove().appendTo("#secondary_groups")
|
||||||
|
})
|
||||||
|
|
||||||
|
// Add none if empty select
|
||||||
|
if ($("#secondary_groups_selected option").length == 0) {
|
||||||
|
$("#secondary_groups_selected").append($('<option>',{
|
||||||
|
value: 0,
|
||||||
|
text: "<?php echo __("None");?>"
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.error("Error in AJAX call to add secondary groups")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (data) {
|
||||||
|
console.error("Fatal error in AJAX call to add secondary groups")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready (function() {
|
$(document).ready (function() {
|
||||||
$("select#id_os").pandoraSelectOS ();
|
$("select#id_os").pandoraSelectOS ();
|
||||||
|
|
||||||
|
@ -32,15 +32,18 @@ $tab = get_parameter ('tab', 'main');
|
|||||||
//See if id_agente is set (either POST or GET, otherwise -1
|
//See if id_agente is set (either POST or GET, otherwise -1
|
||||||
$id_agente = (int) get_parameter ("id_agente");
|
$id_agente = (int) get_parameter ("id_agente");
|
||||||
$group = 0;
|
$group = 0;
|
||||||
if ($id_agente)
|
$all_groups = array($group);
|
||||||
|
if ($id_agente) {
|
||||||
$group = agents_get_agent_group ($id_agente);
|
$group = agents_get_agent_group ($id_agente);
|
||||||
|
$all_groups = agents_get_all_groups_agent($id_agente, $group);
|
||||||
|
}
|
||||||
|
|
||||||
if (!check_acl ($config["id_user"], $group, "AW", $id_agente)) {
|
if (!check_acl_one_of_groups ($config["id_user"], $all_groups, "AW")) {
|
||||||
$access_granted = false;
|
$access_granted = false;
|
||||||
switch ($tab) {
|
switch ($tab) {
|
||||||
case 'alert':
|
case 'alert':
|
||||||
case 'module':
|
case 'module':
|
||||||
if (check_acl ($config["id_user"], $group, "AD", $id_agente)) {
|
if (check_acl_one_of_groups ($config["id_user"], $all_groups, "AD")) {
|
||||||
$access_granted = true;
|
$access_granted = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -281,8 +284,9 @@ if ($create_agent) {
|
|||||||
"Url description":"' . $url_description .'",
|
"Url description":"' . $url_description .'",
|
||||||
"Quiet":"' . (int)$quiet.'"}';
|
"Quiet":"' . (int)$quiet.'"}';
|
||||||
|
|
||||||
|
$unsafe_alias = io_safe_output($alias);
|
||||||
db_pandora_audit("Agent management",
|
db_pandora_audit("Agent management",
|
||||||
"Created agent $alias", false, true, $info);
|
"Created agent $unsafe_alias", false, true, $info);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$id_agente = 0;
|
$id_agente = 0;
|
||||||
@ -447,7 +451,7 @@ if ($id_agente) {
|
|||||||
$incidenttab['active'] = false;
|
$incidenttab['active'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_acl ($config["id_user"], $group, "AW", $id_agente)) {
|
if (check_acl_one_of_groups ($config["id_user"], $all_groups, "AW")) {
|
||||||
if ($has_remote_conf) {
|
if ($has_remote_conf) {
|
||||||
$agent_name = agents_get_name($id_agente);
|
$agent_name = agents_get_name($id_agente);
|
||||||
$agent_name = io_safe_output($agent_name);
|
$agent_name = io_safe_output($agent_name);
|
||||||
@ -555,7 +559,7 @@ if ($id_agente) {
|
|||||||
$help_header = 'plugins_tab';
|
$help_header = 'plugins_tab';
|
||||||
break;
|
break;
|
||||||
case "module":
|
case "module":
|
||||||
$type_module_t = (int) get_parameter ('moduletype', '');
|
$type_module_t = get_parameter ('moduletype', '');
|
||||||
$tab_description = '- '. __('Modules');
|
$tab_description = '- '. __('Modules');
|
||||||
if($type_module_t == 'webux'){
|
if($type_module_t == 'webux'){
|
||||||
$help_header = 'wux_console';
|
$help_header = 'wux_console';
|
||||||
@ -909,7 +913,7 @@ if ($update_agent) { // if modified some agent paramenter
|
|||||||
if ($id_agente) {
|
if ($id_agente) {
|
||||||
//This has been done in the beginning of the page, but if an agent was created, this id might change
|
//This has been done in the beginning of the page, but if an agent was created, this id might change
|
||||||
$id_grupo = agents_get_agent_group ($id_agente);
|
$id_grupo = agents_get_agent_group ($id_agente);
|
||||||
if (!check_acl ($config["id_user"], $id_grupo, "AW") && !check_acl ($config["id_user"], $id_grupo, "AD")) {
|
if (!check_acl_one_of_groups ($config["id_user"], $all_groups, "AW") && !check_acl_one_of_groups ($config["id_user"], $all_groups, "AD")) {
|
||||||
db_pandora_audit("ACL Violation","Trying to admin an agent without access");
|
db_pandora_audit("ACL Violation","Trying to admin an agent without access");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
exit;
|
exit;
|
||||||
@ -1586,8 +1590,9 @@ if ($delete_module) { // DELETE agent module !
|
|||||||
WHERE tam.id_agente_modulo = tae.id_agente_modulo
|
WHERE tam.id_agente_modulo = tae.id_agente_modulo
|
||||||
AND tam.id_agente_modulo = ' . $id_borrar_modulo);
|
AND tam.id_agente_modulo = ' . $id_borrar_modulo);
|
||||||
$id_grupo = (int) agents_get_agent_group($id_agente);
|
$id_grupo = (int) agents_get_agent_group($id_agente);
|
||||||
|
$all_groups = agents_get_all_groups_agent ($id_agente, $id_grupo);
|
||||||
|
|
||||||
if (! check_acl ($config["id_user"], $id_grupo, "AW")) {
|
if (! check_acl_one_of_groups ($config["id_user"], $all_groups, "AW")) {
|
||||||
db_pandora_audit("ACL Violation",
|
db_pandora_audit("ACL Violation",
|
||||||
"Trying to delete a module without admin rights");
|
"Trying to delete a module without admin rights");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
@ -1787,7 +1792,7 @@ if ($updateGIS) {
|
|||||||
"altitude" => $previusAgentGISData['stored_altitude'],
|
"altitude" => $previusAgentGISData['stored_altitude'],
|
||||||
"start_timestamp" => $previusAgentGISData['start_timestamp'],
|
"start_timestamp" => $previusAgentGISData['start_timestamp'],
|
||||||
"end_timestamp" => date( 'Y-m-d H:i:s'),
|
"end_timestamp" => date( 'Y-m-d H:i:s'),
|
||||||
"description" => __('Save by Pandora Console'),
|
"description" => __('Save by %s Console', get_product_name()),
|
||||||
"manual_placement" => $previusAgentGISData['manual_placement'],
|
"manual_placement" => $previusAgentGISData['manual_placement'],
|
||||||
"number_of_packages" => $previusAgentGISData['number_of_packages'],
|
"number_of_packages" => $previusAgentGISData['number_of_packages'],
|
||||||
"tagente_id_agente" => $previusAgentGISData['tagente_id_agente']
|
"tagente_id_agente" => $previusAgentGISData['tagente_id_agente']
|
||||||
@ -1802,7 +1807,7 @@ if ($updateGIS) {
|
|||||||
"stored_altitude" => $lastAltitude,
|
"stored_altitude" => $lastAltitude,
|
||||||
"start_timestamp" => date( 'Y-m-d H:i:s'),
|
"start_timestamp" => date( 'Y-m-d H:i:s'),
|
||||||
"manual_placement" => 1,
|
"manual_placement" => 1,
|
||||||
"description" => __('Update by Pandora Console')),
|
"description" => __('Update by %s Console', get_product_name())),
|
||||||
array("tagente_id_agente" => $idAgente));
|
array("tagente_id_agente" => $idAgente));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1815,7 +1820,7 @@ if ($updateGIS) {
|
|||||||
"stored_latitude" => $lastLatitude,
|
"stored_latitude" => $lastLatitude,
|
||||||
"stored_altitude" => $lastAltitude,
|
"stored_altitude" => $lastAltitude,
|
||||||
"manual_placement" => 1,
|
"manual_placement" => 1,
|
||||||
"description" => __('Insert by Pandora Console')
|
"description" => __('Insert by %s Console', get_product_name())
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ $viewtab['active'] = false;
|
|||||||
$onheader = array('view' => $viewtab);
|
$onheader = array('view' => $viewtab);
|
||||||
|
|
||||||
// Header
|
// Header
|
||||||
ui_print_page_header (__('Agents defined in Pandora'), "images/agent_mc.png", false, "", true, $onheader);
|
ui_print_page_header (__('Agents defined in %s', get_product_name()), "images/agent_mc.png", false, "", true, $onheader);
|
||||||
|
|
||||||
// Perform actions
|
// Perform actions
|
||||||
$agent_to_delete = (int)get_parameter('borrar_agente');
|
$agent_to_delete = (int)get_parameter('borrar_agente');
|
||||||
@ -79,16 +79,18 @@ $result = null;
|
|||||||
|
|
||||||
if ($agent_to_delete) {
|
if ($agent_to_delete) {
|
||||||
$id_agente = $agent_to_delete;
|
$id_agente = $agent_to_delete;
|
||||||
$agent_name = agents_get_name ($id_agente);
|
if (check_acl_one_of_groups (
|
||||||
$id_grupo = agents_get_agent_group($id_agente);
|
$config["id_user"],
|
||||||
if (check_acl ($config["id_user"], $id_grupo, "AW")) {
|
agents_get_all_groups_agent($id_agente),
|
||||||
|
"AW"
|
||||||
|
)) {
|
||||||
$id_agentes[0] = $id_agente;
|
$id_agentes[0] = $id_agente;
|
||||||
$result = agents_delete_agent($id_agentes);
|
$result = agents_delete_agent($id_agentes);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// NO permissions.
|
// NO permissions.
|
||||||
db_pandora_audit("ACL Violation",
|
db_pandora_audit("ACL Violation",
|
||||||
"Trying to delete agent \'$agent_name\'");
|
"Trying to delete agent \'" . agents_get_name ($id_agente). "\'");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -495,6 +497,8 @@ if ($agents !== false) {
|
|||||||
|
|
||||||
$id_grupo = $agent["id_grupo"];
|
$id_grupo = $agent["id_grupo"];
|
||||||
|
|
||||||
|
$cluster = db_get_row_sql('select id from tcluster where id_agent = '.$agent['id_agente']);
|
||||||
|
|
||||||
if (! check_acl ($config["id_user"], $id_grupo, "AW", $agent['id_agente']) && ! check_acl ($config["id_user"], $id_grupo, "AD", $agent['id_agente']))
|
if (! check_acl ($config["id_user"], $id_grupo, "AW", $agent['id_agente']) && ! check_acl ($config["id_user"], $id_grupo, "AD", $agent['id_agente']))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -564,22 +568,38 @@ if ($agents !== false) {
|
|||||||
|
|
||||||
echo '</span><div class="left actions" style="visibility: hidden; clear: left">';
|
echo '</span><div class="left actions" style="visibility: hidden; clear: left">';
|
||||||
if (check_acl ($config["id_user"], $agent["id_grupo"], "AW")) {
|
if (check_acl ($config["id_user"], $agent["id_grupo"], "AW")) {
|
||||||
echo '<a href="index.php?sec=gagente&
|
if($agent["id_os"] == 100){
|
||||||
sec2=godmode/agentes/configurar_agente&tab=main&
|
$cluster = db_get_row_sql('select id from tcluster where id_agent = '.$agent['id_agente']);
|
||||||
id_agente='.$agent["id_agente"].'">'.__('Edit').'</a>';
|
echo '<a href="index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$cluster['id'].'&step=1&update=1">'.__('Edit').'</a>';
|
||||||
echo ' | ';
|
echo ' | ';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo '<a href="index.php?sec=gagente&
|
||||||
|
sec2=godmode/agentes/configurar_agente&tab=main&
|
||||||
|
id_agente='.$agent["id_agente"].'">'.__('Edit').'</a>';
|
||||||
|
echo ' | ';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if($agent["id_os"] != 100){
|
||||||
echo '<a href="index.php?sec=gagente&
|
echo '<a href="index.php?sec=gagente&
|
||||||
sec2=godmode/agentes/configurar_agente&tab=module&
|
sec2=godmode/agentes/configurar_agente&tab=module&
|
||||||
id_agente='.$agent["id_agente"].'">'.__('Modules').'</a>';
|
id_agente='.$agent["id_agente"].'">'.__('Modules').'</a>';
|
||||||
echo ' | ';
|
echo ' | ';
|
||||||
|
}
|
||||||
|
|
||||||
echo '<a href="index.php?sec=gagente&
|
echo '<a href="index.php?sec=gagente&
|
||||||
sec2=godmode/agentes/configurar_agente&tab=alert&
|
sec2=godmode/agentes/configurar_agente&tab=alert&
|
||||||
id_agente='.$agent["id_agente"].'">'.__('Alerts').'</a>';
|
id_agente='.$agent["id_agente"].'">'.__('Alerts').'</a>';
|
||||||
echo ' | ';
|
echo ' | ';
|
||||||
echo '<a href="index.php?sec=estado
|
|
||||||
|
if($agent["id_os"] == 100){
|
||||||
|
echo '<a href="index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_view&id='.$cluster['id'].'">'.__('View').'</a>';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo '<a href="index.php?sec=estado
|
||||||
&sec2=operation/agentes/ver_agente
|
&sec2=operation/agentes/ver_agente
|
||||||
&id_agente='.$agent["id_agente"].'">'.__('View').'</a>';
|
&id_agente='.$agent["id_agente"].'">'.__('View').'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
@ -628,19 +648,41 @@ if ($agents !== false) {
|
|||||||
|
|
||||||
if ($agent['disabled']) {
|
if ($agent['disabled']) {
|
||||||
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
||||||
enable_agent=".$agent["id_agente"]."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort&disabled=$disabled''>".
|
enable_agent=".$agent["id_agente"]."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort&disabled=$disabled'";
|
||||||
html_print_image('images/lightbulb_off.png', true, array('alt' => __('Enable agent'), 'title' => __('Enable agent'))) ."</a>";
|
|
||||||
|
if($agent["id_os"] != 100){
|
||||||
|
echo ">";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo ' onClick="if (!confirm(\' '.__('You are going to enable a cluster agent. Are you sure?').'\')) return false;">';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo html_print_image('images/lightbulb_off.png', true, array('alt' => __('Enable agent'), 'title' => __('Enable agent'))) ."</a>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
||||||
disable_agent=".$agent["id_agente"]."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort&disabled=$disabled'>".
|
disable_agent=".$agent["id_agente"]."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort&disabled=$disabled'";
|
||||||
html_print_image('images/lightbulb.png', true, array('alt' => __('Disable agent'), 'title' => __('Disable agent'))) ."</a>";
|
if($agent["id_os"] != 100){
|
||||||
|
echo ">";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo ' onClick="if (!confirm(\' '.__('You are going to disable a cluster agent. Are you sure?').'\')) return false;">';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo html_print_image('images/lightbulb.png', true, array('alt' => __('Disable agent'), 'title' => __('Disable agent'))) ."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_acl ($config["id_user"], $agent["id_grupo"], "AW")) {
|
if (check_acl ($config["id_user"], $agent["id_grupo"], "AW")) {
|
||||||
echo " <a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
echo " <a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
||||||
borrar_agente=".$agent["id_agente"]."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort&disabled=$disabled'";
|
borrar_agente=".$agent["id_agente"]."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort&disabled=$disabled'";
|
||||||
echo ' onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
|
||||||
|
if($agent["id_os"] != 100){
|
||||||
|
echo ' onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo ' onClick="if (!confirm(\' '.__('WARNING! - You are going to delete a cluster agent. Are you sure?').'\')) return false;">';
|
||||||
|
}
|
||||||
|
|
||||||
echo html_print_image('images/cross.png', true, array("border" => '0')) . "</a>";
|
echo html_print_image('images/cross.png', true, array("border" => '0')) . "</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +111,13 @@ if (($policy_page) || (isset($agent))) {
|
|||||||
$show_creation = true;
|
$show_creation = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (check_acl ($config['id_user'], $agent['id_grupo'], "AW"))
|
if (!isset($all_groups)) {
|
||||||
|
$all_groups = agents_get_all_groups_agent (
|
||||||
|
$agent['id_agente'],
|
||||||
|
$agent['id_grupo']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (check_acl_one_of_groups ($config['id_user'], $all_groups, "AW"))
|
||||||
$show_creation = true;
|
$show_creation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,12 +151,13 @@ if (($policy_page) || (isset($agent))) {
|
|||||||
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
||||||
|
if (!$config['disable_help']) {
|
||||||
echo '<div style="text-align: right; width: 100%;padding-top:10px;padding-bottom:10px">';
|
echo '<div style="text-align: right; width: 100%;padding-top:10px;padding-bottom:10px">';
|
||||||
echo "<strong>";
|
echo "<strong>";
|
||||||
echo "<a style='color: #373737;' target='_blank' href='http://pandorafms.com/Library/Library/'>".__("Get more modules in Pandora FMS Library")."</a>";
|
echo "<a style='color: #373737;' target='_blank' href='http://pandorafms.com/Library/Library/'>".__("Get more modules on Monitoring Library")."</a>";
|
||||||
echo "</strong>";
|
echo "</strong>";
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
if (! isset ($id_agente))
|
if (! isset ($id_agente))
|
||||||
return;
|
return;
|
||||||
@ -164,8 +171,9 @@ if ($multiple_delete) {
|
|||||||
$count_correct_delete_modules = 0;
|
$count_correct_delete_modules = 0;
|
||||||
foreach($id_agent_modules_delete as $id_agent_module_del) {
|
foreach($id_agent_modules_delete as $id_agent_module_del) {
|
||||||
$id_grupo = (int) agents_get_agent_group($id_agente);
|
$id_grupo = (int) agents_get_agent_group($id_agente);
|
||||||
|
$all_groups = agents_get_all_groups_agent($id_agente, $id_grupo);
|
||||||
|
|
||||||
if (! check_acl ($config["id_user"], $id_grupo, "AW")) {
|
if (! check_acl_one_of_groups ($config["id_user"], $all_groups, "AW")) {
|
||||||
db_pandora_audit("ACL Violation",
|
db_pandora_audit("ACL Violation",
|
||||||
"Trying to delete a module without admin rights");
|
"Trying to delete a module without admin rights");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
@ -604,7 +612,7 @@ if ($checked) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($modules as $module) {
|
foreach ($modules as $module) {
|
||||||
if (! check_acl ($config["id_user"], $group, "AW", $id_agente) && ! check_acl ($config["id_user"], $group, "AD", $id_agente)) {
|
if (! check_acl_one_of_groups ($config["id_user"], $all_groups, "AW") && ! check_acl_one_of_groups ($config["id_user"], $all_groups, "AD")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -762,7 +770,7 @@ foreach ($modules as $module) {
|
|||||||
array('alt' => __('Disable module'), 'title' => __('Disable module'))) ."</a>";
|
array('alt' => __('Disable module'), 'title' => __('Disable module'))) ."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_acl ($config['id_user'], $agent['id_grupo'], "AW") && $module['id_tipo_modulo'] != 25) {
|
if (check_acl_one_of_groups ($config['id_user'], $all_groups, "AW") && $module['id_tipo_modulo'] != 25) {
|
||||||
$data[8] .= ' <a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&duplicate_module='.$module['id_agente_modulo'].'"
|
$data[8] .= ' <a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&duplicate_module='.$module['id_agente_modulo'].'"
|
||||||
onClick="if (!confirm(\' ' . __('Are you sure?') . '\')) return false;">';
|
onClick="if (!confirm(\' ' . __('Are you sure?') . '\')) return false;">';
|
||||||
$data[8] .= html_print_image ('images/copy.png', true,
|
$data[8] .= html_print_image ('images/copy.png', true,
|
||||||
@ -798,7 +806,7 @@ foreach ($modules as $module) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_acl ($config['id_user'], $agent['id_grupo'], "AW")) {
|
if (check_acl_one_of_groups ($config['id_user'], $all_groups, "AW")) {
|
||||||
// Delete module
|
// Delete module
|
||||||
$data[9] = html_print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true);
|
$data[9] = html_print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true);
|
||||||
$data[9] .= ' <a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&delete_module='.$module['id_agente_modulo'].'"
|
$data[9] .= ' <a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&delete_module='.$module['id_agente_modulo'].'"
|
||||||
@ -811,14 +819,14 @@ foreach ($modules as $module) {
|
|||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_acl ($config['id_user'], $agent['id_grupo'], "AW")) {
|
if (check_acl_one_of_groups ($config['id_user'], $all_groups, "AW")) {
|
||||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module"
|
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module"
|
||||||
onsubmit="if (! confirm (\'' . __('Are you sure?') . '\')) return false">';
|
onsubmit="if (! confirm (\'' . __('Are you sure?') . '\')) return false">';
|
||||||
}
|
}
|
||||||
|
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
|
|
||||||
if (check_acl ($config['id_user'], $agent['id_grupo'], "AW")) {
|
if (check_acl_one_of_groups ($config['id_user'], $all_groups, "AW")) {
|
||||||
echo '<div class="action-buttons" style="width: ' . $table->width . '">';
|
echo '<div class="action-buttons" style="width: ' . $table->width . '">';
|
||||||
html_print_input_hidden ('multiple_delete', 1);
|
html_print_input_hidden ('multiple_delete', 1);
|
||||||
html_print_submit_button (__('Delete'), 'multiple_delete', false, 'class="sub delete"');
|
html_print_submit_button (__('Delete'), 'multiple_delete', false, 'class="sub delete"');
|
||||||
|
@ -493,12 +493,7 @@ switch ($moduletype) {
|
|||||||
/* WARNING: type 7 is reserved on enterprise */
|
/* WARNING: type 7 is reserved on enterprise */
|
||||||
default:
|
default:
|
||||||
if (enterprise_include ('godmode/agentes/module_manager_editor.php') === ENTERPRISE_NOT_HOOK) {
|
if (enterprise_include ('godmode/agentes/module_manager_editor.php') === ENTERPRISE_NOT_HOOK) {
|
||||||
ui_print_error_message(sprintf(__('DEBUG: Invalid module type specified in %s:%s'), __FILE__, __LINE__));
|
ui_print_error_message(sprintf(__('Invalid module type')));
|
||||||
echo __('Most likely you have recently upgraded from an earlier version of Pandora and either <br />
|
|
||||||
1) forgot to use the database converter<br />
|
|
||||||
2) used a bad version of the database converter (see Bugreport #2124706 for the solution)<br />
|
|
||||||
3) found a new bug - please report a way to duplicate this error');
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -27,7 +27,7 @@ html_print_input_hidden ('ajax_url', ui_get_full_url("ajax.php"), false);
|
|||||||
html_print_input_hidden ('search_matches_translation', __("Search matches"), false);
|
html_print_input_hidden ('search_matches_translation', __("Search matches"), false);
|
||||||
|
|
||||||
// Define a custom action to save the OID selected in the SNMP browser to the form
|
// Define a custom action to save the OID selected in the SNMP browser to the form
|
||||||
html_print_input_hidden ('custom_action', urlencode (base64_encode(' <a href="javascript:setOID()"><img src="' . ui_get_full_url("images") . '/hand_point.png" title="' . __("Use this OID") . '" style="vertical-align: middle;"></img></a>')), false);
|
html_print_input_hidden ('custom_action', urlencode (base64_encode(' <a href="javascript:setOID()"><img src="' . ui_get_full_url("images") . '/input_filter.disabled.png" title="' . __("Use this OID") . '" style="vertical-align: middle;"></img></a>')), false);
|
||||||
|
|
||||||
$isFunctionPolicies = enterprise_include_once('include/functions_policies.php');
|
$isFunctionPolicies = enterprise_include_once('include/functions_policies.php');
|
||||||
|
|
||||||
|
@ -103,24 +103,9 @@ if ($module_service_synthetic_selector !== ENTERPRISE_NOT_HOOK) {
|
|||||||
$data[0] = '';
|
$data[0] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$data[1] = '<div id="module_data" style="top:1em; float:left; width:50%;">';
|
$data[1] = '<div id="module_data" style="top:1em; float:left; width:50%;">';
|
||||||
$data[1] .= html_print_label(__("Agent"),'agent_name', true)."<br/>";
|
$data[1] .= html_print_label(__("Agent"),'agent_name', true)."<br/>";
|
||||||
|
|
||||||
$params = array();
|
|
||||||
$params['return'] = true;
|
|
||||||
$params['show_helptip'] = true;
|
|
||||||
$params['input_name'] = 'agent_name';
|
|
||||||
$params['value'] = $agent_name;
|
|
||||||
$params['javascript_is_function_select'] = true;
|
|
||||||
$params['selectbox_id'] = 'prediction_module';
|
|
||||||
$params['none_module_text'] = __('Select Module');
|
|
||||||
$params['use_hidden_input_idagent'] = true;
|
|
||||||
$params['hidden_input_idagent_id'] = 'hidden-id_agente';
|
|
||||||
$data[1] .= ui_print_agent_autocomplete_input($params);
|
|
||||||
|
|
||||||
// Get module and agent of the target prediction module
|
// Get module and agent of the target prediction module
|
||||||
if (!empty($prediction_module)) {
|
if (!empty($prediction_module)) {
|
||||||
$id_agente_clean = modules_get_agentmodule_agent($prediction_module);
|
$id_agente_clean = modules_get_agentmodule_agent($prediction_module);
|
||||||
@ -131,6 +116,19 @@ else {
|
|||||||
$id_agente_clean = $id_agente;
|
$id_agente_clean = $id_agente;
|
||||||
$agent_name_clean = $agent_name;
|
$agent_name_clean = $agent_name;
|
||||||
}
|
}
|
||||||
|
$agent_alias = agents_get_alias($id_agente_clean);
|
||||||
|
|
||||||
|
$params = array();
|
||||||
|
$params['return'] = true;
|
||||||
|
$params['show_helptip'] = true;
|
||||||
|
$params['input_name'] = 'agent_name';
|
||||||
|
$params['value'] = $agent_alias;
|
||||||
|
$params['javascript_is_function_select'] = true;
|
||||||
|
$params['selectbox_id'] = 'prediction_module';
|
||||||
|
$params['none_module_text'] = __('Select Module');
|
||||||
|
$params['use_hidden_input_idagent'] = true;
|
||||||
|
$params['hidden_input_idagent_id'] = 'hidden-id_agente_module_prediction';
|
||||||
|
$data[1] .= ui_print_agent_autocomplete_input($params);
|
||||||
|
|
||||||
$data[1] .= html_print_label(__("Module"),'prediction_module',true);
|
$data[1] .= html_print_label(__("Module"),'prediction_module',true);
|
||||||
if ($id_agente) {
|
if ($id_agente) {
|
||||||
@ -154,7 +152,7 @@ $periods [1] = __('Monthly');
|
|||||||
$periods [2] = __('Daily');
|
$periods [2] = __('Daily');
|
||||||
$data[1] .= html_print_select ($periods, 'custom_integer_2', $custom_integer_2, '', '', 0, true);
|
$data[1] .= html_print_select ($periods, 'custom_integer_2', $custom_integer_2, '', '', 0, true);
|
||||||
|
|
||||||
$data[1] .= html_print_input_hidden ('id_agente', $id_agente, true);
|
$data[1] .= html_print_input_hidden ('id_agente_module_prediction', $id_agente, true);
|
||||||
$data[1] .= '</div>';
|
$data[1] .= '</div>';
|
||||||
|
|
||||||
$table_simple->colspan['prediction_module'][1] = 3;
|
$table_simple->colspan['prediction_module'][1] = 3;
|
||||||
|
@ -522,9 +522,9 @@ $table->data[5][1] = "
|
|||||||
"</td>
|
"</td>
|
||||||
<td>".
|
<td>".
|
||||||
html_print_input_text ('once_date_from', $once_date_from, '', 10, 10, true, $disabled_in_execution) .
|
html_print_input_text ('once_date_from', $once_date_from, '', 10, 10, true, $disabled_in_execution) .
|
||||||
ui_print_help_tip(__('Date format in Pandora is year/month/day'), true) .
|
ui_print_help_tip(__('Date format is YY/MM/DD'), true) .
|
||||||
html_print_input_text ('once_time_from', $once_time_from, '', 9, 9, true, $disabled_in_execution) .
|
html_print_input_text ('once_time_from', $once_time_from, '', 9, 9, true, $disabled_in_execution) .
|
||||||
ui_print_help_tip(__('Time format in Pandora is hours(24h):minutes:seconds'), true) .
|
ui_print_help_tip(__('Watch format is hours (24h):minutes:seconds'), true) .
|
||||||
"</td>
|
"</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -533,9 +533,9 @@ $table->data[5][1] = "
|
|||||||
"</td>
|
"</td>
|
||||||
<td>".
|
<td>".
|
||||||
html_print_input_text ('once_date_to', $once_date_to, '', 10, 10, true) .
|
html_print_input_text ('once_date_to', $once_date_to, '', 10, 10, true) .
|
||||||
ui_print_help_tip(__('Date format in Pandora is year/month/day'), true) .
|
ui_print_help_tip(__('Date format is YY/MM/DD'), true) .
|
||||||
html_print_input_text ('once_time_to', $once_time_to, '', 9, 9, true) .
|
html_print_input_text ('once_time_to', $once_time_to, '', 9, 9, true) .
|
||||||
ui_print_help_tip(__('Time format in Pandora is hours(24h):minutes:seconds'), true) .
|
ui_print_help_tip(__('Watch format is hours (24h):minutes:seconds'), true) .
|
||||||
"</td>
|
"</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -603,7 +603,7 @@ $table->data[5][1] = "
|
|||||||
html_print_input_text (
|
html_print_input_text (
|
||||||
'periodically_time_from',
|
'periodically_time_from',
|
||||||
$periodically_time_from, '', 7, 7, true, $disabled_in_execution) .
|
$periodically_time_from, '', 7, 7, true, $disabled_in_execution) .
|
||||||
ui_print_help_tip(__('Time format in Pandora is hours(24h):minutes:seconds').
|
ui_print_help_tip(__('Watch format is hours (24h):minutes:seconds.').
|
||||||
".<br>".__('The end time must be higher than the start time'), true) .
|
".<br>".__('The end time must be higher than the start time'), true) .
|
||||||
"</td>
|
"</td>
|
||||||
<td>" . __('To hour:') . "</td>
|
<td>" . __('To hour:') . "</td>
|
||||||
@ -611,7 +611,7 @@ $table->data[5][1] = "
|
|||||||
html_print_input_text (
|
html_print_input_text (
|
||||||
'periodically_time_to',
|
'periodically_time_to',
|
||||||
$periodically_time_to, '', 7, 7, true, $disabled_in_execution) .
|
$periodically_time_to, '', 7, 7, true, $disabled_in_execution) .
|
||||||
ui_print_help_tip(__('Time format in Pandora is hours(24h):minutes:seconds').
|
ui_print_help_tip(__('Watch format is hours (24h):minutes:seconds.').
|
||||||
".<br>".__('The end time must be higher than the start time'), true) .
|
".<br>".__('The end time must be higher than the start time'), true) .
|
||||||
"</td>
|
"</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -1186,6 +1186,7 @@ ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascri
|
|||||||
|
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
$("#id_agents").change(agent_changed_by_multiple_agents);
|
$("#id_agents").change(agent_changed_by_multiple_agents);
|
||||||
|
$("#modules_selection_mode").change(agent_changed_by_multiple_agents);
|
||||||
|
|
||||||
change_type_downtime();
|
change_type_downtime();
|
||||||
change_type_execution();
|
change_type_execution();
|
||||||
|
@ -168,9 +168,8 @@ if ($create_action) {
|
|||||||
$result = alerts_create_alert_action ($name, $id_alert_command,
|
$result = alerts_create_alert_action ($name, $id_alert_command,
|
||||||
$values);
|
$values);
|
||||||
|
|
||||||
$info = 'Name: ' . $name . ' ID alert Command: ' . $id_alert_command .
|
$info = '{"Name":"'.$name.'", "ID alert Command":"'.$id_alert_command.'", "Field information":"'.$info_fields.'", "Group":"'.$values['id_group'].'",
|
||||||
$info_fields . ' Group: ' . $values['id_group'] .
|
"Action threshold":"'.$values['action_threshold'].'"}';
|
||||||
' Action threshold: ' . $values['action_threshold'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
@ -245,10 +244,6 @@ if ($update_action) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$result = alerts_update_alert_action ($id, $values);
|
$result = alerts_update_alert_action ($id, $values);
|
||||||
|
|
||||||
$info = 'Name: ' . $name . ' ID alert Command: ' . $id_alert_command .
|
|
||||||
$info_fields . ' Group: ' . $group .
|
|
||||||
' Action threshold: ' . $action_threshold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
|
@ -294,7 +294,7 @@ if ($create_command) {
|
|||||||
$result = alerts_create_alert_command ($name, $command,
|
$result = alerts_create_alert_command ($name, $command,
|
||||||
$values);
|
$values);
|
||||||
|
|
||||||
$info = 'Name: ' . $name . ' Command: ' . $command . ' Description: ' . $description. ' ' .$info_fields;
|
$info = '{"Name":"'.$name.'","Command":"'.$command.'","Description":"'.$description. ' '.$info_fields.'"}';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$result = '';
|
$result = '';
|
||||||
|
@ -141,6 +141,12 @@ echo '<form class="add_alert_form" method="post">';
|
|||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
|
|
||||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||||
|
|
||||||
|
if($id_cluster){
|
||||||
|
echo "<input onclick='window.location.replace(\"index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_view&id=".$id_cluster."\");' type=button style='float:right;margin-left:20px;' name='store' class='sub upd' value='".__('Finish and view cluster')."'>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
html_print_submit_button (__('Add alert'), 'add', false, 'class="sub wand"');
|
html_print_submit_button (__('Add alert'), 'add', false, 'class="sub wand"');
|
||||||
html_print_input_hidden ('create_alert', 1);
|
html_print_input_hidden ('create_alert', 1);
|
||||||
echo '</div></form>';
|
echo '</div></form>';
|
||||||
|
@ -159,8 +159,14 @@ else {
|
|||||||
$form_filter .= "</form>";
|
$form_filter .= "</form>";
|
||||||
if ( defined("METACONSOLE"))
|
if ( defined("METACONSOLE"))
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
|
|
||||||
|
if(!$id_cluster){
|
||||||
|
ui_toggle($form_filter, __('Alert control filter'), __('Toggle filter(s)'));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
unset($form_filter);
|
||||||
|
}
|
||||||
|
|
||||||
ui_toggle($form_filter, __('Alert control filter'), __('Toggle filter(s)'));
|
|
||||||
|
|
||||||
$simple_alerts = array();
|
$simple_alerts = array();
|
||||||
|
|
||||||
@ -443,12 +449,11 @@ foreach ($simple_alerts as $alert) {
|
|||||||
|
|
||||||
if (! $id_agente) {
|
if (! $id_agente) {
|
||||||
$id_agent = modules_get_agentmodule_agent ($alert['id_agent_module']);
|
$id_agent = modules_get_agentmodule_agent ($alert['id_agent_module']);
|
||||||
|
$all_groups = agents_get_all_groups_agent($id_agent);
|
||||||
$agent_group = db_get_value('id_grupo', 'tagente', 'id_agente', $id_agent);
|
|
||||||
|
|
||||||
$data[0] = '';
|
$data[0] = '';
|
||||||
|
|
||||||
if (check_acl ($config['id_user'], $agent_group, "AW")) {
|
if (check_acl_one_of_groups ($config['id_user'], $all_groups, "AW")) {
|
||||||
$main_tab = 'main';
|
$main_tab = 'main';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -467,7 +472,7 @@ foreach ($simple_alerts as $alert) {
|
|||||||
$data[0] .= '</a>';
|
$data[0] .= '</a>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$agent_group = db_get_value('id_grupo', 'tagente', 'id_agente', $id_agente);
|
$all_groups = agents_get_all_groups_agent($id_agente);
|
||||||
}
|
}
|
||||||
|
|
||||||
$module_name = modules_get_agentmodule_name ($alert['id_agent_module']);
|
$module_name = modules_get_agentmodule_name ($alert['id_agent_module']);
|
||||||
@ -544,7 +549,7 @@ foreach ($simple_alerts as $alert) {
|
|||||||
$data[2] .= '</ul>';
|
$data[2] .= '</ul>';
|
||||||
|
|
||||||
// Is possible manage actions if have LW permissions in the agent group of the alert module
|
// Is possible manage actions if have LW permissions in the agent group of the alert module
|
||||||
if (check_acl ($config['id_user'], $agent_group, "LW")) {
|
if (check_acl_one_of_groups ($config['id_user'], $all_groups, "LW")) {
|
||||||
//~ $data[2] .= '<form method="post" action="' . $url . '" class="delete_link" style="display: inline; vertical-align: -50%;">';
|
//~ $data[2] .= '<form method="post" action="' . $url . '" class="delete_link" style="display: inline; vertical-align: -50%;">';
|
||||||
$data[2] .= '<form method="post" action="' . $url . '" class="delete_link" style="display: inline;">';
|
$data[2] .= '<form method="post" action="' . $url . '" class="delete_link" style="display: inline;">';
|
||||||
$data[2] .= html_print_input_image ('delete',
|
$data[2] .= html_print_input_image ('delete',
|
||||||
@ -568,7 +573,7 @@ foreach ($simple_alerts as $alert) {
|
|||||||
$data[2] .= '</div>';
|
$data[2] .= '</div>';
|
||||||
$data[2] .= '</table>';
|
$data[2] .= '</table>';
|
||||||
// Is possible manage actions if have LW permissions in the agent group of the alert module
|
// Is possible manage actions if have LW permissions in the agent group of the alert module
|
||||||
if (check_acl ($config['id_user'], $agent_group, "LW") || check_acl ($config['id_user'], $template_group, "LM")) {
|
if (check_acl_one_of_groups ($config['id_user'], $all_groups, "LW") || check_acl ($config['id_user'], $template_group, "LM")) {
|
||||||
$own_info = get_user_info($config['id_user']);
|
$own_info = get_user_info($config['id_user']);
|
||||||
if (check_acl ($config['id_user'], $template_group, "LW"))
|
if (check_acl ($config['id_user'], $template_group, "LW"))
|
||||||
$own_groups = users_get_groups($config['id_user'], 'LW', true);
|
$own_groups = users_get_groups($config['id_user'], 'LW', true);
|
||||||
@ -666,7 +671,7 @@ foreach ($simple_alerts as $alert) {
|
|||||||
$data[4] .= '</form>';
|
$data[4] .= '</form>';
|
||||||
|
|
||||||
// To manage alert is necessary LW permissions in the agent group
|
// To manage alert is necessary LW permissions in the agent group
|
||||||
if(check_acl ($config['id_user'], $agent_group, "LW")) {
|
if(check_acl_one_of_groups ($config['id_user'], $all_groups, "LW")) {
|
||||||
$data[4] .= ' <form class="standby_alert_form" action="' . $url . '" method="post" style="display: inline;">';
|
$data[4] .= ' <form class="standby_alert_form" action="' . $url . '" method="post" style="display: inline;">';
|
||||||
if (!$alert['standby']) {
|
if (!$alert['standby']) {
|
||||||
$data[4] .= html_print_input_image ('standby_off', 'images/bell.png', 1, 'padding:0px;', true);
|
$data[4] .= html_print_input_image ('standby_off', 'images/bell.png', 1, 'padding:0px;', true);
|
||||||
@ -681,7 +686,7 @@ foreach ($simple_alerts as $alert) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// To access to policy page is necessary have AW permissions in the agent
|
// To access to policy page is necessary have AW permissions in the agent
|
||||||
if(check_acl ($config['id_user'], $agent_group, "AW")) {
|
if(check_acl_one_of_groups ($config['id_user'], $all_groups, "AW")) {
|
||||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
||||||
$policyInfo = policies_is_alert_in_policy2($alert['id'], false);
|
$policyInfo = policies_is_alert_in_policy2($alert['id'], false);
|
||||||
if ($policyInfo === false)
|
if ($policyInfo === false)
|
||||||
@ -697,7 +702,7 @@ foreach ($simple_alerts as $alert) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// To manage alert is necessary LW permissions in the agent group
|
// To manage alert is necessary LW permissions in the agent group
|
||||||
if(check_acl ($config['id_user'], $agent_group, "LW")) {
|
if(check_acl_one_of_groups ($config['id_user'], $all_groups, "LW")) {
|
||||||
$data[4] .= ' <form class="delete_alert_form" action="' . $url . '" method="post" style="display: inline;">';
|
$data[4] .= ' <form class="delete_alert_form" action="' . $url . '" method="post" style="display: inline;">';
|
||||||
if ($alert['disabled']) {
|
if ($alert['disabled']) {
|
||||||
$data[4] .= html_print_image('images/add.disabled.png',
|
$data[4] .= html_print_image('images/add.disabled.png',
|
||||||
@ -714,7 +719,7 @@ foreach ($simple_alerts as $alert) {
|
|||||||
$data[4] .= '</form>';
|
$data[4] .= '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(check_acl ($config['id_user'], $agent_group, "LM")) {
|
if(check_acl_one_of_groups ($config['id_user'], $all_groups, "LM")) {
|
||||||
$data[4] .= '<form class="view_alert_form" method="post" style="display: inline;" action="index.php?sec=galertas&sec2=godmode/alerts/alert_view">';
|
$data[4] .= '<form class="view_alert_form" method="post" style="display: inline;" action="index.php?sec=galertas&sec2=godmode/alerts/alert_view">';
|
||||||
$data[4] .= html_print_input_image ('view_alert', 'images/eye.png', 1, '', true, array('title' => __('View alert advanced details')));
|
$data[4] .= html_print_input_image ('view_alert', 'images/eye.png', 1, '', true, array('title' => __('View alert advanced details')));
|
||||||
$data[4] .= html_print_input_hidden ('id_alert', $alert['id'], true);
|
$data[4] .= html_print_input_hidden ('id_alert', $alert['id'], true);
|
||||||
@ -737,7 +742,7 @@ if (isset($dont_display_alert_create_bttn))
|
|||||||
if ($dont_display_alert_create_bttn)
|
if ($dont_display_alert_create_bttn)
|
||||||
$display_create = false;
|
$display_create = false;
|
||||||
|
|
||||||
if ($display_create && (check_acl ($config['id_user'], 0, "LW") || check_acl ($config['id_user'], $template_group, "LM"))) {
|
if ($display_create && (check_acl ($config['id_user'], 0, "LW") || check_acl ($config['id_user'], $template_group, "LM")) && !$id_cluster) {
|
||||||
echo '<div class="action-buttons" style="width: ' . $table->width . '">';
|
echo '<div class="action-buttons" style="width: ' . $table->width . '">';
|
||||||
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">';
|
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">';
|
||||||
html_print_submit_button (__('Create'), 'crtbtn', false, 'class="sub next"');
|
html_print_submit_button (__('Create'), 'crtbtn', false, 'class="sub next"');
|
||||||
|
@ -90,14 +90,17 @@ if ($create_alert) {
|
|||||||
"tagente_modulo","id_agente_modulo", $id_agent_module));
|
"tagente_modulo","id_agente_modulo", $id_agent_module));
|
||||||
|
|
||||||
// Audit the creation only when the alert creation is correct
|
// Audit the creation only when the alert creation is correct
|
||||||
|
$unsafe_alert_template_name = io_safe_output($alert_template_name);
|
||||||
|
$unsafe_module_name = io_safe_output($module_name);
|
||||||
|
$unsafe_agent_alias = io_safe_output($agent_alias);
|
||||||
if ($id) {
|
if ($id) {
|
||||||
db_pandora_audit("Alert management",
|
db_pandora_audit("Alert management",
|
||||||
"Added alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'",
|
"Added alert '$unsafe_alert_template_name' for module '$unsafe_module_name' in agent '$unsafe_agent_alias'",
|
||||||
false, false, 'ID: ' . $id);
|
false, false, 'ID: ' . $id);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
db_pandora_audit("Alert management",
|
db_pandora_audit("Alert management",
|
||||||
"Fail Added alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'");
|
"Fail Added alert '$unsafe_alert_template_name' for module '$unsafe_module_name' in agent '$unsafe_agent_alias'");
|
||||||
}
|
}
|
||||||
|
|
||||||
$messageAction = ui_print_result_message ($id,
|
$messageAction = ui_print_result_message ($id,
|
||||||
@ -143,6 +146,20 @@ if ($delete_alert) {
|
|||||||
|
|
||||||
$messageAction = ui_print_result_message ($result,
|
$messageAction = ui_print_result_message ($result,
|
||||||
__('Successfully deleted'), __('Could not be deleted'), '', true);
|
__('Successfully deleted'), __('Could not be deleted'), '', true);
|
||||||
|
|
||||||
|
$id_cluster = db_get_all_rows_sql('select id,cluster_type from tcluster where id_agent = '.$id_agente);
|
||||||
|
|
||||||
|
if($id_cluster){
|
||||||
|
|
||||||
|
if($id_cluster[0]['cluster_type'] == 'AA'){
|
||||||
|
header('Location: index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$id_cluster[0]['id'].'&step=5&update=1&message_delete_alert='.$result);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
header('Location: index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$id_cluster[0]['id'].'&step=7&update=1&message_delete_alert='.$result);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($add_action) {
|
if ($add_action) {
|
||||||
@ -211,6 +228,20 @@ if ($delete_action) {
|
|||||||
|
|
||||||
$messageAction = ui_print_result_message ($result,
|
$messageAction = ui_print_result_message ($result,
|
||||||
__('Successfully deleted'), __('Could not be deleted'), '', true);
|
__('Successfully deleted'), __('Could not be deleted'), '', true);
|
||||||
|
|
||||||
|
$id_cluster = db_get_all_rows_sql('select id,cluster_type from tcluster where id_agent = '.$id_agente);
|
||||||
|
|
||||||
|
if($id_cluster){
|
||||||
|
|
||||||
|
if($id_cluster[0]['cluster_type'] == 'AA'){
|
||||||
|
header('Location: index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$id_cluster[0]['id'].'&step=5&update=1&message_delete_action='.$result);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
header('Location: index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$id_cluster[0]['id'].'&step=7&update=1&message_delete_action='.$result);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($enable_alert) {
|
if ($enable_alert) {
|
||||||
@ -228,6 +259,19 @@ if ($enable_alert) {
|
|||||||
|
|
||||||
$messageAction = ui_print_result_message ($result,
|
$messageAction = ui_print_result_message ($result,
|
||||||
__('Successfully enabled'), __('Could not be enabled'), '', true);
|
__('Successfully enabled'), __('Could not be enabled'), '', true);
|
||||||
|
|
||||||
|
$id_cluster = db_get_all_rows_sql('select id,cluster_type from tcluster where id_agent = '.$id_agente);
|
||||||
|
|
||||||
|
if($id_cluster){
|
||||||
|
|
||||||
|
if($id_cluster[0]['cluster_type'] == 'AA'){
|
||||||
|
header('Location: index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$id_cluster[0]['id'].'&step=5&update=1&message_enable_alert='.$result);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
header('Location: index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$id_cluster[0]['id'].'&step=7&update=1&message_enable_alert='.$result);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($disable_alert) {
|
if ($disable_alert) {
|
||||||
@ -245,6 +289,20 @@ if ($disable_alert) {
|
|||||||
|
|
||||||
$messageAction = ui_print_result_message ($result,
|
$messageAction = ui_print_result_message ($result,
|
||||||
__('Successfully disabled'), __('Could not be disabled'), '', true);
|
__('Successfully disabled'), __('Could not be disabled'), '', true);
|
||||||
|
|
||||||
|
$id_cluster = db_get_all_rows_sql('select id,cluster_type from tcluster where id_agent = '.$id_agente);
|
||||||
|
|
||||||
|
if($id_cluster){
|
||||||
|
|
||||||
|
if($id_cluster[0]['cluster_type'] == 'AA'){
|
||||||
|
header('Location: index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$id_cluster[0]['id'].'&step=5&update=1&message_disable_alert='.$result);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
header('Location: index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$id_cluster[0]['id'].'&step=7&update=1&message_disable_alert='.$result);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($standbyon_alert) {
|
if ($standbyon_alert) {
|
||||||
@ -262,6 +320,19 @@ if ($standbyon_alert) {
|
|||||||
|
|
||||||
$messageAction = ui_print_result_message ($result,
|
$messageAction = ui_print_result_message ($result,
|
||||||
__('Successfully set standby'), __('Could not be set standby'), '', true);
|
__('Successfully set standby'), __('Could not be set standby'), '', true);
|
||||||
|
|
||||||
|
$id_cluster = db_get_all_rows_sql('select id,cluster_type from tcluster where id_agent = '.$id_agente);
|
||||||
|
|
||||||
|
if($id_cluster){
|
||||||
|
|
||||||
|
if($id_cluster[0]['cluster_type'] == 'AA'){
|
||||||
|
header('Location: index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$id_cluster[0]['id'].'&step=5&update=1&message_standbyon='.$result);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
header('Location: index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$id_cluster[0]['id'].'&step=7&update=1&message_standbyon='.$result);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($standbyoff_alert) {
|
if ($standbyoff_alert) {
|
||||||
@ -279,6 +350,19 @@ if ($standbyoff_alert) {
|
|||||||
|
|
||||||
$messageAction = ui_print_result_message ($result,
|
$messageAction = ui_print_result_message ($result,
|
||||||
__('Successfully set off standby'), __('Could not be set off standby'), '', true);
|
__('Successfully set off standby'), __('Could not be set off standby'), '', true);
|
||||||
|
|
||||||
|
$id_cluster = db_get_all_rows_sql('select id,cluster_type from tcluster where id_agent = '.$id_agente);
|
||||||
|
|
||||||
|
if($id_cluster){
|
||||||
|
|
||||||
|
if($id_cluster[0]['cluster_type'] == 'AA'){
|
||||||
|
header('Location: index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$id_cluster[0]['id'].'&step=5&update=1&message_standbyoff='.$result);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
header('Location: index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&id_cluster='.$id_cluster[0]['id'].'&step=7&update=1&message_standbyoff='.$result);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($id_agente) {
|
if ($id_agente) {
|
||||||
@ -294,8 +378,8 @@ if ($id_agente) {
|
|||||||
echo $messageAction;
|
echo $messageAction;
|
||||||
|
|
||||||
require_once('godmode/alerts/alert_list.list.php');
|
require_once('godmode/alerts/alert_list.list.php');
|
||||||
|
$all_groups = agents_get_all_groups_agent ($id_agente, $agent['id_grupo']);
|
||||||
if(check_acl ($config['id_user'], $agent['id_grupo'], "LW") || check_acl ($config['id_user'], $agent['id_grupo'], "LM")) {
|
if(check_acl_one_of_groups ($config['id_user'], $all_groups, "LW") || check_acl_one_of_groups ($config['id_user'], $all_groups, "LM")) {
|
||||||
require_once('godmode/alerts/alert_list.builder.php');
|
require_once('godmode/alerts/alert_list.builder.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ if ($create_special_day) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$result = alerts_create_alert_special_day ($date, $same_day, $values);
|
$result = alerts_create_alert_special_day ($date, $same_day, $values);
|
||||||
$info = 'Date: ' . $date . ' Same day of the week: ' . $same_day . ' Description: ' . $values['description'];
|
$info = '{"Date":"'.$date.'","Same day of the week":"'.$same_day.'","Description":"'.$values['description'].'"}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,12 +186,12 @@ if ($update_special_day) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$result = alerts_update_alert_special_day ($id, $values);
|
$result = alerts_update_alert_special_day ($id, $values);
|
||||||
$info = 'Date: ' . $date . ' Same day of the week: ' . $same_day . ' Description: ' . $description;
|
$info = '{"Date":"'.$date.'","Same day of the week":"'.$same_day.'","Description":"'.$description.'"}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$result = alerts_update_alert_special_day ($id, $values);
|
$result = alerts_update_alert_special_day ($id, $values);
|
||||||
$info = 'Date: ' . $date . ' Same day of the week: ' . $same_day . ' Description: ' . $description;
|
$info = '{"Date":"'.$date.'","Same day of the week":"'.$same_day.'","Description":"'.$description.'"}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user