mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Merge remote-tracking branch 'origin/develop' into ent-7786-agentes-asignados-a-politicas-en-metaconsola
This commit is contained in:
commit
edc345acea
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.755, AIX version
|
# Version 7.0NG.756, AIX version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 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.755, FreeBSD Version
|
# Version 7.0NG.756, FreeBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 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.755, HP-UX Version
|
# Version 7.0NG.756, HP-UX Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 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.755, GNU/Linux
|
# Version 7.0NG.756, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 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.755, GNU/Linux
|
# Version 7.0NG.756, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 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.755, Solaris Version
|
# Version 7.0NG.756, Solaris Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 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-2021 Artica Soluciones Tecnologicas
|
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||||
# Version 7.0NG.755
|
# Version 7.0NG.756
|
||||||
# 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
|
||||||
# Foundation; either version 2 of the Licence or any later version
|
# Foundation; either version 2 of the Licence or any later version
|
||||||
|
@ -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.755, AIX version
|
# Version 7.0NG.756, 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.755
|
# Version 7.0NG.756
|
||||||
# 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.755, HPUX Version
|
# Version 7.0NG.756, 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.755
|
# Version 7.0NG.756
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
# (c) 2003-2021 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.755
|
# Version 7.0NG.756
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
# (c) 2003-2021 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.755
|
# Version 7.0NG.756
|
||||||
# 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.755, Solaris version
|
# Version 7.0NG.756, 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.755, AIX version
|
# Version 7.0NG.756, AIX version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.755-210720
|
Version: 7.0NG.756-210722
|
||||||
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.755-210720"
|
pandora_version="7.0NG.756-210722"
|
||||||
|
|
||||||
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
|
||||||
|
@ -31,7 +31,7 @@ fi
|
|||||||
if [ "$#" -ge 2 ]; then
|
if [ "$#" -ge 2 ]; then
|
||||||
VERSION="$2"
|
VERSION="$2"
|
||||||
else
|
else
|
||||||
VERSION="7.0NG.755"
|
VERSION="7.0NG.756"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Path for the generated DMG file
|
# Path for the generated DMG file
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
<choice id="com.pandorafms.pandorafms_src" visible="false">
|
<choice id="com.pandorafms.pandorafms_src" visible="false">
|
||||||
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
||||||
</choice>
|
</choice>
|
||||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.755" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.756" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||||
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
|
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
|
||||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
||||||
</choice>
|
</choice>
|
||||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.755" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.756" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||||
<!-- <installation-check script="check()" />
|
<!-- <installation-check script="check()" />
|
||||||
<script>
|
<script>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
|
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
|
||||||
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
|
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
|
||||||
|
|
||||||
<key>CFBundleVersion</key> <string>7.0NG.755</string>
|
<key>CFBundleVersion</key> <string>7.0NG.756</string>
|
||||||
<key>CFBundleGetInfoString</key> <string>7.0NG.755 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
<key>CFBundleGetInfoString</key> <string>7.0NG.756 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||||
<key>CFBundleShortVersionString</key> <string>7.0NG.755</string>
|
<key>CFBundleShortVersionString</key> <string>7.0NG.756</string>
|
||||||
|
|
||||||
<key>NSPrincipalClass</key><string>NSApplication</string>
|
<key>NSPrincipalClass</key><string>NSApplication</string>
|
||||||
<key>NSMainNibFile</key><string>MainMenu</string>
|
<key>NSMainNibFile</key><string>MainMenu</string>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.755, GNU/Linux
|
# Version 7.0NG.756, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 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.755, FreeBSD Version
|
# Version 7.0NG.756, FreeBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 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.755, HP-UX Version
|
# Version 7.0NG.756, HP-UX Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 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.755, GNU/Linux
|
# Version 7.0NG.756, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 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.755, GNU/Linux
|
# Version 7.0NG.756, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 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.755, NetBSD Version
|
# Version 7.0NG.756, NetBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 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.755, Solaris Version
|
# Version 7.0NG.756, Solaris Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1014,8 +1014,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.755';
|
use constant AGENT_VERSION => '7.0NG.756';
|
||||||
use constant AGENT_BUILD => '210720';
|
use constant AGENT_BUILD => '210722';
|
||||||
|
|
||||||
# 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;
|
||||||
|
@ -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.755
|
%define version 7.0NG.756
|
||||||
%define release 210720
|
%define release 210722
|
||||||
|
|
||||||
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.755
|
%define version 7.0NG.756
|
||||||
%define release 210720
|
%define release 210722
|
||||||
|
|
||||||
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.755"
|
PI_VERSION="7.0NG.756"
|
||||||
PI_BUILD="210720"
|
PI_BUILD="210722"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Base config file for Pandora FMS Windows Agent
|
# Base config file for Pandora FMS Windows Agent
|
||||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||||
# Version 7.0NG.755
|
# Version 7.0NG.756
|
||||||
# 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
|
||||||
# Foundation; either version 2 of the Licence or any later version
|
# Foundation; either version 2 of the Licence or any later version
|
||||||
|
@ -3,7 +3,7 @@ AllowLanguageSelection
|
|||||||
{Yes}
|
{Yes}
|
||||||
|
|
||||||
AppName
|
AppName
|
||||||
{Pandora FMS Windows Agent v7.0NG.755}
|
{Pandora FMS Windows Agent v7.0NG.756}
|
||||||
|
|
||||||
ApplicationID
|
ApplicationID
|
||||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||||
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{210720}
|
{210722}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
@ -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.755 Build 210720")
|
#define PANDORA_VERSION ("7.0NG.756 Build 210722")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -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.755(Build 210720))"
|
VALUE "ProductVersion", "(7.0NG.756(Build 210722))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.755-210720
|
Version: 7.0NG.756-210722
|
||||||
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.755-210720"
|
pandora_version="7.0NG.756-210722"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
|
|
||||||
|
ALTER TABLE `tmetaconsole_setup` ADD COLUMN `unified` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||||
ALTER TABLE `tlayout` ADD COLUMN `auto_adjust` INTEGER UNSIGNED NOT NULL default 0;
|
ALTER TABLE `tlayout` ADD COLUMN `auto_adjust` INTEGER UNSIGNED NOT NULL default 0;
|
||||||
ALTER TABLE `tlayout_data` ADD COLUMN `title` TEXT default '';
|
ALTER TABLE `tlayout_data` ADD COLUMN `title` TEXT default '';
|
||||||
|
|
||||||
@ -24,8 +25,6 @@ CREATE TABLE IF NOT EXISTS `tsync_queue` (
|
|||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
SOURCE './procedures/updateSnmpAlerts.sql';
|
|
||||||
|
|
||||||
UPDATE `tlink` SET `link` = 'https://pandorafms.com/manual/' WHERE `id_link` = 0000000001;
|
UPDATE `tlink` SET `link` = 'https://pandorafms.com/manual/' WHERE `id_link` = 0000000001;
|
||||||
|
|
||||||
UPDATE pandora.tuser_task
|
UPDATE pandora.tuser_task
|
||||||
@ -37,7 +36,7 @@ UPDATE `tuser_task_scheduled` SET
|
|||||||
`args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:7;s:3:"PDF";s:15:"first_execution"')
|
`args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:7;s:3:"PDF";s:15:"first_execution"')
|
||||||
WHERE `id_user_task` = 2;
|
WHERE `id_user_task` = 2;
|
||||||
|
|
||||||
UPDATE `tconfig` SET `value` = 0 WHERE `token` = `centralized_management`;
|
UPDATE `tconfig` SET `value` = 0 WHERE `token` = 'centralized_management';
|
||||||
|
|
||||||
DELETE ta FROM `tagente` ta LEFT JOIN `tgrupo` tg on ta.`id_grupo` = tg.`id_grupo` WHERE tg.`id_grupo` IS NULL;
|
DELETE ta FROM `tagente` ta LEFT JOIN `tgrupo` tg on ta.`id_grupo` = tg.`id_grupo` WHERE tg.`id_grupo` IS NULL;
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
DELIMITER //
|
|
||||||
CREATE PROCEDURE updateSnmpAlerts()
|
CREATE PROCEDURE updateSnmpAlerts()
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE tokenId INT DEFAULT 0;
|
DECLARE tokenId INT DEFAULT 0;
|
||||||
@ -33,7 +32,4 @@ BEGIN
|
|||||||
UPDATE tconfig SET value = 1 WHERE token = 'update_snmp_alerts_procedure_already_run';
|
UPDATE tconfig SET value = 1 WHERE token = 'update_snmp_alerts_procedure_already_run';
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
END//
|
END
|
||||||
DELIMITER ;
|
|
||||||
CALL updateSnmpAlerts();
|
|
||||||
DROP PROCEDURE updateSnmpAlerts;
|
|
@ -418,6 +418,8 @@ ALTER TABLE `tmetaconsole_setup` MODIFY COLUMN `meta_dbuser` text NULL,
|
|||||||
|
|
||||||
ALTER TABLE `tmetaconsole_setup` ADD COLUMN `server_uid` TEXT NOT NULL default '';
|
ALTER TABLE `tmetaconsole_setup` ADD COLUMN `server_uid` TEXT NOT NULL default '';
|
||||||
|
|
||||||
|
ALTER TABLE `tmetaconsole_setup` ADD COLUMN `unified` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- Table `tprofile_view`
|
-- Table `tprofile_view`
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
|
79
pandora_console/general/node_deactivated.php
Normal file
79
pandora_console/general/node_deactivated.php
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Static page to lock access to console
|
||||||
|
*
|
||||||
|
* @category Wizard
|
||||||
|
* @package Pandora FMS
|
||||||
|
* @subpackage Applications.VMware
|
||||||
|
* @version 1.0.0
|
||||||
|
* @license See below
|
||||||
|
*
|
||||||
|
* ______ ___ _______ _______ ________
|
||||||
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||||
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||||
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||||
|
*
|
||||||
|
* ============================================================================
|
||||||
|
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||||
|
* Please see http://pandorafms.org for full contribution list
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation for version 2.
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
* ============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Begin.
|
||||||
|
ui_require_css_file('maintenance');
|
||||||
|
?>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="responsive center padding-6">
|
||||||
|
<p><?php echo __('You cannot use this node until system is unified'); ?></p>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
html_print_image(
|
||||||
|
'images/maintenance.png',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'class' => 'responsive',
|
||||||
|
'width' => 800,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo __(
|
||||||
|
'Please navigate to %s to unify system',
|
||||||
|
'<a href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=advanced/command_center'
|
||||||
|
).'" target="_new">'.__('command center').'</a>'
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<br>
|
||||||
|
<p><?php echo __('You will be automatically redirected when all tasks finish'); ?></p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
setTimeout(
|
||||||
|
function() {
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
10000
|
||||||
|
);
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
@ -941,6 +941,15 @@ class Client
|
|||||||
$queries = preg_split("/(;\n)|(;\n\r)/", $sql);
|
$queries = preg_split("/(;\n)|(;\n\r)/", $sql);
|
||||||
foreach ($queries as $query) {
|
foreach ($queries as $query) {
|
||||||
if (empty($query) !== true) {
|
if (empty($query) !== true) {
|
||||||
|
if (preg_match('/^\s*LOAD\s+(.*)$/i', $query, $matches) > 0) {
|
||||||
|
$filepath = dirname($mr_file).'/'.$matches[1];
|
||||||
|
if (file_exists($filepath) === true) {
|
||||||
|
$query = file_get_contents($filepath);
|
||||||
|
} else {
|
||||||
|
throw new \Exception('Cannot load file: '.$filepath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($dbh->query($query) === false) {
|
if ($dbh->query($query) === false) {
|
||||||
// 1022: Duplicate key in table.
|
// 1022: Duplicate key in table.
|
||||||
// 1050: Table already defined.
|
// 1050: Table already defined.
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC210720';
|
$build_version = 'PC210722';
|
||||||
$pandora_version = 'v7.0NG.755';
|
$pandora_version = 'v7.0NG.756';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
$script_tz = @date_default_timezone_get();
|
$script_tz = @date_default_timezone_get();
|
||||||
|
@ -1752,11 +1752,27 @@ function has_metaconsole()
|
|||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function is_management_allowed($hkey='')
|
function is_management_allowed($hkey='')
|
||||||
|
{
|
||||||
|
return ( (is_metaconsole() && is_centrallised())
|
||||||
|
|| (!is_metaconsole() && !is_centrallised())
|
||||||
|
|| (!is_metaconsole() && is_centrallised()) && $hkey == generate_hash_to_api());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if is a centrallised environment.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
function is_centrallised()
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
return ( (is_metaconsole() && $config['centralized_management'])
|
|
||||||
|| (!is_metaconsole() && !$config['centralized_management'])
|
if (isset($config['centralized_management']) === false) {
|
||||||
|| (!is_metaconsole() && $config['centralized_management']) && $hkey == generate_hash_to_api());
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (bool) $config['centralized_management'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1768,8 +1784,7 @@ function is_management_allowed($hkey='')
|
|||||||
*/
|
*/
|
||||||
function is_central_policies()
|
function is_central_policies()
|
||||||
{
|
{
|
||||||
global $config;
|
return is_metaconsole() && is_centrallised();
|
||||||
return is_metaconsole() && $config['centralized_management'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,8 +22,12 @@ h1 {
|
|||||||
color: #83b92f;
|
color: #83b92f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p a {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
font-size: 2rem;
|
font-size: 1rem;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
letter-spacing: 1.5px;
|
letter-spacing: 1.5px;
|
||||||
font-weight: lighter;
|
font-weight: lighter;
|
||||||
|
@ -1040,6 +1040,30 @@ if (isset($_GET['bye'])) {
|
|||||||
|
|
||||||
clear_pandora_error_for_header();
|
clear_pandora_error_for_header();
|
||||||
|
|
||||||
|
if ((bool) $config['node_deactivated'] === true) {
|
||||||
|
// Prevent access node if not merged.
|
||||||
|
include 'general/node_deactivated.php';
|
||||||
|
|
||||||
|
while (ob_get_length() > 0) {
|
||||||
|
ob_end_flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
exit('</html>');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((bool) $config['maintenance_mode'] === true
|
||||||
|
&& (bool) users_is_admin() === false
|
||||||
|
) {
|
||||||
|
// Show maintenance web-page. For non-admin users only.
|
||||||
|
include 'general/maintenance.php';
|
||||||
|
|
||||||
|
while (ob_get_length() > 0) {
|
||||||
|
ob_end_flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
exit('</html>');
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------
|
* ----------------------------------------------------------------------
|
||||||
* EXTENSIONS
|
* EXTENSIONS
|
||||||
@ -1087,21 +1111,6 @@ if (get_parameter('login', 0) !== 0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((bool) $config['maintenance_mode'] === true
|
|
||||||
&& (bool) users_is_admin() === false
|
|
||||||
) {
|
|
||||||
// Show maintenance web-page. For non-admin users only.
|
|
||||||
include 'general/maintenance.php';
|
|
||||||
|
|
||||||
while (ob_get_length() > 0) {
|
|
||||||
ob_end_flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
exit('</html>');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Header.
|
// Header.
|
||||||
if ($config['pure'] == 0) {
|
if ($config['pure'] == 0) {
|
||||||
echo '<div id="container"><div id="head">';
|
echo '<div id="container"><div id="head">';
|
||||||
|
@ -128,8 +128,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.755';
|
$version = '7.0NG.756';
|
||||||
$build = '210720';
|
$build = '210722';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
# Pandora FMS Console
|
# Pandora FMS Console
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.755
|
%define version 7.0NG.756
|
||||||
%define release 210720
|
%define release 210722
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
# Pandora FMS Console
|
# Pandora FMS Console
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.755
|
%define version 7.0NG.756
|
||||||
%define release 210720
|
%define release 210722
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
# Pandora FMS Console
|
# Pandora FMS Console
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.755
|
%define version 7.0NG.756
|
||||||
%define release 210720
|
%define release 210722
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name apache2
|
%define httpd_name apache2
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# This code is licensed under GPL 2.0 license.
|
# This code is licensed under GPL 2.0 license.
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.755"
|
PI_VERSION="7.0NG.756"
|
||||||
FORCE=0
|
FORCE=0
|
||||||
DESTDIR=""
|
DESTDIR=""
|
||||||
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
|
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
|
||||||
|
@ -2747,8 +2747,9 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_setup` (
|
|||||||
`auth_token` text,
|
`auth_token` text,
|
||||||
`id_group` int(10) unsigned NOT NULL default 0,
|
`id_group` int(10) unsigned NOT NULL default 0,
|
||||||
`api_password` text NOT NULL,
|
`api_password` text NOT NULL,
|
||||||
`disabled` tinyint(1) unsigned NOT NULL default '0',
|
`disabled` tinyint(1) unsigned NOT NULL default 0,
|
||||||
`last_event_replication` bigint(20) default '0',
|
`unified` tinyint(1) unsigned NOT NULL default 0,
|
||||||
|
`last_event_replication` bigint(20) default 0,
|
||||||
`server_uid` text NOT NULL default '',
|
`server_uid` text NOT NULL default '',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB
|
) ENGINE=InnoDB
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.755-210720
|
Version: 7.0NG.756-210722
|
||||||
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.755-210720"
|
pandora_version="7.0NG.756-210722"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
# Pandora FMS Server Daemon launcher for FreeBSD
|
# Pandora FMS Server Daemon launcher through pandora_ha for FreeBSD
|
||||||
# (c) 2010 Junichi Satoh <junichi@rworks.jp>
|
# (c) 2010-2021 Junichi Satoh <junichi@rworks.jp>
|
||||||
# (c) 2014 Koichiro Kikuchi <koichiro@rworks.jp>
|
# (c) 2014 Koichiro Kikuchi <koichiro@rworks.jp>
|
||||||
#
|
#
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
@ -13,63 +13,51 @@
|
|||||||
|
|
||||||
# Add the following lines to /etc/rc.conf to enable pandora_server:
|
# Add the following lines to /etc/rc.conf to enable pandora_server:
|
||||||
# pandora_server_enable (bool): Set to "YES" to enable pandora_server (default: NO)
|
# pandora_server_enable (bool): Set to "YES" to enable pandora_server (default: NO)
|
||||||
# pandora_server_profiles (str): Define your profiles here (default: "")
|
|
||||||
#
|
#
|
||||||
|
|
||||||
. "/etc/rc.subr"
|
. "/etc/rc.subr"
|
||||||
|
|
||||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
|
name="pandora_ha"
|
||||||
|
|
||||||
name="pandora_server"
|
|
||||||
rcvar=pandora_server_enable
|
rcvar=pandora_server_enable
|
||||||
|
|
||||||
: ${pandora_server_enable:=NO}
|
: ${pandora_server_enable:=NO}
|
||||||
: ${pandora_server_configfile:=/usr/local/etc/pandora/pandora_server.conf}
|
: ${pandora_server_configfile:=/usr/local/etc/pandora/pandora_server.conf}
|
||||||
|
|
||||||
command=/usr/local/bin/${name}
|
command=/usr/local/bin/pandora_ha
|
||||||
command_args="-D"
|
command_pandora=/usr/local/bin/pandora_server
|
||||||
command_interpreter=/usr/local/bin/perl
|
command_interpreter=/usr/local/bin/perl
|
||||||
_pidprefix=/var/run/$name
|
_pidprefix=/var/run/pandora_ha
|
||||||
|
_pidprefix_pandora=/var/run/pandora_server
|
||||||
pidfile=${_pidprefix}.pid
|
pidfile=${_pidprefix}.pid
|
||||||
|
pidfile_pandora=${_pidprefix_pandora}.pid
|
||||||
required_files="$pandora_server_configfile"
|
required_files="$pandora_server_configfile"
|
||||||
|
extra_commands="status_server start_server stop_server restart_server"
|
||||||
|
|
||||||
|
stop_postcmd=stop_postcmd
|
||||||
|
|
||||||
|
status_server_cmd=control_pandora_server
|
||||||
|
start_server_cmd=control_pandora_server
|
||||||
|
stop_server_cmd=control_pandora_server
|
||||||
|
restart_server_cmd=control_pandora_server
|
||||||
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
|
|
||||||
if [ "$2" ]; then
|
control_pandora_server() {
|
||||||
profile="$2"
|
local name command pidfile
|
||||||
if [ "$pandora_server_profiles" ]; then
|
name="pandora_server"
|
||||||
pidfile="${_pidprefix}.${profile}.pid"
|
command=$command_pandora
|
||||||
eval pandora_server_configfile="\${pandora_server_${profile}_configfile:-}"
|
pidfile=$pidfile_pandora
|
||||||
if [ -z "$pandora_server_configfile" ]; then
|
pandora_server_flags="-D $pandora_server_flags -P $pidfile_pandora $pandora_server_configfile"
|
||||||
echo "You must define a configuration file (pandora_server_${profile}_configfile)"
|
pandora_arg=`echo $rc_arg | sed 's/_server//g'`
|
||||||
exit 1
|
unset "${pandora_arg}_cmd" "${pandora_arg}_precmd" "${pandora_arg}_postcmd"
|
||||||
fi
|
run_rc_command $pandora_arg
|
||||||
required_files="$pandora_server_configfile"
|
}
|
||||||
eval pandora_server_enable="\${pandora_server_${profile}_enable:-$pandora_server_enable}"
|
|
||||||
eval pandora_server_flags="\${pandora_server_${profile}_flags:-$pandora_server_flags}"
|
|
||||||
eval pidfile="\${pandora_server_${profile}_pidfile:-$pidfile}"
|
|
||||||
else
|
|
||||||
echo "$0: extra argument ignored"
|
|
||||||
fi
|
|
||||||
elif [ "${pandora_server_profiles}" ] && [ "$1" ]; then
|
|
||||||
for profile in ${pandora_server_profiles}; do
|
|
||||||
eval _enable="\${pandora_server_${profile}_enable}"
|
|
||||||
case "${_enable:-${pandora_server_enable}}" in
|
|
||||||
[Yy][Ee][Ss]);;
|
|
||||||
*) continue;;
|
|
||||||
esac
|
|
||||||
echo "===> pandora_server profile: ${profile}"
|
|
||||||
/usr/local/etc/rc.d/pandora_server $1 ${profile}
|
|
||||||
retcode="$?"
|
|
||||||
if [ "0${retcode}" -ne 0 ]; then
|
|
||||||
failed="${profile} (${retcode}) ${failed:-}"
|
|
||||||
else
|
|
||||||
success="${profile} ${success:-}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
pandora_server_flags="$pandora_server_flags -P $pidfile $pandora_server_configfile"
|
stop_postcmd()
|
||||||
|
{
|
||||||
|
rm -f $pidfile
|
||||||
|
}
|
||||||
|
|
||||||
|
pandora_ha_flags="-d -p $pidfile $pandora_server_configfile"
|
||||||
|
|
||||||
run_rc_command "$1"
|
run_rc_command "$1"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
# Tentacle Server Daemon launcher for FreeBSD
|
# Tentacle Server Daemon launcher for FreeBSD
|
||||||
# (c) 2010-2012 Junichi Satoh <junichi@rworks.jp>
|
# (c) 2010-2021 Junichi Satoh <junichi@rworks.jp>
|
||||||
#
|
#
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
@ -21,17 +21,23 @@ name="tentacle_server"
|
|||||||
rcvar=tentacle_server_enable
|
rcvar=tentacle_server_enable
|
||||||
|
|
||||||
# read configuration and set defaults
|
# read configuration and set defaults
|
||||||
tentacle_server_enable=${tentacle_server_enable:-"NO"}
|
|
||||||
tentacle_server_flags=${tentacle_server_flags:-'-a 0.0.0.0 -p 41121 -s /var/spool/pandora/data_in -i.*\.conf:conf\;.*\.md5:md5\;.*\.zip:collections -d'}
|
|
||||||
tentacle_server_user=${tentacle_server_user:-"pandora"}
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
|
: ${tentacle_server_enable="NO"}
|
||||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
|
: ${tentacle_server_config="/usr/local/etc/tentacle/${name}.conf"}
|
||||||
|
: ${tentacle_server_pidfile="/var/run/${name}.pid"}
|
||||||
|
|
||||||
command=/usr/local/bin/${name}
|
command=/usr/local/bin/${name}
|
||||||
command_interpreter=/usr/local/bin/perl
|
command_interpreter=/usr/local/bin/perl
|
||||||
|
tentacle_server_user=${tentacle_server_user:-"pandora"}
|
||||||
|
#
|
||||||
|
# Use tentacle_server.conf by default.
|
||||||
|
tentacle_server_flags="-F ${tentacle_server_config}"
|
||||||
|
#
|
||||||
|
# Each parameters can also be specified as arguments like this:
|
||||||
|
#tentacle_server_flags=${tentacle_server_flags:-'-a 0.0.0.0 -p 41121 -s /var/spool/pandora/data_in -i.*\.conf:conf\;.*\.md5:md5\;.*\.zip:collections -d'}
|
||||||
|
#
|
||||||
procname=$command
|
procname=$command
|
||||||
pidfile=/var/run/$name.pid
|
pidfile=${tentacle_server_pidfile}
|
||||||
|
|
||||||
start_postcmd=start_postcmd
|
start_postcmd=start_postcmd
|
||||||
stop_postcmd=stop_postcmd
|
stop_postcmd=stop_postcmd
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#############################################################################
|
#############################################################################
|
||||||
# Pandora FMS Server Parameters
|
# Pandora FMS Server Parameters
|
||||||
# Pandora FMS, the Flexible Monitoring System.
|
# Pandora FMS, the Flexible Monitoring System.
|
||||||
# Version 7.0NG.755
|
# Version 7.0NG.756
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -45,8 +45,8 @@ our @EXPORT = qw(
|
|||||||
);
|
);
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.755";
|
my $pandora_version = "7.0NG.756";
|
||||||
my $pandora_build = "210720";
|
my $pandora_build = "210722";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
@ -338,6 +338,7 @@ sub pandora_load_config {
|
|||||||
$pa_config->{"mssql_driver"} = undef; # 745
|
$pa_config->{"mssql_driver"} = undef; # 745
|
||||||
$pa_config->{"snmpconsole_lock"} = 0; # 755.
|
$pa_config->{"snmpconsole_lock"} = 0; # 755.
|
||||||
$pa_config->{"snmpconsole_period"} = 0; # 755.
|
$pa_config->{"snmpconsole_period"} = 0; # 755.
|
||||||
|
$pa_config->{"snmpconsole_threshold"} = 0; # 755.
|
||||||
|
|
||||||
# Internal MTA for alerts, each server need its own config.
|
# Internal MTA for alerts, each server need its own config.
|
||||||
$pa_config->{"mta_address"} = ''; # Introduced on 2.0
|
$pa_config->{"mta_address"} = ''; # Introduced on 2.0
|
||||||
|
@ -33,8 +33,8 @@ use base 'Exporter';
|
|||||||
our @ISA = qw(Exporter);
|
our @ISA = qw(Exporter);
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.755";
|
my $pandora_version = "7.0NG.756";
|
||||||
my $pandora_build = "210720";
|
my $pandora_build = "210722";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
# Pandora FMS Server
|
# Pandora FMS Server
|
||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.755
|
%define version 7.0NG.756
|
||||||
%define release 210720
|
%define release 210722
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
# Pandora FMS Server
|
# Pandora FMS Server
|
||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.755
|
%define version 7.0NG.756
|
||||||
%define release 210720
|
%define release 210722
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
# This code is licensed under GPL 2.0 license.
|
# This code is licensed under GPL 2.0 license.
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.755"
|
PI_VERSION="7.0NG.756"
|
||||||
PI_BUILD="210720"
|
PI_BUILD="210722"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
@ -407,6 +407,11 @@ install () {
|
|||||||
mv ${sh_script}.new $sh_script
|
mv ${sh_script}.new $sh_script
|
||||||
chmod a+x $sh_script
|
chmod a+x $sh_script
|
||||||
done
|
done
|
||||||
|
# install pandora_ha
|
||||||
|
INSTALL_DIR="$DESTDIR$PREFIX/bin/"
|
||||||
|
echo ">Installing the pandora_ha binary to $INSTALL_DIR..."
|
||||||
|
cp -f $DESTDIR$PANDORA_HOME/util/pandora_ha.pl "$INSTALL_DIR/pandora_ha"
|
||||||
|
chmod +x "$INSTALL_DIR/pandora_ha"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
SYSTEMD_DIR=$DESTDIR/etc/systemd/system
|
SYSTEMD_DIR=$DESTDIR/etc/systemd/system
|
||||||
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
|||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.755 Build 210720";
|
my $version = "7.0NG.756 Build 210722";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
@ -159,6 +159,8 @@ sub help_screen {
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
sub ha_keep_pandora_running($$) {
|
sub ha_keep_pandora_running($$) {
|
||||||
my ($conf, $dbh) = @_;
|
my ($conf, $dbh) = @_;
|
||||||
|
my $OSNAME = $^O;
|
||||||
|
my $control_command;
|
||||||
|
|
||||||
$conf->{'pandora_service_cmd'} = 'service pandora_server' unless defined($conf->{'pandora_service_cmd'});
|
$conf->{'pandora_service_cmd'} = 'service pandora_server' unless defined($conf->{'pandora_service_cmd'});
|
||||||
|
|
||||||
@ -179,18 +181,30 @@ sub ha_keep_pandora_running($$) {
|
|||||||
$Pandora_Service = $conf->{'pandora_service_cmd'};
|
$Pandora_Service = $conf->{'pandora_service_cmd'};
|
||||||
|
|
||||||
# Check if service is running
|
# Check if service is running
|
||||||
my $pid = `$Pandora_Service status-server | awk '{print \$NF*1}' | tr -d '\.'`;
|
$control_command = "status-server";
|
||||||
|
if ($OSNAME eq "freebsd") {
|
||||||
|
$control_command = "status_server";
|
||||||
|
}
|
||||||
|
my $pid = `$Pandora_Service $control_command | awk '{print \$NF*1}' | tr -d '\.'`;
|
||||||
|
|
||||||
if ( ($pid > 0) && ($component_last_contact > 0)) {
|
if ( ($pid > 0) && ($component_last_contact > 0)) {
|
||||||
# service running but not all components
|
# service running but not all components
|
||||||
log_message($conf, 'LOG', 'Pandora service running but not all components.');
|
log_message($conf, 'LOG', 'Pandora service running but not all components.');
|
||||||
print ">> service running but delayed...\n";
|
print ">> service running but delayed...\n";
|
||||||
`$Pandora_Service restart-server 2>/dev/null`;
|
$control_command = "restart-server";
|
||||||
|
if ($OSNAME eq "freebsd") {
|
||||||
|
$control_command = "restart_server";
|
||||||
|
}
|
||||||
|
`$Pandora_Service $control_command 2>/dev/null`;
|
||||||
} elsif ($pid == 0) {
|
} elsif ($pid == 0) {
|
||||||
# service not running
|
# service not running
|
||||||
log_message($conf, 'LOG', 'Pandora service not running.');
|
log_message($conf, 'LOG', 'Pandora service not running.');
|
||||||
print ">> service not running...\n";
|
print ">> service not running...\n";
|
||||||
`$Pandora_Service start-server 2>/dev/null`;
|
$control_command = "start-server";
|
||||||
|
if ($OSNAME eq "freebsd") {
|
||||||
|
$control_command = "start_server";
|
||||||
|
}
|
||||||
|
`$Pandora_Service $control_command 2>/dev/null`;
|
||||||
} elsif ($pid > 0
|
} elsif ($pid > 0
|
||||||
&& $nservers == 0
|
&& $nservers == 0
|
||||||
) {
|
) {
|
||||||
@ -202,7 +216,11 @@ sub ha_keep_pandora_running($$) {
|
|||||||
log_message($conf, 'LOG', 'Pandora service running without servers ['.$nservers.'].');
|
log_message($conf, 'LOG', 'Pandora service running without servers ['.$nservers.'].');
|
||||||
if ($nservers >= 0) {
|
if ($nservers >= 0) {
|
||||||
log_message($conf, 'LOG', 'Restarting Pandora service...');
|
log_message($conf, 'LOG', 'Restarting Pandora service...');
|
||||||
`$Pandora_Service restart-serer 2>/dev/null`;
|
$control_command = "restart-server";
|
||||||
|
if ($OSNAME eq "freebsd") {
|
||||||
|
$control_command = "restart_server";
|
||||||
|
}
|
||||||
|
`$Pandora_Service $control_command 2>/dev/null`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -212,6 +230,7 @@ sub ha_keep_pandora_running($$) {
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
sub ha_update_server($$) {
|
sub ha_update_server($$) {
|
||||||
my ($config, $dbh) = @_;
|
my ($config, $dbh) = @_;
|
||||||
|
my $OSNAME = $^O;
|
||||||
|
|
||||||
my $repoServer = pandora_get_tconfig_token(
|
my $repoServer = pandora_get_tconfig_token(
|
||||||
$dbh, 'remote_config', '/var/spool/pandora/data_in'
|
$dbh, 'remote_config', '/var/spool/pandora/data_in'
|
||||||
@ -250,8 +269,11 @@ sub ha_update_server($$) {
|
|||||||
# Restart service
|
# Restart service
|
||||||
$config->{'pandora_service_cmd'} = 'service pandora_server'
|
$config->{'pandora_service_cmd'} = 'service pandora_server'
|
||||||
unless defined($config->{'pandora_service_cmd'});
|
unless defined($config->{'pandora_service_cmd'});
|
||||||
|
my $control_command = "restart-server";
|
||||||
`$config->{'pandora_service_cmd'} restart-server 2>/dev/null`;
|
if ($OSNAME eq "freebsd") {
|
||||||
|
$control_command = "restart_server";
|
||||||
|
}
|
||||||
|
`$config->{'pandora_service_cmd'} $control_command 2>/dev/null`;
|
||||||
`touch "$lockFile"`;
|
`touch "$lockFile"`;
|
||||||
|
|
||||||
# After apply update, permission over files are changed, allow group to
|
# After apply update, permission over files are changed, allow group to
|
||||||
@ -359,11 +381,17 @@ sub ha_main($) {
|
|||||||
# Stop pandora server
|
# Stop pandora server
|
||||||
################################################################################
|
################################################################################
|
||||||
sub stop {
|
sub stop {
|
||||||
|
my $OSNAME = $^O;
|
||||||
|
|
||||||
if ($Running == 1) {
|
if ($Running == 1) {
|
||||||
$Running = 0;
|
$Running = 0;
|
||||||
# cleanup and stop pandora_server
|
# cleanup and stop pandora_server
|
||||||
print ">> stopping server...\n";
|
print ">> stopping server...\n";
|
||||||
`$Pandora_Service stop-server 2>/dev/null`;
|
my $control_command = "stop-server";
|
||||||
|
if ($OSNAME eq "freebsd") {
|
||||||
|
$control_command = "stop_server";
|
||||||
|
}
|
||||||
|
`$Pandora_Service $control_command 2>/dev/null`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.755 Build 210720";
|
my $version = "7.0NG.756 Build 210722";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user