mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2008-08-05 Sancho Lerena <slerena@gmail.com>
* AUTHORS: Added Evi to AUTHORS file. * pandoradb.sql: MAJOR UPDATE and normalization of database structure. trecon_task table has changed from previous 2.0 version. * pandoradb_data.sql: Minimal updates. * reporting_builder.php: Fixed bug #2035570 (Two weeks instead one week in combo to select SLA period). . * manage_config_remote.php: Fixed bug #2032889: Show configurations not present in disk and fail to copy them. * manage_recontask.php: Show OS, and some stetical changes and code optimization. Removed old code for assigned network servers and so on. * manage_recontask_form.php: Removed old fields, added new fields, fixed old bugs (create incident combo). * config_inc.php: Code cleanup, updated variables. * config_process.php: Updated version info. * estado_ultimopaquete.php: Added refresh icon. * view_server.php: Added missing link to view_server_detail.php for recon servers. Somebody take it prisoner :-) * view_server_detail.php: Code stype update, and some fixes and new column information. * modificar_agente.php, configurar_agente.php: Fixed use of $id_user. * index.php: Temporal workaround to use $id_user as global. Need to fix. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1003 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
b8c5d66e8c
commit
b16aac61f6
@ -2,8 +2,8 @@ Sancho Lerena <slerena@gmail.com>
|
||||
Esteban Sanchez <esteban.sanchez@artica.es>
|
||||
Jorge Gonzalez <jorge.gonzalez@artica.es>
|
||||
Raul Mateos <raulofpandora@gmail.com>
|
||||
Esteban Sanchez <estebans@artica.es>
|
||||
Ramon Novoa <ramon.novoa@artica.es>
|
||||
Evi Vanoost <vanooste@rcbi.rochester.edu>
|
||||
|
||||
See full list of contributors on:
|
||||
|
||||
|
@ -1,3 +1,36 @@
|
||||
2008-08-05 Sancho Lerena <slerena@gmail.com>
|
||||
|
||||
* AUTHORS: Added Evi to AUTHORS file.
|
||||
|
||||
* pandoradb.sql: MAJOR UPDATE and normalization of database
|
||||
structure. trecon_task table has changed from previous 2.0 version.
|
||||
|
||||
* pandoradb_data.sql: Minimal updates.
|
||||
|
||||
* reporting_builder.php: Fixed bug #2035570 (Two weeks instead one
|
||||
week in combo to select SLA period).
|
||||
.
|
||||
* manage_config_remote.php: Fixed bug #2032889: Show configurations
|
||||
not present in disk and fail to copy them.
|
||||
|
||||
* manage_recontask.php: Show OS, and some stetical changes and code
|
||||
optimization. Removed old code for assigned network servers and so on.
|
||||
|
||||
* manage_recontask_form.php: Removed old fields, added new fields, fixed
|
||||
old bugs (create incident combo).
|
||||
|
||||
* config_inc.php: Code cleanup, updated variables.
|
||||
|
||||
* config_process.php: Updated version info.
|
||||
|
||||
* estado_ultimopaquete.php: Added refresh icon.
|
||||
|
||||
* view_server.php: Added missing link to view_server_detail.php for
|
||||
recon servers. Somebody take it prisoner :-)
|
||||
|
||||
* view_server_detail.php: Code stype update, and some fixes and new
|
||||
column information.
|
||||
|
||||
2008-08-05 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* include/functions_extensions.php: Added function to call login
|
||||
@ -17,6 +50,10 @@
|
||||
|
||||
* ChangeLog: Added comment about commit #1000.
|
||||
|
||||
* modificar_agente.php, configurar_agente.php: Fixed use of $id_user.
|
||||
|
||||
* index.php: Temporal workaround to use $id_user as global. Need to fix.
|
||||
|
||||
2008-08-04 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* index.php: Set id_user in config array when login. This fixes errors
|
||||
@ -83,6 +120,7 @@
|
||||
|
||||
* include/help/en/help_plugin_definition.php: Language corrections.
|
||||
|
||||
>>>>>>> .r1002
|
||||
2008-07-31 Sancho Lerena <slerena@gmail.com>
|
||||
|
||||
* include/help/en/help_plugin_definition.php: New help page for
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
// Load global vars
|
||||
require("include/config.php");
|
||||
if (give_acl($id_user, 0, "AW")!=1) {
|
||||
if (give_acl($config["id_user"], 0, "AW")!=1) {
|
||||
audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to access agent manager");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
@ -496,7 +496,7 @@ if ((isset($agent_created_ok)) && ($agent_created_ok == 1)){
|
||||
if (isset($_GET["id_agente"])) {
|
||||
$id_agente = $_GET["id_agente"];
|
||||
$id_grupo = dame_id_grupo($id_agente);
|
||||
if (give_acl($id_user, $id_grupo, "AW")==1){
|
||||
if (give_acl($config["id_user"], $id_grupo, "AW")==1){
|
||||
$sql1='SELECT * FROM tagente WHERE id_agente = '.$id_agente;
|
||||
$result=mysql_query($sql1);
|
||||
if ($row=mysql_fetch_array($result)){
|
||||
@ -523,7 +523,7 @@ if (isset($_GET["id_agente"])) {
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to admin an Agent out of admin groups!");
|
||||
audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation","Trying to admin an Agent out of admin groups!");
|
||||
require ("general/noaccess.php");
|
||||
echo "</table>";
|
||||
require ("general/footer.php");
|
||||
@ -566,8 +566,8 @@ if ((isset($_GET["update_module"])) && (!isset($_POST["oid"])) && (!isset($_POST
|
||||
|
||||
if (isset($_GET["update_alert"])){
|
||||
$id_grupo = dame_id_grupo($id_agente);
|
||||
if (give_acl($id_user, $id_grupo, "LW")==0){
|
||||
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to update an alert without admin rights");
|
||||
if (give_acl($config["id_user"], $id_grupo, "LW")==0){
|
||||
audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation","Trying to update an alert without admin rights");
|
||||
require ("general/noaccess.php");
|
||||
echo "</table>";
|
||||
require ("general/footer.php");
|
||||
@ -617,8 +617,8 @@ if ((isset($_POST["update_module"])) || (isset($_POST["insert_module"]))) {
|
||||
$id_agente_modulo = $_POST["id_agente_modulo"];
|
||||
}
|
||||
$id_grupo = dame_id_grupo($id_agente);
|
||||
if (give_acl($id_user, $id_grupo, "AW")==0){
|
||||
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to create a module without admin rights");
|
||||
if (give_acl($config["id_user"], $id_grupo, "AW")==0){
|
||||
audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation","Trying to create a module without admin rights");
|
||||
require ("general/noaccess.php");
|
||||
echo "</table>";
|
||||
require ("general/footer.php");
|
||||
@ -763,8 +763,8 @@ if (((!isset($_POST["nc"]) OR ($_POST["nc"]==-1))) && (!isset($_POST["oid"])) &&
|
||||
// =================
|
||||
if (isset($_GET["delete_module"])){ // DELETE agent module !
|
||||
$id_borrar_modulo = $_GET["delete_module"];
|
||||
$id_grupo = dame_id_grupo($id_agente); if (give_acl($id_user, $id_grupo, "AW")==0){
|
||||
audit_db($id_user,$REMOTE_ADDR, "ACL Violation",
|
||||
$id_grupo = dame_id_grupo($id_agente); if (give_acl($config["id_user"], $id_grupo, "AW")==0){
|
||||
audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation",
|
||||
"Trying to delete a module without admin rights");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
|
@ -102,15 +102,22 @@ if ((isset($_GET["operacion"])) AND ($update_agent == -1) AND ($update_group ==
|
||||
else
|
||||
$sql1 = 'SELECT * FROM tagente ORDER BY nombre';
|
||||
echo '<select name="origen" style="width:200px">';
|
||||
if (($update_agent != 1) AND ($origen != -1))
|
||||
echo "<option value=".$_POST["origen"].">".dame_nombre_agente($origen)."</option>";
|
||||
if (($update_agent != 1) AND ($origen != -1)){
|
||||
$agent_name_src = dame_nombre_agente ($origen);
|
||||
$source = $config["remote_config"]."/". md5($agent_name_src);
|
||||
if (file_exists($source))
|
||||
echo "<option value=".$_POST["origen"].">" . $agent_name_src . "</option>";
|
||||
}
|
||||
$result=mysql_query($sql1);
|
||||
while ($row=mysql_fetch_array($result)){
|
||||
if (give_acl ($config["id_user"], $row["id_grupo"], "AR")){
|
||||
if ( $origen != $row["id_agente"])
|
||||
if ( $origen != $row["id_agente"]){
|
||||
$source = $config["remote_config"]."/". md5($row["nombre"]);
|
||||
if (file_exists($source))
|
||||
echo "<option value=".$row["id_agente"].">".$row["nombre"]."</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '</select>';
|
||||
|
||||
echo ' ';
|
||||
|
@ -18,8 +18,8 @@
|
||||
// Load global vars
|
||||
require("include/config.php");
|
||||
|
||||
if (give_acl($id_user, 0, "AW") != 1) {
|
||||
audit_db($id_user,$REMOTE_ADDR, "ACL Violation",
|
||||
if (give_acl($config["id_user"], 0, "AW") != 1) {
|
||||
audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation",
|
||||
"Trying to access Agent Management");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
@ -40,7 +40,7 @@ if (isset($_GET["borrar_agente"])){ // if delete agent
|
||||
$id_agente = entrada_limpia($_GET["borrar_agente"]);
|
||||
$agent_name = dame_nombre_agente($id_agente);
|
||||
$id_grupo = dame_id_grupo($id_agente);
|
||||
if (give_acl($id_user, $id_grupo, "AW")==1){
|
||||
if (give_acl($config["id_user"], $id_grupo, "AW")==1){
|
||||
// Firts delete from agents table
|
||||
$sql_delete= "DELETE FROM tagente
|
||||
WHERE id_agente = ".$id_agente;
|
||||
@ -87,7 +87,7 @@ if (isset($_GET["borrar_agente"])){ // if delete agent
|
||||
}
|
||||
$sql = "DELETE FROM taddress_agent where id_agent = $id_agente";
|
||||
$result=mysql_query($sql);
|
||||
audit_db($id_user,$REMOTE_ADDR, "Agent '$agent_name' deleted", "Agent Management");
|
||||
audit_db($config["id_user"],$REMOTE_ADDR, "Agent '$agent_name' deleted", "Agent Management");
|
||||
|
||||
// Delete remote configuration
|
||||
$agent_md5 = md5($agent_name, FALSE);
|
||||
@ -99,7 +99,7 @@ if (isset($_GET["borrar_agente"])){ // if delete agent
|
||||
unlink ($file_name);
|
||||
}
|
||||
} else { // NO permissions.
|
||||
audit_db($id_user,$REMOTE_ADDR, "ACL Violation",
|
||||
audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation",
|
||||
"Trying to delete agent '$agent_name'");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
@ -128,7 +128,7 @@ if ( $ag_group > 1 ){
|
||||
"</option>";
|
||||
}
|
||||
echo "<option value=1>".dame_nombre_grupo(1)."</option>"; // Group all is always active
|
||||
$mis_grupos = list_group ($id_user); //Print combo for groups and set an array with all groups
|
||||
$mis_grupos = list_group ($config["id_user"]); //Print combo for groups and set an array with all groups
|
||||
echo "</select>";
|
||||
echo "<td valign='top'>
|
||||
<noscript>
|
||||
@ -171,13 +171,13 @@ if ($ag_group > 1){
|
||||
AND $search_sql ORDER BY nombre";
|
||||
} else {
|
||||
// Is admin user ??
|
||||
if (get_db_sql ("SELECT * FROM tusuario WHERE id_usuario ='$id_user'", "nivel") == 1){
|
||||
if (get_db_sql ("SELECT * FROM tusuario WHERE id_usuario ='".$config["id_user"]."'", "nivel") == 1){
|
||||
$sql1 = "SELECT * FROM tagente WHERE $search_sql ORDER BY nombre, id_grupo LIMIT $offset, ".$config["block_size"];
|
||||
$sql2="SELECT COUNT(id_agente) FROM tagente WHERE $search_sql ORDER BY nombre, id_grupo";
|
||||
} else {
|
||||
$sql1="SELECT * FROM tagente WHERE $search_sql AND id_grupo IN (SELECT id_grupo FROM tusuario_perfil WHERE id_usuario='$id_user')
|
||||
$sql1="SELECT * FROM tagente WHERE $search_sql AND id_grupo IN (SELECT id_grupo FROM tusuario_perfil WHERE id_usuario='".$config["id_user"]."')
|
||||
ORDER BY nombre, id_grupo LIMIT $offset, ".$config["block_size"];
|
||||
$sql2="SELECT COUNT(id_agente) FROM tagente WHERE $search_sql AND id_grupo IN (SELECT id_grupo FROM tusuario_perfil WHERE id_usuario='$id_user') ORDER BY nombre, id_grupo";
|
||||
$sql2="SELECT COUNT(id_agente) FROM tagente WHERE $search_sql AND id_grupo IN (SELECT id_grupo FROM tusuario_perfil WHERE id_usuario='".$config["id_user"]."') ORDER BY nombre, id_grupo";
|
||||
}
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@ if (mysql_num_rows($result)){
|
||||
$tdcolor = "datos2";
|
||||
$color = 1;
|
||||
}
|
||||
if (give_acl($id_user, $id_grupo, "AW")==1){
|
||||
if (give_acl($config["id_user"], $id_grupo, "AW")==1){
|
||||
// Agent name
|
||||
echo "<tr><td class='$tdcolor'>";
|
||||
if ($row["disabled"] == 1){
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
// Pandora FMS - the Free monitoring system
|
||||
// ========================================
|
||||
// Copyright (c) 2004-2007 Sancho Lerena, slerena@gmail.com
|
||||
// Main PHP/SQL code development and project architecture and management
|
||||
// Copyright (c) 2005-2007 Artica Soluciones Tecnologicas, info@artica.es
|
||||
// Pandora FMS - the Flexible Monitoring System
|
||||
// ============================================
|
||||
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
|
||||
// Please see http://pandora.sourceforge.net for full contribution list
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
@ -381,7 +380,8 @@ if ($edit_sla_report_content) {
|
||||
$periods[12] = '12 '.lang_string ('hours');
|
||||
$periods[24] = lang_string ('last_day');
|
||||
$periods[48] = lang_string ('two_days');
|
||||
$periods[360] = lang_string ('last_week');
|
||||
$periods[180] = lang_string ('last_week');
|
||||
$periods[360] = lang_string ('last_two_weeks');
|
||||
$periods[720] = lang_string ('last_month');
|
||||
$periods[4320] = lang_string ('six_months');
|
||||
$table->data[1][1] = print_select ($periods, 'period', 0, '', '--', 0, true);
|
||||
|
@ -1,12 +1,13 @@
|
||||
<?php
|
||||
|
||||
// Pandora FMS - the Free monitoring system
|
||||
// ========================================
|
||||
// Copyright (c) 2004-2007 Sancho Lerena, slerena@gmail.com
|
||||
// Main PHP/SQL code development and project architecture and management
|
||||
// Pandora FMS - the Flexible Monitoring System
|
||||
// ============================================
|
||||
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
|
||||
// Please see http://pandora.sourceforge.net for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; version 2
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
@ -14,17 +15,16 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
// Load global vars
|
||||
|
||||
require("include/config.php");
|
||||
if ((comprueba_login() != 0) || (give_acl($id_user, 0, "PM")!=1)) {
|
||||
audit_db($id_user,$REMOTE_ADDR, "ACL Violation",
|
||||
"Trying to access Agent Management");
|
||||
// Load global vars
|
||||
global $config;
|
||||
|
||||
if ( (give_acl($id_user, 0, "LM")==0)){
|
||||
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Recon Task Management");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------
|
||||
// DELETE A RECON TASKs
|
||||
// --------------------------------
|
||||
@ -39,22 +39,28 @@ if (isset($_GET["delete"])) {
|
||||
}
|
||||
|
||||
|
||||
if ((isset($_GET["update"])) OR ((isset($_GET["create"])))){
|
||||
$name = entrada_limpia($_POST["name"]);
|
||||
$network = entrada_limpia($_POST["network"]);
|
||||
$description = entrada_limpia($_POST["description"]);
|
||||
$id_recon_server = entrada_limpia($_POST["id_recon_server"]);
|
||||
$interval = entrada_limpia($_POST["interval"]);
|
||||
$id_group = entrada_limpia($_POST["id_group"]);
|
||||
$create_incident = entrada_limpia($_POST["create_incident"]);
|
||||
$id_network_profile = entrada_limpia($_POST["id_network_profile"]);
|
||||
$id_os = get_parameter ("id_os", 10);
|
||||
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
// UPDATE A RECON TASK
|
||||
// --------------------------------
|
||||
if (isset($_GET["update"])) {
|
||||
$id = entrada_limpia($_GET["update"]);
|
||||
$name = entrada_limpia($_POST["name"]);
|
||||
$network = entrada_limpia($_POST["network"]);
|
||||
$description = entrada_limpia($_POST["description"]);
|
||||
$id_server = entrada_limpia($_POST["id_server"]);
|
||||
$type = entrada_limpia($_POST["type"]);
|
||||
$server_assigned = entrada_limpia($_POST["server_assigned"]);
|
||||
$interval = entrada_limpia($_POST["interval"]);
|
||||
$id_group = entrada_limpia($_POST["id_group"]);
|
||||
$create_incident = entrada_limpia($_POST["create_incident"]);
|
||||
$id_network_profile = entrada_limpia($_POST["id_network_profile"]);
|
||||
$sql = "UPDATE trecon_task SET name = '".$name."', subnet = '".$network."', description='".$description."', type = $type, id_network_server = $id_server, create_incident = $create_incident, id_group = $id_group, interval_sweep = $interval, id_network_server_assigned = $server_assigned, id_network_profile = $id_network_profile WHERE id_rt = $id";
|
||||
$sql = "UPDATE trecon_task SET id_os = $id_os, name = '$name', subnet = '$network',
|
||||
description='$description', id_recon_server = $id_recon_server,
|
||||
create_incident = $create_incident, id_group = $id_group, interval_sweep = $interval,
|
||||
id_network_profile = $id_network_profile WHERE id_rt = $id";
|
||||
$result=mysql_query($sql);
|
||||
if ($result)
|
||||
echo "<h3 class='suc'>".$lang_label["modify_ok"]."</h3>";
|
||||
@ -66,17 +72,7 @@ if (isset($_GET["update"])) {
|
||||
// CREATE A RECON TASK
|
||||
// --------------------------------
|
||||
if (isset($_GET["create"])) {
|
||||
$name = entrada_limpia($_POST["name"]);
|
||||
$network = entrada_limpia($_POST["network"]);
|
||||
$description = entrada_limpia($_POST["description"]);
|
||||
$id_server = entrada_limpia($_POST["id_server"]);
|
||||
$type = entrada_limpia($_POST["type"]);
|
||||
$server_assigned = entrada_limpia($_POST["server_assigned"]);
|
||||
$interval = entrada_limpia($_POST["interval"]);
|
||||
$id_group = entrada_limpia($_POST["id_group"]);
|
||||
$create_incident = entrada_limpia($_POST["create_incident"]);
|
||||
$id_network_profile = entrada_limpia($_POST["id_network_profile"]);
|
||||
$sql = "INSERT INTO trecon_task (name, subnet, description, type, id_network_server, create_incident, id_group, id_network_server_assigned, id_network_profile, interval_sweep) VALUES ( '$name', '$network', '$description', $type, $id_server, $create_incident, $id_group, $server_assigned, $id_network_profile, $interval)";
|
||||
$sql = "INSERT INTO trecon_task (name, subnet, description, id_recon_server, create_incident, id_group, id_network_profile, interval_sweep, id_os) VALUES ( '$name', '$network', '$description', $id_recon_server, $create_incident, $id_group, $id_network_profile, $interval, $id_os)";
|
||||
$result=mysql_query($sql);
|
||||
if ($result)
|
||||
echo "<h3 class='suc'>".$lang_label["create_ok"]."</h3>";
|
||||
@ -93,16 +89,16 @@ $query="SELECT * FROM trecon_task";
|
||||
$result=mysql_query($query);
|
||||
$color=1;
|
||||
if (mysql_num_rows($result)){
|
||||
echo "<table cellpadding='4' cellspacing='4' witdh='720' class='databox'>";
|
||||
echo "<table cellpadding='4' cellspacing='4' width='700' class='databox'>";
|
||||
echo "<tr><th class='datos'>".$lang_label["name"];
|
||||
echo "<th class='datos'>".$lang_label['type'];
|
||||
echo "<th class='datos'>".$lang_label['network'];
|
||||
echo "<th class='datos'>".$lang_label['network_profile'];
|
||||
echo "<th class='datos'>".$lang_label['group'];
|
||||
echo "<th class='datos'>".$lang_label['incident'];
|
||||
echo "<th class='datos'>".$lang_label['interval'];
|
||||
echo "<th class='datos'>".$lang_label['network_server'];
|
||||
echo "<th class='datos'>X";
|
||||
echo "<th class='datos'>".lang_string ('type');
|
||||
echo "<th class='datos'>".lang_string ('network');
|
||||
echo "<th class='datos'>".lang_string ('network_profile');
|
||||
echo "<th class='datos'>".lang_string ('group');
|
||||
echo "<th class='datos'>".lang_string ('incident');
|
||||
echo "<th class='datos'>".lang_string ('OS');
|
||||
echo "<th class='datos'>".lang_string ('interval');
|
||||
echo "<th class='datos'>".lang_string ('Action');
|
||||
}
|
||||
while ($row=mysql_fetch_array($result)){
|
||||
$id_rt = $row["id_rt"];
|
||||
@ -111,12 +107,13 @@ while ($row=mysql_fetch_array($result)){
|
||||
$description = $row["description"];
|
||||
// $id_server = $row["server"];
|
||||
$type = $row["type"];
|
||||
$id_network_server = $row["id_network_server"];
|
||||
$id_recon_server = $row["id_recon_server"];
|
||||
$interval = $row["interval_sweep"];
|
||||
$id_group = $row["id_group"];
|
||||
$create_incident = $row["create_incident"];
|
||||
$id_network_profile = $row["id_network_profile"];
|
||||
$id_network_server_assigned = $row["id_network_server_assigned"];
|
||||
$id_os = $row["id_os"];
|
||||
|
||||
if ($color == 1){
|
||||
$tdcolor = "datos";
|
||||
$color = 0;
|
||||
@ -144,22 +141,30 @@ while ($row=mysql_fetch_array($result)){
|
||||
// GROUP
|
||||
echo "</td><td class='$tdcolor' align='center'>";
|
||||
echo "<img class='bot' src='images/groups_small/".show_icon_group($id_group).".png' alt=''>";
|
||||
|
||||
// INCIDENT
|
||||
echo "</td><td class='$tdcolor'>";
|
||||
if ($create_incident == 1)
|
||||
echo $lang_label["yes"];
|
||||
else
|
||||
echo $lang_label["no"];
|
||||
|
||||
// OS
|
||||
echo "</td><td class='$tdcolor'>";
|
||||
if ($id_os > 0){
|
||||
$icon = get_db_sql ("SELECT icon_name FROM tconfig_os WHERE id_os = $id_os");
|
||||
echo "<img src='images/$icon'>";
|
||||
}
|
||||
|
||||
// INTERVAL
|
||||
echo "</td><td class='$tdcolor' align='center'>";
|
||||
echo human_time_description_raw($interval);
|
||||
|
||||
// Network server assigned
|
||||
echo "</td><td class='$tdcolor'f9 >";
|
||||
echo "<a href='index.php?sec=gserver&sec2=godmode/servers/modificar_server&server=$id_network_server_assigned'>".give_server_name($id_network_server_assigned)."</a>";;
|
||||
|
||||
// ACTION
|
||||
echo "</td><td class='".$tdcolor."' align='center'><a href='index.php?sec=gservers&sec2=godmode/servers/manage_recontask&delete=$id_rt'><img src='images/cross.png' border='0'></td></tr>";
|
||||
echo "</td><td class='".$tdcolor."' align='center'><a href='index.php?sec=gservers&sec2=godmode/servers/manage_recontask&delete=$id_rt'><img src='images/cross.png' border='0'>";
|
||||
echo " ";
|
||||
echo "<a href='index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&update=$id_rt'><img src='images/config.png'></A>";
|
||||
echo "</td></tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
|
||||
@ -167,7 +172,7 @@ if (!mysql_num_rows($result)){
|
||||
echo "<div class='nf'>".$lang_label["no_rtask"]."</div>";
|
||||
}
|
||||
|
||||
echo "<table width='680'>";
|
||||
echo "<table width='700'>";
|
||||
echo "<tr><td align='right'>";
|
||||
echo "<form method='post' action='index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&create'>";
|
||||
echo "<input type='submit' class='sub next' name='crt' value='".$lang_label["create"]."'>";
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?PHP
|
||||
// Pandora FMS - the Free monitoring system
|
||||
// ========================================
|
||||
// Copyright (c) 2004-2007 Sancho Lerena, slerena@openideas.info
|
||||
// Copyright (c) 2005-2007 Artica Soluciones Tecnologicas
|
||||
// Pandora FMS - the Flexible Monitoring System
|
||||
// ============================================
|
||||
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
|
||||
// Please see http://pandora.sourceforge.net for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
@ -32,29 +32,29 @@ if (isset($_GET["update"])){ // Edit mode
|
||||
$row=mysql_fetch_array($result);
|
||||
$name = $row["name"];
|
||||
$network = $row["subnet"];
|
||||
$id_recon_server = $row["id_recon_server"];
|
||||
$description = $row["description"];
|
||||
$type = $row["type"];
|
||||
$id_network_server = $row["id_network_server"];
|
||||
$interval = $row["interval_sweep"];
|
||||
$id_group = $row["id_group"];
|
||||
$create_incident = $row["create_incident"];
|
||||
$id_network_profile = $row["id_network_profile"];
|
||||
$id_network_server_assigned = $row["id_network_server_assigned"];
|
||||
$id_os = $row["id_os"];
|
||||
|
||||
} elseif (isset($_GET["create"])){
|
||||
$id_rt = -1;
|
||||
$name = "";
|
||||
$network = "";
|
||||
$description = "";
|
||||
$id_server = 0;
|
||||
$id_recon_server = 0;
|
||||
$type = 1;
|
||||
$id_network_server = 0;
|
||||
$interval = 43200;
|
||||
$id_group = 1;
|
||||
$create_incident = 1;
|
||||
$id_network_profile = 1;
|
||||
$id_network_server_assigned = 0;
|
||||
$id_os = 10; // Other
|
||||
}
|
||||
|
||||
echo '<h2>'.$lang_label["view_servers"].' > ';
|
||||
echo $lang_label["manage_recontask"];
|
||||
pandora_help ("recontask");
|
||||
@ -67,16 +67,16 @@ if ($id_rt != -1)
|
||||
else
|
||||
echo "<form name='modulo' method='post' action='index.php?sec=gservers&sec2=godmode/servers/manage_recontask&create=1'>";
|
||||
|
||||
//name
|
||||
// Name
|
||||
echo '<tr><td class="datos2">'.$lang_label["task_name"];
|
||||
echo "<td class='datos2'><input type='text' name='name' size='25' value='$name'>";
|
||||
//-- Recon server
|
||||
|
||||
// Recon server
|
||||
echo "<td class='datos2'>".$lang_label["recon_server"];
|
||||
echo '<a href="#" class="tip"> <span>'.$lang_label["recon_server_help"].'</span></a>';
|
||||
echo "<td class='datos2'>";
|
||||
echo '<select name="id_server">';
|
||||
echo "<option value='$id_network_server'>". give_server_name($id_network_server);
|
||||
echo '<select name="id_recon_server">';
|
||||
echo "<option value='$id_recon_server'>" . give_server_name($id_recon_server);
|
||||
$sql1="SELECT id_server, name FROM tserver WHERE recon_server = 1 ORDER BY name ";
|
||||
$result=mysql_query($sql1);
|
||||
while ($row=mysql_fetch_array($result)){
|
||||
@ -89,6 +89,7 @@ echo "<tr>";
|
||||
echo '<td class="datos">'.$lang_label["network"].'</td>';
|
||||
echo '<td class="datos">';
|
||||
echo '<input type="text" name="network" size="25" value="'.$network.'"></td>';
|
||||
|
||||
// Interval
|
||||
echo '<td class="datos">'.$lang_label["interval"].'</td>';
|
||||
echo '<td class="datos">';
|
||||
@ -112,7 +113,7 @@ echo "</select>";
|
||||
|
||||
// Network profile
|
||||
echo "<tr>";
|
||||
echo "<td class='datos2'>".$lang_label["network_profile"]."</td>";
|
||||
echo "<td class='datos2'>".lang_string ("network_profile") . "</td>";
|
||||
echo "<td class='datos2'>";
|
||||
echo "<select name='id_network_profile'>";
|
||||
echo "<option value='$id_network_profile'>".give_network_profile_name($id_network_profile);
|
||||
@ -121,18 +122,19 @@ $result=mysql_query($sql1);
|
||||
while ($row=mysql_fetch_array($result))
|
||||
echo "<option value='".$row["id_np"]."'>".$row["name"]."</option>";
|
||||
echo "</select></td>";
|
||||
//-- Network server
|
||||
echo "<td class='datos2'>".$lang_label["network_server"];
|
||||
echo '<a href="#" class="tip"> <span>'.$lang_label["network_server2_help"].'</span></a>';
|
||||
|
||||
// OS
|
||||
echo "<td class='datos2'>". lang_string ("OS") . "</td>";
|
||||
echo "<td class='datos2'>";
|
||||
echo '<select name="server_assigned">';
|
||||
$sql1="SELECT id_server, name FROM tserver WHERE network_server = 1 ORDER BY name ";
|
||||
echo "<select name='id_os'>";
|
||||
if ($id_os != 0)
|
||||
echo "<option value='$id_os'>".get_db_sql ("SELECT name FROM tconfig_os WHERE id_os = $id_os");
|
||||
echo "<option value=-1>". lang_string ("Any");
|
||||
$sql1 = "SELECT * FROM tconfig_os ORDER BY name";
|
||||
$result=mysql_query($sql1);
|
||||
echo "<option value='$id_network_server_assigned'>". give_server_name($id_network_server_assigned);
|
||||
while ($row=mysql_fetch_array($result)){
|
||||
echo "<option value='".$row["id_server"]."'>".$row["name"]."</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
while ($row=mysql_fetch_array($result))
|
||||
echo "<option value='".$row["id_os"]."'>".$row["name"]."</option>";
|
||||
echo "</select></td>";
|
||||
|
||||
// Group
|
||||
echo "<tr>";
|
||||
@ -146,19 +148,12 @@ while ($row=mysql_fetch_array($result))
|
||||
echo "<option value='".$row["id_grupo"]."'>".$row["nombre"]."</option>";
|
||||
echo "</select></td>";
|
||||
|
||||
// TYPE
|
||||
echo "<td class='datos'>".$lang_label["type"];
|
||||
echo "<td class='datos'>";
|
||||
echo "<select name='type'>";
|
||||
echo "<option value='1'>ICMP</option>";
|
||||
echo "</select>";
|
||||
|
||||
// Incident
|
||||
echo "<tr>";
|
||||
echo "<td class='datos2'>".$lang_label["incident"]."</td>";
|
||||
echo "<td class='datos2'>";
|
||||
echo "<select name='create_incident'>";
|
||||
if ($type == 1){
|
||||
if ($create_incident == 1){
|
||||
echo "<option value='1'>".$lang_label["yes"]."</option>";
|
||||
echo "<option value='0'>".$lang_label["no"]."</option>";
|
||||
}
|
||||
@ -169,6 +164,7 @@ else {
|
||||
echo "</select></td>";
|
||||
echo "<td class='datos2' colspan=2> </td></tr>";
|
||||
|
||||
// Comments
|
||||
echo '<tr><td class="datost">'.$lang_label["comments"];
|
||||
echo '<td class="datos" colspan=3>';
|
||||
echo '<textarea name="description" cols=70 rows=2>';
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
// Pandora FMS - the Free Monitoring System
|
||||
// ========================================
|
||||
// Pandora FMS - the Flexible Monitoring System
|
||||
// ============================================
|
||||
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
|
||||
// Please see http://pandora.sourceforge.net for full contribution list
|
||||
|
||||
@ -28,22 +28,14 @@
|
||||
// $config["homeurl"]="/pandora_console/";
|
||||
|
||||
// Do not display any ERROR
|
||||
//error_reporting(0); // Need to use active console at this moment
|
||||
error_reporting(0);
|
||||
|
||||
// Display ALL errors
|
||||
error_reporting(E_ERROR);
|
||||
// error_reporting(E_ERROR);
|
||||
|
||||
// This is directory where placed "/attachment" directory, to upload files stores.
|
||||
// This MUST be writtable by http server user, and should be in pandora root.
|
||||
// By default, Pandora adds /attachment to this, so by default is the pandora console home dir
|
||||
|
||||
$config["attachment_store"]=$config["homedir"];
|
||||
|
||||
// Default font used for graphics (a Free TrueType font included with Pandora FMS)
|
||||
$config["fontpath"] = $config["homedir"]."/reporting/FreeSans.ttf";
|
||||
|
||||
// Style (pandora by default)
|
||||
$config["style"] = "pandora";
|
||||
|
||||
include ("config_process.php");
|
||||
?>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?PHP
|
||||
|
||||
// Pandora FMS - the Free Monitoring System
|
||||
// ========================================
|
||||
// Pandora FMS - the Flexible Monitoring System
|
||||
// ============================================
|
||||
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
|
||||
// Please see http://pandora.sourceforge.net for full contribution list
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
//Pandora Version
|
||||
if (!isset ($build_version))
|
||||
$build_version = "PC080610";
|
||||
$build_version = "PC080805";
|
||||
if (!isset ($pandora_version))
|
||||
$pandora_version = "v2.0-dev";
|
||||
|
||||
@ -48,7 +48,7 @@ if (! mysql_connect ($config["dbhost"], $config["dbuser"], $config["dbpass"])) {
|
||||
<a href="index.php"><img src="images/pandora_logo.png" border="0"></a>
|
||||
</div>
|
||||
<div id="db_ftxt">
|
||||
<h1 id="log_f" class="error">Pandora Console Error DB-001</h1>
|
||||
<h1 id="log_f" class="error">Pandora FMS Console Error DB-001</h1>
|
||||
Cannot connect with Database, please check your database setup in the
|
||||
<b>./include/config.php</b> file and read documentation.<i><br><br>
|
||||
Probably any of your user/database/hostname values are incorrect or
|
||||
@ -72,7 +72,7 @@ if (sizeof ($configs) == 0) {
|
||||
<a href="index.php"><img src="images/pandora_logo.png" border="0"></a>
|
||||
</div>
|
||||
<div id="db_ftxt">
|
||||
<h1 id="log_f" class="error">Pandora Console Error DB-002</h1>
|
||||
<h1 id="log_f" class="error">Pandora FMS Console Error DB-002</h1>
|
||||
Cannot load configuration variables. Please check your database setup in the
|
||||
<b>./include/config.php</b> file and read documentation.<i><br><br>
|
||||
Probably database schema is created but there are no data inside it or you have a problem with DB access credentials.
|
||||
|
@ -184,6 +184,8 @@ if (! isset ($_SESSION['id_usuario']) && isset ($_GET["login"])) {
|
||||
} else {
|
||||
// There is session for id_usuario
|
||||
$config["id_user"] = $_SESSION["id_usuario"];
|
||||
// Temporal fix
|
||||
$id_user = $config["id_user"];
|
||||
}
|
||||
|
||||
// Log off
|
||||
|
@ -31,11 +31,17 @@ $timestamp_lof = $row_t["ultimo_contacto"];
|
||||
$intervalo_agente = $row_t["intervalo"];
|
||||
|
||||
// Get last packet
|
||||
$sql3='SELECT * FROM tagente_modulo, tagente_estado WHERE tagente_modulo.disabled = 0 AND tagente_modulo.id_agente = '.$id_agente.' AND tagente_estado.utimestamp != 0 AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo ORDER BY id_module_group, nombre';
|
||||
$label_group=0;
|
||||
$sql3 = 'SELECT * FROM tagente_modulo, tagente_estado WHERE tagente_modulo.disabled = 0 AND tagente_modulo.id_agente = ' . $id_agente . ' AND tagente_estado.utimestamp != 0 AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo ORDER BY id_module_group, nombre';
|
||||
$label_group = 0;
|
||||
$last_label = "";
|
||||
|
||||
// Title
|
||||
echo "<h2>".$lang_label["ag_title"]." > ";
|
||||
echo $lang_label["last_data_chunk"]."</h2>";
|
||||
echo $lang_label["last_data_chunk"];
|
||||
echo " <a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data'><img src='images/refresh.png'></A>";
|
||||
echo "</h2>";
|
||||
|
||||
|
||||
$result3=mysql_query($sql3);
|
||||
if (mysql_num_rows ($result3)) {
|
||||
echo "<table width='750' cellpadding='3' cellspacing='3' class='databox'>";
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
// Pandora FMS - the Free Monitoring System
|
||||
// ========================================
|
||||
// Pandora FMS - the Flexible Monitoring System
|
||||
// ============================================
|
||||
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
|
||||
// Please see http://pandora.sourceforge.net for full contribution list
|
||||
|
||||
@ -64,7 +64,11 @@ $table->data = array ();
|
||||
foreach ($servers as $server) {
|
||||
$data = array ();
|
||||
$serverinfo = server_status ($server['id_server']);
|
||||
$data[0] = $server['name'];
|
||||
if ($server["recon_server"]==1)
|
||||
$data[0] = "<b><a href='index.php?sec=estado_server&sec2=operation/servers/view_server_detail&server_id=".$server["id_server"]."'>".$server['name']."</A></b>";
|
||||
else
|
||||
$data[0] = "<b>".$server['name']."</b>";
|
||||
|
||||
if ($server['status'] == 0){
|
||||
$data[1] = '<img src="images/pixel_red.png" width="20" height="20">';
|
||||
} else {
|
||||
|
@ -1,60 +1,78 @@
|
||||
<?php
|
||||
|
||||
// Pandora FMS - the Free Monitoring System
|
||||
// ========================================
|
||||
// Copyright (c) 2004-2008 Sancho Lerena, slerena@gmail.com
|
||||
// Main PHP/SQL code development, project architecture and management.
|
||||
// Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com
|
||||
// CSS and some PHP code additions
|
||||
// Pandora FMS - the Flexible Monitoring System
|
||||
// ============================================
|
||||
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
|
||||
// Please see http://pandora.sourceforge.net for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
// Load global vars
|
||||
require("include/config.php");
|
||||
|
||||
if (comprueba_login() != 0) {
|
||||
audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation","Trying to access recon task viewer");
|
||||
require ($config["homeurl"]."/general/noaccess.php");
|
||||
}
|
||||
|
||||
if (give_acl($id_user, 0, "AR")==0) {
|
||||
audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation","Trying to access recon task viewer");
|
||||
require ($config["homeurl"]."/general/noaccess.php");
|
||||
}
|
||||
|
||||
|
||||
$modules_server = 0;
|
||||
$total_modules = 0;
|
||||
$total_modules_data = 0;
|
||||
|
||||
if ((comprueba_login() == 0) AND (give_acl($id_user, 0, "AR")==1) ) {
|
||||
|
||||
// --------------------------------
|
||||
// FORCE A RECON TASK
|
||||
// --------------------------------
|
||||
if (give_acl($id_user, 0, "PM")==1){
|
||||
// --------------------------------
|
||||
// FORCE A RECON TASK
|
||||
// --------------------------------
|
||||
if (give_acl($id_user, 0, "PM")==1){
|
||||
if (isset($_GET["force"])) {
|
||||
$id = entrada_limpia($_GET["force"]);
|
||||
$sql = "UPDATE trecon_task set utimestamp = 0, status = -1 WHERE id_rt = $id ";
|
||||
$result = mysql_query($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$id_server = get_parameter ("server_id", -1);
|
||||
$sql = "SELECT * FROM tserver where id_server = $id_server";
|
||||
$result=mysql_query($sql);
|
||||
$row=mysql_fetch_array($result);
|
||||
$server_name = $row["name"];
|
||||
$id_server = $row[0];
|
||||
$id_server = get_parameter ("server_id", -1);
|
||||
$sql = "SELECT * FROM tserver WHERE id_server = $id_server";
|
||||
$result=mysql_query($sql);
|
||||
$row=mysql_fetch_array($result);
|
||||
$server_name = $row["name"];
|
||||
$id_server = $row[0];
|
||||
|
||||
echo "<h2>".$lang_label["server_detail"]." - $server_name ";
|
||||
echo " ";
|
||||
echo "<a href='index.php?sec=estado_server&sec2=operation/servers/view_server_detail&server_id=$id_server'>";
|
||||
echo "<img src='images/refresh.png'>";
|
||||
echo "</A>";
|
||||
echo "</h2>";
|
||||
// Show network tasks for Recon Server
|
||||
if ($row["recon_server"]){
|
||||
$sql = "SELECT * FROM trecon_task where id_network_server = $id_server";
|
||||
echo "<h2>". lang_string ("server_detail") . " - $server_name ";
|
||||
echo " ";
|
||||
echo "<a href='index.php?sec=estado_server&sec2=operation/servers/view_server_detail&server_id=$id_server'>";
|
||||
echo "<img src='images/refresh.png'>";
|
||||
echo "</A>";
|
||||
echo "</h2>";
|
||||
// Show network tasks for Recon Server
|
||||
if ($row["recon_server"]){
|
||||
$sql = "SELECT * FROM trecon_task WHERE id_recon_server = $id_server";
|
||||
// Connect DataBase
|
||||
$result=mysql_query($sql);
|
||||
if (mysql_num_rows($result)){
|
||||
echo "<table cellpadding='4' cellspacing='4' width='760' class='databox'>";
|
||||
echo "<tr><th class='datos'><th class='datos'>".$lang_label["task_name"]."</th>";
|
||||
echo "<tr><th class='datos'>".lang_string ("Force")."</th>";
|
||||
echo "<th class='datos'>".$lang_label["task_name"]."</th>";
|
||||
echo "<th class='datos'>".$lang_label['interval']."</th>";
|
||||
echo "<th class='datos'>".$lang_label['network']."</th>";
|
||||
echo "<th class='datos'>".$lang_label['type']."</th>";
|
||||
echo "<th class='datos'>".$lang_label['status']."</th>";
|
||||
echo "<th class='datos'>".$lang_label['network_profile']."</th>";
|
||||
echo "<th class='datos'>".$lang_label['group']."</th>";
|
||||
echo "<th class='datos'>".lang_string ("OS") ."</th>";
|
||||
echo "<th class='datos'>".$lang_label['progress']."</th>";
|
||||
echo "<th class='datos'>".$lang_label['lastupdate']."</th>";
|
||||
echo "<th class='datos'></th>";
|
||||
@ -74,8 +92,8 @@ if ((comprueba_login() == 0) AND (give_acl($id_user, 0, "AR")==1) ) {
|
||||
$utimestamp = $row["utimestamp"];
|
||||
$interval = $row["interval_sweep"];
|
||||
$create_incident = $row["create_incident"];
|
||||
$id_network_server_assigned = $row["id_network_server_assigned"];
|
||||
$subnet = $row["subnet"];
|
||||
$id_os = $row["id_os"];
|
||||
$id_group = $row["id_group"];
|
||||
$id_network_profile = $row["id_network_profile"];
|
||||
$type = $row["type"];
|
||||
@ -99,14 +117,7 @@ if ((comprueba_login() == 0) AND (give_acl($id_user, 0, "AR")==1) ) {
|
||||
// Subnet
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo $subnet;
|
||||
// Type
|
||||
echo "<td class='$tdcolor' align='center'>";
|
||||
if ($type == 1){
|
||||
echo "ICMP";
|
||||
}
|
||||
elseif ($type == 2){
|
||||
echo "TCP Port";
|
||||
}
|
||||
|
||||
// status
|
||||
echo "<td class='$tdcolor' align='center'>";
|
||||
if ($status == -1)
|
||||
@ -121,6 +132,13 @@ if ((comprueba_login() == 0) AND (give_acl($id_user, 0, "AR")==1) ) {
|
||||
echo "<td class='$tdcolor' align='center'>";
|
||||
echo "<img class='bot' src='images/groups_small/".show_icon_group($id_group).".png'>";
|
||||
|
||||
// OS
|
||||
echo "<td class='$tdcolor' align='center'>";
|
||||
if ($id_os > 0){
|
||||
$icon = get_db_sql ("SELECT icon_name FROM tconfig_os WHERE id_os = $id_os");
|
||||
echo "<img src='images/$icon'>";
|
||||
}
|
||||
|
||||
// Progress
|
||||
echo "<td class='$tdcolor' align='center'>";
|
||||
if ($status < 0)
|
||||
@ -143,6 +161,6 @@ if ((comprueba_login() == 0) AND (give_acl($id_user, 0, "AR")==1) ) {
|
||||
} else {
|
||||
echo "This server has no recon tasks assigned";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -21,15 +21,16 @@
|
||||
-- Pandora FMS official tables for 2.0 version --
|
||||
--------------------------------------------------------------
|
||||
|
||||
CREATE TABLE `taddress` (
|
||||
`id_a` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`ip` varchar(15) NOT NULL default '',
|
||||
CREATE TABLE IF NOT EXISTS `taddress` (
|
||||
`id_a` int(10) unsigned NOT NULL auto_increment,
|
||||
`ip` varchar(60) NOT NULL default '',
|
||||
`ip_pack` int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id_a`),
|
||||
KEY `ip` (`ip`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `taddress_agent` (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `taddress_agent` (
|
||||
`id_ag` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`id_a` bigint(20) unsigned NOT NULL default '0',
|
||||
`id_agent` mediumint(8) unsigned NOT NULL default '0',
|
||||
@ -37,99 +38,90 @@ CREATE TABLE `taddress_agent` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tagent_access` (
|
||||
`id_ac` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`id_agent` int(11) NOT NULL default '0',
|
||||
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`utimestamp` bigint(20) NOT NULL default '0',
|
||||
PRIMARY KEY (`id_ac`),
|
||||
KEY `agent_index` (`id_agent`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tagente` (
|
||||
`id_agente` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
CREATE TABLE IF NOT EXISTS `tagente` (
|
||||
`id_agente` int(10) unsigned NOT NULL auto_increment,
|
||||
`nombre` varchar(100) NOT NULL default '',
|
||||
`direccion` varchar(100) default NULL,
|
||||
`comentarios` varchar(255) default '',
|
||||
`id_grupo` int(10) unsigned NOT NULL default '0',
|
||||
`ultimo_contacto` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`modo` tinyint(1) NOT NULL default '0',
|
||||
`intervalo` int(11) NOT NULL default '300',
|
||||
`intervalo` int(11) unsigned NOT NULL default '300',
|
||||
`id_os` int(10) unsigned default '0',
|
||||
`os_version` varchar(100) default '',
|
||||
`agent_version` varchar(100) default '',
|
||||
`ultimo_contacto_remoto` datetime default '0000-00-00 00:00:00',
|
||||
`disabled` tinyint(2) NOT NULL default '0',
|
||||
`id_network_server` int(4) unsigned default '0',
|
||||
`id_plugin_server` int(4) unsigned default '0',
|
||||
`id_prediction_server` int(4) unsigned default '0',
|
||||
`id_wmi_server` int(4) unsigned default '0',
|
||||
`id_parent` mediumint(8) unsigned default '0',
|
||||
`id_network_server` smallint(4) unsigned default '0',
|
||||
`id_plugin_server` smallint(4) unsigned default '0',
|
||||
`id_prediction_server` smallint(4) unsigned default '0',
|
||||
`id_wmi_server` smallint(4) unsigned default '0',
|
||||
`id_parent` int(10) unsigned default '0',
|
||||
PRIMARY KEY (`id_agente`),
|
||||
KEY `nombre` (`nombre`),
|
||||
KEY `direccion` (`direccion`),
|
||||
KEY `disabled` (`disabled`),
|
||||
KEY `id_grupo` (`id_grupo`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
||||
|
||||
CREATE TABLE `tagente_datos` (
|
||||
`id_agente_datos` bigint(10) unsigned NOT NULL auto_increment,
|
||||
`id_agente_modulo` mediumint(8) unsigned NOT NULL default '0',
|
||||
CREATE TABLE IF NOT EXISTS `tagente_datos` (
|
||||
`id_agente_datos` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`id_agente_modulo` int(10) unsigned NOT NULL default '0',
|
||||
`datos` double(18,2) default NULL,
|
||||
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`id_agente` mediumint(8) unsigned NOT NULL default '0',
|
||||
`utimestamp` int(10) unsigned default '0',
|
||||
`id_agente` int(10) unsigned NOT NULL default '0',
|
||||
`utimestamp` bigint(20) default '0',
|
||||
PRIMARY KEY (`id_agente_datos`),
|
||||
KEY `data_index2` (`id_agente`,`id_agente_modulo`),
|
||||
KEY `data_index1` (`id_agente_modulo`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
||||
|
||||
CREATE TABLE `tagent_data_image` (
|
||||
CREATE TABLE IF NOT EXISTS `tagent_data_image` (
|
||||
`id` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`id_agent_module` mediumint(8) unsigned NOT NULL default '0',
|
||||
`id_agent` mediumint(8) unsigned NOT NULL default '0',
|
||||
`id_agent_module`int(10) unsigned NOT NULL default '0',
|
||||
`id_agent` int(10) unsigned NOT NULL default '0',
|
||||
`blob` mediumblob NOT NULL,
|
||||
`filename` varchar(255) default '',
|
||||
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`utimestamp` int(10) unsigned default '0',
|
||||
`utimestamp` int(20) unsigned default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `img_idx1` (`id_agent`,`id_agent_module`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tagente_datos_inc` (
|
||||
`id_adi` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`id_agente_modulo` bigint(20) NOT NULL default '0',
|
||||
CREATE TABLE IF NOT EXISTS `tagente_datos_inc` (
|
||||
`id_adi` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_agente_modulo` int(10) unsigned NOT NULL default '0',
|
||||
`datos` double(18,2) default NULL,
|
||||
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`utimestamp` int(10) unsigned default '0',
|
||||
`utimestamp` int(20) unsigned default '0',
|
||||
PRIMARY KEY (`id_adi`),
|
||||
KEY `data_inc_index_1` (`id_agente_modulo`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tagente_datos_string` (
|
||||
CREATE TABLE IF NOT EXISTS `tagente_datos_string` (
|
||||
`id_tagente_datos_string` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`id_agente_modulo` int(11) NOT NULL default '0',
|
||||
`id_agente_modulo` int(10) unsigned NOT NULL default '0',
|
||||
`datos` text NOT NULL,
|
||||
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`id_agente` bigint(4) unsigned NOT NULL default '0',
|
||||
`utimestamp` int(10) unsigned NOT NULL default 0,
|
||||
`id_agente` int(10) unsigned NOT NULL default '0',
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id_tagente_datos_string`),
|
||||
KEY `data_string_index_1` (`id_agente`,`id_agente_modulo`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tagente_estado` (
|
||||
`id_agente_estado` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_agente_modulo` int(20) NOT NULL default '0',
|
||||
`id_agente_modulo` int(10) NOT NULL default '0',
|
||||
`datos` varchar(255) NOT NULL default '',
|
||||
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`cambio` int(11) NOT NULL default '0',
|
||||
`estado` int(11) NOT NULL default '0',
|
||||
`id_agente` int(11) NOT NULL default '0',
|
||||
`cambio` int(4) NOT NULL default '0',
|
||||
`estado` int(4) NOT NULL default '0',
|
||||
`id_agente` int(10) NOT NULL default '0',
|
||||
`last_try` datetime default NULL,
|
||||
`utimestamp` bigint(20) NOT NULL default '0',
|
||||
`current_interval` int(10) unsigned NOT NULL default '0',
|
||||
`running_by` int(10) unsigned default '0',
|
||||
`current_interval` int(8) unsigned NOT NULL default '0',
|
||||
`running_by` smallint(4) unsigned default '0',
|
||||
`last_execution_try` bigint(20) NOT NULL default '0',
|
||||
PRIMARY KEY (`id_agente_estado`),
|
||||
KEY `status_index_1` (`id_agente_modulo`),
|
||||
@ -139,46 +131,45 @@ CREATE TABLE `tagente_estado` (
|
||||
KEY `last_execution_try` (`last_execution_try`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
/*
|
||||
|
||||
id_modulo now uses tmodule
|
||||
-- id_modulo now uses tmodule
|
||||
-- ---------------------------
|
||||
-- 1 - Data server modules (agent related modules)
|
||||
-- 2 - Network server modules
|
||||
-- 4 - Plugin server
|
||||
-- 5 - Predictive server
|
||||
-- 6 - WMI server
|
||||
|
||||
1 - Data server modules (agent related modules)
|
||||
2 - Network server modules
|
||||
4 - Plugin server
|
||||
5 - Predictive server
|
||||
6 - WMI server
|
||||
|
||||
*/
|
||||
|
||||
CREATE TABLE `tagente_modulo` (
|
||||
`id_agente_modulo` bigint(14) unsigned NOT NULL auto_increment,
|
||||
`id_agente` int(11) NOT NULL default '0',
|
||||
`id_tipo_modulo` int(11) NOT NULL default '0',
|
||||
CREATE TABLE IF NOT EXISTS `tagente_modulo` (
|
||||
`id_agente_modulo` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_agente` int(10) unsigned NOT NULL default '0',
|
||||
`id_tipo_modulo` smallint(5) NOT NULL default '0',
|
||||
`descripcion` varchar(100) NOT NULL default '',
|
||||
`nombre` varchar(100) NOT NULL default '',
|
||||
`max` bigint(20) default '0',
|
||||
`min` bigint(20) default '0',
|
||||
`module_interval` int(4) unsigned default '0',
|
||||
`tcp_port` int(4) unsigned default '0',
|
||||
`tcp_send` varchar(150) default '',
|
||||
`tcp_rcv` varchar(100) default '',
|
||||
`tcp_send` varchar(255) default '',
|
||||
`tcp_rcv` varchar(255) default '',
|
||||
`snmp_community` varchar(100) default '',
|
||||
`snmp_oid` varchar(255) default '0',
|
||||
`ip_target` varchar(100) default '',
|
||||
`id_module_group` int(4) unsigned default '0',
|
||||
`flag` tinyint(3) unsigned default '1',
|
||||
`id_modulo` int(11) unsigned default '0',
|
||||
`disabled` tinyint(3) unsigned default '0',
|
||||
`id_export` tinyint(3) unsigned default '0',
|
||||
`flag` tinyint(1) unsigned default '1',
|
||||
`id_modulo` int(10) unsigned default '0',
|
||||
`disabled` tinyint(1) unsigned default '0',
|
||||
`id_export` smallint(4) unsigned default '0',
|
||||
`plugin_user` varchar(250) default '',
|
||||
`plugin_pass` varchar(250) default '',
|
||||
`plugin_parameter` text,
|
||||
`id_plugin` int(11) default '0',
|
||||
`id_plugin` int(10) default '0',
|
||||
`post_process` double(18,2) default NULL,
|
||||
`prediction_module` bigint(14) default '0',
|
||||
`max_timeout` tinyint(3) unsigned default '0',
|
||||
PRIMARY KEY (`id_agente_modulo`,`id_agente`),
|
||||
`max_timeout` int(4) unsigned default '0',
|
||||
PRIMARY KEY (`id_agente_modulo`),
|
||||
KEY `main_idx` (`id_agente_modulo`,`id_agente`),
|
||||
KEY `tam_agente` (`id_agente`),
|
||||
KEY `id_tipo_modulo` (`id_tipo_modulo`),
|
||||
KEY `tam_plugin` (`id_plugin`),
|
||||
@ -187,7 +178,16 @@ CREATE TABLE `tagente_modulo` (
|
||||
|
||||
-- snmp_oid is also used for WMI query
|
||||
|
||||
CREATE TABLE `talert_snmp` (
|
||||
CREATE TABLE IF NOT EXISTS `tagent_access` (
|
||||
`id_ac` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`id_agent` int(10) unsigned NOT NULL default '0',
|
||||
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`utimestamp` bigint(20) NOT NULL default '0',
|
||||
PRIMARY KEY (`id_ac`),
|
||||
KEY `agent_index` (`id_agent`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `talert_snmp` (
|
||||
`id_as` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_alert` int(10) unsigned NOT NULL default '0',
|
||||
`al_field1` varchar(100) NOT NULL default '',
|
||||
@ -209,54 +209,54 @@ CREATE TABLE `talert_snmp` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `talerta` (
|
||||
CREATE TABLE IF NOT EXISTS `talerta` (
|
||||
`id_alerta` int(10) unsigned NOT NULL auto_increment,
|
||||
`nombre` varchar(100) NOT NULL default '',
|
||||
`comando` varchar(255) default '',
|
||||
`comando` varchar(500) default '',
|
||||
`descripcion` varchar(255) default '',
|
||||
PRIMARY KEY (`id_alerta`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tcompound_alert` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`id_aam` int(11) NOT NULL default '0',
|
||||
CREATE TABLE IF NOT EXISTS `tcompound_alert` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_aam` int(10) unsigned NOT NULL default '0',
|
||||
`operation` enum('NOP', 'AND','OR','XOR','NAND','NOR','NXOR'),
|
||||
PRIMARY KEY (`id`, `id_aam`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `talerta_agente_modulo` (
|
||||
`id_aam` int(11) unsigned NOT NULL auto_increment,
|
||||
`id_agente_modulo` int(11) NOT NULL default '0',
|
||||
`id_alerta` int(11) NOT NULL default '0',
|
||||
`id_aam` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_agente_modulo` int(10) unsigned NOT NULL default '0',
|
||||
`id_alerta` int(10) unsigned NOT NULL default '0',
|
||||
`al_campo1` varchar(255) default '',
|
||||
`al_campo2` varchar(255) default '',
|
||||
`al_campo3` mediumtext NOT NULL,
|
||||
`descripcion` varchar(255) default '',
|
||||
`dis_max` double(18,2) default NULL,
|
||||
`dis_min` double(18,2) default NULL,
|
||||
`time_threshold` int(11) NOT NULL default '0',
|
||||
`time_threshold` int(10) NOT NULL default '0',
|
||||
`last_fired` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`max_alerts` int(4) NOT NULL default '1',
|
||||
`times_fired` int(11) NOT NULL default '0',
|
||||
`module_type` int(11) NOT NULL default '0',
|
||||
`min_alerts` int(4) NOT NULL default '0',
|
||||
`max_alerts` int(4) unsigned NOT NULL default '1',
|
||||
`times_fired` int(3) NOT NULL default '0',
|
||||
`module_type` int(10) unsigned NOT NULL default '0',
|
||||
`min_alerts` int(4) unsigned NOT NULL default '0',
|
||||
`internal_counter` int(4) default '0',
|
||||
`alert_text` varchar(255) default '',
|
||||
`disable` int(4) default '0',
|
||||
`time_from` TIME default '00:00:00',
|
||||
`time_to` TIME default '00:00:00',
|
||||
`id_agent` int(11) default NULL,
|
||||
`monday` tinyint(3) default '1',
|
||||
`tuesday` tinyint(3) default '1',
|
||||
`wednesday` tinyint(3) default '1',
|
||||
`thursday` tinyint(3) default '1',
|
||||
`friday` tinyint(3) default '1',
|
||||
`saturday` tinyint(3) default '1',
|
||||
`sunday` tinyint(3) default '1',
|
||||
`recovery_notify` tinyint(3) default '0',
|
||||
`disable` tinyint(3) default '0',
|
||||
`time_from` time default '00:00:00',
|
||||
`time_to` time default '00:00:00',
|
||||
`id_agent` int(10) default NULL,
|
||||
`monday` tinyint(1) default '1',
|
||||
`tuesday` tinyint(1) default '1',
|
||||
`wednesday` tinyint(1) default '1',
|
||||
`thursday` tinyint(1) default '1',
|
||||
`friday` tinyint(1) default '1',
|
||||
`saturday` tinyint(1) default '1',
|
||||
`sunday` tinyint(1) default '1',
|
||||
`recovery_notify` tinyint(1) default '0',
|
||||
`priority` tinyint(4) default '0',
|
||||
`al_f2_recovery` varchar(255) NOT NULL default '',
|
||||
`al_f3_recovery` mediumtext NOT NULL default '',
|
||||
`al_f3_recovery` mediumtext NOT NULL,
|
||||
PRIMARY KEY (`id_aam`),
|
||||
KEY `id_agente_modulo` (`id_agente_modulo`),
|
||||
KEY `disable` (`disable`)
|
||||
@ -269,18 +269,18 @@ CREATE TABLE `talerta_agente_modulo` (
|
||||
-- Priority : 3 - Warning (yellow)
|
||||
-- Priority : 4 - Critical (red)
|
||||
|
||||
CREATE TABLE `tattachment` (
|
||||
`id_attachment` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`id_incidencia` bigint(20) NOT NULL default '0',
|
||||
CREATE TABLE IF NOT EXISTS `tattachment` (
|
||||
`id_attachment` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_incidencia` int(10) unsigned NOT NULL default '0',
|
||||
`id_usuario` varchar(60) NOT NULL default '',
|
||||
`filename` varchar(255) NOT NULL default '',
|
||||
`description` varchar(150) default '',
|
||||
`size` bigint(20) NOT NULL default '0',
|
||||
`size` bigint(20) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id_attachment`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tconfig` (
|
||||
CREATE TABLE IF NOT EXISTS `tconfig` (
|
||||
`id_config` int(10) unsigned NOT NULL auto_increment,
|
||||
`token` varchar(100) NOT NULL default '',
|
||||
`value` varchar(100) NOT NULL default '',
|
||||
@ -288,7 +288,7 @@ CREATE TABLE `tconfig` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tconfig_os` (
|
||||
CREATE TABLE IF NOT EXISTS `tconfig_os` (
|
||||
`id_os` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
`description` varchar(250) default '',
|
||||
@ -297,19 +297,19 @@ CREATE TABLE `tconfig_os` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tevento` (
|
||||
CREATE TABLE IF NOT EXISTS `tevento` (
|
||||
`id_evento` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`id_agente` bigint(20) NOT NULL default '0',
|
||||
`id_usuario` varchar(60) NOT NULL default '0',
|
||||
`id_grupo` bigint(20) NOT NULL default '0',
|
||||
`estado` int(10) unsigned NOT NULL default '0',
|
||||
`id_agente` int(10) NOT NULL default '0',
|
||||
`id_usuario` varchar(100) NOT NULL default '0',
|
||||
`id_grupo` mediumint(4) NOT NULL default '0',
|
||||
`estado` tinyint(3) unsigned NOT NULL default '0',
|
||||
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`evento` varchar(255) NOT NULL default '',
|
||||
`utimestamp` bigint(20) unsigned NOT NULL default '0',
|
||||
`event_type` ENUM('unknown', 'monitor_up', 'monitor_down', 'alert_fired', 'alert_recovered', 'alert_ceased', 'alert_manual_validation', 'recon_host_detected', 'system', 'error', 'new_agent') default 'unknown',
|
||||
`id_agentmodule` bigint(20) NOT NULL default '0',
|
||||
`id_alert_am` bigint(20) NOT NULL default '0',
|
||||
`criticity` int(4) unsigned NOT NULL default 0,
|
||||
`utimestamp` bigint(20) NOT NULL default '0',
|
||||
`event_type` enum('unknown','monitor_up','monitor_down','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent') default 'unknown',
|
||||
`id_agentmodule` int(10) NOT NULL default '0',
|
||||
`id_alert_am` int(10) NOT NULL default '0',
|
||||
`criticity` int(4) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id_evento`),
|
||||
KEY `indice_1` (`id_agente`,`id_evento`),
|
||||
KEY `indice_2` (`utimestamp`,`id_evento`)
|
||||
@ -321,43 +321,43 @@ CREATE TABLE `tevento` (
|
||||
-- Criticity: 3 - Warning (yellow)
|
||||
-- Criticity: 4 - Critical (red)
|
||||
|
||||
CREATE TABLE `tgrupo` (
|
||||
`id_grupo` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
CREATE TABLE IF NOT EXISTS `tgrupo` (
|
||||
`id_grupo` mediumint(4) unsigned NOT NULL auto_increment,
|
||||
`nombre` varchar(100) NOT NULL default '',
|
||||
`icon` varchar(50) default NULL,
|
||||
`parent` tinyint(4) NOT NULL default '-1',
|
||||
`disabled` tinyint(4) NOT NULL default '0',
|
||||
`parent` mediumint(4) unsigned NOT NULL default '0',
|
||||
`disabled` tinyint(3) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id_grupo`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tincidencia` (
|
||||
CREATE TABLE IF NOT EXISTS `tincidencia` (
|
||||
`id_incidencia` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`inicio` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`cierre` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`titulo` varchar(100) NOT NULL default '',
|
||||
`descripcion` mediumtext NOT NULL,
|
||||
`id_usuario` varchar(100) NOT NULL default '',
|
||||
`id_usuario` varchar(60) NOT NULL default '',
|
||||
`origen` varchar(100) NOT NULL default '',
|
||||
`estado` int(11) NOT NULL default '0',
|
||||
`prioridad` int(11) NOT NULL default '0',
|
||||
`id_grupo` mediumint(9) NOT NULL default '0',
|
||||
`estado` int(10) NOT NULL default '0',
|
||||
`prioridad` int(10) NOT NULL default '0',
|
||||
`id_grupo` mediumint(4) unsigned NOT NULL default '0',
|
||||
`actualizacion` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`id_creator` varchar(60) default NULL,
|
||||
`notify_email` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`notify_email` tinyint(3) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id_incidencia`),
|
||||
KEY `incident_index_1` (`id_usuario`,`id_incidencia`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tlanguage` (
|
||||
CREATE TABLE IF NOT EXISTS`tlanguage` (
|
||||
`id_language` varchar(6) NOT NULL default '',
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
PRIMARY KEY (`id_language`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tlink` (
|
||||
CREATE TABLE IF NOT EXISTS `tlink` (
|
||||
`id_link` int(10) unsigned zerofill NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
`link` varchar(255) NOT NULL default '',
|
||||
@ -365,30 +365,30 @@ CREATE TABLE `tlink` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tmensajes` (
|
||||
`id_mensaje` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`id_usuario_origen` varchar(100) NOT NULL default '',
|
||||
`id_usuario_destino` varchar(100) NOT NULL default '',
|
||||
CREATE TABLE IF NOT EXISTS `tmensajes` (
|
||||
`id_mensaje` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_usuario_origen` varchar(60) NOT NULL default '',
|
||||
`id_usuario_destino` varchar(60) NOT NULL default '',
|
||||
`mensaje` tinytext NOT NULL,
|
||||
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`subject` varchar(255) NOT NULL default '',
|
||||
`estado` int(10) unsigned NOT NULL default '0',
|
||||
`estado` int(4) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id_mensaje`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tmodule_group` (
|
||||
`id_mg` bigint(20) unsigned NOT NULL auto_increment,
|
||||
CREATE TABLE IF NOT EXISTS `tmodule_group` (
|
||||
`id_mg` tinyint(4) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(150) NOT NULL default '',
|
||||
PRIMARY KEY (`id_mg`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tnetwork_component` (
|
||||
`id_nc` mediumint(12) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(50) NOT NULL,
|
||||
CREATE TABLE IF NOT EXISTS `tnetwork_component` (
|
||||
`id_nc` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(80) NOT NULL,
|
||||
`description` varchar(250) default NULL,
|
||||
`id_group` mediumint(9) NOT NULL default '1',
|
||||
`id_group` int(6) NOT NULL default '1',
|
||||
`type` smallint(6) NOT NULL default '6',
|
||||
`max` bigint(20) NOT NULL default '0',
|
||||
`min` bigint(20) NOT NULL default '0',
|
||||
@ -398,8 +398,8 @@ CREATE TABLE `tnetwork_component` (
|
||||
`tcp_rcv` varchar(255) NOT NULL default 'NULL',
|
||||
`snmp_community` varchar(255) NOT NULL default 'NULL',
|
||||
`snmp_oid` varchar(400) NOT NULL,
|
||||
`id_module_group` tinyint(4) NOT NULL default '0',
|
||||
`id_modulo` int(11) unsigned default '0',
|
||||
`id_module_group` tinyint(4) unsigned NOT NULL default '0',
|
||||
`id_modulo` int(10) unsigned default '0',
|
||||
`plugin_user` varchar(250) default '',
|
||||
`plugin_pass` varchar(250) default '',
|
||||
`plugin_parameter` text,
|
||||
@ -408,31 +408,31 @@ CREATE TABLE `tnetwork_component` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tnetwork_component_group` (
|
||||
`id_sg` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
CREATE TABLE IF NOT EXISTS `tnetwork_component_group` (
|
||||
`id_sg` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(200) NOT NULL default '',
|
||||
`parent` mediumint(9) NOT NULL default '0',
|
||||
`parent` mediumint(8) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id_sg`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tnetwork_profile` (
|
||||
`id_np` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
CREATE TABLE IF NOT EXISTS `tnetwork_profile` (
|
||||
`id_np` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
`description` varchar(250) default '',
|
||||
PRIMARY KEY (`id_np`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tnetwork_profile_component` (
|
||||
`id_npc` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`id_nc` mediumint(8) unsigned NOT NULL default '0',
|
||||
`id_np` mediumint(8) unsigned NOT NULL default '0',
|
||||
CREATE TABLE IF NOT EXISTS `tnetwork_profile_component` (
|
||||
`id_npc` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_nc` int(10) unsigned NOT NULL default '0',
|
||||
`id_np` int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id_npc`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tnota` (
|
||||
CREATE TABLE IF NOT EXISTS `tnota` (
|
||||
`id_nota` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`id_usuario` varchar(100) NOT NULL default '0',
|
||||
`timestamp` tinyblob NOT NULL,
|
||||
@ -441,7 +441,7 @@ CREATE TABLE `tnota` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tnota_inc` (
|
||||
CREATE TABLE IF NOT EXISTS `tnota_inc` (
|
||||
`id_nota_inc` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`id_incidencia` mediumint(9) NOT NULL default '0',
|
||||
`id_nota` mediumint(9) NOT NULL default '0',
|
||||
@ -449,48 +449,45 @@ CREATE TABLE `tnota_inc` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `torigen` (
|
||||
CREATE TABLE IF NOT EXISTS `torigen` (
|
||||
`origen` varchar(100) NOT NULL default ''
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tperfil` (
|
||||
CREATE TABLE IF NOT EXISTS `tperfil` (
|
||||
`id_perfil` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(60) NOT NULL default '',
|
||||
`incident_edit` int(11) NOT NULL default '0',
|
||||
`incident_view` int(11) NOT NULL default '0',
|
||||
`incident_management` int(11) NOT NULL default '0',
|
||||
`agent_view` int(11) NOT NULL default '0',
|
||||
`agent_edit` int(11) NOT NULL default '0',
|
||||
`alert_edit` int(11) NOT NULL default '0',
|
||||
`user_management` int(11) NOT NULL default '0',
|
||||
`db_management` int(11) NOT NULL default '0',
|
||||
`alert_management` int(11) NOT NULL default '0',
|
||||
`pandora_management` int(11) NOT NULL default '0',
|
||||
`incident_edit` tinyint(3) NOT NULL default '0',
|
||||
`incident_view` tinyint(3) NOT NULL default '0',
|
||||
`incident_management` tinyint(3) NOT NULL default '0',
|
||||
`agent_view` tinyint(3) NOT NULL default '0',
|
||||
`agent_edit` tinyint(3) NOT NULL default '0',
|
||||
`alert_edit` tinyint(3) NOT NULL default '0',
|
||||
`user_management` tinyint(3) NOT NULL default '0',
|
||||
`db_management` tinyint(3) NOT NULL default '0',
|
||||
`alert_management` tinyint(3) NOT NULL default '0',
|
||||
`pandora_management` tinyint(3) NOT NULL default '0',
|
||||
PRIMARY KEY (`id_perfil`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `trecon_task` (
|
||||
CREATE TABLE IF NOT EXISTS `trecon_task` (
|
||||
`id_rt` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
`description` varchar(250) NOT NULL default '',
|
||||
`type` tinyint(3) unsigned NOT NULL default '0',
|
||||
`subnet` varchar(64) NOT NULL default '',
|
||||
`id_network_server` int(10) unsigned NOT NULL default '0',
|
||||
`id_network_profile` int(10) unsigned NOT NULL default '0',
|
||||
`create_incident` tinyint(3) unsigned NOT NULL default '0',
|
||||
`id_group` int(10) unsigned NOT NULL default '1',
|
||||
`utimestamp` bigint(20) unsigned NOT NULL default '0',
|
||||
`status` tinyint(4) NOT NULL default '0',
|
||||
`interval_sweep` int(10) unsigned NOT NULL default '0',
|
||||
`id_network_server_assigned` int(10) unsigned NOT NULL default '0',
|
||||
`extended_info` varchar(250) default NULL,
|
||||
`extended_value` varchar(250) default NULL,
|
||||
`id_recon_server` int(10) unsigned NOT NULL default '0',
|
||||
`id_os` tinyint(4) NOT NULL default '0',
|
||||
PRIMARY KEY (`id_rt`),
|
||||
KEY `recon_task_daemon` (`id_network_server`,`utimestamp`,`status`,`interval_sweep`)
|
||||
KEY `recon_task_daemon` (`id_recon_server`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tserver` (
|
||||
CREATE TABLE IF NOT EXISTS `tserver` (
|
||||
`id_server` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
`ip_address` varchar(100) NOT NULL default '',
|
||||
@ -515,7 +512,7 @@ CREATE TABLE `tserver` (
|
||||
KEY `status` (`status`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tsesion` (
|
||||
CREATE TABLE IF NOT EXISTS `tsesion` (
|
||||
`ID_sesion` bigint(4) unsigned NOT NULL auto_increment,
|
||||
`ID_usuario` varchar(60) NOT NULL default '0',
|
||||
`IP_origen` varchar(100) NOT NULL default '',
|
||||
@ -527,7 +524,7 @@ CREATE TABLE `tsesion` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `ttipo_modulo` (
|
||||
CREATE TABLE IF NOT EXISTS `ttipo_modulo` (
|
||||
`id_tipo` smallint(5) unsigned NOT NULL auto_increment,
|
||||
`nombre` varchar(100) NOT NULL default '',
|
||||
`categoria` int(11) NOT NULL default '0',
|
||||
@ -537,7 +534,7 @@ CREATE TABLE `ttipo_modulo` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `ttrap` (
|
||||
CREATE TABLE IF NOT EXISTS `ttrap` (
|
||||
`id_trap` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`source` varchar(50) NOT NULL default '',
|
||||
`oid` varchar(255) NOT NULL default '',
|
||||
@ -553,7 +550,7 @@ CREATE TABLE `ttrap` (
|
||||
PRIMARY KEY (`id_trap`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tusuario` (
|
||||
CREATE TABLE IF NOT EXISTS `tusuario` (
|
||||
`id_usuario` varchar(60) NOT NULL default '0',
|
||||
`nombre_real` varchar(125) NOT NULL default '',
|
||||
`password` varchar(45) default NULL,
|
||||
@ -565,17 +562,17 @@ CREATE TABLE `tusuario` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tusuario_perfil` (
|
||||
`id_up` bigint(20) unsigned NOT NULL auto_increment,
|
||||
CREATE TABLE IF NOT EXISTS `tusuario_perfil` (
|
||||
`id_up` bigint(10) unsigned NOT NULL auto_increment,
|
||||
`id_usuario` varchar(100) NOT NULL default '',
|
||||
`id_perfil` int(20) NOT NULL default '0',
|
||||
`id_grupo` int(11) NOT NULL default '0',
|
||||
`id_perfil` int(10) unsigned NOT NULL default '0',
|
||||
`id_grupo` int(10) NOT NULL default '0',
|
||||
`assigned_by` varchar(100) NOT NULL default '',
|
||||
PRIMARY KEY (`id_up`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tnews` (
|
||||
CREATE TABLE IF NOT EXISTS `tnews` (
|
||||
`id_news` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`author` varchar(255) NOT NULL DEFAULT '',
|
||||
`subject` varchar(255) NOT NULL DEFAULT '',
|
||||
@ -584,7 +581,7 @@ CREATE TABLE `tnews` (
|
||||
PRIMARY KEY(`id_news`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tgraph` (
|
||||
CREATE TABLE IF NOT EXISTS `tgraph` (
|
||||
`id_graph` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_user` varchar(100) NOT NULL default '',
|
||||
`name` varchar(150) NOT NULL default '',
|
||||
@ -598,7 +595,7 @@ CREATE TABLE `tgraph` (
|
||||
PRIMARY KEY(`id_graph`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tgraph_source` (
|
||||
CREATE TABLE IF NOT EXISTS `tgraph_source` (
|
||||
`id_gs` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_graph` int(11) NOT NULL default 0,
|
||||
`id_agent_module` int(11) NOT NULL default 0,
|
||||
@ -606,7 +603,7 @@ CREATE TABLE `tgraph_source` (
|
||||
PRIMARY KEY(`id_gs`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `treport` (
|
||||
CREATE TABLE IF NOT EXISTS `treport` (
|
||||
`id_report` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_user` varchar(100) NOT NULL default '',
|
||||
`name` varchar(150) NOT NULL default '',
|
||||
@ -618,7 +615,7 @@ CREATE TABLE `treport` (
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `treport_content` (
|
||||
CREATE TABLE IF NOT EXISTS `treport_content` (
|
||||
`id_rc` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_report` INTEGER UNSIGNED NOT NULL default 0,
|
||||
`id_gs` INTEGER UNSIGNED NULL default NULL,
|
||||
@ -629,10 +626,10 @@ CREATE TABLE `treport_content` (
|
||||
PRIMARY KEY(`id_rc`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `treport_content_sla_combined` (
|
||||
CREATE TABLE IF NOT EXISTS `treport_content_sla_combined` (
|
||||
`id` INTEGER UNSIGNED NOT NULL auto_increment,
|
||||
`id_report_content` INTEGER UNSIGNED NOT NULL,
|
||||
`id_agent_module` bigint(14) unsigned NOT NULL,
|
||||
`id_agent_module` int(10) unsigned NOT NULL,
|
||||
`sla_max` int(11) NOT NULL default 0,
|
||||
`sla_min` int(11) NOT NULL default 0,
|
||||
`sla_limit` int(11) NOT NULL default 0,
|
||||
@ -643,7 +640,7 @@ CREATE TABLE `treport_content_sla_combined` (
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tlayout` (
|
||||
CREATE TABLE IF NOT EXISTS `tlayout` (
|
||||
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) NOT NULL,
|
||||
`id_group` INTEGER UNSIGNED NOT NULL,
|
||||
@ -654,7 +651,7 @@ CREATE TABLE `tlayout` (
|
||||
PRIMARY KEY(`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tlayout_data` (
|
||||
CREATE TABLE IF NOT EXISTS `tlayout_data` (
|
||||
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_layout` INTEGER UNSIGNED NOT NULL default 0,
|
||||
`pos_x` INTEGER UNSIGNED NOT NULL default 0,
|
||||
@ -673,7 +670,7 @@ CREATE TABLE `tlayout_data` (
|
||||
PRIMARY KEY(`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE tplugin (
|
||||
CREATE TABLE IF NOT EXISTS tplugin (
|
||||
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(200) NOT NULL,
|
||||
`description` mediumtext default "",
|
||||
@ -687,14 +684,14 @@ CREATE TABLE tplugin (
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tmodule` (
|
||||
CREATE TABLE IF NOT EXISTS `tmodule` (
|
||||
`id_module` int(11) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
PRIMARY KEY (`id_module`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `tserver_export` (
|
||||
CREATE TABLE IF NOT EXISTS `tserver_export` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
`preffix` varchar(100) NOT NULL default '',
|
||||
@ -710,16 +707,16 @@ CREATE TABLE `tserver_export` (
|
||||
-- id_export_server is real pandora fms export server process that manages this server
|
||||
-- id is the "destination" server to export
|
||||
|
||||
CREATE TABLE `tserver_export_data` (
|
||||
CREATE TABLE IF NOT EXISTS `tserver_export_data` (
|
||||
`id` int(20) unsigned NOT NULL auto_increment,
|
||||
`id_export_server` int(10) unsigned default NULL,
|
||||
`id_agent_module` mediumint(8) unsigned NOT NULL default '0',
|
||||
`data` varchar(255) default NULL,
|
||||
`utimestamp` int(10) unsigned default '0'
|
||||
`utimestamp` int(10) unsigned default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tplanned_downtime` (
|
||||
CREATE TABLE IF NOT EXISTS `tplanned_downtime` (
|
||||
`id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT ,
|
||||
`name` VARCHAR( 100 ) NOT NULL ,
|
||||
`description` TEXT NOT NULL ,
|
||||
@ -730,7 +727,7 @@ CREATE TABLE `tplanned_downtime` (
|
||||
INDEX ( `start` , `end` , `module_id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tplanned_downtime_agents` (
|
||||
CREATE TABLE IF NOT EXISTS `tplanned_downtime_agents` (
|
||||
`id` int(20) unsigned NOT NULL auto_increment,
|
||||
`id_agent` mediumint(8) unsigned NOT NULL default '0',
|
||||
`id_downtime` mediumint(8) unsigned NOT NULL default '0',
|
||||
|
@ -42,8 +42,6 @@ INSERT INTO `talerta` VALUES (9,'Jabber Alert','echo _field3_ | sendxmpp -r _fie
|
||||
-- Dumping data for table `tconfig`
|
||||
--
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `tconfig` DISABLE KEYS */;
|
||||
LOCK TABLES `tconfig` WRITE;
|
||||
INSERT INTO `tconfig` VALUES
|
||||
(1,'language_code','en'),
|
||||
@ -53,7 +51,7 @@ INSERT INTO `tconfig` VALUES
|
||||
(6,'graph_res','5'),
|
||||
(7,'step_compact','1'),
|
||||
(8,'db_scheme_version','2.0'),
|
||||
(9,'db_scheme_build','PD80619'),
|
||||
(9,'db_scheme_build','PD80804'),
|
||||
(13,'show_unknown','0'),
|
||||
(14,'show_lastalerts','1'),
|
||||
(15,'style','pandora'),
|
||||
@ -63,14 +61,11 @@ INSERT INTO `tconfig` VALUES
|
||||
(19, 'graph_color3', '#89FF09'),
|
||||
(20, 'sla_period', '604800');
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `tconfig` ENABLE KEYS */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `tconfig_os`
|
||||
--
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `tconfig_os` DISABLE KEYS */;
|
||||
LOCK TABLES `tconfig_os` WRITE;
|
||||
INSERT INTO `tconfig_os` VALUES
|
||||
(1,'Linux','Linux: All versions','so_linux.png'),
|
||||
@ -84,7 +79,7 @@ INSERT INTO `tconfig_os` VALUES
|
||||
(10,'Other','Other SO','so_other.png'),
|
||||
(11,'Network','Pandora Network Agent','network.png');
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `tconfig_os` ENABLE KEYS */;
|
||||
|
||||
|
||||
--
|
||||
-- Dumping data for table `tgrupo`
|
||||
@ -101,14 +96,14 @@ INSERT INTO `tgrupo` VALUES
|
||||
(11,'Workstations','computer',0,0),
|
||||
(12,'Applications','applications',0,0);
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `tgrupo` ENABLE KEYS */;
|
||||
|
||||
|
||||
--
|
||||
-- Dumping data for table `tlanguage`
|
||||
--
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `tlanguage` DISABLE KEYS */;
|
||||
|
||||
LOCK TABLES `tlanguage` WRITE;
|
||||
INSERT INTO `tlanguage` VALUES ('en','English');
|
||||
--INSERT INTO `tlanguage` VALUES ('es_es','Español');
|
||||
@ -117,32 +112,26 @@ INSERT INTO `tlanguage` VALUES ('en','English');
|
||||
--INSERT INTO `tlanguage` VALUES ('pt_br','Português-Brasil');
|
||||
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `tlanguage` ENABLE KEYS */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `tlink`
|
||||
--
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `tlink` DISABLE KEYS */;
|
||||
LOCK TABLES `tlink` WRITE;
|
||||
INSERT INTO `tlink` VALUES
|
||||
(0000000001,'GeekTools','www.geektools.com'),
|
||||
(0000000002,'CentralOPS','http://www.centralops.net/'),
|
||||
(0000000003,'Pandora FMS','http://pandora.sourceforge.net'),
|
||||
(0000000004,'Babel Enterprise','http://babel.sourceforge.net'),
|
||||
(0000000006,'Openideas','http://www.openideas.info'),
|
||||
(0000000007,'Google','http://www.google.com'),
|
||||
(0000000008,'ArticaST','http://www.artica.es');
|
||||
(1,'ArticaST','www.artica.es'),
|
||||
(2,'Pandora FMS','http://pandora.sourceforge.net'),
|
||||
(3,'Babel Enterprise','http://babel.sourceforge.net'),
|
||||
(4,'Openideas','http://www.openideas.info'),
|
||||
(5,'Google','http://www.google.com');
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `tlink` ENABLE KEYS */;
|
||||
|
||||
|
||||
--
|
||||
-- Dumping data for table `tmodule_group`
|
||||
--
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `tmodule_group` DISABLE KEYS */;
|
||||
LOCK TABLES `tmodule_group` WRITE;
|
||||
INSERT INTO `tmodule_group` VALUES
|
||||
(1,'General'),
|
||||
@ -151,13 +140,22 @@ INSERT INTO `tmodule_group` VALUES
|
||||
(4,'System'),
|
||||
(5,'Miscellaneous');
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `tmodule_group` ENABLE KEYS */;
|
||||
|
||||
|
||||
--
|
||||
-- Dumping data for table `torigen`
|
||||
--
|
||||
INSERT INTO `torigen` VALUES ('Operating System event'),('IDS events'),('Firewall records'),('Database event'),('Application data'),('Logfiles'),('Other data source'),('Pandora FMS Event'),('User report'),('Unknown source');
|
||||
|
||||
INSERT INTO `torigen` VALUES
|
||||
('Operating System event'),
|
||||
('IDS events'),
|
||||
('Firewall records'),
|
||||
('Database event'),
|
||||
('Application data'),
|
||||
('Logfiles'),
|
||||
('Other data source'),
|
||||
('Pandora FMS Event'),
|
||||
('User report'),
|
||||
('Unknown source');
|
||||
|
||||
--
|
||||
-- Dumping data for table `ttipo_modulo`
|
||||
@ -183,16 +181,15 @@ INSERT INTO `ttipo_modulo` VALUES
|
||||
(21,'async_proc', 7, 'Asyncronous proc data', 'mod_async_proc.png'),
|
||||
(22,'async_data', 6, 'Asyncronous numeric data', 'mod_async_data.png'),
|
||||
(23,'async_string', 8, 'Asyncronous string data', 'mod_async_string.png'),
|
||||
(100,'keep_alive',-1,'KeepAlive','mod_keepalive.png');
|
||||
/*
|
||||
Not implemented yet
|
||||
(100,'keep_alive',-1,'KeepAlive','mod_keepalive.png'),
|
||||
(19,'image_jpg',9,'Image JPG data', 'mod_image_jpg.png'),
|
||||
(20,'image_png',9,'Image PNG data', 'mod_image_png.png'),
|
||||
(24,'async_inc', 6, 'Asyncronous incremental data', 'mod_async_inc.png'),
|
||||
*/
|
||||
(20,'image_png',9,'Image PNG data', 'mod_image_png.png');
|
||||
--Not yet implemented
|
||||
--(24,'async_inc', 6, 'Asyncronous incremental data', 'mod_async_inc.png')
|
||||
|
||||
/* Categoria field is used to segregate several types (plugin, agents, network) on their data
|
||||
types, could be used or could be avoided and use directly primary key (id_tipo) */
|
||||
|
||||
-- Categoria field is used to segregate several types (plugin, agents, network) on their data
|
||||
-- types, could be used or could be avoided and use directly primary key (id_tipo)
|
||||
|
||||
--
|
||||
-- Dumping data for table `tusuario`
|
||||
@ -264,12 +261,10 @@ INSERT INTO `tnetwork_component` VALUES (60,'CPU System','Linux System CPU usage
|
||||
INSERT INTO `tnetwork_component` VALUES (177,'System Context Change','Linux System Context changes ',5,15,0,0,180,0,'','','public','.1.3.6.1.4.1.2021.11.8.0',4,2,'','','',0);
|
||||
INSERT INTO `tnetwork_component` VALUES (178,'System Interrupts','Linux system interrupts ',5,15,0,0,180,0,'','','public','.1.3.6.1.4.1.2021.11.7.0',4,2,'','','',0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`) VALUES (176,'Catalyst Free Mem','Taken from ftp://ftp.cisco.com/pub/mibs/oid/OLD-CISCO-MEMORY-MIB.oid',2,15,0,0,180,0,'','','public','1.3.6.1.4.1.9.2.1.8',4,2);
|
||||
|
||||
INSERT INTO `tnetwork_component` VALUES (61,'GigabitEthernet1/0/1 Status','',2,18,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.8.10101',2,2,'','','',0);
|
||||
INSERT INTO `tnetwork_component` VALUES (62,'GigabitEthernet1/0/2 Status','',2,18,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.8.10102',2,2,'','','',0);
|
||||
INSERT INTO `tnetwork_component` VALUES (63,'GigabitEthernet1/0/3 Status','',2,18,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.8.10103',2,2,'','','',0);
|
||||
|
||||
|
||||
-- WMI components
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `plugin_user`, `max_timeout`) VALUES (200, 'CPU load', 'CPU0 load average', 14, 1, 100, 0, 300, 1, '', '', '', 'SELECT LoadPercentage from Win32_Processor WHERE DeviceID = "CPU0"', 1, 6, 'Administrator', 10);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `plugin_user`, `max_timeout`) VALUES (201, 'Free RAM', 'Available RAM memory in bytes', 14, 1, 0, 0, 300, 0, '', '', '', 'SELECT AvailableBytes from Win32_PerfRawData_PerfOS_Memory', 1, 6, 'Administrator', 10);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
// Pandora FMS - the Free Monitoring System
|
||||
// ========================================
|
||||
// Pandora FMS - the Flexible Monitoring System
|
||||
// ============================================
|
||||
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
|
||||
// Please see http://pandora.sourceforge.net for full contribution list
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user