Merge remote-tracking branch 'origin/develop' into ent-5023-limpiar-toda-referencia-a-event-alert

This commit is contained in:
marcos 2021-06-18 12:28:58 +02:00
commit 36dd93701a
2889 changed files with 629350 additions and 250740 deletions

13
.gitignore vendored Normal file
View File

@ -0,0 +1,13 @@
.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
pandora_console/.DS_Store
.DS_Store

View File

@ -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
![screenshot 1](http://wolf359.artica.es/public_images/captura-pantalla-pandora3.png)
<br />
<br />

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,12 +1,7 @@
* {
font-family: "Open Sans", "Noto Sans", sans-serif
}
body {
min-width: 425px;
min-height: 540px;
margin: 5px;
font-family: Tahoma, Geneva, Arial;
font-size: 10pt;
}
h1 {
@ -28,7 +23,8 @@ a:hover {
text-decoration: underline;
}
a:visited {
color: #254533; text-decoration:none;
color: #254533;
text-decoration: none;
}
a:visited:hover {
text-decoration: underline;
@ -51,8 +47,8 @@ div.main {
width: 400px;
}
div.textarea {
background-color: #D5DED5;
width: 100%
background-color: #d5ded5;
width: 100%;
}
div.e {
text-align: right;
@ -88,7 +84,6 @@ div.options_divider {
div.options_divider h2 {
margin: 20px 20px 0;
padding: 5px;
font-weight: 500;
border: 2px solid #82b92e;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
@ -233,25 +228,25 @@ button h3 {
}
.sev-Warning {
background: #FDDD30;
background: #fddd30;
color: #333;
}
.sev-Critical {
background: #F84348;
background: #f84348;
}
.sev-Informational {
background: #4CA8E0;
background: #4ca8e0;
}
.sev-Normal {
background: #84B839;
background: #84b839;
}
.sev-Maintenance {
background: #A8A8A8;
background: #a8a8a8;
}
.sev-Minor {
background: #F099A2;
background: #f099a2;
color: #333;
}
.sev-Major {
background: #C97A4A;
background: #c97a4a;
}

View File

@ -3,7 +3,7 @@ var isFetching = null;
var storedEvents = new Array();
var notVisited = {};
$(window).on('load', function() {
$(window).on("load", function() {
initilise();
// Wait some ms to throw main function
var delay = setTimeout(main, 100);
@ -23,20 +23,27 @@ function removeNotVisited(eventId) {
}
function main() {
chrome.runtime.sendMessage({ text: "FETCH_EVENTS" });
// Do not fetch if is fetching now
if (isFetching) return;
isFetching = true;
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"];
var url =
localStorage["ip_address"] +
"/include/api.php?op=get&op2=events&return_type=json";
var feedUrl = url;
var data = new FormData();
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.open("POST", feedUrl, true);
req.withCredentials = true;
req.send(data);
}
function handleError() {
@ -64,7 +71,7 @@ function getEvents(reply){
var fetchedEvents = parseReplyEvents(reply);
// If there is no events requested, mark all as visited
if (storedEvents.length == 0) {
if (typeof storedEvents != "undefined" && storedEvents.length == 0) {
notVisited = {};
storedEvents = fetchedEvents;
return;
@ -78,10 +85,10 @@ function getEvents(reply){
// 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;
newNotVisited[newEvents[k]["id"]] = true;
if (views.length == 0) {
notVisitedCount++;
displayNotification (newEvents[k])
displayNotification(newEvents[k]);
alertsSound(newEvents[k]);
}
}
@ -89,15 +96,15 @@ function getEvents(reply){
// 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;
if (notVisited[fetchedEvents[k]["id"]] === true) {
newNotVisited[fetchedEvents[k]["id"]] = true;
notVisitedCount++;
}
}
notVisited = newNotVisited;
// Update the number
localStorage["new_events"] = (views.length == 0) ? notVisitedCount : 0;
localStorage["new_events"] = views.length == 0 ? notVisitedCount : 0;
updateBadge();
// Store the requested events
@ -118,7 +125,7 @@ function fetchNewEvents(A,B){
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']) {
if (A[i]["id"] == B[j]["id"]) {
id = true;
break;
}
@ -130,11 +137,15 @@ function fetchNewEvents(A,B){
return arrDiff;
}
function parseReplyEvents(reply) {
// Split the API response
var data = JSON.parse(reply)
var data;
try {
data = JSON.parse(reply);
} catch (error) {
console.log(error);
return [];
}
var e_array = JSON.parse(reply).data;
// Form a properly object
@ -142,16 +153,16 @@ function parseReplyEvents (reply) {
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
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
@ -163,7 +174,7 @@ function alertsSound(pEvent){
return;
}
switch (pEvent['severity']) {
switch (pEvent["severity"]) {
case "Critical":
playSound(localStorage["critical"]);
break;
@ -183,7 +194,6 @@ function alertsSound(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
@ -193,10 +203,10 @@ function displayNotification (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') {
else if (Notification.permission !== "denied") {
Notification.requestPermission(function(permission) {
// Whatever the user answers, we make sure we store the information
if(!('permission' in Notification)) {
if (!("permission" in Notification)) {
Notification.permission = permission;
}
@ -207,34 +217,37 @@ function displayNotification (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'];
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'],
{
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');
}
window.open(url, "_blank");
};
// Close notification after 10 secs
setTimeout(function() {notification.close()}, 10000);
setTimeout(function() {
notification.close();
}, 10000);
}
function resetInterval() {
@ -243,7 +256,6 @@ function resetInterval () {
}
function initilise() {
if (isFetching == null) isFetching = false;
if (localStorage["ip_address"] == undefined) {
localStorage["ip_address"] = "http://firefly.artica.es/pandora_demo";

View File

@ -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();

View File

@ -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",

View File

@ -1,21 +1,42 @@
<!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 lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Wicket Alert</title>
<style type="text/css">
body { margin:0; font-family:arial; font-size:10pt }
h1 { font-weight:bold; font-size:16px; margin:2px 0 2px 4px; color:#237948; font-family:arial; }
body {
margin: 0;
font-size: 10pt;
}
h1 {
font-weight: bold;
font-size: 16px;
margin: 2px 0 2px 4px;
color: #237948;
}
a { color: #237948; text-decoration:none; }
a:hover { text-decoration:underline; }
a:visited { color: #237948; text-decoration:none; }
a:visited:hover { text-decoration:underline; }
a {
color: #237948;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:visited {
color: #237948;
text-decoration: none;
}
a:visited:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>Event Alert</h1>
<div id="e" style="background:url('images/icon.png') no-repeat 0% 50%; margin:0 4px; padding-left:50px; min-height:48px;">
<div
id="e"
style="background:url('images/icon.png') no-repeat 0% 50%; margin:0 4px; padding-left:50px; min-height:48px;"
>
<script src="js/notification.js"></script>
</div>
</body>

View File

@ -0,0 +1,169 @@
#!/bin/bash
#export PANDORA_SERVER_IP='newdemos.artica.es' && curl -sSL http://firefly.artica.es/projects/pandora_deploy_agent.sh | bash
# define variables
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
S_VERSION='2021012801'
LOGFILE="/tmp/pandora-agent-deploy-$(date +%F).log"
# Ansi color code variables
red="\e[0;91m"
green="\e[0;92m"
bold="\e[1m"
cyan="\e[0;36m"
yellow="\e[0;33m"
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 Agent 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 Agent 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_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"
}
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
}
install_autodiscover () {
local arch=$1
wget https://pandorafms.com/library/wp-content/uploads/2020/04/autodiscover-linux.zip
unzip autodiscover-linux.zip
chmod +x $arch/autodiscover
mv -f $arch/autodiscover /etc/pandora/plugins/autodiscover
}
## Main
echo "Starting PandoraFMS Agent deployment ver. $S_VERSION"
execute_cmd "[ $PANDORA_SERVER_IP ]" 'Check Server IP Address' 'Please define env variable PANDORA_SERVER_IP'
# Check OS.
OS=$([[ $(grep '^ID_LIKE=' /etc/os-release) ]] && grep ^ID_LIKE= /etc/os-release | cut -d '=' -f2 | tr -d '"' || grep ^ID= /etc/os-release | cut -d '=' -f2 | tr -d '"')
[[ $OS == 'rhel fedora' ]] && OS_RELEASE=$OS
[[ $OS == 'centos rhel fedora' ]] && OS_RELEASE=$OS
[[ $OS == 'debian' ]] && OS_RELEASE=$OS
# 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
echo -en "${cyan}Checking compatible OS... ${reset}"
[[ $OS_RELEASE ]]
check_cmd_status "Error not compatible OS, $OS"
# Root permisions
check_root_permissions
# Connectivity
check_repo_connection
# Execute tools check
execute_cmd "grep --version" 'Checking needed tools: grep'
execute_cmd "sed --version" 'Checking needed tools: sed'
# Creating working directory
rm -rf $HOME/pandora_deploy_tmp/ &>> $LOGFILE
mkdir $HOME/pandora_deploy_tmp &>> $LOGFILE
execute_cmd "cd $HOME/pandora_deploy_tmp" "Moving to workspace: $HOME/pandora_deploy_tmp"
# Downloading and installing packages
if [[ $OS_RELEASE == 'rhel fedora' ]] || [[ $OS_RELEASE == 'centos rhel fedora' ]]; then
yum install -y perl wget curl perl-Sys-Syslog unzip &>> $LOGFILE
echo -e "${cyan}Instaling agent dependencies...${reset}" ${green}OK${reset}
yum install -y http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_unix-7.0NG.noarch.rpm &>> $LOGFILE
echo -e "${cyan}Instaling Pandora FMS agent...${reset}" ${green}OK${reset}
fi
if [[ $OS_RELEASE == 'debian' ]]; then
execute_cmd "apt update" 'Updating repos'
execute_cmd "apt install -y perl wget curl unzip procps python3 python3-pip" 'Instaling agent dependencies'
execute_cmd 'wget http://firefly.artica.es/pandorafms/latest/Debian_Ubuntu/pandorafms.agent_unix_7.0NG.deb' 'Downloading Pandora FMS agent dependencies'
execute_cmd 'apt install -y ./pandorafms.agent_unix_7.0NG.deb' 'Installing Pandora FMS agent'
fi
# Configuring Agente
[[ $PANDORA_SERVER_IP ]] && sed -i "s/^server_ip.*$/server_ip $PANDORA_SERVER_IP/g" $PANDORA_AGENT_CONF
[[ $PANDORA_REMOTE_CONFIG ]] && sed -i "s/^remote_config.*$/remote_config $PANDORA_REMOTE_CONFIG/g" $PANDORA_AGENT_CONF
[[ $PANDORA_GROUP ]] && sed -i "s/^group.*$/group $PANDORA_GROUP/g" $PANDORA_AGENT_CONF
[[ $PANDORA_DEBUG ]] && sed -i "s/^debug.*$/debug $PANDORA_DEBUG/g" $PANDORA_AGENT_CONF
[[ $PANDORA_AGENT_NAME ]] && sed -i "s/^#agent_name.*$/agent_name $PANDORA_AGENT_NAME/g" $PANDORA_AGENT_CONF
[[ $PANDORA_AGENT_ALIAS ]] && sed -i "s/^#agent_alias.*$/agent_alias $PANDORA_AGENT_ALIAS/g" $PANDORA_AGENT_CONF
[[ $PANDORA_SECONDARY_GROUPS ]] && sed -i "s/^# secondary_groups.*$/secondary_groups $PANDORA_SECONDARY_GROUPS/g" $PANDORA_AGENT_CONF
[[ $TIMEZONE ]] && ln -sfn /usr/share/zoneinfo/$TIMEZONE /etc/localtime
#installing autodiscover
arch=$(uname -m)
case $arch in
x86_64)
execute_cmd 'install_autodiscover x86_64' "installing service autodiscover on $arch" 'Error unable to install autodiscovery'
;;
x86)
execute_cmd 'install_autodiscover x84' "installing service autodiscover on $arch" 'Error unable to install autodiscovery'
;;
armv7l)
echo -e "${cyan}Skiping autodiscover installation arch $arch not suported${reset}"
;;
*)
echo -e "${yellow}Skiping autodiscover installation arch $arch not suported${reset}"
;;
esac
#Starting pandora agent daemon.
execute_cmd '/etc/init.d/pandora_agent_daemon restart' 'Starting Pandora Agent'
cd
execute_cmd 'rm -rf $HOME/pandora_deploy_tmp' 'Cleaning up temporay files'
echo -e "${green}PandoraFMS Agent installed and running, sending data to: $PANDORA_SERVER_IP${reset}"

View File

@ -0,0 +1,595 @@
#!/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" "Checking 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 \
perl(NetAddr::IP) \
perl(Sys::Syslog) \
perl(DBI) \
perl(XML::Simple) \
perl(Geo::IP) \
perl(IO::Socket::INET6) \
perl(XML::Twig) \
expect \
openssh-clients \
http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm \
http://firefly.artica.es/centos7/wmic-1.4-1.el7.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_dependencies=" \
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 $oracle_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 = 800M/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
[ -d /dev/lxd/ ] || 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"}'

View File

@ -0,0 +1,145 @@
![Image of Pandora FMS](https://pandorafms.org/wp-content/uploads/2016/06/logo_pandora_community.png)
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.
[![Try in PWD](https://raw.githubusercontent.com/play-with-docker/stacks/master/assets/images/button.png)](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.

View File

@ -0,0 +1,274 @@
#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 dependencies
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 dependencies
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 \
expect \
openssh-clients \
http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
http://firefly.artica.es/centos7/wmic-1.4-1.el7.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
# Install Phantom
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

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -0,0 +1,5 @@
# exclude packages
demos/
*.tar*
*.rpm
phantomjs

View File

@ -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 = 800M/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

View File

@ -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

View File

@ -0,0 +1,50 @@
![Image of Pandora FMS](https://pandorafms.org/wp-content/uploads/2016/06/logo_pandora_community.png)
# 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.

View File

@ -1,32 +1,38 @@
if ("undefined" == typeof(PandoraChrome)) {
/* 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 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(){
PandoraChrome.fn = (function() {
return {
displaySideBar: function() {
PandoraChrome.fn.hideNotification();
PandoraChrome.fn.hideBadge();
toggleSidebar('viewPandoraSidebar');
toggleSidebar("viewPandoraSidebar");
},
displayDialog: function() {
window.openDialog("chrome://pandorasidebar/content/options.xul", "","chrome, centerscreen, dialog, modal, resizable=no", null).focus();
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');
toggleSidebar("viewPandoraSidebar");
PandoraChrome.fn.setIcon("icon16");
}
},
@ -42,18 +48,24 @@ PandoraChrome.fn = function(){
timer = setTimeout(PandoraChrome.fn.main, 100);
},
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 url =
prefManager.getCharPref("ip_address") +
"/include/api.php?op=get&op2=events&return_type=json";
var feedUrl = url;
var data = new FormData();
data.append("apipass", prefManager.getCharPref("api_pass"));
data.append("user", prefManager.getCharPref("user_name"));
data.append("pass", prefManager.getCharPref("pass"));
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);
req.open("POST", feedUrl, true);
req.send(data);
},
handleError: function() {
@ -75,21 +87,16 @@ PandoraChrome.fn = function(){
clearTimeout(timer);
}
timer = setTimeout(PandoraChrome.fn.main, 1000);
}
else{
} 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{
} else {
prefManager.setBoolPref("data_check", true);
prefManager.setCharPref("data", doc);
@ -106,7 +113,6 @@ PandoraChrome.fn = function(){
oldEvents = allEvents;
}
newEvents = PandoraChrome.fn.fetchNewEvents(allEvents, oldEvents);
if (newEvents.length != 0) {
for (var k = 0; k < newEvents.length; k++) {
@ -114,23 +120,22 @@ PandoraChrome.fn = function(){
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{
} else {
PandoraChrome.fn.hideBadge();
}
if (timer) {
clearTimeout(timer);
}
timer =setTimeout(PandoraChrome.fn.main , prefManager.getIntPref("refresh")*1000 );
timer = setTimeout(
PandoraChrome.fn.main,
prefManager.getIntPref("refresh") * 1000
);
}
},
@ -152,44 +157,49 @@ PandoraChrome.fn = function(){
if (newEvents[eventId][19] == "Warning") {
Sounds.playSound(prefManager.getIntPref("warning"));
}
}
var newEve = document.getElementById('newEvent');
var newEve = document.getElementById("newEvent");
newEve.label = "Last Event : " + newEvents[eventId][6];
var id;
if (newEvents[eventId][9] == 0) {
id = ".";
}
else {
} 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] +
id;
newEve.tooltipText = event;
$('#newEvent').show();
$("#newEvent").show();
return;
},
hideNotification: function() {
//alert("Hide Notif");
$('#newEvent').hide();
$("#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;") ;
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();
$("#temp").show();
},
hideBadge: function() {
var updateCount = document.getElementById('temp');
var updateCount = document.getElementById("temp");
//alert("hide B");
$('#temp').hide();
$("#temp").hide();
},
divideArray: function(e_array) {
@ -201,7 +211,6 @@ PandoraChrome.fn = function(){
return Events;
},
fetchNewEvents: function(A, B) {
var arrDiff = new Array();
// alert(A.length);
@ -221,25 +230,33 @@ PandoraChrome.fn = function(){
return arrDiff;
},
getNotification: function(eventId) {
var title = newEvents[eventId][6];
var id;
if (newEvents[eventId][9] == 0) {
id = ".";
}
else {
} 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] +
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>';
return (
"<a>" +
title +
'</a> <br/> <span style="font-size:80%">' +
event +
"</span>"
);
}
};
}();
})();
/* Add Event Listener */
window.addEventListener("load", PandoraChrome.fn.Onloading(), false);

View File

@ -2,50 +2,97 @@ body {
min-width: 425px;
min-height: 540px;
margin: 5px;
font-family:Tahoma, Geneva, Arial;
font-size: 10pt;
}
h1 { font-weight: bold; font-size:16px; margin:2px 0px 2px 0px; color:#237948; font-family:arial }
h1 {
font-weight: bold;
font-size: 16px;
margin: 2px 0px 2px 0px;
color: #237948;
}
h2 {
color: blue;
}
label { color: #254533; text-decoration:none; }
label:hover { text-decoration:underline; }
label:visited { color: #254533; text-decoration:none; }
label:visited:hover { text-decoration:underline; }
label {
color: #254533;
text-decoration: none;
}
label:hover {
text-decoration: underline;
}
label:visited {
color: #254533;
text-decoration: none;
}
label:visited:hover {
text-decoration: underline;
}
label.text-link {
color: #254533;
text-decoration: none;
}
label.text-link :hover {
text-decoration: underline;
}
label.text-link :visited {
color: #254533;
text-decoration: none;
}
label.text-link :visited:hover {
text-decoration: underline;
}
label.text-link { color: #254533; text-decoration:none; }
label.text-link :hover { text-decoration:underline; }
label.text-link :visited { color: #254533; text-decoration:none; }
label.text-link :visited:hover { text-decoration:underline; }
span.res {
font-size: 80%;
color: #555;
}
span.res { font-size:80%; color:#555; }
image.pm { margin-right:3px;cursor:pointer; margin-top:0px; }
image.pm {
margin-right: 3px;
cursor: pointer;
margin-top: 0px;
}
.main {
background-color: white;
height: 500px;
width: 400px;
}
.textarea {
background-color : #D5DED5;
width :100%
background-color: #d5ded5;
width: 100%;
}
vbox.e {
text-align: right;
font-size: 8pt;
}
vbox.b {
background-color: white;
border: 1px solid #bababa;
margin: 5px;
padding: 4px;
}
vbox.b description label {
font-size: 10pt;
}
vbox.b description {
margin: 2px 0px 4px 0px;
color: #333;
font-size: 9pt;
}
vbox.e{ text-align:right; font-size:8pt; }
vbox.b { background-color:white; border:1px solid #BABABA; margin:5px; padding:4px; }
vbox.b description label { font-size: 10pt; }
vbox.b description { margin:2px 0px 4px 0px; color:#333; font-size:9pt; }
vbox.b vbox.items description {
margin:2px 0px 8px 0px; color:#333; width:355px;float:left; display:block;
margin: 2px 0px 8px 0px;
color: #333;
width: 355px;
float: left;
display: block;
}
vbox.b vbox.items description image {
float:left;margin:0px 3px 0px 0px;
float: left;
margin: 0px 3px 0px 0px;
}
.tooltip {
display: none;
font-size: 12px;
@ -67,5 +114,3 @@ vbox.b vbox.items description image {
width: 100px; /* width of the spinner gif */
height: 102px; /*hight of the spinner gif +2px to fix IE8 issue */
}

View File

@ -29,6 +29,8 @@ $CODEHOME/pandora_console/pandora_console.redhat.spec \
$CODEHOME/pandora_console/pandora_console.rhel7.spec \
$CODEHOME/pandora_agents/unix/pandora_agent.redhat.spec \
$CODEHOME/pandora_server/pandora_server.redhat.spec \
$PANDHOME_ENT/pandora_agents/pandora_agent.spec \
$PANDHOME_ENT/pandora_server/pandora_server_enterprise.redhat.spec \
$PANDHOME_ENT/pandora_console/enterprise/pandora_console_enterprise.redhat.spec \
$PANDHOME_ENT/pandora_console/enterprise/pandora_console_enterprise.rhel7.spec \
$PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.redhat.spec"
@ -36,7 +38,7 @@ DEBIAN_FILES="$CODEHOME/pandora_console/DEBIAN \
$CODEHOME/pandora_server/DEBIAN \
$CODEHOME/pandora_agents/unix/DEBIAN \
$PANDHOME_ENT/pandora_console/DEBIAN \
$PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/DEBIAN"
$PANDHOME_ENT/pandora_server/DEBIAN"
INSTALLER_FILES="$CODEHOME/pandora_console/pandora_console_install \
$CODEHOME/pandora_server/pandora_server_installer \
$CODEHOME/pandora_agents/unix/pandora_agent_installer"
@ -55,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 \
@ -136,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..."
@ -147,13 +160,13 @@ echo "Updating Pandora Server version..."
sed -i -e "s/my\s\s*\$pandora_version\s*=.*/my \$pandora_version = \"$VERSION\";/" "$SERVER_FILE"
sed -i -e "s/my\s\s*\$pandora_build\s*=.*/my \$pandora_build = \"$BUILD\";/" "$SERVER_FILE"
echo "Updating DB maintenance script version..."
sed -i -e "s/my\s\s*\$version\s*=.*/my \$version = \"$VERSION PS$BUILD\";/" "$SERVER_DB_FILE"
sed -i -e "s/my\s\s*\$version\s*=.*/my \$version = \"$VERSION Build $BUILD\";/" "$SERVER_DB_FILE"
echo "Updating CLI script version..."
sed -i -e "s/my\s\s*\$version\s*=.*/my \$version = \"$VERSION PS$BUILD\";/" "$SERVER_CLI_FILE"
sed -i -e "s/my\s\s*\$version\s*=.*/my \$version = \"$VERSION Build $BUILD\";/" "$SERVER_CLI_FILE"
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"
@ -184,7 +197,7 @@ echo "Updating Pandora Unix Agent version..."
sed -i -e "s/\s*use\s*constant\s*AGENT_VERSION =>.*/use constant AGENT_VERSION => '$VERSION';/" "$AGENT_UNIX_FILE"
sed -i -e "s/\s*use\s*constant\s*AGENT_BUILD =>.*/use constant AGENT_BUILD => '$BUILD';/" "$AGENT_UNIX_FILE"
echo "Updating Pandora Windows Agent version..."
sed -i -e "s/\s*#define\s*PANDORA_VERSION\s*.*/#define PANDORA_VERSION (\"$VERSION(Build $BUILD)\")/" "$AGENT_WIN_FILE"
sed -i -e "s/\s*#define\s*PANDORA_VERSION\s*.*/#define PANDORA_VERSION (\"$VERSION Build $BUILD\")/" "$AGENT_WIN_FILE"
sed -i -e "s/{Pandora FMS Windows Agent v.*}/{Pandora FMS Windows Agent v$VERSION}/" "$AGENT_WIN_MPI_FILE"
NUMERIC_VERSION=$(echo $VERSION | sed -e "s/\([0-9]*\.[0-9]*\).*/\1/")
sed -i -n "1h;1!H;\${;g;s/[\r\n]InstallVersion[\r\n]{\S*}/\nInstallVersion\n{$NUMERIC_VERSION.0.0}/g;p;}" "$AGENT_WIN_MPI_FILE"

View 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

View File

@ -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

View File

@ -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...

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="lib" path="libs/commons-lang3-3.0.1.jar"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Pandroid Agent v1.0</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -1,4 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6

View File

@ -1,99 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="pandroid.agent"
android:versionCode="1002"
android:versionName="3.0" >
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="false"
android:xlargeScreens="false" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-feature android:name="android.hardware.sensor.light" />
<uses-feature android:name="android.hardware.location" />
<uses-sdk android:minSdkVersion="8" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".PandroidAgent"
android:configChanges="keyboardHidden|orientation"
android:label="@string/app_name"
android:theme="@style/MainTheme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Status" />
<activity android:name=".Setup" />
<service
android:name="pandroid.agent.PandroidAgentListener"
android:enabled="true" />
<receiver android:name="pandroid.agent.EventReceiver" />
<receiver
android:name="pandroid.agent.StartMyServiceAtBootReceiver"
android:enabled="true"
android:exported="true"
android:label="StartMyServiceAtBootReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service
android:name="pandroid.agent.MyStartService"
android:enabled="true" />
<activity
android:name=".About"
android:label="@string/pandroid_agent_str"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name=".Help"
android:label="@string/help_str"
android:theme="@android:style/Theme.Dialog" />
<receiver android:name=".SMSBroadcastReceiver" >
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" >
</action>
</intent-filter>
</receiver>
</application>
</manifest>

View File

@ -1,34 +0,0 @@
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}

View File

@ -1,14 +0,0 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt
# Project target.
target=android-17

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dip" >
<ImageView
android:id="@+id/img_logo_about"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0"
android:contentDescription="@string/about_desc"
android:src="@drawable/pandroid_large" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pandroid_agent_copyright" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/licensed_under_gpl_str" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:text="@string/develop_team_str" />
<TextView
android:id="@+id/url_pandora"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal" />
</LinearLayout>

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
android:orientation="vertical"
android:padding="10dip" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/help_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</ScrollView>
</LinearLayout>

View File

@ -1,52 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/p"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/yes_button"
style="?android:attr/buttonStyleSmall"
android:layout_width="173dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
android:text="@string/yes" />
<Button
android:id="@+id/no_button"
style="?android:attr/buttonStyleSmall"
android:layout_width="168dp"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/yes_button"
android:layout_alignRight="@+id/yes_button"
android:layout_below="@+id/yes_button"
android:layout_marginTop="22dp"
android:text="@string/no" />
<CheckBox
android:id="@+id/password_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/no_button"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="@string/password_checkbox" />
</RelativeLayout>

View File

@ -1,70 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<EditText
android:id="@+id/password_create_field"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="19dp"
android:ems="10"
android:inputType="textPassword" >
<requestFocus />
</EditText>
<Button
android:id="@+id/password_create_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/password_create_field"
android:layout_centerHorizontal="true"
android:layout_marginTop="92dp"
android:text="@string/enter" />
<EditText
android:id="@+id/password_create_field_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/password_create_field"
android:layout_below="@+id/password_create_field"
android:layout_marginTop="16dp"
android:ems="10"
android:inputType="textPassword" />
<TextView
android:id="@+id/password_repeat_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/password_create_field"
android:layout_centerHorizontal="true"
android:text="@string/password_repeat" />
<TextView
android:id="@+id/password_create_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:text="@string/password_set" />
</RelativeLayout>

View File

@ -1,60 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<EditText
android:id="@+id/password_entry_input"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="85dp"
android:ems="10"
android:inputType="textPassword" />
<Button
android:id="@+id/password_back_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/password_entry_input"
android:layout_below="@+id/password_entry_input"
android:layout_marginTop="29dp"
android:text="@string/back" />
<Button
android:id="@+id/password_entry_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/password_back_button"
android:layout_alignBottom="@+id/password_back_button"
android:layout_alignLeft="@+id/password_entry_input"
android:text="@string/enter" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="36dp"
android:text="@string/alert_dialog_password"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>

View File

@ -1,343 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/setup"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<CheckBox
android:id="@+id/checkNotification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/notificationCheck"
android:textColor="#bbbbbb"
android:textSize="14sp"
android:paddingTop="5sp"/>
<TextView
android:id="@+id/field1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:text="@string/serverAddr" />
<EditText
android:id="@+id/serverAddrInput"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions"
android:singleLine="true" />
<TextView
android:id="@+id/field2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/serverPort" />
<EditText
android:id="@+id/serverPortInput"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:singleLine="true" />
<TextView
android:id="@+id/field3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/interval" />
<EditText
android:id="@+id/intervalInput"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:singleLine="true" />
<TextView
android:id="@+id/field4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/agent" />
<EditText
android:id="@+id/agentNameInput"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions"
android:singleLine="true" />
<TextView
android:id="@+id/field5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/bufferSize" />
<EditText
android:id="@+id/bufferSize"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:maxLines="1"
/>
<TextView
android:id="@+id/field6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/mobileWebURL" />
<EditText
android:id="@+id/mobileWebURLInput"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textUri"
android:singleLine="true" />
<Button
android:id="@+id/goToWebButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/go_to_web" />
<TextView
android:id="@+id/field7"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/taskToReport" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ProgressBar
android:id="@+id/loading_task_anim"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Spinner
android:id="@+id/processes_combo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
<CheckBox
android:id="@+id/checkTaskReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/taskReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkGpsReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/gpsReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkBatteryLevelReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/BatteryLevelReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkMemoryReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/memoryReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkDeviceUpTimeReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/uptimeReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkInventoryReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/InventoryReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkHelloSignalReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/HelloSignalReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkSimIDReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/simIDReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkNetworkOperatorReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/NetworkOperatorReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkNetworkTypeReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/NetworkTypeReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkPhoneTypeReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/PhoneTypeReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkSignalStrengthReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/SignalStrengthReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkReceivedSMSReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ReceivedSMSReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkSentSMSReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/SentSMSReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkIncomingCallsReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/IncomingCallsReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkMissedCallsReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/MissedCallsReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkOutgoingCallsReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/OutgoingCallsReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkBytesReceivedReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/BytesReceivedReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkBytesSentReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/BytesSentReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkRoamingReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/RoamingReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<Button
android:id="@+id/update"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/update" />
<Button
android:id="@+id/set_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/set_password" />
<Button
android:id="@+id/stopAgent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/stopAgent" />
<Button
android:id="@+id/restartAgent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/restartAgent" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</RelativeLayout>

View File

@ -1,235 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/setupnosim"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<CheckBox
android:id="@+id/checkNotification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5sp"
android:text="@string/notificationCheck"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<TextView
android:id="@+id/field1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:text="@string/serverAddr" />
<EditText
android:id="@+id/serverAddrInput"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions"
android:singleLine="true" />
<TextView
android:id="@+id/field2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/serverPort" />
<EditText
android:id="@+id/serverPortInput"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:singleLine="true" />
<TextView
android:id="@+id/field3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/interval" />
<EditText
android:id="@+id/intervalInput"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:singleLine="true" />
<TextView
android:id="@+id/field4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/agent" />
<EditText
android:id="@+id/agentNameInput"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions"
android:singleLine="true" />
<TextView
android:id="@+id/field5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/bufferSize" />
<EditText
android:id="@+id/bufferSize"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:singleLine="true" />
<TextView
android:id="@+id/field6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/mobileWebURL" />
<EditText
android:id="@+id/mobileWebURLInput"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textUri"
android:singleLine="true" />
<Button
android:id="@+id/goToWebButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/go_to_web" />
<TextView
android:id="@+id/field7"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/taskToReport" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ProgressBar
android:id="@+id/loading_task_anim"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Spinner
android:id="@+id/processes_combo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
</LinearLayout>
<CheckBox
android:id="@+id/checkTaskReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/taskReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkGpsReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/gpsReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkBatteryLevelReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/BatteryLevelReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkMemoryReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/memoryReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkDeviceUpTimeReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/uptimeReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkInventoryReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/InventoryReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkHelloSignalReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/HelloSignalReport"
android:textColor="#bbbbbb"
android:textSize="14sp" />
<Button
android:id="@+id/update"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/update" />
<Button
android:id="@+id/set_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/set_password" />
<Button
android:id="@+id/stopAgent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/stopAgent" />
<Button
android:id="@+id/restartAgent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/restartAgent" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</RelativeLayout>

View File

@ -1,8 +0,0 @@
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
style="?android:attr/spinnerDropDownItemStyle"
android:singleLine="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#00ff00"
android:ellipsize="marquee" />

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="#00FF00" >
</TextView>

View File

@ -1,475 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="5dp" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/last_values_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/last_values"
android:textSize="18sp"
android:textStyle="bold" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/lastContactInfo_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/img_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:padding="5dp"
android:src="@drawable/logo" />
<TextView
android:id="@+id/latitude_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/lastContactInfo_label_str"
android:text="@string/latitude"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/latitude_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/latitude_label_str" />
<TextView
android:id="@+id/longitude_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/latitude_value_str"
android:text="@string/longitude"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/longitude_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/longitude_label_str" />
<TextView
android:id="@+id/battery_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/longitude_value_str"
android:text="@string/battery_level"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/battery_label_str" />
<!--
<TextView
android:id="@+id/orientation_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/orientation"
android:textSize="14dip"
android:textStyle="bold"
android:layout_below="@id/battery_value_str"
/>
<TextView
android:id="@+id/orientation_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/orientation_label_str"
/>
<TextView
android:id="@+id/proximity_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/proximity"
android:textSize="14dip"
android:textStyle="bold"
android:layout_below="@id/battery_value_str"
/>
<TextView
android:id="@+id/proximity_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/proximity_label_str"
/>
-->
</RelativeLayout>
<TextView
android:id="@+id/task_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/task"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/task_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/memory_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/memory"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/memory_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.18" >
<TableRow
android:id="@+id/tableRow0"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/uptime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/uptime"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/uptime_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/sim_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sim_id"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/sim_id_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/network_operator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dip"
android:text="@string/network_operator"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/network_operator_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/network_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/network_type"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/network_type_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow4"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/phone_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/phone_type"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/phone_type_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow5"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/signal_strength"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/signal_strength"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/signal_strength_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow6"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/sms_received"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sms_received"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/sms_received_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow7"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/sms_sent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sms_sent"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/sms_sent_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow8"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/incoming_calls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/incoming_calls"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/incoming_calls_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow9"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/missed_calls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/missed_calls"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/missed_calls_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow10"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/outgoing_calls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/outgoing_calls"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/outgoing_calls_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow11"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/receive_bytes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/receive_bytes"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/receive_bytes_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow12"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/transmit_bytes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/transmit_bytes"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/transmit_bytes_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow13"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/roaming"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/roaming"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/roaming_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
</TableLayout>
<!--
for debugging
<Button
android:id="@+id/start"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="@string/start" />
<Button
android:id="@+id/stop"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Stop" />
<Button
android:id="@+id/get_xml"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Get xml" />
<TextView
android:id="@+id/xml"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:text="..." />
<Button
android:id="@+id/hide_xml"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hide xml" />
-->
</LinearLayout>
</ScrollView>
</LinearLayout>

View File

@ -1,216 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="5sp" >
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/last_values_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/last_values"
android:textSize="18sp"
android:textStyle="bold"
android:layout_gravity="center_horizontal"
/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/lastContactInfo_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textStyle="bold"
/>
<ImageView
android:id="@+id/img_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"
android:src="@drawable/logo"
android:layout_alignParentRight="true"
android:contentDescription="Logo"
/>
<TextView
android:id="@+id/latitude_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/latitude"
android:textSize="14sp"
android:textStyle="bold"
android:layout_below="@id/lastContactInfo_label_str"
/>
<TextView
android:id="@+id/latitude_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/latitude_label_str"
/>
<TextView
android:id="@+id/longitude_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/longitude"
android:textSize="14sp"
android:textStyle="bold"
android:layout_below="@id/latitude_value_str"
/>
<TextView
android:id="@+id/longitude_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/longitude_label_str"
/>
<TextView
android:id="@+id/battery_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/battery_level"
android:textSize="14sp"
android:textStyle="bold"
android:layout_below="@id/longitude_value_str"
/>
<TextView
android:id="@+id/battery_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/battery_label_str"
/>
<!--<TextView
android:id="@+id/orientation_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/orientation"
android:textSize="14dip"
android:textStyle="bold"
android:layout_below="@id/battery_value_str"
/>
<TextView
android:id="@+id/orientation_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/orientation_label_str"
/>
<TextView
android:id="@+id/proximity_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/proximity"
android:textSize="14dip"
android:textStyle="bold"
android:layout_below="@id/battery_value_str"
/>
<TextView
android:id="@+id/proximity_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/proximity_label_str"
/>-->
</RelativeLayout>
<TextView
android:id="@+id/task_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/task"
android:textSize="14sp"
android:textStyle="bold"
/>
<TextView
android:id="@+id/task_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/memory_label_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/memory"
android:textSize="14sp"
android:textStyle="bold"
/>
<TextView
android:id="@+id/memory_value_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/uptime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/uptime"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/uptime_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<!-- for debugging
<Button
android:id="@+id/start"
android:layout_alignParentBottom="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/start"
/>
<Button
android:id="@+id/stop"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Stop"
/>
<Button
android:id="@+id/get_xml"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Get xml"
/>
<TextView
android:id="@+id/xml"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="..."
android:gravity="left"
/>
<Button
android:id="@+id/hide_xml"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hide xml"
/>
-->
</LinearLayout>
</ScrollView>
</LinearLayout>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/welcome"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/ImageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="false"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:contentDescription="Pandroid logo"
android:paddingTop="20dp"
android:src="@drawable/pandroid_large" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/ImageView1"
android:layout_centerHorizontal="true"
android:paddingTop="20dp"
android:text="Version 3.0"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="40sp" />
</RelativeLayout>

Some files were not shown because too many files have changed in this diff Show More