Merge remote-tracking branch 'origin/develop' into ent-5331-implementar-monitorizacion-de-ms-SQL-Server-en-discovery-como-el-de-oracle
Conflicts: pandora_console/include/constants.php pandora_server/lib/PandoraFMS/Recon/Base.pm
This commit is contained in:
commit
71a0dcfd0c
|
@ -0,0 +1,11 @@
|
|||
.vstags
|
||||
MYMETA.json
|
||||
MYMETA.yml
|
||||
.vscode
|
||||
.vscode*
|
||||
.vstags
|
||||
**/blib
|
||||
**/PandoraFMS-Enterprise/Makefile
|
||||
**/PandoraFMS-Enterprise/pm_to_blib
|
||||
**/pandora_console/attachment/cache
|
||||
**/pandora_console/attachment/agents
|
31
README.md
31
README.md
|
@ -8,31 +8,34 @@ Pandora FMS is a monitoring software for IT infrastructure management which incl
|
|||
|
||||
For community support you can visit our forums at http://forums.pandorafms.org. Visit our community page at http://pandorafms.org and if you need commercial information or/and professional support visit http://pandorafms.com.
|
||||
|
||||
|
||||
### How to install Pandora FMS
|
||||
|
||||
Installing Pandora FMS is a very easy task. Please visit our wiki and follow all the steps described for a quick and proper installation. http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Installing
|
||||
|
||||
### What is Pandora FMS?
|
||||
Pandora FMS is a monitoring application to watch systems and applications that allows to know the status of any element of the business systems. Pandora FMS watches your hardware, software, your multilayer system and, of course, your OS. Pandora FMS can detect if a network interface is down or the movement of any NASDAQ new technology market value. If you wish, Pandora FMS can send a SMS message when your system or your application fails or when Google stock value drops below 330 US$. Pandora FMS will fit your systems and requirements, because it has been designed to be open, modular, multiplattform and easy to customize.
|
||||
|
||||
Pandora FMS is a monitoring application to watch systems and applications that allows to know the status of any element of the business systems. Pandora FMS watches your hardware, software, your multilayer system and, of course, your OS. Pandora FMS can detect if a network interface is down or the movement of any NASDAQ new technology market value. If you wish, Pandora FMS can send a SMS message when your system or your application fails or when Google stock value drops below 330 US\$. Pandora FMS will fit your systems and requirements, because it has been designed to be open, modular, multiplattform and easy to customize.
|
||||
|
||||
### Other things Pandora FMS can do
|
||||
Pandora FMS is a monitoring tool that not only measures if a parameter is right or wrong. Pandora FMS can quantify the state (right or wrong), or store a value (numeric or alphanumeric) for months if necessary. Pandora FMS can measure performances, compare values among different systems and set alarms over thresholds. Pandora FMS works against a Database so it can generate reports, statistics, SLA and meausre anything: OS, applications and hardware systems, such as firewalls, proxies, Databases, web servers, VPN, routers, switches, processes, services, remote accesses to servers, etc. Everything integrated in an open and distributed architecture. Pandora FMS can be deployed over any OS, with specific agents for each platform. There are agents for Windows (2000, XP, 2003), GNU/Linux, Solaris, HP-UX, BSD, AIX, IPSO and OpenWRT. Pandora FMS not only gathers information through its agents, but it can also monitor any hardware system with TCP/IP connectivity, such as load balancing systems, routers, switches or printers, through SNMP and TCP/ICMP checks.
|
||||
|
||||
Pandora FMS is a monitoring tool that not only measures if a parameter is right or wrong. Pandora FMS can quantify the state (right or wrong), or store a value (numeric or alphanumeric) for months if necessary. Pandora FMS can measure performances, compare values among different systems and set alarms over thresholds. Pandora FMS works against a Database so it can generate reports, statistics, SLA and meausre anything: OS, applications and hardware systems, such as firewalls, proxies, Databases, web servers, VPN, routers, switches, processes, services, [remote accesses to servers](https://pandorafms.com/server-monitoring/), etc. Everything integrated in an open and distributed architecture. Pandora FMS can be deployed over any OS, with specific agents for each platform. There are agents for Windows (2000, XP, 2003), GNU/Linux, Solaris, HP-UX, BSD, AIX, IPSO and OpenWRT. Pandora FMS not only gathers information through its agents, but it can also monitor any hardware system with TCP/IP connectivity, such as load balancing systems, routers, switches or printers, through SNMP and TCP/ICMP checks.
|
||||
|
||||
### Main features
|
||||
* Network monitoring
|
||||
* WMI monitoring
|
||||
* Agent monitoring (for all OS)
|
||||
* Graphical reporting, based on it's own SQL backend
|
||||
* SLA, and ITIL KPI metrics on reporting
|
||||
* Status & Performance monitoring
|
||||
* GIS tracking and viewing
|
||||
* Inventory management (Local and remote)
|
||||
* User defined visual console screens and Dashboards WYSIWYG
|
||||
* Very high capacity (Thousands of devices)
|
||||
* Multiuser, several levels of ACL management.
|
||||
|
||||
- Network monitoring
|
||||
- WMI monitoring
|
||||
- Agent monitoring (for all OS)
|
||||
- Graphical reporting, based on it's own SQL backend
|
||||
- SLA, and ITIL KPI metrics on reporting
|
||||
- Status & Performance monitoring
|
||||
- GIS tracking and viewing
|
||||
- Inventory management (Local and remote)
|
||||
- User defined visual console screens and Dashboards WYSIWYG
|
||||
- Very high capacity (Thousands of devices)
|
||||
- Multiuser, several levels of ACL management.
|
||||
|
||||
### Screenshots
|
||||
|
||||

|
||||
<br />
|
||||
<br />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Pandora FMS - http://pandorafms.com
|
||||
|
||||
==================================================
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// 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
|
||||
|
|
|
@ -24,7 +24,7 @@ cd $CODEHOME && tar zcvf $RPMHOME/SOURCES/pandorafms_server-$LOCAL_VERSION.tar.g
|
|||
cd $CODEHOME/pandora_agents/shellscript && tar zcvf $RPMHOME/SOURCES/pandorafms_agent-$LOCAL_VERSION.tar.gz --exclude \.exe --exclude \.svn --exclude nohup linux || exit 1
|
||||
|
||||
# Unix agent
|
||||
cd $CODEHOME/pandora_agents && tar zvcf $RPMHOME/SOURCES/pandorafms_agent_unix-$LOCAL_VERSION.tar.gz --exclude \.exe --exclude \.svn --exclude nohup --exclude NT4 unix || exit 1
|
||||
cd $CODEHOME/pandora_agents && tar zvcf $RPMHOME/SOURCES/pandorafms_agent_unix-$LOCAL_VERSION.tar.gz --exclude \.exe --exclude \.svn --exclude nohup --exclude NT4 --exclude Darwin/dmg unix || exit 1
|
||||
|
||||
# Enterprise console
|
||||
cd $PANDHOME_ENT/pandora_console && tar zcvf $RPMHOME/SOURCES/pandorafms_console_enterprise-$LOCAL_VERSION.tar.gz --exclude \.exe --exclude \.svn enterprise/* || exit 1
|
||||
|
|
|
@ -3,309 +3,321 @@ var isFetching = null;
|
|||
var storedEvents = new Array();
|
||||
var notVisited = {};
|
||||
|
||||
$(window).on('load', function() {
|
||||
initilise();
|
||||
// Wait some ms to throw main function
|
||||
var delay = setTimeout(main, 100);
|
||||
resetInterval();
|
||||
$(window).on("load", function() {
|
||||
initilise();
|
||||
// Wait some ms to throw main function
|
||||
var delay = setTimeout(main, 100);
|
||||
resetInterval();
|
||||
});
|
||||
|
||||
function fetchEvents() {
|
||||
return storedEvents;
|
||||
return storedEvents;
|
||||
}
|
||||
|
||||
function fetchNotVisited() {
|
||||
return notVisited;
|
||||
return notVisited;
|
||||
}
|
||||
|
||||
function removeNotVisited(eventId) {
|
||||
if (notVisited[eventId] === true) delete notVisited[eventId];
|
||||
if (notVisited[eventId] === true) delete notVisited[eventId];
|
||||
}
|
||||
|
||||
function main() {
|
||||
chrome.runtime.sendMessage({ text: "FETCH_EVENTS" });
|
||||
// Do not fetch if is fetching now
|
||||
if (isFetching) return;
|
||||
isFetching = true;
|
||||
|
||||
chrome.runtime.sendMessage({text: "FETCH_EVENTS"});
|
||||
// Do not fetch if is fetching now
|
||||
if (isFetching) return;
|
||||
isFetching = true;
|
||||
var url =
|
||||
localStorage["ip_address"] +
|
||||
"/include/api.php?op=get&op2=events&return_type=json";
|
||||
var feedUrl = url;
|
||||
var data = new FormData();
|
||||
|
||||
var feedUrl = localStorage["ip_address"]+'/include/api.php?op=get&op2=events&return_type=json&apipass='+localStorage["api_pass"]+'&user='+localStorage["user_name"]+'&pass='+localStorage["pass"];
|
||||
data.append("apipass", localStorage["api_pass"]);
|
||||
data.append("user", localStorage["user_name"]);
|
||||
data.append("pass", localStorage["pass"]);
|
||||
|
||||
req = new XMLHttpRequest();
|
||||
req.onload = handleResponse;
|
||||
req.onerror = handleError;
|
||||
req.open("GET", feedUrl, true);
|
||||
req.withCredentials = true
|
||||
req.send(null);
|
||||
req = new XMLHttpRequest();
|
||||
req.onload = handleResponse;
|
||||
req.onerror = handleError;
|
||||
req.open("POST", feedUrl, true);
|
||||
req.withCredentials = true;
|
||||
req.send(data);
|
||||
}
|
||||
|
||||
function handleError() {
|
||||
chrome.runtime.sendMessage({text: "FETCH_EVENTS_URL_ERROR"});
|
||||
isFetching = false;
|
||||
chrome.runtime.sendMessage({ text: "FETCH_EVENTS_URL_ERROR" });
|
||||
isFetching = false;
|
||||
}
|
||||
|
||||
function handleResponse() {
|
||||
var doc = req.responseText;
|
||||
if (doc=="auth error") {
|
||||
chrome.runtime.sendMessage({text: "FETCH_EVENTS_URL_ERROR"});
|
||||
} else {
|
||||
var n = doc.search("404 Not Found");
|
||||
if (n>0) {
|
||||
chrome.runtime.sendMessage({text: "FETCH_EVENTS_DATA_ERROR"});
|
||||
} else {
|
||||
getEvents(doc);
|
||||
chrome.runtime.sendMessage({text: "FETCH_EVENTS_SUCCESS"});
|
||||
}
|
||||
}
|
||||
isFetching = false;
|
||||
var doc = req.responseText;
|
||||
if (doc == "auth error") {
|
||||
chrome.runtime.sendMessage({ text: "FETCH_EVENTS_URL_ERROR" });
|
||||
} else {
|
||||
var n = doc.search("404 Not Found");
|
||||
if (n > 0) {
|
||||
chrome.runtime.sendMessage({ text: "FETCH_EVENTS_DATA_ERROR" });
|
||||
} else {
|
||||
getEvents(doc);
|
||||
chrome.runtime.sendMessage({ text: "FETCH_EVENTS_SUCCESS" });
|
||||
}
|
||||
}
|
||||
isFetching = false;
|
||||
}
|
||||
|
||||
function getEvents(reply){
|
||||
var fetchedEvents = parseReplyEvents(reply);
|
||||
function getEvents(reply) {
|
||||
var fetchedEvents = parseReplyEvents(reply);
|
||||
|
||||
// If there is no events requested, mark all as visited
|
||||
if (storedEvents.length == 0) {
|
||||
notVisited = {};
|
||||
storedEvents = fetchedEvents;
|
||||
return;
|
||||
}
|
||||
// If there is no events requested, mark all as visited
|
||||
if (typeof storedEvents != "undefined" && storedEvents.length == 0) {
|
||||
notVisited = {};
|
||||
storedEvents = fetchedEvents;
|
||||
return;
|
||||
}
|
||||
|
||||
// Discriminate the new events
|
||||
newEvents=fetchNewEvents(fetchedEvents,storedEvents);
|
||||
var newNotVisited = {};
|
||||
var notVisitedCount = 0;
|
||||
|
||||
// Check if popup is displayed to make some actions
|
||||
var views = chrome.extension.getViews({ type: "popup" });
|
||||
for(var k=0;k<newEvents.length;k++){
|
||||
newNotVisited[newEvents[k]['id']] = true;
|
||||
if (views.length == 0) {
|
||||
notVisitedCount++;
|
||||
displayNotification (newEvents[k])
|
||||
alertsSound(newEvents[k]);
|
||||
}
|
||||
}
|
||||
// Discriminate the new events
|
||||
newEvents = fetchNewEvents(fetchedEvents, storedEvents);
|
||||
var newNotVisited = {};
|
||||
var notVisitedCount = 0;
|
||||
|
||||
// Make that the old events marked as not visited remains with the
|
||||
// same status
|
||||
for(var k=0;k<fetchedEvents.length;k++){
|
||||
if (notVisited[fetchedEvents[k]['id']] === true) {
|
||||
newNotVisited[fetchedEvents[k]['id']] = true;
|
||||
notVisitedCount++;
|
||||
}
|
||||
}
|
||||
notVisited = newNotVisited;
|
||||
// Check if popup is displayed to make some actions
|
||||
var views = chrome.extension.getViews({ type: "popup" });
|
||||
for (var k = 0; k < newEvents.length; k++) {
|
||||
newNotVisited[newEvents[k]["id"]] = true;
|
||||
if (views.length == 0) {
|
||||
notVisitedCount++;
|
||||
displayNotification(newEvents[k]);
|
||||
alertsSound(newEvents[k]);
|
||||
}
|
||||
}
|
||||
|
||||
// Update the number
|
||||
localStorage["new_events"] = (views.length == 0) ? notVisitedCount : 0;
|
||||
updateBadge();
|
||||
// Make that the old events marked as not visited remains with the
|
||||
// same status
|
||||
for (var k = 0; k < fetchedEvents.length; k++) {
|
||||
if (notVisited[fetchedEvents[k]["id"]] === true) {
|
||||
newNotVisited[fetchedEvents[k]["id"]] = true;
|
||||
notVisitedCount++;
|
||||
}
|
||||
}
|
||||
notVisited = newNotVisited;
|
||||
|
||||
// Store the requested events
|
||||
storedEvents = fetchedEvents;
|
||||
// Update the number
|
||||
localStorage["new_events"] = views.length == 0 ? notVisitedCount : 0;
|
||||
updateBadge();
|
||||
|
||||
// Store the requested events
|
||||
storedEvents = fetchedEvents;
|
||||
}
|
||||
|
||||
function updateBadge() {
|
||||
if (localStorage["new_events"] != 0) {
|
||||
chrome.browserAction.setBadgeBackgroundColor({color:[0,200,0,255]});
|
||||
chrome.browserAction.setBadgeText({ text: localStorage["new_events"] });
|
||||
} else {
|
||||
chrome.browserAction.setBadgeText({ text: "" });
|
||||
}
|
||||
if (localStorage["new_events"] != 0) {
|
||||
chrome.browserAction.setBadgeBackgroundColor({ color: [0, 200, 0, 255] });
|
||||
chrome.browserAction.setBadgeText({ text: localStorage["new_events"] });
|
||||
} else {
|
||||
chrome.browserAction.setBadgeText({ text: "" });
|
||||
}
|
||||
}
|
||||
|
||||
function fetchNewEvents(A,B){
|
||||
var arrDiff = new Array();
|
||||
for(var i = 0; i < A.length; i++) {
|
||||
var id = false;
|
||||
for(var j = 0; j < B.length; j++) {
|
||||
if(A[i]['id'] == B[j]['id']) {
|
||||
id = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!id) {
|
||||
arrDiff.push(A[i]);
|
||||
}
|
||||
}
|
||||
return arrDiff;
|
||||
function fetchNewEvents(A, B) {
|
||||
var arrDiff = new Array();
|
||||
for (var i = 0; i < A.length; i++) {
|
||||
var id = false;
|
||||
for (var j = 0; j < B.length; j++) {
|
||||
if (A[i]["id"] == B[j]["id"]) {
|
||||
id = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!id) {
|
||||
arrDiff.push(A[i]);
|
||||
}
|
||||
}
|
||||
return arrDiff;
|
||||
}
|
||||
|
||||
function parseReplyEvents(reply) {
|
||||
// Split the API response
|
||||
var data;
|
||||
try {
|
||||
data = JSON.parse(reply);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return [];
|
||||
}
|
||||
var e_array = JSON.parse(reply).data;
|
||||
|
||||
function parseReplyEvents (reply) {
|
||||
|
||||
// Split the API response
|
||||
var data = JSON.parse(reply)
|
||||
var e_array = JSON.parse(reply).data;
|
||||
|
||||
// Form a properly object
|
||||
var fetchedEvents=new Array();
|
||||
for(var i=0;i<e_array.length;i++){
|
||||
var event=e_array[i];
|
||||
fetchedEvents.push({
|
||||
'id' : event.id_evento,
|
||||
'agent_name' : event.agent_name,
|
||||
'agent' : event.id_agente,
|
||||
'date' : event.timestamp,
|
||||
'title' : event.evento,
|
||||
'module' : event.id_agentmodule,
|
||||
'type' : event.event_type,
|
||||
'source' : event.source,
|
||||
'severity' : event.criticity_name,
|
||||
'visited' : false
|
||||
});
|
||||
}
|
||||
// Return the events
|
||||
return fetchedEvents;
|
||||
// Form a properly object
|
||||
var fetchedEvents = new Array();
|
||||
for (var i = 0; i < e_array.length; i++) {
|
||||
var event = e_array[i];
|
||||
fetchedEvents.push({
|
||||
id: event.id_evento,
|
||||
agent_name: event.agent_name,
|
||||
agent: event.id_agente,
|
||||
date: event.timestamp,
|
||||
title: event.evento,
|
||||
module: event.id_agentmodule,
|
||||
type: event.event_type,
|
||||
source: event.source,
|
||||
severity: event.criticity_name,
|
||||
visited: false
|
||||
});
|
||||
}
|
||||
// Return the events
|
||||
return fetchedEvents;
|
||||
}
|
||||
|
||||
function alertsSound(pEvent){
|
||||
if(localStorage["sound_alert"]!="on"){
|
||||
return;
|
||||
}
|
||||
function alertsSound(pEvent) {
|
||||
if (localStorage["sound_alert"] != "on") {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (pEvent['severity']) {
|
||||
case "Critical":
|
||||
playSound(localStorage["critical"]);
|
||||
break;
|
||||
case "Informational":
|
||||
playSound(localStorage["informational"]);
|
||||
break;
|
||||
case "Maintenance":
|
||||
playSound(localStorage["maintenance"]);
|
||||
break;
|
||||
case "Normal":
|
||||
playSound(localStorage["normal"]);
|
||||
break;
|
||||
case "Warning":
|
||||
playSound(localStorage["warning"]);
|
||||
break;
|
||||
}
|
||||
switch (pEvent["severity"]) {
|
||||
case "Critical":
|
||||
playSound(localStorage["critical"]);
|
||||
break;
|
||||
case "Informational":
|
||||
playSound(localStorage["informational"]);
|
||||
break;
|
||||
case "Maintenance":
|
||||
playSound(localStorage["maintenance"]);
|
||||
break;
|
||||
case "Normal":
|
||||
playSound(localStorage["normal"]);
|
||||
break;
|
||||
case "Warning":
|
||||
playSound(localStorage["warning"]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function displayNotification (pEvent) {
|
||||
function displayNotification(pEvent) {
|
||||
// Check if the user is okay to get some notification
|
||||
if (Notification.permission === "granted") {
|
||||
// If it's okay create a notification
|
||||
getNotification(pEvent);
|
||||
}
|
||||
|
||||
// Check if the user is okay to get some notification
|
||||
if (Notification.permission === "granted") {
|
||||
// If it's okay create a notification
|
||||
getNotification(pEvent);
|
||||
}
|
||||
|
||||
// Otherwise, we need to ask the user for permission
|
||||
// Note, Chrome does not implement the permission static property
|
||||
// So we have to check for NOT 'denied' instead of 'default'
|
||||
else if (Notification.permission !== 'denied') {
|
||||
Notification.requestPermission(function (permission) {
|
||||
// Whatever the user answers, we make sure we store the information
|
||||
if(!('permission' in Notification)) {
|
||||
Notification.permission = permission;
|
||||
}
|
||||
|
||||
// If the user is okay, let's create a notification
|
||||
if (permission === "granted") getNotification(pEvent);
|
||||
});
|
||||
}
|
||||
// Otherwise, we need to ask the user for permission
|
||||
// Note, Chrome does not implement the permission static property
|
||||
// So we have to check for NOT 'denied' instead of 'default'
|
||||
else if (Notification.permission !== "denied") {
|
||||
Notification.requestPermission(function(permission) {
|
||||
// Whatever the user answers, we make sure we store the information
|
||||
if (!("permission" in Notification)) {
|
||||
Notification.permission = permission;
|
||||
}
|
||||
|
||||
// If the user is okay, let's create a notification
|
||||
if (permission === "granted") getNotification(pEvent);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getNotification(pEvent){
|
||||
|
||||
// Build the event text
|
||||
var even = pEvent['type'];
|
||||
if (pEvent['source'] != '') even += " : " + pEvent['source'];
|
||||
even += ". Event occured at " + pEvent['date'];
|
||||
if(pEvent['module'] != 0) even += " in the module with Id "+ pEvent['module'];
|
||||
even += ".";
|
||||
function getNotification(pEvent) {
|
||||
// Build the event text
|
||||
var even = pEvent["type"];
|
||||
if (pEvent["source"] != "") even += " : " + pEvent["source"];
|
||||
even += ". Event occured at " + pEvent["date"];
|
||||
if (pEvent["module"] != 0)
|
||||
even += " in the module with Id " + pEvent["module"];
|
||||
even += ".";
|
||||
|
||||
var url = (pEvent['agent'] == 0)
|
||||
? localStorage["ip_address"]+"/index.php?sec=eventos&sec2=operation/events/events"
|
||||
: localStorage["ip_address"]+"/index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=" + pEvent['agent'];
|
||||
var url =
|
||||
pEvent["agent"] == 0
|
||||
? localStorage["ip_address"] +
|
||||
"/index.php?sec=eventos&sec2=operation/events/events"
|
||||
: localStorage["ip_address"] +
|
||||
"/index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=" +
|
||||
pEvent["agent"];
|
||||
|
||||
var notification = new Notification(
|
||||
pEvent['title'],
|
||||
{
|
||||
body: even,
|
||||
icon: "images/icon.png"
|
||||
}
|
||||
);
|
||||
var notification = new Notification(pEvent["title"], {
|
||||
body: even,
|
||||
icon: "images/icon.png"
|
||||
});
|
||||
|
||||
// Add the link
|
||||
notification.onclick = function (event) {
|
||||
event.preventDefault();
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
// Add the link
|
||||
notification.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
window.open(url, "_blank");
|
||||
};
|
||||
|
||||
// Close notification after 10 secs
|
||||
setTimeout(function() {notification.close()}, 10000);
|
||||
// Close notification after 10 secs
|
||||
setTimeout(function() {
|
||||
notification.close();
|
||||
}, 10000);
|
||||
}
|
||||
|
||||
function resetInterval () {
|
||||
if (refreshTimer) clearInterval(refreshTimer);
|
||||
refreshTimer = setInterval(main, localStorage["refresh"]*1000);
|
||||
function resetInterval() {
|
||||
if (refreshTimer) clearInterval(refreshTimer);
|
||||
refreshTimer = setInterval(main, localStorage["refresh"] * 1000);
|
||||
}
|
||||
|
||||
function initilise(){
|
||||
function initilise() {
|
||||
if (isFetching == null) isFetching = false;
|
||||
if (localStorage["ip_address"] == undefined) {
|
||||
localStorage["ip_address"] = "http://firefly.artica.es/pandora_demo";
|
||||
}
|
||||
|
||||
if (isFetching == null) isFetching = false;
|
||||
if(localStorage["ip_address"]==undefined){
|
||||
localStorage["ip_address"]="http://firefly.artica.es/pandora_demo";
|
||||
}
|
||||
|
||||
if(localStorage["api_pass"]==undefined){
|
||||
localStorage["api_pass"]="doreik0";
|
||||
}
|
||||
|
||||
if(localStorage["user_name"]==undefined){
|
||||
localStorage["user_name"]="demo";
|
||||
}
|
||||
|
||||
if(localStorage["pass"]==undefined){
|
||||
localStorage["pass"]="demo";
|
||||
}
|
||||
if(localStorage["critical"]==null){
|
||||
localStorage["critical"]="11";
|
||||
}
|
||||
if(localStorage["informational"]==null){
|
||||
localStorage["informational"]="1";
|
||||
}
|
||||
if(localStorage["maintenance"]==null){
|
||||
localStorage["maintenance"]="10";
|
||||
}
|
||||
if(localStorage["normal"]==null){
|
||||
localStorage["normal"]="6";
|
||||
}
|
||||
if(localStorage["warning"]==null){
|
||||
localStorage["warning"]="2";
|
||||
}
|
||||
if(localStorage["events"]==null){
|
||||
localStorage["events"]=20;
|
||||
}
|
||||
if(localStorage["refresh"]==null){
|
||||
localStorage["refresh"]="10";
|
||||
}
|
||||
if(localStorage["ip_address"]==null){
|
||||
localStorage["ip_address"]="http://firefly.artica.es/pandora_demo";
|
||||
}
|
||||
|
||||
if(localStorage["api_pass"]==null){
|
||||
localStorage["api_pass"]="doreik0";
|
||||
}
|
||||
|
||||
if(localStorage["user_name"]==null){
|
||||
localStorage["user_name"]="demo";
|
||||
}
|
||||
|
||||
if(localStorage["pass"]==null){
|
||||
localStorage["pass"]="demo";
|
||||
}
|
||||
if(localStorage["sound_alert"]==null){
|
||||
localStorage["sound_alert"]="on";
|
||||
}
|
||||
if(localStorage["changed"]==null){
|
||||
localStorage["changed"]="false";
|
||||
}
|
||||
if(localStorage["new_events"]==null){
|
||||
localStorage["new_events"]=parseInt(localStorage["events"]);
|
||||
}
|
||||
if(localStorage["error"]==null) {
|
||||
localStorage["error"] = true;
|
||||
}
|
||||
if (localStorage["api_pass"] == undefined) {
|
||||
localStorage["api_pass"] = "doreik0";
|
||||
}
|
||||
|
||||
if (localStorage["user_name"] == undefined) {
|
||||
localStorage["user_name"] = "demo";
|
||||
}
|
||||
|
||||
if (localStorage["pass"] == undefined) {
|
||||
localStorage["pass"] = "demo";
|
||||
}
|
||||
if (localStorage["critical"] == null) {
|
||||
localStorage["critical"] = "11";
|
||||
}
|
||||
if (localStorage["informational"] == null) {
|
||||
localStorage["informational"] = "1";
|
||||
}
|
||||
if (localStorage["maintenance"] == null) {
|
||||
localStorage["maintenance"] = "10";
|
||||
}
|
||||
if (localStorage["normal"] == null) {
|
||||
localStorage["normal"] = "6";
|
||||
}
|
||||
if (localStorage["warning"] == null) {
|
||||
localStorage["warning"] = "2";
|
||||
}
|
||||
if (localStorage["events"] == null) {
|
||||
localStorage["events"] = 20;
|
||||
}
|
||||
if (localStorage["refresh"] == null) {
|
||||
localStorage["refresh"] = "10";
|
||||
}
|
||||
if (localStorage["ip_address"] == null) {
|
||||
localStorage["ip_address"] = "http://firefly.artica.es/pandora_demo";
|
||||
}
|
||||
|
||||
if (localStorage["api_pass"] == null) {
|
||||
localStorage["api_pass"] = "doreik0";
|
||||
}
|
||||
|
||||
if (localStorage["user_name"] == null) {
|
||||
localStorage["user_name"] = "demo";
|
||||
}
|
||||
|
||||
if (localStorage["pass"] == null) {
|
||||
localStorage["pass"] = "demo";
|
||||
}
|
||||
if (localStorage["sound_alert"] == null) {
|
||||
localStorage["sound_alert"] = "on";
|
||||
}
|
||||
if (localStorage["changed"] == null) {
|
||||
localStorage["changed"] = "false";
|
||||
}
|
||||
if (localStorage["new_events"] == null) {
|
||||
localStorage["new_events"] = parseInt(localStorage["events"]);
|
||||
}
|
||||
if (localStorage["error"] == null) {
|
||||
localStorage["error"] = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,10 @@ $(document).ready(function() {
|
|||
bg = chrome.extension.getBackgroundPage();
|
||||
|
||||
// Display the information
|
||||
if (bg.fetchEvents().length == 0) {
|
||||
var events = bg.fetchEvents();
|
||||
if (!events) {
|
||||
showError("Failed to retrieve events, please retry");
|
||||
} else if (events.length == 0) {
|
||||
showError("No events");
|
||||
} else {
|
||||
showEvents();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "__MSG_name__",
|
||||
"version": "2.2",
|
||||
"version": "2.3",
|
||||
"manifest_version": 2,
|
||||
"description": "Pandora FMS Event viewer Chrome extension",
|
||||
"homepage_url": "http://pandorafms.com",
|
||||
|
|
|
@ -0,0 +1,585 @@
|
|||
#!/bin/bash
|
||||
|
||||
# define variables
|
||||
PANDORA_CONSOLE=/var/www/html/pandora_console
|
||||
CONSOLE_PATH=/var/www/html/pandora_console
|
||||
PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
|
||||
PANDORA_SERVER_BIN=/usr/bin/pandora_server
|
||||
PANDORA_HA_BIN=/usr/bin/pandora_ha
|
||||
PANDORA_TABLES_MIN=160
|
||||
DBHOST=127.0.0.1
|
||||
DBNAME=pandora
|
||||
DBUSER=pandora
|
||||
DBPASS=pandora
|
||||
DBPORT=3306
|
||||
S_VERSION='2021012801'
|
||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||
|
||||
# Ansi color code variables
|
||||
red="\e[0;91m"
|
||||
green="\e[0;92m"
|
||||
bold="\e[1m"
|
||||
cyan="\e[0;36m"
|
||||
reset="\e[0m"
|
||||
|
||||
# Functions
|
||||
|
||||
execute_cmd () {
|
||||
local cmd="$1"
|
||||
local msg="$2"
|
||||
|
||||
echo -e "${cyan}$msg...${reset}"
|
||||
$cmd &>> $LOGFILE
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${red}Fail${reset}"
|
||||
[ "$3" ] && echo "$3"
|
||||
echo "Error installing Pandora FMS for detailed error please check log: $LOGFILE"
|
||||
rm -rf $HOME/pandora_deploy_tmp &>> $LOGFILE
|
||||
exit 1
|
||||
else
|
||||
echo -e "\e[1A\e ${cyan}$msg...${reset} ${green}OK${reset}"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
check_cmd_status () {
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${red}Fail${reset}"
|
||||
[ "$1" ] && echo "$1"
|
||||
echo "Error installing Pandora FMS for detailed error please check log: $LOGFILE"
|
||||
rm -rf $HOME/pandora_deploy_tmp/*.rpm* &>> $LOGFILE
|
||||
exit 1
|
||||
else
|
||||
echo -e "${green}OK${reset}"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
check_pre_pandora () {
|
||||
export MYSQL_PWD=$DBPASS
|
||||
|
||||
echo -en "${cyan}Checking environment ... ${reset}"
|
||||
rpm -qa | grep pandora &>> /dev/null && local fail=true
|
||||
[ -d "$CONSOLE_PATH" ] && local fail=true
|
||||
[ -f /usr/bin/pandora_server ] && local fail=true
|
||||
echo "use $DBNAME" | mysql -uroot -P$DBPORT -h$DBHOST &>> /dev/null && local fail=true
|
||||
|
||||
[ ! $fail ]
|
||||
check_cmd_status 'Error there is a current Pandora FMS installation on this node, please remove it to execute a clean install'
|
||||
}
|
||||
|
||||
check_repo_connection () {
|
||||
execute_cmd "ping -c 2 8.8.8.8" "Checking internet connection"
|
||||
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
|
||||
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
|
||||
}
|
||||
|
||||
check_root_permissions () {
|
||||
echo -en "${cyan}Checking root account... ${reset}"
|
||||
if [ "$(whoami)" != "root" ]; then
|
||||
echo -e "${red}Fail${reset}"
|
||||
echo "Please use a root account or sudo for installing PandoraFMS"
|
||||
echo "Error installing Pandora FMS for detailed error please check log: $LOGFILE"
|
||||
exit 1
|
||||
|
||||
else
|
||||
echo -e "${green}OK${reset}"
|
||||
fi
|
||||
}
|
||||
|
||||
## Main
|
||||
echo "Starting PandoraFMS Community deployment ver. $S_VERSION"
|
||||
|
||||
# Centos Version
|
||||
if [ ! "$(grep -i centos /etc/redhat-release)" ]; then
|
||||
printf "${red}Error this is not a Centos Base system, this installer is compatible with Centos systems only${reset}\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
execute_cmd "grep -i centos /etc/redhat-release" "Checking Centos" 'Error This is not a Centos Base system'
|
||||
|
||||
echo -en "${cyan}Check Centos Version...${reset}"
|
||||
[ $(sed -nr 's/VERSION_ID+=\s*"([0-9])"$/\1/p' /etc/os-release) -eq '7' ]
|
||||
check_cmd_status 'Error OS version, Centos 7 is expected'
|
||||
|
||||
# initialice logfile
|
||||
execute_cmd "echo 'Starting community deployment' > $LOGFILE" "All installer activity is logged on $LOGFILE"
|
||||
echo "Community installer version: $S_VERSION" >> $LOGFILE
|
||||
|
||||
# Pre checks
|
||||
# Root permisions
|
||||
check_root_permissions
|
||||
|
||||
# Pre installed pandora
|
||||
check_pre_pandora
|
||||
|
||||
# Connectivity
|
||||
check_repo_connection
|
||||
|
||||
# Systemd
|
||||
execute_cmd "systemctl status" "Cheking SystemD" 'This is not a SystemD enable system, if tryng to use in a docker env plese check: https://github.com/pandorafms/pandorafms/tree/develop/extras/docker/centos8'
|
||||
|
||||
# Check memomry greather or equal to 2G
|
||||
execute_cmd "[ $(grep MemTotal /proc/meminfo | awk '{print $2}') -ge 1700000 ]" 'Checking memory (required: 2 GB)'
|
||||
|
||||
# Check disk size at least 10 Gb free space
|
||||
execute_cmd "[ $(df -BM / | tail -1 | awk '{print $4}' | tr -d M) -gt 10000 ]" 'Checking Disk (required: 10 GB free min)'
|
||||
|
||||
# Execute tools check
|
||||
execute_cmd "awk --version" 'Checking needed tools: awk'
|
||||
execute_cmd "grep --version" 'Checking needed tools: grep'
|
||||
execute_cmd "sed --version" 'Checking needed tools: sed'
|
||||
execute_cmd "yum --version" 'Checking needed tools: yum'
|
||||
|
||||
# Creating working directory
|
||||
rm -rf $HOME/pandora_deploy_tmp/*.rpm* &>> $LOGFILE
|
||||
mkdir $HOME/pandora_deploy_tmp &>> $LOGFILE
|
||||
execute_cmd "cd $HOME/pandora_deploy_tmp" "Moving to workspace: $HOME/pandora_deploy_tmp"
|
||||
|
||||
#Installing wget
|
||||
execute_cmd "yum install -y wget" "Installing wget"
|
||||
|
||||
#Installing extra repositiries
|
||||
extra_repos=" \
|
||||
tar \
|
||||
yum-utils \
|
||||
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
|
||||
http://rpms.remirepo.net/enterprise/remi-release-7.rpm \
|
||||
https://repo.percona.com/yum/percona-release-latest.noarch.rpm"
|
||||
|
||||
execute_cmd "yum install -y $extra_repos" "Installing extra repositories"
|
||||
execute_cmd "yum-config-manager --enable remi-php73" "Configuring PHP"
|
||||
|
||||
# Install percona Database
|
||||
[ -f /etc/resolv.conf ] && rm -rf /etc/my.cnf
|
||||
execute_cmd "yum install -y Percona-Server-server-57" "Installing Percona Server"
|
||||
|
||||
# Console dependencies
|
||||
console_dependencies=" \
|
||||
php \
|
||||
postfix \
|
||||
php-mcrypt \
|
||||
php-cli \
|
||||
php-gd \
|
||||
php-curl \
|
||||
php-session \
|
||||
php-mysqlnd \
|
||||
php-ldap \
|
||||
php-zip \
|
||||
php-zlib \
|
||||
php-fileinfo \
|
||||
php-gettext \
|
||||
php-snmp \
|
||||
php-mbstring \
|
||||
php-pecl-zip \
|
||||
php-xmlrpc \
|
||||
libxslt \
|
||||
wget \
|
||||
php-xml \
|
||||
httpd \
|
||||
mod_php \
|
||||
atk \
|
||||
avahi-libs \
|
||||
cairo \
|
||||
cups-libs \
|
||||
fribidi \
|
||||
gd \
|
||||
gdk-pixbuf2 \
|
||||
ghostscript \
|
||||
graphite2 \
|
||||
graphviz \
|
||||
gtk2 \
|
||||
harfbuzz \
|
||||
hicolor-icon-theme \
|
||||
hwdata \
|
||||
jasper-libs \
|
||||
lcms2 \
|
||||
libICE \
|
||||
libSM \
|
||||
libXaw \
|
||||
libXcomposite \
|
||||
libXcursor \
|
||||
libXdamage \
|
||||
libXext \
|
||||
libXfixes \
|
||||
libXft \
|
||||
libXi \
|
||||
libXinerama \
|
||||
libXmu \
|
||||
libXrandr \
|
||||
libXrender \
|
||||
libXt \
|
||||
libXxf86vm \
|
||||
libcroco \
|
||||
libdrm \
|
||||
libfontenc \
|
||||
libglvnd \
|
||||
libglvnd-egl \
|
||||
libglvnd-glx \
|
||||
libpciaccess \
|
||||
librsvg2 \
|
||||
libthai \
|
||||
libtool-ltdl \
|
||||
libwayland-client \
|
||||
libwayland-server \
|
||||
libxshmfence \
|
||||
mesa-libEGL \
|
||||
mesa-libGL \
|
||||
mesa-libgbm \
|
||||
mesa-libglapi \
|
||||
pango \
|
||||
pixman \
|
||||
xorg-x11-fonts-75dpi \
|
||||
xorg-x11-fonts-misc \
|
||||
poppler-data \
|
||||
php-yaml \
|
||||
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
|
||||
execute_cmd "yum install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
|
||||
|
||||
# Server dependencies
|
||||
server_dependencies=" \
|
||||
perl \
|
||||
vim \
|
||||
fping \
|
||||
perl-IO-Compress \
|
||||
nmap \
|
||||
sudo \
|
||||
perl-Time-HiRes \
|
||||
nfdump \
|
||||
net-snmp-utils \
|
||||
http://www6.atomicorp.com/channels/atomic/centos/7/x86_64/RPMS/wmi-1.3.14-4.el7.art.x86_64.rpm"
|
||||
execute_cmd "yum install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
||||
|
||||
# SDK VMware perl dependencies
|
||||
vmware_dependencies=" \
|
||||
http://firefly.artica.es/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm \
|
||||
perl-JSON \
|
||||
perl-Archive-Zip \
|
||||
openssl-devel \
|
||||
perl-Crypt-CBC \
|
||||
perl-Digest-SHA \
|
||||
http://firefly.artica.es/centos7/perl-Crypt-OpenSSL-AES-0.02-1.el7.x86_64.rpm"
|
||||
execute_cmd "yum install -y $vmware_dependencies" "Installing SDK VMware perl dependencies"
|
||||
|
||||
# Instant client Oracle
|
||||
oracle_dependencier=" \
|
||||
https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-basic-19.8.0.0.0-1.x86_64.rpm \
|
||||
https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-sqlplus-19.8.0.0.0-1.x86_64.rpm"
|
||||
execute_cmd "yum install -y $vmware_dependencies" "Installing Oracle Instant client"
|
||||
|
||||
# Disabling SELINUX and firewalld
|
||||
setenforce 0
|
||||
sed -i -e "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config
|
||||
systemctl disable firewalld --now &>> $LOGFILE
|
||||
|
||||
|
||||
#Configuring Database
|
||||
execute_cmd "systemctl start mysqld" "Starting database engine"
|
||||
export MYSQL_PWD=$(grep "temporary password" /var/log/mysqld.log | rev | cut -d' ' -f1 | rev)
|
||||
echo """
|
||||
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Pandor4!');
|
||||
UNINSTALL PLUGIN validate_password;
|
||||
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('pandora');
|
||||
""" | mysql --connect-expired-password -uroot
|
||||
|
||||
export MYSQL_PWD=$DBPASS
|
||||
echo -en "${cyan}Creating Pandora FMS database...${reset}"
|
||||
echo "create database $DBNAME" | mysql -uroot -P$DBPORT -h$DBHOST
|
||||
check_cmd_status 'Error creating database pandora, is this an empty node? if you have a previus installation please contact with support.'
|
||||
|
||||
echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%' identified by \"$DBPASS\"" | mysql -uroot -P$DBPORT -h$DBHOST
|
||||
|
||||
#Generating my.cnf
|
||||
POOL_SIZE=$(grep -i total /proc/meminfo | head -1 | awk '{printf "%.2f \n", $(NF-1)*0.4/1024}' | sed "s/\\..*$/M/g")
|
||||
cat > /etc/my.cnf << EO_CONFIG_F
|
||||
[mysqld]
|
||||
datadir=/var/lib/mysql
|
||||
socket=/var/lib/mysql/mysql.sock
|
||||
user=mysql
|
||||
character-set-server=utf8
|
||||
skip-character-set-client-handshake
|
||||
# Disabling symbolic-links is recommended to prevent assorted security risks
|
||||
symbolic-links=0
|
||||
# Mysql optimizations for Pandora FMS
|
||||
# Please check the documentation in http://pandorafms.com for better results
|
||||
|
||||
max_allowed_packet = 64M
|
||||
innodb_buffer_pool_size = $POOL_SIZE
|
||||
innodb_lock_wait_timeout = 90
|
||||
innodb_file_per_table
|
||||
innodb_flush_log_at_trx_commit = 0
|
||||
innodb_flush_method = O_DIRECT
|
||||
innodb_log_file_size = 64M
|
||||
innodb_log_buffer_size = 16M
|
||||
innodb_io_capacity = 100
|
||||
thread_cache_size = 8
|
||||
thread_stack = 256K
|
||||
max_connections = 100
|
||||
|
||||
key_buffer_size=4M
|
||||
read_buffer_size=128K
|
||||
read_rnd_buffer_size=128K
|
||||
sort_buffer_size=128K
|
||||
join_buffer_size=4M
|
||||
|
||||
query_cache_type = 1
|
||||
query_cache_size = 64M
|
||||
query_cache_min_res_unit = 2k
|
||||
query_cache_limit = 256K
|
||||
|
||||
sql_mode=""
|
||||
|
||||
[mysqld_safe]
|
||||
log-error=/var/log/mysqld.log
|
||||
pid-file=/var/run/mysqld/mysqld.pid
|
||||
|
||||
EO_CONFIG_F
|
||||
|
||||
execute_cmd "systemctl restart mysqld" "Configuring database engine"
|
||||
|
||||
# Downloading Pandora Packages
|
||||
execute_cmd "wget http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" "Downloading Pandora FMS Server community"
|
||||
execute_cmd "wget http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm" "Downloading Pandora FMS Console community"
|
||||
execute_cmd "wget http://firefly.artica.es/centos7/pandorafms_agent_unix-7.0NG.751_x86_64.rpm" "Downloading Pandora FMS Agent community"
|
||||
|
||||
# Install Pandora
|
||||
execute_cmd "yum install -y $HOME/pandora_deploy_tmp/pandorafms*.rpm" "installing PandoraFMS packages"
|
||||
|
||||
# Copy gotty utility
|
||||
execute_cmd "wget https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz" 'Dowloading gotty util'
|
||||
tar xvzf gotty_linux_amd64.tar.gz &>> $LOGFILE
|
||||
execute_cmd "mv gotty /usr/bin/" 'Installing gotty util'
|
||||
|
||||
# Enable Services
|
||||
execute_cmd "systemctl enable mysqld --now" "Enabling Database service"
|
||||
execute_cmd "systemctl enable httpd --now" "Enabling HTTPD service"
|
||||
|
||||
# Populate Database
|
||||
echo -en "${cyan}Loading pandoradb.sql to $DBNAME database...${reset}"
|
||||
mysql -u$DBUSER -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb.sql &>> $LOGFILE
|
||||
check_cmd_status 'Error Loading database schema'
|
||||
|
||||
echo -en "${cyan}Loading pandoradb_data.sql to $DBNAME database...${reset}"
|
||||
mysql -u$DBUSER -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb_data.sql &>> $LOGFILE
|
||||
check_cmd_status 'Error Loading database schema data'
|
||||
|
||||
# Configure console
|
||||
cat > $CONSOLE_PATH/include/config.php << EO_CONFIG_F
|
||||
<?php
|
||||
\$config["dbtype"] = "mysql";
|
||||
\$config["dbname"]="$DBNAME";
|
||||
\$config["dbuser"]="$DBUSER";
|
||||
\$config["dbpass"]="$DBPASS";
|
||||
\$config["dbhost"]="localhost";
|
||||
\$config["homedir"]="$PANDORA_CONSOLE";
|
||||
\$config["homeurl"]="/pandora_console";
|
||||
error_reporting(0);
|
||||
\$ownDir = dirname(__FILE__) . '/';
|
||||
include (\$ownDir . "config_process.php");
|
||||
|
||||
EO_CONFIG_F
|
||||
|
||||
cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F
|
||||
<Directory "/var/www/html">
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
EO_CONFIG_F
|
||||
|
||||
# Add ws proxy options to apache.
|
||||
cat >> /etc/httpd/conf.modules.d/00-proxy.conf << 'EO_HTTPD_MOD'
|
||||
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
|
||||
|
||||
EO_HTTPD_MOD
|
||||
|
||||
cat >> /etc/httpd/conf.d/wstunnel.conf << 'EO_HTTPD_WSTUNNEL'
|
||||
ProxyRequests Off
|
||||
<Proxy *>
|
||||
Require all granted
|
||||
</Proxy>
|
||||
|
||||
ProxyPass /ws ws://127.0.0.1:8080
|
||||
ProxyPassReverse /ws ws://127.0.0.1:8080
|
||||
|
||||
EO_HTTPD_WSTUNNEL
|
||||
|
||||
# Temporal quitar htaccess
|
||||
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/images/.htaccess
|
||||
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/attachment/.htaccess
|
||||
|
||||
# Fixing console permissions
|
||||
chmod 600 $CONSOLE_PATH/include/config.php
|
||||
chown apache. $CONSOLE_PATH/include/config.php
|
||||
mv $CONSOLE_PATH/install.php $CONSOLE_PATH/install.done
|
||||
|
||||
# Prepare php.ini
|
||||
sed -i -e "s/^max_input_time.*/max_input_time = -1/g" /etc/php.ini
|
||||
sed -i -e "s/^max_execution_time.*/max_execution_time = 0/g" /etc/php.ini
|
||||
sed -i -e "s/^upload_max_filesize.*/upload_max_filesize = 800M/g" /etc/php.ini
|
||||
sed -i -e "s/^memory_limit.*/memory_limit = 500M/g" /etc/php.ini
|
||||
|
||||
cat > /var/www/html/index.html << EOF_INDEX
|
||||
<meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/">
|
||||
EOF_INDEX
|
||||
|
||||
execute_cmd "systemctl restart httpd" "Restarting httpd after configuration"
|
||||
|
||||
# prepare snmptrapd
|
||||
cat > /etc/snmp/snmptrapd.conf << EOF
|
||||
authCommunity log public
|
||||
disableAuthorization yes
|
||||
EOF
|
||||
|
||||
# Prepare Server conf
|
||||
sed -i -e "s/^dbhost.*/dbhost $DBHOST/g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s/^dbname.*/dbname $DBNAME/g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s/^dbuser.*/dbuser $DBUSER/g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s|^dbpass.*|dbpass $DBPASS|g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s/^dbport.*/dbport $DBPORT/g" $PANDORA_SERVER_CONF
|
||||
|
||||
# Set Oracle environment for pandora_server
|
||||
cat > /etc/pandora/pandora_server.env << 'EOF_ENV'
|
||||
#!/bin/bash
|
||||
VERSION=19.8
|
||||
export PATH=$PATH:$HOME/bin:/usr/lib/oracle/$VERSION/client64/bin
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/$VERSION/client64/lib
|
||||
export ORACLE_HOME=/usr/lib/oracle/$VERSION/client64
|
||||
EOF_ENV
|
||||
|
||||
# Kernel optimization
|
||||
cat >> /etc/sysctl.conf <<EO_KO
|
||||
# Pandora FMS Optimization
|
||||
|
||||
# default=5
|
||||
net.ipv4.tcp_syn_retries = 3
|
||||
|
||||
# default=5
|
||||
net.ipv4.tcp_synack_retries = 3
|
||||
|
||||
# default=1024
|
||||
net.ipv4.tcp_max_syn_backlog = 65536
|
||||
|
||||
# default=124928
|
||||
net.core.wmem_max = 8388608
|
||||
|
||||
# default=131071
|
||||
net.core.rmem_max = 8388608
|
||||
|
||||
# default = 128
|
||||
net.core.somaxconn = 1024
|
||||
|
||||
# default = 20480
|
||||
net.core.optmem_max = 81920
|
||||
|
||||
EO_KO
|
||||
|
||||
execute_cmd "sysctl --system" "Applying Kernel optimization"
|
||||
|
||||
# Fix pandora_server.{log,error} permissions to allow Console check them
|
||||
chown pandora:apache /var/log/pandora
|
||||
chmod g+s /var/log/pandora
|
||||
|
||||
cat > /etc/logrotate.d/pandora_server <<EO_LR
|
||||
/var/log/pandora/pandora_server.log
|
||||
/var/log/pandora/web_socket.log
|
||||
/var/log/pandora/pandora_server.error {
|
||||
su root apache
|
||||
weekly
|
||||
missingok
|
||||
size 300000
|
||||
rotate 3
|
||||
maxage 90
|
||||
compress
|
||||
notifempty
|
||||
copytruncate
|
||||
create 660 pandora apache
|
||||
}
|
||||
|
||||
/var/log/pandora/pandora_snmptrap.log {
|
||||
su root apache
|
||||
weekly
|
||||
missingok
|
||||
size 500000
|
||||
rotate 1
|
||||
maxage 30
|
||||
notifempty
|
||||
copytruncate
|
||||
create 660 pandora apache
|
||||
}
|
||||
|
||||
EO_LR
|
||||
|
||||
cat > /etc/logrotate.d/pandora_agent <<EO_LRA
|
||||
/var/log/pandora/pandora_agent.log {
|
||||
su root apache
|
||||
weekly
|
||||
missingok
|
||||
size 300000
|
||||
rotate 3
|
||||
maxage 90
|
||||
compress
|
||||
notifempty
|
||||
copytruncate
|
||||
}
|
||||
|
||||
EO_LRA
|
||||
|
||||
chmod 0644 /etc/logrotate.d/pandora_server
|
||||
chmod 0644 /etc/logrotate.d/pandora_agent
|
||||
|
||||
# Add websocket engine start script.
|
||||
mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/
|
||||
chmod +x /etc/init.d/pandora_websocket_engine
|
||||
|
||||
# Start Websocket engine
|
||||
/etc/init.d/pandora_websocket_engine start &>> $LOGFILE
|
||||
|
||||
# Configure websocket to be started at start.
|
||||
systemctl enable pandora_websocket_engine &>> $LOGFILE
|
||||
|
||||
# Enable pandora ha service
|
||||
systemctl enable pandora_server --now &>> $LOGFILE
|
||||
execute_cmd "systemctl start pandora_server" "Starting Pandora FMS Server"
|
||||
|
||||
# starting tentacle server
|
||||
systemctl enable tentacle_serverd &>> $LOGFILE
|
||||
execute_cmd "service tentacle_serverd start" "Starting Tentacle Server"
|
||||
|
||||
# Enabling condole cron
|
||||
execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron"
|
||||
echo "* * * * * root wget -q -O - --no-check-certificate http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab
|
||||
## Enabling agent
|
||||
systemctl enable pandora_agent_daemon &>> $LOGFILE
|
||||
execute_cmd "systemctl start pandora_agent_daemon" "starting Pandora FMS Agent"
|
||||
|
||||
#SSH banner
|
||||
[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)
|
||||
|
||||
cat > /etc/issue.net << EOF_banner
|
||||
|
||||
Welcome to Pandora FMS appliance on CentOS
|
||||
------------------------------------------
|
||||
Go to Public http://$ipplublic/pandora_console$to to login web console
|
||||
$(ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v "172.17.0.1" | awk '{print $2}' | awk -F '/' '{print "Go to Local http://"$1"/pandora_console to login web console"}')
|
||||
|
||||
You can find more information at http://pandorafms.com
|
||||
|
||||
EOF_banner
|
||||
|
||||
rm -f /etc/issue
|
||||
ln -s /etc/issue.net /etc/issue
|
||||
|
||||
echo 'Banner /etc/issue.net' >> /etc/ssh/sshd_config
|
||||
|
||||
# Remove temporary files
|
||||
execute_cmd "echo done" "Pandora FMS Community installed"
|
||||
cd
|
||||
execute_cmd "rm -rf $HOME/pandora_deploy_tmp" "Removing temporary files"
|
||||
|
||||
# Print nice finish message
|
||||
GREEN='\033[01;32m'
|
||||
NONE='\033[0m'
|
||||
printf " -> Go to Public ${green}http://"$ipplublic"/pandora_console${reset} to manage this server"
|
||||
ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -v g=$GREEN -v n=$NONE -F '/' '{printf "\n -> Go to Local "g"http://"$1"/pandora_console"n" to manage this server \n -> Use this credentials to login in the console "g"[ User: admin / Password: pandora ]"n" \n"}'
|
|
@ -0,0 +1,145 @@
|
|||

|
||||
|
||||
|
||||
Pandora FMS is a __monitoring solution__ that provides unparalleled flexibility for IT to address both immediate and unforeseen operational issues, including infrastructure and IT processes.
|
||||
|
||||
It uniquely enables business and IT to adapt to changing needs through a flexible and rapid approach to IT and business deployment.
|
||||
|
||||
For community support you can visit our forums at [forums.pandorafms.org](http://forums.pandorafms.org). Check out our community website at [pandorafms.org](http://pandorafms.org), and if you need sales information or/and professional support, visit [pandorafms.com](http://pandorafms.com).
|
||||
|
||||
# Pandora FMS full stack based on Centos 8
|
||||
|
||||
## Try it
|
||||
|
||||
You can try it on a cloud env for 4 hours using play with docker just click in the icon bellow, wait for the pulling image and the containers will be up and running automatically
|
||||
|
||||
If you want to open the console just click on the port 8080 on the upside and will be redirected to the pandora consola.
|
||||
|
||||
[](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/rafaelameijeiras/PandoraFMS/master/pandorafms_community/docker-compose-official.yml)
|
||||
|
||||
|
||||
https://www.youtube.com/watch?v=Hw2P6hHQpeI
|
||||
|
||||
Note: could take a couple of minutes for the console to be ready so if you click in the 8080 port and nothing and have a blank page wait a little and reload the page
|
||||
|
||||
## Usage
|
||||
```
|
||||
docker run --name Pandora_new %container_name% --rm \
|
||||
-p %local_httpd_port%:80 \
|
||||
-p %local_tentacle_port%:41121 \
|
||||
-e DBHOST=%Mysql_Server_IP% \
|
||||
-e DBNAME=%database_name% \
|
||||
-e DBUSER=%Mysql_user% \
|
||||
-e DBPASS=%Mysql_pass% \
|
||||
-e DBPORT=%Mysql_port% \
|
||||
-e INSTANCE_NAME=%server name% \
|
||||
-ti pandorafms-open-stack-el8
|
||||
```
|
||||
Example:
|
||||
```
|
||||
docker run --name Pandora_new --rm \
|
||||
-p 8081:80 \
|
||||
-p 41125:41121 \
|
||||
-e DBHOST=192.168.80.45 \
|
||||
-e DBNAME=pandora_demos_1 \
|
||||
-e DBUSER=pandora \
|
||||
-e DBPASS=pandora \
|
||||
-e DBPORT=3306 \
|
||||
-e INSTANCE_NAME=pandora201 \
|
||||
-ti pandorafms-open-stack-el8
|
||||
```
|
||||
|
||||
### Integrated database for PandoraFMS container
|
||||
There is a preconfigured database image in this repo to connect the Pandora environment so you can up the database and then point the pandora container to the database.
|
||||
|
||||
Example:
|
||||
```
|
||||
docker run --name Pandora_DB \
|
||||
-p 3306:3306 \
|
||||
-e MYSQL_ROOT_PASSWORD=pandora \
|
||||
-e MYSQL_DATABASE=pandora \
|
||||
-e MYSQL_USER=pandora \
|
||||
-e MYSQL_PASSWORD=pandora \
|
||||
-d pandorafms/pandorafms-percona-base
|
||||
```
|
||||
|
||||
This creates a Percona mysql docker and a database called Pandora with grants to the pandora user (optional) and the credentials for root user.
|
||||
|
||||
In this example we expose the 3306 for database connection.
|
||||
|
||||
Using this configuration (getting the container ip from DB container ip) you can execute the next container Pandora pointing to it:
|
||||
|
||||
```
|
||||
docker run --name Pandora_new --rm \
|
||||
-p 8081:80 \
|
||||
-p 41125:41121 \
|
||||
-e DBHOST=<percona container ip> \
|
||||
-e DBNAME=pandora \
|
||||
-e DBUSER=pandora \
|
||||
-e DBPASS=pandora \
|
||||
-e DBPORT=3306 \
|
||||
-e INSTANCE_NAME=pandora_inst \
|
||||
-ti pandorafms/pandorafms-open-stack-el8
|
||||
```
|
||||
|
||||
### Docker Compose Stack
|
||||
|
||||
if you want to run an easy to deploy stack you may use the docker-compose.yml file
|
||||
|
||||
```
|
||||
version: '3.1'
|
||||
services:
|
||||
db:
|
||||
image: pandorafms/pandorafms-percona-base
|
||||
restart: always
|
||||
#command: ["mysqld", "--innodb-buffer-pool-size=900M"]
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: pandora
|
||||
MYSQL_DATABASE: pandora
|
||||
MYSQL_USER: pandora
|
||||
MYSQL_PASSWORD: pandora
|
||||
networks:
|
||||
- pandora
|
||||
|
||||
pandora:
|
||||
image: pandorafms/pandorafms-open-stack-el8:latest
|
||||
restart: always
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: pandora
|
||||
DBHOST: db
|
||||
DBNAME: pandora
|
||||
DBUSER: pandora
|
||||
DBPASS: pandora
|
||||
DBPORT: 3306
|
||||
INSTANCE_NAME: pandora01
|
||||
PUBLICURL: ""
|
||||
SLEEP: 5
|
||||
RETRIES: 10
|
||||
networks:
|
||||
- pandora
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "41121:41121"
|
||||
- "162:162/udp"
|
||||
- "9995:9995/udp"
|
||||
networks:
|
||||
pandora:
|
||||
```
|
||||
just by running: `docker-compose -f <docker-compose-file> up`
|
||||
|
||||
## Important Parameters:
|
||||
|
||||
* __INSTANCE_NAME__: Pandora Server name
|
||||
* __DBHOST__: DB host IP to MySQL engine
|
||||
* __DBNAME__: The name of the database. If your user have enough permissions to create databases, the container will create it in case automatically if didn't exist
|
||||
* __DBUSER__: The user to connect MySQL engine.
|
||||
* __DBPASS__: User password to connect MySQL engine.
|
||||
* __DBPORT__: The port to connect MySQL engine. by default 33306
|
||||
* __PUBLICURL__: Define a public URL. Useful when Pandora is used behind a reverse proxy
|
||||
* __SLEEP__: Time to wait between retries
|
||||
* __RETRIES__: How many times Pandora will try to connect to MySQL engine before fail.
|
||||
|
||||
Note1: the SLEEP and RETRIES variables will be used to wait for database container to fully start, if you are in a slower system maybe you will need to increase these variables values, in this example will wait 5 seconds for the database container to be up and retries 3 times.
|
||||
|
|
@ -0,0 +1,272 @@
|
|||
#docker build -t pandorafms/pandorafms-open-base-el8 -f $HOME/code/pandorafms/extras/docker/centos8/base/Dockerfile $HOME/code/pandorafms/extras/docker/centos8/base/
|
||||
#docker push pandorafms/pandorafms-open-base-el8
|
||||
|
||||
FROM centos:8
|
||||
|
||||
RUN dnf install -y --setopt=tsflags=nodocs \
|
||||
epel-release \
|
||||
dnf-utils \
|
||||
http://rpms.remirepo.net/enterprise/remi-release-8.rpm
|
||||
|
||||
RUN dnf module reset -y php && dnf module install -y php:remi-7.3
|
||||
RUN dnf config-manager --set-enabled powertools
|
||||
|
||||
# Install console
|
||||
RUN dnf install -y --setopt=tsflags=nodocs \
|
||||
php \
|
||||
php-mcrypt \php-cli \
|
||||
php-gd \
|
||||
php-curl \
|
||||
php-session \
|
||||
php-mysqlnd \
|
||||
php-ldap \
|
||||
php-zip \
|
||||
php-zlib \
|
||||
php-fileinfo \
|
||||
php-gettext \
|
||||
php-snmp \
|
||||
php-mbstring \
|
||||
php-pecl-zip \
|
||||
php-xmlrpc \
|
||||
libxslt \
|
||||
wget \
|
||||
php-xml \
|
||||
httpd \
|
||||
mod_php \
|
||||
atk \
|
||||
avahi-libs \
|
||||
cairo \
|
||||
cups-libs \
|
||||
fribidi \
|
||||
gd \
|
||||
gdk-pixbuf2 \
|
||||
ghostscript \
|
||||
graphite2 \
|
||||
graphviz \
|
||||
gtk2 \
|
||||
harfbuzz \
|
||||
hicolor-icon-theme \
|
||||
hwdata \
|
||||
jasper-libs \
|
||||
lcms2 \
|
||||
libICE \
|
||||
libSM \
|
||||
libXaw \
|
||||
libXcomposite \
|
||||
libXcursor \
|
||||
libXdamage \
|
||||
libXext \
|
||||
libXfixes \
|
||||
libXft \
|
||||
libXi \
|
||||
libXinerama \
|
||||
libXmu \
|
||||
libXrandr \
|
||||
libXrender \
|
||||
libXt \
|
||||
libXxf86vm \
|
||||
libcroco \
|
||||
libdrm \
|
||||
libfontenc \
|
||||
libglvnd \
|
||||
libglvnd-egl \
|
||||
libglvnd-glx \
|
||||
libpciaccess \
|
||||
librsvg2 \
|
||||
libthai \
|
||||
libtool-ltdl \
|
||||
libwayland-client \
|
||||
libwayland-server \
|
||||
libxshmfence \
|
||||
mesa-libEGL \
|
||||
mesa-libGL \
|
||||
mesa-libgbm \
|
||||
mesa-libglapi \
|
||||
pango \
|
||||
pixman \
|
||||
nfdump \
|
||||
xorg-x11-fonts-75dpi \
|
||||
xorg-x11-fonts-misc \
|
||||
poppler-data \
|
||||
php-yaml
|
||||
|
||||
RUN mkdir -p /run/php-fpm/ ; chown -R root:apache /run/php-fpm/
|
||||
# not installed perl-Net-Telnet gtk-update-icon-cach ghostscript-fonts
|
||||
|
||||
# Install server
|
||||
|
||||
RUN dnf install -y --setopt=tsflags=nodocs \
|
||||
GeoIP \
|
||||
GeoIP-GeoLite-data \
|
||||
dwz \
|
||||
efi-srpm-macros \
|
||||
ghc-srpm-macros \
|
||||
go-srpm-macros \
|
||||
ocaml-srpm-macros \
|
||||
openblas-srpm-macros \
|
||||
perl \
|
||||
perl-Algorithm-Diff \
|
||||
perl-Archive-Tar \
|
||||
perl-Archive-Zip \
|
||||
perl-Attribute-Handlers \
|
||||
perl-B-Debug \
|
||||
perl-CPAN \
|
||||
perl-CPAN-Meta \
|
||||
perl-CPAN-Meta-Requirements \
|
||||
perl-CPAN-Meta-YAML \
|
||||
perl-Compress-Bzip2 \
|
||||
perl-Config-Perl-V \
|
||||
perl-DBD-MySQL \
|
||||
perl-DBI \
|
||||
perl-DB_File \
|
||||
perl-Data-Dump \
|
||||
perl-Data-OptList \
|
||||
perl-Data-Section \
|
||||
perl-Devel-PPPort \
|
||||
perl-Devel-Peek \
|
||||
perl-Devel-SelfStubber \
|
||||
perl-Devel-Size \
|
||||
perl-Digest-HMAC \
|
||||
perl-Digest-SHA \
|
||||
perl-Encode-Locale \
|
||||
perl-Encode-devel \
|
||||
perl-Env \
|
||||
perl-ExtUtils-CBuilder \
|
||||
perl-ExtUtils-Command \
|
||||
perl-ExtUtils-Embed \
|
||||
perl-ExtUtils-Install \
|
||||
perl-ExtUtils-MM-Utils \
|
||||
perl-ExtUtils-MakeMaker \
|
||||
perl-ExtUtils-Manifest \
|
||||
perl-ExtUtils-Miniperl \
|
||||
perl-ExtUtils-ParseXS \
|
||||
perl-File-Fetch \
|
||||
perl-File-HomeDir \
|
||||
perl-File-Listing \
|
||||
perl-File-Which \
|
||||
perl-Filter \
|
||||
perl-Filter-Simple \
|
||||
perl-Geo-IP \
|
||||
perl-HTML-Parser \
|
||||
perl-HTML-Tagset \
|
||||
perl-HTML-Tree \
|
||||
perl-HTTP-Cookies \
|
||||
perl-HTTP-Date \
|
||||
perl-HTTP-Message \
|
||||
perl-HTTP-Negotiate \
|
||||
perl-IO-HTML \
|
||||
perl-IO-Socket-INET6 \
|
||||
perl-IO-Zlib \
|
||||
perl-IO-stringy \
|
||||
perl-IPC-Cmd \
|
||||
perl-IPC-SysV \
|
||||
perl-IPC-System-Simple \
|
||||
perl-JSON \
|
||||
perl-JSON-PP \
|
||||
perl-LWP-MediaTypes \
|
||||
perl-Locale-Codes \
|
||||
perl-Locale-Maketext \
|
||||
perl-Locale-Maketext-Simple \
|
||||
perl-MRO-Compat \
|
||||
perl-Math-BigInt \
|
||||
perl-Math-BigInt-FastCalc \
|
||||
perl-Math-BigRat \
|
||||
perl-Memoize \
|
||||
perl-Module-Build \
|
||||
perl-Module-CoreList \
|
||||
perl-Module-CoreList-tools \
|
||||
perl-Module-Load \
|
||||
perl-Module-Load-Conditional \
|
||||
perl-Module-Loaded \
|
||||
perl-Module-Metadata \
|
||||
perl-NTLM \
|
||||
perl-Net-HTTP \
|
||||
perl-Net-Ping \
|
||||
perl-NetAddr-IP \
|
||||
perl-Package-Generator \
|
||||
perl-Params-Check \
|
||||
perl-Params-Util \
|
||||
perl-Perl-OSType \
|
||||
perl-PerlIO-via-QuotedPrint \
|
||||
perl-Pod-Checker \
|
||||
perl-Pod-Html \
|
||||
perl-Pod-Parser \
|
||||
perl-SelfLoader \
|
||||
perl-Socket6 \
|
||||
perl-Software-License \
|
||||
perl-Sub-Exporter \
|
||||
perl-Sub-Install \
|
||||
perl-Sys-Syslog \
|
||||
perl-Test \
|
||||
perl-Test-Harness \
|
||||
perl-Test-Simple \
|
||||
perl-Text-Balanced \
|
||||
perl-Text-Diff \
|
||||
perl-Text-Glob \
|
||||
perl-Text-Template \
|
||||
perl-Thread-Queue \
|
||||
perl-Time-Piece \
|
||||
perl-TimeDate \
|
||||
perl-Try-Tiny \
|
||||
perl-Unicode-Collate \
|
||||
perl-WWW-RobotRules \
|
||||
perl-XML-NamespaceSupport \
|
||||
perl-XML-Parser \
|
||||
perl-XML-SAX \
|
||||
perl-XML-SAX-Base \
|
||||
perl-XML-Simple \
|
||||
perl-XML-Twig \
|
||||
perl-autodie \
|
||||
perl-bignum \
|
||||
perl-devel \
|
||||
perl-encoding \
|
||||
perl-experimental \
|
||||
perl-inc-latest \
|
||||
perl-libnetcfg \
|
||||
perl-libwww-perl \
|
||||
perl-local-lib \
|
||||
perl-open \
|
||||
perl-perlfaq \
|
||||
perl-srpm-macros \
|
||||
perl-utils \
|
||||
perl-version \
|
||||
python-srpm-macros \
|
||||
python3-pyparsing \
|
||||
python3-rpm-macros \
|
||||
qt5-srpm-macros \
|
||||
redhat-rpm-config \
|
||||
rust-srpm-macros \
|
||||
systemtap-sdt-devel \
|
||||
perl-TermReadKey \
|
||||
perl \
|
||||
perl-DBD-MySQL \
|
||||
perl-DBI \
|
||||
initscripts \
|
||||
vim \
|
||||
fping \
|
||||
perl-IO-Compress \
|
||||
perl-Time-HiRes \
|
||||
perl-Math-Complex \
|
||||
libnsl \
|
||||
mysql \
|
||||
java \
|
||||
net-snmp-utils \
|
||||
net-tools \
|
||||
nmap-ncat \
|
||||
nmap \
|
||||
net-snmp-utils \
|
||||
sudo \
|
||||
http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
|
||||
http://firefly.artica.es/centos8/wmi-1.3.14-4.el7.art.x86_64.rpm
|
||||
|
||||
# install utils
|
||||
RUN dnf install -y supervisor crontabs http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm --setopt=tsflags=nodocs
|
||||
# SDK VMware perl dependencies
|
||||
RUN dnf install -y http://firefly.artica.es/centos8/perl-Crypt-OpenSSL-AES-0.02-1.el8.x86_64.rpm http://firefly.artica.es/centos8/perl-Crypt-SSLeay-0.73_07-1.gf.el8.x86_64.rpm perl-Net-HTTP perl-libwww-perl openssl-devel perl-Crypt-CBC perl-Bytes-Random-Secure perl-Crypt-Random-Seed perl-Math-Random-ISAAC perl-JSON http://firefly.artica.es/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm
|
||||
# Instant client Oracle
|
||||
RUN dnf install -y https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-basic-19.8.0.0.0-1.x86_64.rpm https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-sqlplus-19.8.0.0.0-1.x86_64.rpm
|
||||
|
||||
RUN dnf install -y supervisor crontabs http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm --setopt=tsflags=nodocs
|
||||
|
||||
|
||||
EXPOSE 80 443 41121 162/udp
|
|
@ -0,0 +1,116 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=$1
|
||||
ENT="$HOME/code/pandora_enterprise"
|
||||
OPEN="$HOME/code/pandorafms"
|
||||
OS="Centos"
|
||||
ARCH="x86_64"
|
||||
EL="el7"
|
||||
EXT="demo"
|
||||
TARGET_URL="http://atlantis.artica.es"
|
||||
DOCKER_PATH="$OPEN/extras/docker/centos8/"
|
||||
OSTACK_IMAGE="pandorafms/pandorafms-open-stack-el8"
|
||||
OBASE_IMAGE="pandorafms/pandorafms-open-base-el8"
|
||||
PERCONA_IMAGE="pandorafms/pandorafms-percona-base"
|
||||
|
||||
|
||||
function help {
|
||||
echo "To excute the builder you must declare 4 parameters: the version image, upload (push) tokens, build base (rebuild centos base image), build percona (rebuild percona base image)"
|
||||
echo ""
|
||||
echo "$0 <version> [ <push 0|1> ] [<build base 0|1>] [<build percona 0|1>]"
|
||||
echo "Ex creates a local image from 749 packages : $0 749 0 1 1"
|
||||
}
|
||||
|
||||
if [ "$1" == "" ] || [ "$1" == "-h" ] ; then
|
||||
help
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$2" == "1" ]; then
|
||||
UPDATE="1"
|
||||
fi
|
||||
|
||||
if [ "$3" == "1" ]; then
|
||||
BASEBUILD="1"
|
||||
fi
|
||||
|
||||
if [ "$4" == "1" ]; then
|
||||
DBBUILD="1"
|
||||
fi
|
||||
|
||||
#Defining packages urls
|
||||
|
||||
oconsoleurl=$TARGET_URL/Releases/7.0NG.$VERSION/$OS/noarch/pandorafms_console-7.0NG.$VERSION.noarch.rpm
|
||||
oserverurl=$TARGET_URL/Releases/7.0NG.$VERSION/$OS/noarch/pandorafms_server-7.0NG.$VERSION.noarch.rpm
|
||||
url=$(curl -I -s $TARGET_URL/Releases/7.0NG.$VERSION/ 2> /dev/null | grep "200 OK" | wc -l)
|
||||
|
||||
# log in into docker acount to acces private repo.
|
||||
|
||||
# docker login -u $DOCKERUSER -p$DOCKERPASS
|
||||
|
||||
Check athlantis is reachable
|
||||
if [ "$url" -lt 1 ] ; then
|
||||
echo "$url Athlantis unreachable ..."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "Start"
|
||||
# Removing old packages
|
||||
cd $DOCKER_PATH/pandora-stack/sources
|
||||
rm -rf ./pandorafms_*
|
||||
|
||||
# Downloading new packages
|
||||
wget $oconsoleurl
|
||||
wget $oserverurl
|
||||
|
||||
if [ "$BASEBUILD" == 1 ] ; then
|
||||
docker pull centos:8
|
||||
# Open Base image
|
||||
echo "building Base el8 image"
|
||||
cd $DOCKER_PATH/base
|
||||
docker build -t $OBASE_IMAGE:$VERSION -f $DOCKER_PATH/base/Dockerfile $DOCKER_PATH/base
|
||||
echo "Taging Open stack el8 latest image before upload"
|
||||
docker tag $OBASE_IMAGE:$VERSION $OBASE_IMAGE:latest
|
||||
echo -e ">>>> \n"
|
||||
else
|
||||
docker pull pandorafms/pandorafms-open-base-el8
|
||||
fi
|
||||
|
||||
if [ "$DBBUILD" == 1 ] ; then
|
||||
docker pull percona:5.7
|
||||
# Percona image
|
||||
echo "building Percona image"
|
||||
cd $OPEN/extras/docker/percona
|
||||
docker build -t $PERCONA_IMAGE:latest -f $OPEN/extras/docker/percona/Dockerfile $OPEN/extras/docker/percona
|
||||
echo -e ">>>> \n"
|
||||
fi
|
||||
|
||||
#Open Stack image
|
||||
echo "building Open el8 image"
|
||||
cd $DOCKER_PATH/pandora-stack
|
||||
docker build -t $OSTACK_IMAGE:$VERSION -f $DOCKER_PATH/pandora-stack/Dockerfile $DOCKER_PATH/pandora-stack
|
||||
echo "Taging Open base latest image before upload"
|
||||
docker tag $OSTACK_IMAGE:$VERSION $OSTACK_IMAGE:latest
|
||||
echo -e ">>>> \n"
|
||||
|
||||
# Upload images
|
||||
|
||||
if [ "$UPDATE" == 1 ] ; then
|
||||
if [ "$BASEBUILD" == 1 ] ; then
|
||||
#Open base Images
|
||||
echo "Uploading Open $OBASE_IMAGE:$VERSION . . ."
|
||||
docker push $OBASE_IMAGE:$VERSION
|
||||
docker push $OBASE_IMAGE:latest
|
||||
fi
|
||||
|
||||
if [ "$DBBUILD" == 1 ] ; then
|
||||
#Open base Images
|
||||
echo "Uploading percona $PERCONA_IMAGE:latest . . ."
|
||||
docker push $PERCONA_IMAGE:latest
|
||||
fi
|
||||
|
||||
#Open Stack Images
|
||||
echo "Uploading Open $OSTACK_IMAGE:$VERSION . . ."
|
||||
docker push $OSTACK_IMAGE:$VERSION
|
||||
docker push $OSTACK_IMAGE:latest
|
||||
fi
|
|
@ -0,0 +1,43 @@
|
|||
# Use root/example as user/password credentials
|
||||
# este compose incluye la base de datos en otro docker y levanta aplicacion y DB juntos
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
|
||||
db:
|
||||
image: pandorafms/pandorafms-percona-base
|
||||
restart: always
|
||||
#command: ["mysqld", "--innodb-buffer-pool-size=900M"]
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: pandora
|
||||
MYSQL_DATABASE: pandora
|
||||
MYSQL_USER: pandora
|
||||
MYSQL_PASSWORD: pandora
|
||||
networks:
|
||||
- pandora
|
||||
|
||||
pandora:
|
||||
image: pandorafms/pandorafms-open-stack-el8:latest
|
||||
restart: always
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: pandora
|
||||
DBHOST: db
|
||||
DBNAME: pandora
|
||||
DBUSER: pandora
|
||||
DBPASS: pandora
|
||||
DBPORT: 3306
|
||||
INSTANCE_NAME: pandora01
|
||||
PUBLICURL: ""
|
||||
SLEEP: 5
|
||||
RETRIES: 10
|
||||
networks:
|
||||
- pandora
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "41121:41121"
|
||||
- "162:162/udp"
|
||||
- "9995:9995/udp"
|
||||
networks:
|
||||
pandora:
|
|
@ -0,0 +1,24 @@
|
|||
#docker build -t pandorafms/pandorafms-open-stack-el8:$VERSION -f $HOME/code/pandorafms/extras/docker/centos8/pandora-stack/Dockerfile $HOME/code/pandorafms/extras/docker/centos8/pandora-stack/
|
||||
|
||||
FROM pandorafms/pandorafms-open-base-el8
|
||||
|
||||
ENV DBNAME=pandora
|
||||
ENV DBUSER=pandora
|
||||
ENV DBPASS=pandora
|
||||
ENV DBHOST=pandora
|
||||
ENV DBPORT=3306
|
||||
ENV SLEEP=5
|
||||
ENV RETRIES=1
|
||||
ENV OPEN=1
|
||||
|
||||
ENV LC_ALL=C
|
||||
|
||||
RUN rm -rf /etc/localtime ; ln -s /usr/share/zoneinfo/Europe/Madrid /etc/localtime
|
||||
|
||||
COPY ./sources /opt/pandora
|
||||
# Install the Pandora console
|
||||
RUN dnf install -y /opt/pandora/pandorafms_console-*.rpm /opt/pandora/pandorafms_server-*.rpm ; yum clean all
|
||||
|
||||
EXPOSE 80 443 41121 162/udp 9995/udp
|
||||
|
||||
CMD sh /opt/pandora/init_pandora.sh
|
|
@ -0,0 +1,5 @@
|
|||
# exclude packages
|
||||
demos/
|
||||
*.tar*
|
||||
*.rpm
|
||||
phantomjs
|
|
@ -0,0 +1,336 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Prepares environment and launchs Pandora FMS
|
||||
#
|
||||
# Global vars
|
||||
#
|
||||
PANDORA_CONSOLE=/var/www/html/pandora_console
|
||||
PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
|
||||
PANDORA_SERVER_BIN=/usr/bin/pandora_server
|
||||
PANDORA_HA_BIN=/usr/bin/pandora_ha
|
||||
PANDORA_TABLES_MIN=160
|
||||
#
|
||||
# Check database
|
||||
#
|
||||
function db_check {
|
||||
# Check DB
|
||||
echo -n ">> Checking dbengine connection: "
|
||||
|
||||
for i in `seq $RETRIES`; do
|
||||
r=`echo 'select 1' | mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST -A`
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -n "retriying DB conection in $SLEEP seconds: "
|
||||
sleep $SLEEP
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
r=`echo 'select 1' | mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST -A`
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "OK"
|
||||
echo -n ">> Checking database connection: "
|
||||
r=`echo 'select 1' | mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST -A $DBNAME`
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "OK"
|
||||
return 0
|
||||
fi
|
||||
echo -n ">> Cannot connect to $DBNAME, trying to create: "
|
||||
r=`echo "create database $DBNAME" | mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST`
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "OK"
|
||||
return 0
|
||||
fi
|
||||
echo "Cannot create database $DBNAME on $DBUSER@$DBHOST:$DBPORT"
|
||||
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ "$DEBUG" == "1" ]; then
|
||||
echo "Command: [echo 'select 1' | mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST -A $DBNAME]"
|
||||
echo "Output: [$r]"
|
||||
|
||||
traceroute $DBHOST
|
||||
nmap $DBHOST -v -v -p $DBPORT
|
||||
fi
|
||||
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
# Load database
|
||||
#
|
||||
function db_load {
|
||||
# Load DB
|
||||
echo -n ">> Checking database state:"
|
||||
r=`mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST -A $DBNAME -s -e 'show tables'| wc -l`
|
||||
if [ "$DEBUG" == "1" ]; then
|
||||
echo "Command: [mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST -A $DBNAME -s -e 'show tables'| wc -l]"
|
||||
echo "Output: [$r]"
|
||||
fi
|
||||
|
||||
if [ "$r" -ge "$PANDORA_TABLES_MIN" ]; then
|
||||
echo 'OK. Already exists, '$r' tables detected'
|
||||
return 0
|
||||
fi
|
||||
echo 'Empty database detected';
|
||||
|
||||
# Needs to be loaded.
|
||||
echo -n "- Loading database schema: "
|
||||
r=`mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb.sql`
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb.sql"
|
||||
echo "ERROR"
|
||||
echo "$r"
|
||||
return 1;
|
||||
fi
|
||||
echo "OK"
|
||||
|
||||
echo -n "- Loading database data: "
|
||||
r=`mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb_data.sql`
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR"
|
||||
echo $r
|
||||
return 2;
|
||||
fi
|
||||
echo "OK"
|
||||
|
||||
# Loaded.
|
||||
return 0
|
||||
}
|
||||
|
||||
#
|
||||
# Prepare & start Pandora FMS Console
|
||||
#
|
||||
function console_prepare {
|
||||
CONSOLE_PATH=/var/www/html/pandora_console
|
||||
|
||||
echo ">> Preparing console"
|
||||
# Delete install and license files.
|
||||
mv $CONSOLE_PATH/install.php $CONSOLE_PATH/install.done
|
||||
rm -f $CONSOLE_PATH/enterprise/PandoraFMS_Enteprise_Licence.txt
|
||||
|
||||
# Configure console.
|
||||
cat > $CONSOLE_PATH/include/config.php << EO_CONFIG_F
|
||||
<?php
|
||||
\$config["dbtype"] = "mysql";
|
||||
\$config["dbname"]="$DBNAME";
|
||||
\$config["dbuser"]="$DBUSER";
|
||||
\$config["dbpass"]="$DBPASS";
|
||||
\$config["dbhost"]="$DBHOST";
|
||||
\$config["homedir"]="/var/www/html/pandora_console";
|
||||
\$config["homeurl"]="/pandora_console";
|
||||
error_reporting(0);
|
||||
\$ownDir = dirname(__FILE__) . '/';
|
||||
include (\$ownDir . "config_process.php");
|
||||
|
||||
EO_CONFIG_F
|
||||
|
||||
# enable allow override
|
||||
cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F
|
||||
<Directory "/var/www/html">
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
EO_CONFIG_F
|
||||
|
||||
cat > /var/www/html/index.html << EOF_INDEX
|
||||
<meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/">
|
||||
EOF_INDEX
|
||||
|
||||
echo "- Fixing permissions"
|
||||
chmod 600 $CONSOLE_PATH/include/config.php
|
||||
chown -R apache. $CONSOLE_PATH
|
||||
|
||||
# prepare php.ini
|
||||
sed -i -e "s/^max_input_time.*/max_input_time = -1/g" /etc/php.ini
|
||||
sed -i -e "s/^max_execution_time.*/max_execution_time = 0/g" /etc/php.ini
|
||||
sed -i -e "s/^upload_max_filesize.*/upload_max_filesize = 800M/g" /etc/php.ini
|
||||
sed -i -e "s/^memory_limit.*/memory_limit = 500M/g" /etc/php.ini
|
||||
|
||||
echo "- Setting Public URL: $PUBLICURL"
|
||||
q=$(mysql -u$DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "select token from tconfig;" | grep public_url)
|
||||
[[ ! "$q" ]] && mysql -u $DBUSER -p$DBPASS $DBNAME -P$DBPORT -h$DBHOST -sNe "INSERT INTO tconfig (token,value) VALUES ('public_url',\"$PUBLICURL\");"
|
||||
mysql -u$DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "UPDATE tconfig SET value=\"$PUBLICURL\" WHERE token=\"public_url\";"
|
||||
|
||||
#touch $CONSOLE_PATH/pandora_console.log
|
||||
#chown apache. $CONSOLE_PATH/pandora_console.log
|
||||
|
||||
}
|
||||
|
||||
function check_mr {
|
||||
## geting MR + Package
|
||||
CMR=$(mysql -u$DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "select value from tconfig where token = 'MR'")
|
||||
CPK=$(mysql -u$DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "select value from tconfig where token = 'current_package_enterprise'")
|
||||
|
||||
DPK=$(grep pandora_version $PANDORA_CONSOLE/include/config_process.php | awk '{print $3}' | tr -d "'" | tr -d ";" | cut -d . -f 3)
|
||||
DMR=$(ls $PANDORA_CONSOLE/extras/mr/ | sort -n | tail -1 | cut -d . -f 1)
|
||||
|
||||
if [[ $DMR -gt $CMR ]]; then
|
||||
echo ">> Fixing DB: MR: $CMR Current Package: $CPK Desired MR: $DMR"
|
||||
cd $PANDORA_CONSOLE/extras/mr/
|
||||
for i in $(ls | sort -n); do
|
||||
cat $i | mysql -u$DBUSER -p$DBPASS $DBNAME -h$DBHOST
|
||||
done
|
||||
cd -
|
||||
|
||||
echo ">> Updating DB: MR: $CMR Current Package: $CPK Desired MR: $DMR"
|
||||
|
||||
mysql -u $DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "update tconfig set value = $DMR where token = 'MR';"
|
||||
mysql -u $DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "update tconfig set value = $DPK where token = 'current_package_enterprise';"
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
function server_prepare {
|
||||
sed -i -e "s/^dbhost.*/dbhost $DBHOST/g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s/^dbname.*/dbname $DBNAME/g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s/^dbuser.*/dbuser $DBUSER/g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s|^dbpass.*|dbpass $DBPASS|g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s/^dbport.*/dbport $DBPORT/g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s/^#servername.*/servername $INSTANCE_NAME/g" $PANDORA_SERVER_CONF
|
||||
echo "pandora_service_cmd /etc/init.d/pandora_server" >> $PANDORA_SERVER_CONF
|
||||
|
||||
# prepare snmptrapd
|
||||
cat > /etc/snmp/snmptrapd.conf << EOF
|
||||
authCommunity log public
|
||||
disableAuthorization yes
|
||||
EOF
|
||||
|
||||
## Enable WUX
|
||||
if [ "$WUX_SERVER" == "1" ] && [ "$WUX_HOST" ]; then
|
||||
if [ ! $WUX_PORT ]; then
|
||||
WUX_PORT=4444
|
||||
fi
|
||||
echo "Enabling WUX server HOST=$WUX_HOST PORT=$WUX_PORT"
|
||||
sed -i -r "s/#?wuxserver.*/wuxserver 1/g" $PANDORA_SERVER_CONF
|
||||
sed -i -r "s/#?wux_host.*/wux_host $WUX_HOST/g" $PANDORA_SERVER_CONF
|
||||
sed -i -r "s/#?wux_port.*/wux_port $WUX_PORT/g" $PANDORA_SERVER_CONF
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
## MAIN
|
||||
##
|
||||
|
||||
if [ "$DBUSER" == "" ] || [ "$DBPASS" == "" ] || [ "$DBNAME" == "" ] || [ "$DBHOST" == "" ]; then
|
||||
echo "Required environemntal variables DBUSER, DBPASS, DBNAME, DBHOST"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$DBPORT" == "" ]; then
|
||||
DBPORT=3306
|
||||
fi
|
||||
|
||||
echo "" > /opt/pandora/crontasks || touch /opt/pandora/crontasks
|
||||
|
||||
|
||||
#install pandora packages
|
||||
echo "-> Istalling pandorafms"
|
||||
cd /opt/pandora
|
||||
useradd pandora
|
||||
|
||||
if [[ $OPEN != 1 ]]; then
|
||||
# install enterprise
|
||||
dnf install -y /opt/pandora/pandorafms_console*.rpm
|
||||
tar xvfz /opt/pandora/pandorafms_server_*tar* && cd pandora_server && ./pandora_server_installer --install ; rm -rf /opt/pandora/pandora_server
|
||||
[[ -e /var/www/html/pandora_console/include/config.php ]] || yum reinstall -y /opt/pandora/pandorafms*.rpm
|
||||
PANDORA_BIN="pandora_ha"
|
||||
PANDORA_EXEC="/usr/bin/pandora_ha /etc/pandora/pandora_server.conf"
|
||||
else
|
||||
install only open
|
||||
dnf install -y /opt/pandora/pandorafms_console-*.rpm /opt/pandora/pandorafms_server-*.rpm
|
||||
dnf reinstall -y /opt/pandora/pandorafms_server-*.rpm
|
||||
[[ -e /var/www/html/pandora_console/include/config.php ]] || dnf reinstall -y /opt/pandora/pandorafms_console-*.rpm
|
||||
PANDORA_BIN="pandora_server"
|
||||
PANDORA_EXEC="/usr/bin/pandora_server /etc/pandora/pandora_server.conf"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
db_check && db_load
|
||||
|
||||
# Sync to MC.
|
||||
if [ "$META_DBNAME" != "" ] && [ "$META_DBHOST" != "" ]; then
|
||||
if [ "$META_DBPORT" == "" ]; then
|
||||
META_DBPORT=3306
|
||||
fi
|
||||
register_mc
|
||||
fi
|
||||
|
||||
check_mr
|
||||
console_prepare
|
||||
server_prepare
|
||||
|
||||
echo ">> Enable oracle env file cron: "
|
||||
cat > /etc/pandora/pandora_server.env << 'EOF_ENV'
|
||||
#!/bin/bash
|
||||
VERSION=19.8
|
||||
export PATH=$PATH:$HOME/bin:/usr/lib/oracle/$VERSION/client64/bin
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/$VERSION/client64/lib
|
||||
export ORACLE_HOME=/usr/lib/oracle/$VERSION/client64
|
||||
EOF_ENV
|
||||
|
||||
echo ">> Enable discovery cron: "
|
||||
#while true ; do wget -q -O - --no-check-certificate http://localhost/pandora_console/enterprise/cron.php >> /var/www/html/pandora_console/pandora_console.log && sleep 60 ; done &
|
||||
echo "*/5 * * * * wget -q -O - --no-check-certificate http://localhost/pandora_console/enterprise/cron.php >> /var/www/html/pandora_console/log/cron.log" >> /opt/pandora/crontasks
|
||||
|
||||
echo ">> Enable pandora_db cron: "
|
||||
/usr/bin/perl /usr/share/pandora_server/util/pandora_db.pl /etc/pandora/pandora_server.conf
|
||||
#while true ; do sleep 1h && /usr/bin/pandora_db /etc/pandora/pandora_server.conf; done &
|
||||
echo "0 */1 * * * /usr/bin/pandora_db /etc/pandora/pandora_server.conf" >> /opt/pandora/crontasks
|
||||
|
||||
echo ">> Loading crontab tasks"
|
||||
crontab -r
|
||||
crontab /opt/pandora/crontasks && crontab -l
|
||||
|
||||
ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -F '/' '{print "-> Go to http://"$1"/pandora_console to manage this server"}'
|
||||
|
||||
# Check and launch supervisord
|
||||
echo ">> Starting process: Running supervisord"
|
||||
# Create supervisor.conf
|
||||
|
||||
cat > /etc/supervisord.conf << EOF_CON
|
||||
[unix_http_server]
|
||||
file=/tmp/supervisor.sock
|
||||
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
loglevel = debug
|
||||
|
||||
[program:php-fpm]
|
||||
command=/usr/sbin/php-fpm -F
|
||||
riredirect_stderr=true
|
||||
|
||||
[program:httpd]
|
||||
command=/usr/sbin/apachectl -DFOREGROUND
|
||||
riredirect_stderr=true
|
||||
|
||||
[program:tentacle]
|
||||
command=/etc/init.d/tentacle_serverd restart
|
||||
|
||||
[program:$PANDORA_BIN]
|
||||
command=$PANDORA_EXEC
|
||||
riredirect_stderr=true
|
||||
|
||||
[program:cron]
|
||||
command=crond -n
|
||||
|
||||
[group:allservices]
|
||||
programs=httpd,cron,php-fpm,$PANDORA_BIN,tentacle
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///tmp/supervisor.sock
|
||||
|
||||
EOF_CON
|
||||
|
||||
# execute supervisor
|
||||
touch /var/log/pandora/pandora_server.log ; tail -F /var/log/pandora/* &
|
||||
su - -c supervisord
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
#docker build -t pandorafms/pandorafms-percona-base -f $HOME/code/pandorafms/extras/docker/percona/Dockerfile $HOME/code/pandorafms/extras/docker/percona
|
||||
|
||||
FROM percona:5.7
|
||||
|
||||
RUN echo -e '#PandoraFMS configuration \n\
|
||||
[mysqld] \n\
|
||||
max_allowed_packet = 64M \n\
|
||||
innodb_buffer_pool_size = 500M \n\
|
||||
innodb_lock_wait_timeout = 90 \n\
|
||||
innodb_file_per_table \n\
|
||||
innodb_flush_log_at_trx_commit = 0 \n\
|
||||
innodb_flush_method = O_DIRECT \n\
|
||||
innodb_log_file_size = 64M \n\
|
||||
innodb_log_buffer_size = 16M \n\
|
||||
innodb_io_capacity = 100 \n\
|
||||
thread_cache_size = 8 \n\
|
||||
thread_stack = 256K \n\
|
||||
max_connections = 100 \n \n\
|
||||
key_buffer_size=4M \n\
|
||||
read_buffer_size=128K \n\
|
||||
read_rnd_buffer_size=128K \n\
|
||||
sort_buffer_size=128K \n\
|
||||
join_buffer_size=4M \n\n\
|
||||
query_cache_type = 1 \n\
|
||||
query_cache_size = 64M \n\
|
||||
query_cache_min_res_unit = 2k \n\
|
||||
query_cache_limit = 256K \n\n\
|
||||
sql_mode="" ' > /etc/my.cnf.d/pandora.cnf
|
||||
|
||||
EXPOSE 3306
|
|
@ -0,0 +1,50 @@
|
|||

|
||||
|
||||
# Pandora FMS database container
|
||||
|
||||
This container image is designed for optimal performance using Pandora FMS.
|
||||
|
||||
Is based on the official Percona database image turned to get the maximum performance on PandoraFMS
|
||||
|
||||
## Official Gitgub repo
|
||||
|
||||
Dockerfiles and more info in our official repository: https://github.com/pandorafms/pandorafms/tree/develop/extras/docker/percona
|
||||
|
||||
## USAGE
|
||||
|
||||
Similar to the official percona image:
|
||||
Example:
|
||||
```
|
||||
docker run --name Pandora_DB \
|
||||
-p 3306:3306 \
|
||||
-e MYSQL_ROOT_PASSWORD=pandora \
|
||||
-e MYSQL_DATABASE=pandora \
|
||||
-e MYSQL_USER=pandora \
|
||||
-e MYSQL_PASSWORD=pandora \
|
||||
-d pandorafms/pandorafms-percona-base
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
When you start the percona image, you can adjust the configuration of the instance by passing one or more environment variables on the docker run command line. Do note that none of the variables below will have any effect if you start the container with a data directory that already contains a database: any pre-existing database will always be left untouched on container startup.
|
||||
|
||||
__MYSQL_ROOT_PASSWORD__ : This variable is mandatory and specifies the password that will be set for the root superuser account. In the above example, it was set to my-secret-pw.
|
||||
|
||||
__MYSQL_ROOT_HOST__ : By default, root can connect from anywhere. This option restricts root connections to be from the specified host only. Also localhost can be used here for the local-only root access.
|
||||
|
||||
__MYSQL_DATABASE__ :
|
||||
This variable is optional and allows you to specify the name of a database to be created on image startup. If a user/password was supplied (see below) then that user will be granted superuser access (corresponding to GRANT ALL) to this database.
|
||||
|
||||
__MYSQL_USER, MYSQL_PASSWORD__ :These variables are optional, used in conjunction to create a new user and to set that user's password. This user will be granted superuser permissions (see above) for the database specified by the MYSQL_DATABASE variable. Both variables are required for a user to be created.
|
||||
Do note that there is no need to use this mechanism to create the root superuser, that user gets created by default with the password specified by the MYSQL_ROOT_PASSWORD variable.
|
||||
|
||||
__MYSQL_ALLOW_EMPTY_PASSWORD__ : This is an optional variable. Set to yes to allow the container to be started with a blank password for the root user. NOTE: Setting this variable to yes is not recommended unless you really know what you are doing, since this will leave your instance completely unprotected, allowing anyone to gain complete superuser access.
|
||||
|
||||
__MYSQL_RANDOM_ROOT_PASSWORD__ : This is an optional variable. Set to yes to generate a random initial password for the root user (using pwgen). The generated root password will be printed to stdout (GENERATED ROOT PASSWORD: .....).
|
||||
|
||||
__MYSQL_ONETIME_PASSWORD__ : Sets root (not the user specified in MYSQL_USER!) user as expired once init is complete, forcing a password change on first login. NOTE: This feature is supported on MySQL 5.6+ only. Using this option on MySQL 5.5 will throw an appropriate error during initialization.
|
||||
|
||||
__MYSQL_INITDB_SKIP_TZINFO__ : At first run MySQL automatically loads from the local system the timezone information needed for the CONVERT_TZ() function. If it's is not what is intended, this option disables timezone loading.
|
||||
|
||||
__INIT_TOKUDB__ : Tuns on TokuDB Engine. It can be activated only when transparent huge pages (THP) are disabled.
|
||||
|
||||
__INIT_ROCKSDB__ : Tuns on RocksDB Engine.
|
|
@ -1,245 +1,262 @@
|
|||
if ("undefined" == typeof(PandoraChrome)) {
|
||||
var PandoraChrome = {};
|
||||
var prefManager = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("pandora.");
|
||||
/* globals Components, req */
|
||||
if ("undefined" == typeof PandoraChrome) {
|
||||
var PandoraChrome = {};
|
||||
var prefManager = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefService)
|
||||
.getBranch("pandora.");
|
||||
|
||||
var timer = null;
|
||||
var allEvents=new Array();
|
||||
var newEvents=new Array();
|
||||
var oldEvents=new Array();
|
||||
var api_div_numbers=21;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PandoraChrome.fn = function(){
|
||||
return {
|
||||
displaySideBar: function(){
|
||||
PandoraChrome.fn.hideNotification();
|
||||
PandoraChrome.fn.hideBadge();
|
||||
toggleSidebar('viewPandoraSidebar');
|
||||
},
|
||||
displayDialog : function(){
|
||||
window.openDialog("chrome://pandorasidebar/content/options.xul", "","chrome, centerscreen, dialog, modal, resizable=no", null).focus();
|
||||
},
|
||||
handleClick: function(e){
|
||||
if(e.button == 0){
|
||||
toggleSidebar('viewPandoraSidebar');
|
||||
PandoraChrome.fn.setIcon('icon16');
|
||||
}
|
||||
},
|
||||
|
||||
Onloading: function () {
|
||||
if(prefManager.getBoolPref("firstLoad")){
|
||||
prefManager.setIntPref("new_events",prefManager.getIntPref("events"));
|
||||
prefManager.setBoolPref("firstLoad",false);
|
||||
}
|
||||
var timer = null;
|
||||
var allEvents = new Array();
|
||||
var newEvents = new Array();
|
||||
var oldEvents = new Array();
|
||||
var api_div_numbers = 21;
|
||||
}
|
||||
|
||||
if(timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer =setTimeout(PandoraChrome.fn.main , 100 );
|
||||
},
|
||||
PandoraChrome.fn = (function() {
|
||||
return {
|
||||
displaySideBar: function() {
|
||||
PandoraChrome.fn.hideNotification();
|
||||
PandoraChrome.fn.hideBadge();
|
||||
toggleSidebar("viewPandoraSidebar");
|
||||
},
|
||||
displayDialog: function() {
|
||||
window
|
||||
.openDialog(
|
||||
"chrome://pandorasidebar/content/options.xul",
|
||||
"",
|
||||
"chrome, centerscreen, dialog, modal, resizable=no",
|
||||
null
|
||||
)
|
||||
.focus();
|
||||
},
|
||||
handleClick: function(e) {
|
||||
if (e.button == 0) {
|
||||
toggleSidebar("viewPandoraSidebar");
|
||||
PandoraChrome.fn.setIcon("icon16");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Onloading: function() {
|
||||
if (prefManager.getBoolPref("firstLoad")) {
|
||||
prefManager.setIntPref("new_events", prefManager.getIntPref("events"));
|
||||
prefManager.setBoolPref("firstLoad", false);
|
||||
}
|
||||
|
||||
main: function() {
|
||||
// alert('test_main');
|
||||
var url=prefManager.getCharPref("ip_address")+'/include/api.php?op=get&op2=events&return_type=csv&apipass='+prefManager.getCharPref("api_pass")+'&user='+prefManager.getCharPref("user_name")+'&pass='+prefManager.getCharPref("pass");
|
||||
var feedUrl = url;
|
||||
prefManager.setBoolPref("data_check", true);
|
||||
req = new XMLHttpRequest();
|
||||
req.onload = PandoraChrome.fn.handleResponse;
|
||||
req.onerror = PandoraChrome.fn.handleError;
|
||||
req.open("GET", feedUrl, true);
|
||||
req.send(null);
|
||||
},
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer = setTimeout(PandoraChrome.fn.main, 100);
|
||||
},
|
||||
|
||||
handleError: function() {
|
||||
//alert("error");
|
||||
prefManager.setCharPref("data",null);
|
||||
prefManager.setBoolPref("data_check", false);
|
||||
if(timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer =setTimeout(PandoraChrome.fn.main , 1000);
|
||||
},
|
||||
main: function() {
|
||||
// alert('test_main');
|
||||
var url =
|
||||
prefManager.getCharPref("ip_address") +
|
||||
"/include/api.php?op=get&op2=events&return_type=json";
|
||||
var feedUrl = url;
|
||||
var data = new FormData();
|
||||
|
||||
handleResponse: function () {
|
||||
var doc = req.responseText;
|
||||
if (doc=="auth error") {
|
||||
prefManager.setCharPref("data",null);
|
||||
prefManager.setBoolPref("data_check", false);
|
||||
if(timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer =setTimeout(PandoraChrome.fn.main , 1000);
|
||||
data.append("apipass", prefManager.getCharPref("api_pass"));
|
||||
data.append("user", prefManager.getCharPref("user_name"));
|
||||
data.append("pass", prefManager.getCharPref("pass"));
|
||||
|
||||
}
|
||||
else{
|
||||
var n=doc.search("404 Not Found");
|
||||
if(n>0){
|
||||
prefManager.setBoolPref("data_check", true);
|
||||
req = new XMLHttpRequest();
|
||||
req.onload = PandoraChrome.fn.handleResponse;
|
||||
req.onerror = PandoraChrome.fn.handleError;
|
||||
req.open("POST", feedUrl, true);
|
||||
req.send(data);
|
||||
},
|
||||
|
||||
prefManager.setCharPref("data",null);
|
||||
prefManager.setBoolPref("data_check", false);
|
||||
if(timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer =setTimeout(PandoraChrome.fn.main , 1000);
|
||||
}
|
||||
|
||||
else{
|
||||
prefManager.setBoolPref("data_check", true);
|
||||
handleError: function() {
|
||||
//alert("error");
|
||||
prefManager.setCharPref("data", null);
|
||||
prefManager.setBoolPref("data_check", false);
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer = setTimeout(PandoraChrome.fn.main, 1000);
|
||||
},
|
||||
|
||||
prefManager.setCharPref("data",doc);
|
||||
PandoraChrome.fn.getEvents(doc);
|
||||
}
|
||||
}
|
||||
},
|
||||
handleResponse: function() {
|
||||
var doc = req.responseText;
|
||||
if (doc == "auth error") {
|
||||
prefManager.setCharPref("data", null);
|
||||
prefManager.setBoolPref("data_check", false);
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer = setTimeout(PandoraChrome.fn.main, 1000);
|
||||
} else {
|
||||
var n = doc.search("404 Not Found");
|
||||
if (n > 0) {
|
||||
prefManager.setCharPref("data", null);
|
||||
prefManager.setBoolPref("data_check", false);
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer = setTimeout(PandoraChrome.fn.main, 1000);
|
||||
} else {
|
||||
prefManager.setBoolPref("data_check", true);
|
||||
|
||||
getEvents: function (reply){
|
||||
if(reply.length>100){
|
||||
all_event_array=reply.split("\n");
|
||||
allEvents=PandoraChrome.fn.divideArray(all_event_array);
|
||||
if(oldEvents.length==0){
|
||||
oldEvents=allEvents;
|
||||
}
|
||||
prefManager.setCharPref("data", doc);
|
||||
PandoraChrome.fn.getEvents(doc);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
newEvents=PandoraChrome.fn.fetchNewEvents(allEvents,oldEvents);
|
||||
if(newEvents.length!=0){
|
||||
for(var k=0;k<newEvents.length;k++){
|
||||
var temp=prefManager.getIntPref("new_events")+1;
|
||||
prefManager.setIntPref("new_events",temp);
|
||||
PandoraChrome.fn.showNotification(k);
|
||||
PandoraChrome.fn.showBadge(prefManager.getIntPref("new_events"));
|
||||
|
||||
}
|
||||
}
|
||||
oldEvents=allEvents;
|
||||
if(prefManager.getIntPref("new_events")>0){
|
||||
PandoraChrome.fn.showBadge(prefManager.getIntPref("new_events"));
|
||||
}
|
||||
else{
|
||||
PandoraChrome.fn.hideBadge();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer =setTimeout(PandoraChrome.fn.main , prefManager.getIntPref("refresh")*1000 );
|
||||
}
|
||||
},
|
||||
|
||||
showNotification: function(eventId){
|
||||
//alert("notify"+eventId);
|
||||
if(prefManager.getBoolPref("sound_alert")){
|
||||
if(newEvents[eventId][19]=="Critical"){
|
||||
Sounds.playSound(prefManager.getIntPref("critical"));
|
||||
}
|
||||
if(newEvents[eventId][19]=="Informational"){
|
||||
Sounds.playSound(prefManager.getIntPref("informational"));
|
||||
}
|
||||
if(newEvents[eventId][19]=="Maintenance"){
|
||||
Sounds.playSound(prefManager.getIntPref("maintenance"));
|
||||
}
|
||||
if(newEvents[eventId][19]=="Normal"){
|
||||
Sounds.playSound(prefManager.getIntPref("normal"));
|
||||
}
|
||||
if(newEvents[eventId][19]=="Warning"){
|
||||
Sounds.playSound(prefManager.getIntPref("warning"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var newEve = document.getElementById('newEvent');
|
||||
newEve.label="Last Event : "+newEvents[eventId][6];
|
||||
var id;
|
||||
if(newEvents[eventId][9]==0){
|
||||
id=".";
|
||||
}
|
||||
else {
|
||||
id= " in the module with Id "+ newEvents[eventId][9] + ".";
|
||||
}
|
||||
|
||||
var event = newEvents[eventId][14]+" : "+newEvents[eventId][17]+". Event occured at "+ newEvents[eventId][5]+id;
|
||||
newEve.tooltipText=event;
|
||||
$('#newEvent').show();
|
||||
return;
|
||||
},
|
||||
|
||||
|
||||
hideNotification:function(){
|
||||
//alert("Hide Notif");
|
||||
$('#newEvent').hide();
|
||||
},
|
||||
|
||||
|
||||
showBadge: function (txt) {
|
||||
//alert(txt);
|
||||
var updateCount = document.getElementById('temp');
|
||||
updateCount.setAttribute("style","cursor:pointer; font-size:11px; color:#123863; font-weight:bold; display:none;") ;
|
||||
updateCount.label=txt;
|
||||
$('#temp').show();
|
||||
},
|
||||
|
||||
hideBadge: function () {
|
||||
var updateCount = document.getElementById('temp');
|
||||
//alert("hide B");
|
||||
$('#temp').hide();
|
||||
},
|
||||
|
||||
divideArray: function (e_array){
|
||||
var Events=new Array();
|
||||
for(var i=0;i<e_array.length;i++){
|
||||
var event=e_array[i].split(";");
|
||||
Events.push(event);
|
||||
}
|
||||
return Events;
|
||||
},
|
||||
|
||||
|
||||
fetchNewEvents: function (A,B){
|
||||
var arrDiff = new Array();
|
||||
// alert(A.length);
|
||||
//alert(B.length);
|
||||
for(var i = 0; i < A.length; i++) {
|
||||
var id = false;
|
||||
for(var j = 0; j < B.length; j++) {
|
||||
if(A[i][0] == B[j][0]) {
|
||||
id = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!id) {
|
||||
arrDiff.push(A[i]);
|
||||
}
|
||||
}
|
||||
return arrDiff;
|
||||
},
|
||||
|
||||
|
||||
getNotification:function (eventId){
|
||||
var title=newEvents[eventId][6];
|
||||
var id;
|
||||
if(newEvents[eventId][9]==0){
|
||||
id=".";
|
||||
}
|
||||
else {
|
||||
id= " in the module with Id "+ newEvents[eventId][9] + ".";
|
||||
}
|
||||
|
||||
var event = newEvents[eventId][14]+" : "+newEvents[eventId][17]+". Event occured at "+ newEvents[eventId][5]+id;
|
||||
//var event=newEvents[eventId][14]+' '+newEvents[eventId][17]+' Event occured at:'+ newEvents[eventId][5] +'in the module with Id '+ newEvents[eventId][9];
|
||||
return '<a>' + title + '</a> <br/> <span style="font-size:80%">' + event + '</span>';
|
||||
|
||||
getEvents: function(reply) {
|
||||
if (reply.length > 100) {
|
||||
all_event_array = reply.split("\n");
|
||||
allEvents = PandoraChrome.fn.divideArray(all_event_array);
|
||||
if (oldEvents.length == 0) {
|
||||
oldEvents = allEvents;
|
||||
}
|
||||
|
||||
};
|
||||
}();
|
||||
newEvents = PandoraChrome.fn.fetchNewEvents(allEvents, oldEvents);
|
||||
if (newEvents.length != 0) {
|
||||
for (var k = 0; k < newEvents.length; k++) {
|
||||
var temp = prefManager.getIntPref("new_events") + 1;
|
||||
prefManager.setIntPref("new_events", temp);
|
||||
PandoraChrome.fn.showNotification(k);
|
||||
PandoraChrome.fn.showBadge(prefManager.getIntPref("new_events"));
|
||||
}
|
||||
}
|
||||
oldEvents = allEvents;
|
||||
if (prefManager.getIntPref("new_events") > 0) {
|
||||
PandoraChrome.fn.showBadge(prefManager.getIntPref("new_events"));
|
||||
} else {
|
||||
PandoraChrome.fn.hideBadge();
|
||||
}
|
||||
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer = setTimeout(
|
||||
PandoraChrome.fn.main,
|
||||
prefManager.getIntPref("refresh") * 1000
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
showNotification: function(eventId) {
|
||||
//alert("notify"+eventId);
|
||||
if (prefManager.getBoolPref("sound_alert")) {
|
||||
if (newEvents[eventId][19] == "Critical") {
|
||||
Sounds.playSound(prefManager.getIntPref("critical"));
|
||||
}
|
||||
if (newEvents[eventId][19] == "Informational") {
|
||||
Sounds.playSound(prefManager.getIntPref("informational"));
|
||||
}
|
||||
if (newEvents[eventId][19] == "Maintenance") {
|
||||
Sounds.playSound(prefManager.getIntPref("maintenance"));
|
||||
}
|
||||
if (newEvents[eventId][19] == "Normal") {
|
||||
Sounds.playSound(prefManager.getIntPref("normal"));
|
||||
}
|
||||
if (newEvents[eventId][19] == "Warning") {
|
||||
Sounds.playSound(prefManager.getIntPref("warning"));
|
||||
}
|
||||
}
|
||||
|
||||
var newEve = document.getElementById("newEvent");
|
||||
newEve.label = "Last Event : " + newEvents[eventId][6];
|
||||
var id;
|
||||
if (newEvents[eventId][9] == 0) {
|
||||
id = ".";
|
||||
} else {
|
||||
id = " in the module with Id " + newEvents[eventId][9] + ".";
|
||||
}
|
||||
|
||||
var event =
|
||||
newEvents[eventId][14] +
|
||||
" : " +
|
||||
newEvents[eventId][17] +
|
||||
". Event occured at " +
|
||||
newEvents[eventId][5] +
|
||||
id;
|
||||
newEve.tooltipText = event;
|
||||
$("#newEvent").show();
|
||||
return;
|
||||
},
|
||||
|
||||
hideNotification: function() {
|
||||
//alert("Hide Notif");
|
||||
$("#newEvent").hide();
|
||||
},
|
||||
|
||||
showBadge: function(txt) {
|
||||
//alert(txt);
|
||||
var updateCount = document.getElementById("temp");
|
||||
updateCount.setAttribute(
|
||||
"style",
|
||||
"cursor:pointer; font-size:11px; color:#123863; font-weight:bold; display:none;"
|
||||
);
|
||||
updateCount.label = txt;
|
||||
$("#temp").show();
|
||||
},
|
||||
|
||||
hideBadge: function() {
|
||||
var updateCount = document.getElementById("temp");
|
||||
//alert("hide B");
|
||||
$("#temp").hide();
|
||||
},
|
||||
|
||||
divideArray: function(e_array) {
|
||||
var Events = new Array();
|
||||
for (var i = 0; i < e_array.length; i++) {
|
||||
var event = e_array[i].split(";");
|
||||
Events.push(event);
|
||||
}
|
||||
return Events;
|
||||
},
|
||||
|
||||
fetchNewEvents: function(A, B) {
|
||||
var arrDiff = new Array();
|
||||
// alert(A.length);
|
||||
//alert(B.length);
|
||||
for (var i = 0; i < A.length; i++) {
|
||||
var id = false;
|
||||
for (var j = 0; j < B.length; j++) {
|
||||
if (A[i][0] == B[j][0]) {
|
||||
id = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!id) {
|
||||
arrDiff.push(A[i]);
|
||||
}
|
||||
}
|
||||
return arrDiff;
|
||||
},
|
||||
|
||||
getNotification: function(eventId) {
|
||||
var title = newEvents[eventId][6];
|
||||
var id;
|
||||
if (newEvents[eventId][9] == 0) {
|
||||
id = ".";
|
||||
} else {
|
||||
id = " in the module with Id " + newEvents[eventId][9] + ".";
|
||||
}
|
||||
|
||||
var event =
|
||||
newEvents[eventId][14] +
|
||||
" : " +
|
||||
newEvents[eventId][17] +
|
||||
". Event occured at " +
|
||||
newEvents[eventId][5] +
|
||||
id;
|
||||
//var event=newEvents[eventId][14]+' '+newEvents[eventId][17]+' Event occured at:'+ newEvents[eventId][5] +'in the module with Id '+ newEvents[eventId][9];
|
||||
return (
|
||||
"<a>" +
|
||||
title +
|
||||
'</a> <br/> <span style="font-size:80%">' +
|
||||
event +
|
||||
"</span>"
|
||||
);
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
/* Add Event Listener */
|
||||
window.addEventListener("load", PandoraChrome.fn.Onloading(), false);
|
||||
|
|
|
@ -57,6 +57,9 @@ AGENT_UNIX_FILE="$CODEHOME/pandora_agents/unix/pandora_agent"
|
|||
AGENT_WIN_FILE="$CODEHOME/pandora_agents/win32/pandora.cc"
|
||||
AGENT_WIN_MPI_FILE="$CODEHOME/pandora_agents/win32/installer/pandora.mpi"
|
||||
AGENT_WIN_RC_FILE="$CODEHOME/pandora_agents/win32/versioninfo.rc"
|
||||
AGENT_DARWIN_BUILDER="$CODEHOME/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh"
|
||||
AGENT_DARWIN_DISTR="$CODEHOME/pandora_agents/unix/Darwin/dmg/extras/distribution.xml"
|
||||
AGENT_DARWIN_PLIST="$CODEHOME/pandora_agents/unix/Darwin/dmg/files/pandorafms_uninstall/PandoraFMS agent uninstaller.app/Contents/Info.plist"
|
||||
SATELLITE_FILE="$PANDHOME_ENT/satellite_server/satellite_server.pl"
|
||||
PERL_PLUGIN_FILES="$PANDHOME_ENT/pandora_server/util/recon_script/vmware-plugin.pl \
|
||||
$PANDHOME_ENT/pandora_server/util/recon_script/pcm_client.pl \
|
||||
|
@ -138,6 +141,14 @@ for file in $INSTALLER_FILES; do
|
|||
update_installer_version $file
|
||||
done
|
||||
|
||||
# Darwin dmg installer files
|
||||
echo "Updating DARWIN DMG files..."
|
||||
sed -i -e "/VERSION/s/=\"7.0NG.*/=\"$VERSION\"/" "$AGENT_DARWIN_BUILDER"
|
||||
sed -i -r "s/(version=\").*(\"\s+onConclusion=)/\1$VERSION\2/g" "$AGENT_DARWIN_DISTR"
|
||||
sed -i -r "s/(CFBundleVersion<\/key>\s*<string>).*(<\/string>)/\1$VERSION\2/g" "$AGENT_DARWIN_PLIST"
|
||||
sed -i -r "s/(CFBundleShortVersionString<\/key>\s*<string>).*(<\/string>)/\1$VERSION\2/g" "$AGENT_DARWIN_PLIST"
|
||||
sed -i -r "s/(CFBundleGetInfoString<\/key>\s*<string>).*( Pandora FMS)/\1$VERSION\2/g" "$AGENT_DARWIN_PLIST"
|
||||
|
||||
# Perl plugins files
|
||||
for file in $PERL_PLUGIN_FILES; do
|
||||
echo "Updating plugin file $file..."
|
||||
|
@ -155,7 +166,7 @@ sed -i -e "s/my\s\s*\$version\s*=.*/my \$version = \"$VERSION PS$BUILD\";/" "$SE
|
|||
sed -i -e "s/\s*\#\s*\Version.*/\# Version $VERSION/" "$SERVER_CONF_FILE"
|
||||
sed -i -e "s/\s*\!define PRODUCT_VERSION.*/\!define PRODUCT_VERSION \"$VERSION\"/" "$SERVER_WIN_MPI_OPEN_FILE"
|
||||
sed -i -e "s/\s*\!define PRODUCT_VERSION.*/\!define PRODUCT_VERSION \"$VERSION\"/" "$SERVER_WIN_MPI_ENT_FILE"
|
||||
echo "Updateing Pandora PluginTools version..."
|
||||
echo "Updating Pandora PluginTools version..."
|
||||
sed -i -e "s/my\s\s*\$pandora_version\s*=.*/my \$pandora_version = \"$VERSION\";/" "$PLUGIN_LIB_FILE"
|
||||
sed -i -e "s/my\s\s*\$pandora_build\s*=.*/my \$pandora_build = \"$BUILD\";/" "$PLUGIN_LIB_FILE"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Pandora FMS Mail Transfer
|
||||
# This is a tool for transfering Pandora FMS data files by mail (SMTP/POP)
|
||||
##########################################################################
|
||||
# Copyright (c) 2011 Artica Soluciones Tecnologicas S.L
|
||||
# Copyright (c) 2011-2021 Artica Soluciones Tecnologicas S.L
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
FROM centos:centos7
|
||||
MAINTAINER Pandora FMS Team <info@pandorafms.com>
|
||||
FROM centos:7
|
||||
LABEL maintainer="Pandora FMS Team <info@pandorafms.com>"
|
||||
|
||||
# Add Pandora FMS agent installer
|
||||
ADD unix /tmp/pandora_agent/unix
|
||||
ADD unix /opt/pandora/pandora_agent/unix
|
||||
|
||||
RUN export LC_ALL=C
|
||||
|
||||
RUN yum -y update
|
||||
|
||||
# Install dependencies
|
||||
RUN yum -y install \
|
||||
|
@ -11,10 +15,13 @@ RUN yum -y install \
|
|||
perl \
|
||||
python3 \
|
||||
sed \
|
||||
"perl(Sys::Syslog)"
|
||||
perl-YAML-Tiny \
|
||||
"perl(Sys::Syslog)" \
|
||||
&& yum clean all
|
||||
|
||||
|
||||
# Install Pandora FMS agent
|
||||
RUN cd /tmp/pandora_agent/unix \
|
||||
RUN cd /opt/pandora/pandora_agent/unix \
|
||||
&& chmod +x pandora_agent_installer \
|
||||
&& ./pandora_agent_installer --install
|
||||
|
||||
|
@ -41,8 +48,7 @@ if [ $TIMEZONE != "" ]; then\n \
|
|||
\tln -sfn /usr/share/zoneinfo/$TIMEZONE /etc/localtime\n \
|
||||
fi\n \
|
||||
/etc/init.d/pandora_agent_daemon start\n \
|
||||
rm -f $0\n \
|
||||
tail -f /var/log/pandora/pandora_agent.log' \
|
||||
tail -F /var/log/pandora/pandora_agent.log' \
|
||||
>> /entrypoint.sh && \
|
||||
chmod +x /entrypoint.sh
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ respective locations:
|
|||
root@blackbox01:/tmp/pandora/pandora_agents/linux# ./pandora_agent_installer
|
||||
--install
|
||||
|
||||
Pandora FMS Agent Installer 1.0 (c) 2007 Sancho Lerena
|
||||
Pandora FMS Agent Installer 1.0 (c) 2021 Sancho Lerena
|
||||
This program is licensed under GPL2 Terms. http://pandora.sourceforge.net
|
||||
|
||||
Checking default dir /usr/share/pandora_agent...
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.746, AIX version
|
||||
# Version 7.0NG.752, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#Pandora FMS- http:#pandorafms.com
|
||||
# ==================================================
|
||||
# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
||||
# 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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.746, FreeBSD Version
|
||||
# Version 7.0NG.752, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.746, HP-UX Version
|
||||
# Version 7.0NG.752, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.746, GNU/Linux
|
||||
# Version 7.0NG.752, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
' df_all.vbs
|
||||
' Returns free space (%) for all drives
|
||||
' Pandora FMS Plugin, (c) 2010 Sancho Lerena
|
||||
' Pandora FMS Plugin, (c) 2021 Sancho Lerena
|
||||
' ------------------------------------------
|
||||
|
||||
Option Explicit
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.746, GNU/Linux
|
||||
# Version 7.0NG.752, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.746, Solaris Version
|
||||
# Version 7.0NG.752, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -1,53 +1,59 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Fandora FMS - Generate SSH keys step-by-step</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="author" content="Sancho Lerena, Raul Mateos and others">
|
||||
<meta name="copyright" content="This is GPL software. Created by Sancho Lerena and others">
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<img src="images/logo.png" alt="">
|
||||
</center>
|
||||
<head>
|
||||
<title>Fandora FMS - Generate SSH keys step-by-step</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="resource-type" content="document" />
|
||||
<meta name="distribution" content="global" />
|
||||
<meta name="author" content="Sancho Lerena, Raul Mateos and others" />
|
||||
<meta
|
||||
name="copyright"
|
||||
content="This is GPL software. Created by Sancho Lerena and others"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<img src="images/logo.png" alt="" />
|
||||
</center>
|
||||
|
||||
<h2>Step-by-step generating SSH keys</h2>
|
||||
<h2>Step-by-step generating SSH keys</h2>
|
||||
|
||||
From
|
||||
<a href="http://www.openideas.info/wiki/index.php?title=Pandora:FAQ#How_to_generate_a_pair_of_SSH_keys_for_Pandora_Windows_agent_1.2_.3F">Pandora FMS FAQ</a>.
|
||||
From
|
||||
<a
|
||||
href="https://pandorafms.com/docs/index.php?title=Pandora:FAQ#How_to_generate_a_pair_of_SSH_keys_for_Pandora_Windows_agent.3F_.28SSH_Transfer_only.29"
|
||||
>Pandora FMS FAQ</a
|
||||
>.
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
Go to <code>.\util</code> of your Pandora FMS agent for Windows
|
||||
and run <code>puttygen.exe</code>.<br>
|
||||
Generate keys, SSH-2_DSA, 1024:<br><br>
|
||||
<img src="images/1.jpg"><br><br>
|
||||
</li>
|
||||
<li>
|
||||
Press Generate<br>
|
||||
Export key to OpenSSH key (Cygwin uses a port of OpenSSH)<br><br>
|
||||
<img src="images/2.jpg"><br><br>
|
||||
</li>
|
||||
<li>
|
||||
We have no chosen password, so press YES:<br><br>
|
||||
<img src="images/3.jpg"><br><br>
|
||||
</li>
|
||||
<li>
|
||||
Save it as <code>c:\pandora\keys\id_dsa:</code><br><br>
|
||||
<img src="images/4.jpg"><br><br>
|
||||
</li>
|
||||
<li>
|
||||
Now let's copy the public key to clipboard:<br><br>
|
||||
<img src="images/5.jpg"><br><br>
|
||||
</li>
|
||||
<li>
|
||||
and paste it as <code>c:\pandora_agent\keys\id_dsa.pub</code>,
|
||||
and also to the <code>/home/pandora/.ssh/authorized_keys</code> file.
|
||||
<br><br>
|
||||
<img src="images/6.jpg"><br><br>
|
||||
</li>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
||||
<ol>
|
||||
<li>
|
||||
Go to <code>.\util</code> of your Pandora FMS agent for Windows and run
|
||||
<code>puttygen.exe</code>.<br />
|
||||
Generate keys, SSH-2_DSA, 1024:<br /><br />
|
||||
<img src="images/1.jpg" /><br /><br />
|
||||
</li>
|
||||
<li>
|
||||
Press Generate<br />
|
||||
Export key to OpenSSH key (Cygwin uses a port of OpenSSH)<br /><br />
|
||||
<img src="images/2.jpg" /><br /><br />
|
||||
</li>
|
||||
<li>
|
||||
We have no chosen password, so press YES:<br /><br />
|
||||
<img src="images/3.jpg" /><br /><br />
|
||||
</li>
|
||||
<li>
|
||||
Save it as <code>c:\pandora\keys\id_dsa:</code><br /><br />
|
||||
<img src="images/4.jpg" /><br /><br />
|
||||
</li>
|
||||
<li>
|
||||
Now let's copy the public key to clipboard:<br /><br />
|
||||
<img src="images/5.jpg" /><br /><br />
|
||||
</li>
|
||||
<li>
|
||||
and paste it as <code>c:\pandora_agent\keys\id_dsa.pub</code>, and also
|
||||
to the <code>/home/pandora/.ssh/authorized_keys</code> file.
|
||||
<br /><br />
|
||||
<img src="images/6.jpg" /><br /><br />
|
||||
</li>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,53 +1,62 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Pandora FMS - Generación de claves SSH en Windows paso por paso</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="author" content="Sancho Lerena, Raul Mateos y otros">
|
||||
<meta name="copyright" content="This is GPL software. Created by Sancho Lerena and others">
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<img src="images/logo.png" alt="">
|
||||
</center>
|
||||
<h2 class="print">Generación de claves SSH en Windows paso por paso</h2>
|
||||
<head>
|
||||
<title>
|
||||
Pandora FMS - Generación de claves SSH en Windows paso por paso
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="resource-type" content="document" />
|
||||
<meta name="distribution" content="global" />
|
||||
<meta name="author" content="Sancho Lerena, Raul Mateos y otros" />
|
||||
<meta
|
||||
name="copyright"
|
||||
content="This is GPL software. Created by Sancho Lerena and others"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<img src="images/logo.png" alt="" />
|
||||
</center>
|
||||
<h2 class="print">Generación de claves SSH en Windows paso por paso</h2>
|
||||
|
||||
Extraído de las
|
||||
<a href="http://www.openideas.info/wiki/index.php?title=Pandora:FAQ_ES#.C2.BF_C.C3.B3mo_puedo_generar_un_par_de_claves_SHH_para_el_agente_para_Windows_1.2_.3F">
|
||||
FAQ</a>.
|
||||
Extraído de las
|
||||
<a
|
||||
href="https://pandorafms.com/docs/index.php?title=Pandora:FAQ_ES#.C2.BFC.C3.B3mo_puedo_generar_un_par_de_claves_SHH_para_el_agente_para_Windows_.28SSH_Transfer.29_.3F"
|
||||
>
|
||||
FAQ</a
|
||||
>.
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
Desde el directorio <code>.\util</code> del agente Pandora FMS para
|
||||
windows ejecutamos <code>puttygen.exe</code>.<br>
|
||||
Generamos claves SSH-2_DSA, 1024:<br><br>
|
||||
<img src="images/1.jpg"><br><br>
|
||||
</li>
|
||||
<li>
|
||||
Pulsamos «Generate»
|
||||
para generar la clave.<br>
|
||||
Exportamos la clave a formato OpenSSH<br><br>
|
||||
<img src="images/2.jpg"><br><br>
|
||||
</li>
|
||||
<li>
|
||||
No elegimos contraseña, con lo cual pulsamos «Sí»:<br><br>
|
||||
<img src="images/3.jpg"><br><br>
|
||||
</li>
|
||||
<li>
|
||||
Guardamos la clave como <code>C:\pandora\keys\id_dsa:</code><br><br>
|
||||
<img src="images/4.jpg"><br><br>
|
||||
</li>
|
||||
<li>
|
||||
Ahora copiamos la clave pública al portapapeles:<br><br>
|
||||
<img src="images/5.jpg"><br><br>
|
||||
</li>
|
||||
<li>
|
||||
Pegamos la clave en un nuevo fichero <code>C:\pandora_agent\keys\id_dsa.pub</code>,
|
||||
y debemos también añadirla al fichero <code>/home/pandora/.ssh/authorized_keys</code>.
|
||||
<br><br>
|
||||
<img src="images/6.jpg"><br><br>
|
||||
</li>
|
||||
</ol>
|
||||
</body></html>
|
||||
<ol>
|
||||
<li>
|
||||
Desde el directorio <code>.\util</code> del agente Pandora FMS para
|
||||
windows ejecutamos <code>puttygen.exe</code>.<br />
|
||||
Generamos claves SSH-2_DSA, 1024:<br /><br />
|
||||
<img src="images/1.jpg" /><br /><br />
|
||||
</li>
|
||||
<li>
|
||||
Pulsamos «Generate» para generar la clave.<br />
|
||||
Exportamos la clave a formato OpenSSH<br /><br />
|
||||
<img src="images/2.jpg" /><br /><br />
|
||||
</li>
|
||||
<li>
|
||||
No elegimos contraseña, con lo cual pulsamos «Sí»:<br /><br />
|
||||
<img src="images/3.jpg" /><br /><br />
|
||||
</li>
|
||||
<li>
|
||||
Guardamos la clave como <code>C:\pandora\keys\id_dsa:</code><br /><br />
|
||||
<img src="images/4.jpg" /><br /><br />
|
||||
</li>
|
||||
<li>
|
||||
Ahora copiamos la clave pública al portapapeles:<br /><br />
|
||||
<img src="images/5.jpg" /><br /><br />
|
||||
</li>
|
||||
<li>
|
||||
Pegamos la clave en un nuevo fichero
|
||||
<code>C:\pandora_agent\keys\id_dsa.pub</code>, y debemos también
|
||||
añadirla al fichero <code>/home/pandora/.ssh/authorized_keys</code>.
|
||||
<br /><br />
|
||||
<img src="images/6.jpg" /><br /><br />
|
||||
</li>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2010 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.746
|
||||
|
||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.752
|
||||
# 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
|
||||
# Foundation; either version 2 of the Licence or any later version
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
' df_all.vbs
|
||||
' Returns free space (%) for all drives
|
||||
' Pandora FMS Plugin, (c) 2010 Sancho Lerena
|
||||
' Pandora FMS Plugin, (c) 2021 Sancho Lerena
|
||||
' ------------------------------------------
|
||||
|
||||
Option Explicit
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Copyright (c) 2007-2008 Ramon Novoa <rnovoa@artica.es>
|
||||
# Copyright (c) 2007-2008 Artica Soluciones Tecnologicas S.L.
|
||||
#
|
||||
# tentacle_client.pl Tentacle Client. See http://www.openideas.info/wiki for
|
||||
# tentacle_client.pl Tentacle Client. See https://pandorafms.com/docs/ for
|
||||
# protocol description.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -155,7 +155,7 @@ my $t_zip = 0;
|
|||
sub print_help {
|
||||
|
||||
print ("Usage: $0 [options] [file] [file] ...\n\n");
|
||||
print ("Tentacle client v$VERSION. See http://www.openideas.info/wiki for protocol description.\n\n");
|
||||
print ("Tentacle client v$VERSION. See https://pandorafms.com/docs/ for protocol description.\n\n");
|
||||
print ("Options:\n");
|
||||
print ("\t-a address\tServer address (default $t_address).\n");
|
||||
print ("\t-b localaddress\tLocal address to bind.\n");
|
||||
|
@ -1091,7 +1091,7 @@ This is released under the GNU Lesser General Public License.
|
|||
|
||||
L<Getopt::Std>, L<IO::Select>, L<IO::Socket::INET>, L<File::Basename>
|
||||
|
||||
Protocol description and more info at: L<< http://openideas.info/wiki/index.php?title=Tentacle >>
|
||||
Protocol description and more info at: L<< https://pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Tentacle >>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/perl
|
||||
##########################################################################
|
||||
# Tentacle Server
|
||||
# See http://www.openideas.info/wiki for protocol description.
|
||||
# See https://pandorafms.com/docs/ for protocol description.
|
||||
# Tentacle have IANA assigned port tpc/41121 as official port.
|
||||
##########################################################################
|
||||
# Copyright (c) 2007-2008 Ramon Novoa <rnovoa@artica.es>
|
||||
# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L
|
||||
#
|
||||
# tentacle_server.pl Tentacle Server. See http://www.openideas.info/wiki for
|
||||
# tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for
|
||||
# protocol description.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -211,7 +211,7 @@ sub print_help {
|
|||
$" = ',';
|
||||
|
||||
print ("Usage: $0 -s <storage directory> [options]\n\n");
|
||||
print ("Tentacle server v$VERSION. See http://www.openideas.info/wiki for protocol description.\n\n");
|
||||
print ("Tentacle server v$VERSION. See https://pandorafms.com/docs/ for protocol description.\n\n");
|
||||
print ("Options:\n");
|
||||
print ("\t-a ip_addresses\tIP addresses to listen on (default @t_addresses).\n");
|
||||
print ("\t \t(Multiple addresses separated by comma can be defined.)\n");
|
||||
|
@ -1859,7 +1859,7 @@ This is released under the GNU Lesser General Public License.
|
|||
|
||||
L<Getopt::Std>, L<IO::Select>, L<IO::Socket::INET>, L<Thread::Semaphore>, L<POSIX>
|
||||
|
||||
Protocol description and more info at: L<< http://openideas.info/wiki/index.php?title=Tentacle >>
|
||||
Protocol description and more info at: L<< https://pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Tentacle >>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.746, AIX version
|
||||
# Version 7.0NG.752, AIX version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.746
|
||||
# Version 7.0NG.752
|
||||
# FreeBSD/IPSO version
|
||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# **********************************************************************
|
||||
# Pandora FMS Generic IPSO/HPUX
|
||||
# (c) 2009 Artica Soluciones Tecnológicas SL
|
||||
# (c) 2009-2021 Artica Soluciones Tecnológicas SL
|
||||
# with the help of many people. Please see http://pandorafms.org
|
||||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.746, HPUX Version
|
||||
# Version 7.0NG.752, HPUX Version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#Pandora FMS- http:#pandorafms.com
|
||||
# ==================================================
|
||||
# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
||||
# 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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.746
|
||||
# Version 7.0NG.752
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Copyright (c) 2007-2008 Ramon Novoa <rnovoa@artica.es>
|
||||
# Copyright (c) 2007-2008 Artica Soluciones Tecnologicas S.L.
|
||||
#
|
||||
# tentacle_client.pl Tentacle Client. See http://www.openideas.info/wiki for
|
||||
# tentacle_client.pl Tentacle Client. See https://pandorafms.com/docs/ for
|
||||
# protocol description.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -155,7 +155,7 @@ my $t_zip = 0;
|
|||
sub print_help {
|
||||
|
||||
print ("Usage: $0 [options] [file] [file] ...\n\n");
|
||||
print ("Tentacle client v$VERSION. See http://www.openideas.info/wiki for protocol description.\n\n");
|
||||
print ("Tentacle client v$VERSION. See https://pandorafms.com/docs/ for protocol description.\n\n");
|
||||
print ("Options:\n");
|
||||
print ("\t-a address\tServer address (default $t_address).\n");
|
||||
print ("\t-b localaddress\tLocal address to bind.\n");
|
||||
|
@ -1091,7 +1091,7 @@ This is released under the GNU Lesser General Public License.
|
|||
|
||||
L<Getopt::Std>, L<IO::Select>, L<IO::Socket::INET>, L<File::Basename>
|
||||
|
||||
Protocol description and more info at: L<< http://openideas.info/wiki/index.php?title=Tentacle >>
|
||||
Protocol description and more info at: L<< https://pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Tentacle >>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.746
|
||||
# Version 7.0NG.752
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
||||
# General Parameters
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Copyright (c) 2007-2008 Ramon Novoa <rnovoa@artica.es>
|
||||
# Copyright (c) 2007-2008 Artica Soluciones Tecnologicas S.L.
|
||||
#
|
||||
# tentacle_client.pl Tentacle Client. See http://www.openideas.info/wiki for
|
||||
# tentacle_client.pl Tentacle Client. See https://pandorafms.com/docs/ for
|
||||
# protocol description.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -155,7 +155,7 @@ my $t_zip = 0;
|
|||
sub print_help {
|
||||
|
||||
print ("Usage: $0 [options] [file] [file] ...\n\n");
|
||||
print ("Tentacle client v$VERSION. See http://www.openideas.info/wiki for protocol description.\n\n");
|
||||
print ("Tentacle client v$VERSION. See https://pandorafms.com/docs/ for protocol description.\n\n");
|
||||
print ("Options:\n");
|
||||
print ("\t-a address\tServer address (default $t_address).\n");
|
||||
print ("\t-b localaddress\tLocal address to bind.\n");
|
||||
|
@ -1091,7 +1091,7 @@ This is released under the GNU Lesser General Public License.
|
|||
|
||||
L<Getopt::Std>, L<IO::Select>, L<IO::Socket::INET>, L<File::Basename>
|
||||
|
||||
Protocol description and more info at: L<< http://openideas.info/wiki/index.php?title=Tentacle >>
|
||||
Protocol description and more info at: L<< https://pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Tentacle >>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# **********************************************************************
|
||||
# Pandora FMS Agent Simulator (MetaAgent)
|
||||
# (c) 2009 Artica Soluciones Tecnológicas SL
|
||||
# (c) 2009-2021 Artica Soluciones Tecnológicas SL
|
||||
# with the help of many people. Please see http://pandorafms.org
|
||||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.746
|
||||
# Version 7.0NG.752
|
||||
# Licensed under GPL license v2,
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.746, Solaris version
|
||||
# Version 7.0NG.752, Solaris version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.746, AIX version
|
||||
# Version 7.0NG.752, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
||||
# General Parameters
|
||||
|
@ -99,6 +99,12 @@ transfer_mode tentacle
|
|||
# Proxy timeout (by default 1s)
|
||||
# proxy_timeout 1
|
||||
|
||||
# Address the proxy will listen on.
|
||||
#proxy_address 0.0.0.0
|
||||
|
||||
# Port the proxy will listen on.
|
||||
#proxy_port 41121
|
||||
|
||||
# User the agent will run as
|
||||
#pandora_user root
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.746-200617
|
||||
Version: 7.0NG.752-210317
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#Pandora FMS- http:#pandorafms.com
|
||||
# ==================================================
|
||||
# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
||||
# 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
|
||||
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.746-200617"
|
||||
pandora_version="7.0NG.752-210317"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
@ -81,6 +81,9 @@ cp -aRf man/man1/* temp_package/usr/share/man/man1/
|
|||
# Relocate plugins to the final dir and delete
|
||||
cp temp_package/usr/share/pandora_agent/plugins/* temp_package/etc/pandora/plugins
|
||||
|
||||
# Make sure the plugins have execution privileges
|
||||
chmod 755 temp_package/etc/pandora/plugins/*
|
||||
|
||||
echo "Official plugins are placed on /etc/pandora/plugins" > temp_package/usr/share/pandora_agent/plugins/README
|
||||
|
||||
#Disabled, now the package overwrite the previous files.
|
||||
|
|
|
@ -6,13 +6,16 @@
|
|||
<string>com.pandorafms.pandorafms</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/bin/pandora_agent</string>
|
||||
<string>/usr/local/bin/pandora_agent</string>
|
||||
<string>/etc/pandora</string>
|
||||
</array>
|
||||
<key>EnvironmentVariables</key>
|
||||
<dict>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Apple/bin</string>
|
||||
</dict>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>ServiceDescription</key>
|
||||
<string>PandoraFMS agent</string>
|
||||
<key>UserName</key>
|
||||
<string>root</string>
|
||||
</dict>
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
### DMG Agent compilation for MacOS
|
||||
|
||||
1. Move to the dmg directory, where build_darwin_dmg.sh is located
|
||||
# cd /<code-path>/pandorafms/pandora_agents/unix/Darwin/dmg/HOWTO.txt
|
||||
|
||||
2. Run the script. It has three optional arguments. In this order:
|
||||
- DMG package name.
|
||||
By default is "Pandora FMS MacOS agent"
|
||||
- DMG package version.
|
||||
It uses the current version by default (e.g. "7.NG.748")
|
||||
- Build path, where temporary files and final .dmg will be created.
|
||||
By default /root/code/pandorafms/pandora_agents/unix/Darwin/dmg (it creates "build" and "buildtmp" folders, deletes buildtmp when finished)
|
||||
|
||||
3. The script should return "SUCCESS: DMG file created at XXXX" when finished.
|
|
@ -0,0 +1,105 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Restore the original working directory and exit.
|
||||
function error {
|
||||
popd >/dev/null 2>&1
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Keeping this for future CICD integration
|
||||
if [ "$CI_PROJECT_DIR" != "" ]; then
|
||||
LOCALINST="$CODEHOME/pandora_agents/unix/Darwin/dmg"
|
||||
else
|
||||
LOCALINST="/root/code/pandorafms/pandora_agents/unix/Darwin/dmg"
|
||||
fi
|
||||
|
||||
# DMG package name
|
||||
if [ "$#" -ge 1 ]; then
|
||||
DMGNAME="$1"
|
||||
else
|
||||
DMGNAME="Pandora FMS MacOS agent"
|
||||
fi
|
||||
|
||||
# DMG package version
|
||||
if [ "$#" -ge 2 ]; then
|
||||
VERSION="$2"
|
||||
else
|
||||
VERSION="7.0NG.752"
|
||||
fi
|
||||
|
||||
# Path for the generated DMG file
|
||||
if [ "$#" -ge 3 ]; then
|
||||
BUILD_PATH="$3"
|
||||
else
|
||||
BUILD_PATH="/root/code/pandorafms/pandora_agents/unix/Darwin/dmg"
|
||||
fi
|
||||
|
||||
BUILD_DMG="$BUILD_PATH/build"
|
||||
BUILD_TMP="$BUILD_PATH/buildtmp"
|
||||
|
||||
FULLNAME="$DMGNAME-$VERSION.dmg"
|
||||
echo "VERSION-"$VERSION" NAME-"$DMGNAME
|
||||
pushd .
|
||||
cd $LOCALINST
|
||||
|
||||
# Copy necessary files to installer
|
||||
cp ../com.pandorafms.pandorafms.plist files/pandorafms/
|
||||
cp ../../../../pandora_agents/unix/pandora* files/pandorafms/
|
||||
cp ../../../../pandora_agents/unix/tentacle* files/pandorafms/
|
||||
cp -R ../../../../pandora_agents/unix/plugins files/pandorafms/
|
||||
cp -R ../../../../pandora_agents/unix/man files/pandorafms/
|
||||
cp -R ../../../../pandora_agents/unix/Darwin/pandora_agent.conf files/pandorafms/
|
||||
mkdir $BUILD_DMG
|
||||
mkdir $BUILD_TMP
|
||||
|
||||
# Build pandorafms agent component
|
||||
pkgbuild --root files/pandorafms/ \
|
||||
--identifier com.pandorafms.pandorafms_src \
|
||||
--version $VERSION \
|
||||
--scripts scripts \
|
||||
--install-location /usr/local/share/pandora_agent/ \
|
||||
$BUILD_TMP/pandorafms_src.pdk || error
|
||||
|
||||
# Build pandorafms uninstaller app
|
||||
pkgbuild --root files/pandorafms_uninstall/ \
|
||||
--component-plist extras/pandorafms_uninstall.plist \
|
||||
--install-location /Applications \
|
||||
$BUILD_TMP/pandorafms_uninstall.pdk || error
|
||||
|
||||
# Put it together into a single pkg
|
||||
productbuild --distribution extras/distribution.xml \
|
||||
--package-path $BUILD_TMP \
|
||||
--resources resources \
|
||||
--scripts scripts \
|
||||
--version "$VERSION" \
|
||||
$BUILD_TMP/pandorafms_agent.pkg || error
|
||||
|
||||
# Clean and prepare dmg creation
|
||||
rm $BUILD_TMP/pandorafms_src.pdk
|
||||
rm $BUILD_TMP/pandorafms_uninstall.pdk
|
||||
|
||||
#Create dmg file
|
||||
hdiutil create -volname "Pandora FMS agent installer" \
|
||||
-srcfolder "$BUILD_TMP" \
|
||||
-ov -format UDZO \
|
||||
"$BUILD_DMG/$FULLNAME" || error
|
||||
|
||||
#Change the icon to dmg
|
||||
sips -i extras/pandora_installer.png || error
|
||||
DeRez -only icns extras/pandora_installer.png > tmpicns.rsrc || error
|
||||
Rez -append tmpicns.rsrc -o "$BUILD_DMG/$FULLNAME" || error
|
||||
SetFile -a C "$BUILD_DMG/$FULLNAME" || error
|
||||
|
||||
|
||||
# Copy and clean folder
|
||||
rm -Rf $BUILD_TMP
|
||||
rm -Rf files/pandorafms/*pandora*
|
||||
rm -Rf files/pandorafms/*tentacle*
|
||||
rm -Rf files/pandorafms/plugins
|
||||
rm -Rf files/pandorafms/man
|
||||
rm -f files/pandorafms/README
|
||||
rm -f tmpicns.rsrc
|
||||
|
||||
popd
|
||||
|
||||
printf "\nSUCCESS: DMG file created at \"$BUILD_DMG/$FULLNAME\"\n"
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<installer-gui-script minSpecVersion="1">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
||||
<title>Pandora FMS Agent installer for MacOS</title>
|
||||
<welcome file="text/welcome.html" />
|
||||
<!-- <readme file="text/readme.html" /> -->
|
||||
<license file="text/license.html" />
|
||||
<conclusion file="text/conclusion.html" />
|
||||
<background file="images/pfms_background_darwin.png" alignment="bottomleft" scaling="none" mime-type="image/png" uti="public.png" />
|
||||
<options customize="never" allow-external-scripts="true" rootVolumeOnly="true"/>
|
||||
<!-- <options customize="never" allow-external-scripts="true"/> -->
|
||||
<choices-outline>
|
||||
<line choice="default">
|
||||
<line choice="com.pandorafms.pandorafms_src"/>
|
||||
<line choice="com.pandorafms.pandorafms_uninstall"/>
|
||||
</line>
|
||||
</choices-outline>
|
||||
<choice id="default"/>
|
||||
<choice id="com.pandorafms.pandorafms_src" visible="false">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.752" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.752" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<!-- <installation-check script="check()" />
|
||||
<script>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</script>
|
||||
-->
|
||||
</installer-gui-script>
|
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<array>
|
||||
<dict>
|
||||
<key>BundleHasStrictIdentifier</key>
|
||||
<true/>
|
||||
<key>BundleIsRelocatable</key>
|
||||
<false/>
|
||||
<key>BundleIsVersionChecked</key>
|
||||
<true/>
|
||||
<key>BundleOverwriteAction</key>
|
||||
<string>upgrade</string>
|
||||
<key>RootRelativeBundlePath</key>
|
||||
<string>PandoraFMS agent uninstaller.app</string>
|
||||
</dict>
|
||||
</array>
|
||||
</plist>
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/osascript
|
||||
|
||||
set first_time to 1
|
||||
set text_display to "Please set your Pandora FMS IP address:"
|
||||
|
||||
repeat
|
||||
if (first_time = 1) then
|
||||
set text_display to "You can set a specific group for this agent (must exist in Pandora):"
|
||||
end if
|
||||
set my_group to display dialog ¬
|
||||
text_display with title ¬
|
||||
"Target group" default answer "Servers" ¬
|
||||
buttons {"Continue"} ¬
|
||||
default button "Continue"
|
||||
if ((text returned of my_group) = "") then
|
||||
set first_time to 0
|
||||
else
|
||||
exit repeat
|
||||
end if
|
||||
end repeat
|
||||
|
||||
return (text returned of my_group)
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/osascript
|
||||
|
||||
set first_time to 1
|
||||
set text_display to "Enable remote config for this agent?"
|
||||
|
||||
repeat
|
||||
if (first_time = 1) then
|
||||
set text_display to "Enable remote config for this agent? (Enterprise only)"
|
||||
end if
|
||||
set my_remotecfg to display dialog ¬
|
||||
text_display with title ¬
|
||||
"Remote config" ¬
|
||||
buttons {"No", "Yes"} ¬
|
||||
default button "Yes"
|
||||
if (button returned of my_remotecfg) is "Yes" then
|
||||
set remote_config to "1"
|
||||
else
|
||||
set remote_config to "0"
|
||||
end if
|
||||
exit repeat
|
||||
end repeat
|
||||
|
||||
return (remote_config)
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/osascript
|
||||
|
||||
set first_time to 1
|
||||
set text_display to "Please set your Pandora FMS IP address:"
|
||||
|
||||
repeat
|
||||
if (first_time = 1) then
|
||||
set text_display to "Please set your Pandora FMS IP address:"
|
||||
end if
|
||||
set my_serverip to display dialog ¬
|
||||
text_display with title ¬
|
||||
"Pandora FMS Server address" default answer "localhost" ¬
|
||||
buttons {"Continue"} ¬
|
||||
default button "Continue"
|
||||
if ((text returned of my_serverip) = "") then
|
||||
set first_time to 0
|
||||
else
|
||||
exit repeat
|
||||
end if
|
||||
end repeat
|
||||
|
||||
return (text returned of my_serverip)
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
|
||||
my ($CONF_FILE, $token, $value) = @ARGV;
|
||||
exit unless defined ($value);
|
||||
exit unless -e $CONF_FILE;
|
||||
|
||||
open(my $fh, '<', $CONF_FILE) or die($!);
|
||||
my @lines = <$fh>;
|
||||
close ($fh);
|
||||
|
||||
# Set the new value for the configuration token.
|
||||
my $found = 0;
|
||||
for(my $i = 0; $i < $#lines; $i++) {
|
||||
if ($lines[$i] =~ m/[#\s]*$token/) {
|
||||
$lines[$i] = "$token $value\n";
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
# Append the token to the end if it was not found in the file.
|
||||
if ($found == 0) {
|
||||
push(@lines, "$token $value\n");
|
||||
}
|
||||
|
||||
# Write the changes to the configuration file.
|
||||
open($fh, '>', $CONF_FILE) or die($!);
|
||||
print $fh @lines;
|
||||
close($fh);
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>CFBundlePackageType</key><string>APPL</string><key>CFBundleInfoDictionaryVersion</key><string>6.0</string>
|
||||
|
||||
<key>CFBundleName</key> <string>PandoraFMS agent uninstaller</string>
|
||||
<key>CFBundleExecutable</key> <string>uninstall.sh</string>
|
||||
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
|
||||
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
|
||||
|
||||
<key>CFBundleVersion</key> <string>7.0NG.752</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.752 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.752</string>
|
||||
|
||||
<key>NSPrincipalClass</key><string>NSApplication</string>
|
||||
<key>NSMainNibFile</key><string>MainMenu</string>
|
||||
</dict></plist>
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
CONFIRM=`"$(dirname "$0")/../Resources/confirm_uninstall"`
|
||||
if [ "$CONFIRM" -ne "1" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
OUTPUT=`"$(dirname "$0")/../Resources/ask_root"`
|
||||
ERROR="$?"
|
||||
|
||||
if [ "$?" -gt "0" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo $OUTPUT | `sudo -S "$(dirname "$0")/../Resources/uninstall"`
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/osascript
|
||||
|
||||
set my_password to display dialog "Please provide root password to uninstall Pandora FMS agent:" ¬
|
||||
with title "Root confirmation" ¬
|
||||
with icon caution ¬
|
||||
default answer "" ¬
|
||||
buttons {"Cancel", "OK"} default button 2 ¬
|
||||
with hidden answer
|
||||
return (text returned of my_password)
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/osascript
|
||||
|
||||
set first_time to 1
|
||||
set text_display to "Are you sure you want to uninstall Pandora FMS agent?"
|
||||
|
||||
repeat
|
||||
if (first_time = 1) then
|
||||
set text_display to "Are you sure you want to uninstall Pandora FMS agent?"
|
||||
end if
|
||||
set my_remotecfg to display dialog ¬
|
||||
text_display with title ¬
|
||||
"Confirm uninstall" ¬
|
||||
buttons {"No", "Yes"} ¬
|
||||
default button "No"
|
||||
if (button returned of my_remotecfg) is "Yes" then
|
||||
set confirm_uninstall to "1"
|
||||
else
|
||||
set confirm_uninstall to "0"
|
||||
end if
|
||||
exit repeat
|
||||
end repeat
|
||||
|
||||
return (confirm_uninstall)
|
Binary file not shown.
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Stop the agent process
|
||||
`launchctl stop com.pandorafms.pandorafms`
|
||||
PFMSAGENT=`ps aux | grep pandora_agent | grep -v grep | wc -l`
|
||||
if [ "$PFMSAGENT" -gt "0" ]
|
||||
then
|
||||
PIDAGENT=`ps aux | grep pandora_agent | grep -v grep | awk '{print $2}'`
|
||||
kill $PIDAGENT
|
||||
fi
|
||||
|
||||
# Remove local files
|
||||
rm -Rf /etc/pandora
|
||||
rm -Rf /usr/local/share/pandora_agent/
|
||||
rm -f /usr/local/bin/pandora_agent
|
||||
rm -f /usr/local/bin/pandora_agent_exec
|
||||
rm -f /usr/local/bin/pandora_revent
|
||||
rm -f /usr/local/bin/tentacle_client
|
||||
rm -f /usr/local/share/man/man1/pandora_agent.1.gz
|
||||
rm -f /usr/local/share/man/man1/tentacle_client.1.gz
|
||||
rm -f /var/log/pandora/pandora_agent.*
|
||||
rm -f /etc/newsyslog.d/pandora_agent.conf
|
||||
|
||||
# Remove everything related with Pandora FMS agent
|
||||
`launchctl remove com.pandorafms.pandorafms`
|
||||
rm -f /Library/LaunchDaemons/com.pandorafms.pandorafms.plist
|
||||
|
||||
# Remove all packages residual files
|
||||
rm -f /private/var/db/receipts/com.pandorafms*
|
||||
|
||||
# Remove the uninstall app too
|
||||
rm -Rf /Applications/PandoraFMS*
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
|
@ -0,0 +1,4 @@
|
|||
Installation complete! Thank you for installing Pandora FMS agent for MacOS.
|
||||
Agent's service has been automatically started. You can manage the service with:
|
||||
sudo launchctl start com.pandorafms.pandorafms to start it, and sudo launchctl
|
||||
stop com.pandorafms.pandorafms to stop it.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue