diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 84c6f81b40..42ce4ea06d 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,26 @@ +2008-02-21 Sancho Lerena + + * Added new structures for predictive module, plugin server, and other + planned functionalities for 1.4.x version. + + * Merged code from 1.3.1 branch. + +2008-02-19 Raul Mateos + + * operation/agentes/tactical.php: Solved small visual issue with rows. + + * include/languages/language_en.php: Changed CASE in menu texts. + +2008-02-16 Raul Mateos + + * operation/agentes/estado_*.php: Improved usability adding titles in + images. + +2008-02-12 Raul Mateos + + * operation/agentes/estado_agente.php, general/header.php: small changes + to solve small problem with header in IE7. + 2008-02-12 Raul Mateos * include/languages/language_en.php: Corrected typo. @@ -9,16 +32,32 @@ 2008-02-09 Raul Mateos - * pandoradb_data.sql: Solved stupid bug with ending ";". + * pandoradb_data.sql: Solved stupid bug with ending ";". Deleted duplicated + insert. + +2008-02-01 Raul Mateos + + * operation/agentes/estado_*.php: Added code to help admin user + to create agents and alerts, adding buttons to godmode. + + * include/languages/language_es_es.php: Updated text. + +2008-01-21 Sancho Lerena + + * operation/visual_console/render_view.php: Applied some patches from + guruevi to improve graphic size and tooltil. Label is still displayed on + graphic canvas (it could be deleted in the future using an optional switch) + +2008-01-11 Sancho Lerena + + * config.inc.php: Updated version number for config template. + + * tactical.php: Fixed info from network server (merged from trunk). + + * manage_recontask.php: recontask list better render of information. 2008-01-10 Sancho Lerena - * pandoradbdata_13_to_14.sql: Correct build and version. - - * tactical.php: Fixed problem with networkserver stats. - - Code merged from 1.3.1 branch: - * functions_db.php: Some changes in future generic SQL interface access. * pandora_console/include/functions.php: Added generic acces to HTTP @@ -36,20 +75,27 @@ * modificar_agente.php: Fixed some render problems, added a Agent search option and better formatting. - * configurar_agente.php: New management for KeepAlive module. +2008-01-10 Sancho Lerena - New code for 1.4 development branch (trunk) + * functions_db.php: Added generic SQL access function to get data using + a free SQL sentence. + + * estado_ultimopaquete.php: Uses new Keepalive implementation and render + keepalive data in correct way. + + * view_server.php, + tactical.php: Uses new keepalive module to make correct calculations for + server load graphs and stats. + + * configurar_agente.php: Insert new keepalive module record in state table + + * pandoradb_data.sql: Updated scheme for 1.3.1 + + * pandoradbdata_1.3_to_1.3.1.sql: Update SQL from 1.3 to 1.3.1 + + * index.php: Version number update. - * pandoradbdata_13_to_14.sql: Migration SQL (data) code from 1.3 to 1.4 - - * pandoradb_13_to_14.sql: Migration SQL (schema) code frrom 1.3 to 1.4 - - * pandoradb_data.sql: Modified code to fresh install SQL data. - - * pandoradb.sql: Modified code to fresh install SQL schema. - - * index.php, - * install.php: new version info. + This is the first commit for 1.3.1 branch (Console code) 2008-01-09 Sancho Lerena diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 698862b126..272f9024fa 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -1,9 +1,9 @@ "; -echo " +echo "
"; if (isset ($_SESSION["id_usuario"])){ echo ""; if ($data["times_fired"] <> 0){ - echo ""; $id_grupo_alerta = give_db_value ("id_grupo", "tagente", "id_agente", $id_agente); if (give_acl($id_user, $id_grupo_alerta, "AW") == 1) { @@ -128,12 +128,16 @@ if (isset($_GET["id_agente"])){ echo ""; } } else - echo ""; + echo ""; } echo '
"; diff --git a/pandora_console/godmode/servers/manage_recontask.php b/pandora_console/godmode/servers/manage_recontask.php index 5fa1c46461..b91ee14cb8 100644 --- a/pandora_console/godmode/servers/manage_recontask.php +++ b/pandora_console/godmode/servers/manage_recontask.php @@ -93,7 +93,7 @@ $query="SELECT * FROM trecon_task"; $result=mysql_query($query); $color=1; if (mysql_num_rows($result)){ - echo ""; + echo "
"; echo ""; } echo "
".$lang_label["name"]; echo "".$lang_label['type']; echo "".$lang_label['network']; @@ -101,7 +101,6 @@ if (mysql_num_rows($result)){ echo "".$lang_label['group']; echo "".$lang_label['incident']; echo "".$lang_label['interval']; - echo "".$lang_label['recon_server']; echo "".$lang_label['network_server']; echo "X"; } @@ -153,10 +152,8 @@ while ($row=mysql_fetch_array($result)){ echo $lang_label["no"]; // INTERVAL echo ""; - echo $interval; - // Recon server - echo ""; - echo "".give_server_name($id_network_server).""; + echo human_time_description_raw($interval); + // Network server assigned echo ""; echo "".give_server_name($id_network_server_assigned)."";; @@ -165,13 +162,12 @@ while ($row=mysql_fetch_array($result)){ echo "
"; + if (!mysql_num_rows($result)){ echo "
".$lang_label["no_rtask"]."
"; - echo ""; -} else { - echo "
"; -} +} +echo "
"; echo ""; echo "
"; echo "
"; echo ""; diff --git a/pandora_console/include/config.inc.php b/pandora_console/include/config.inc.php index c98c92606a..5089d7c0a2 100644 --- a/pandora_console/include/config.inc.php +++ b/pandora_console/include/config.inc.php @@ -1,36 +1,20 @@ -// Additions to code for Pandora FMS 1.2 graph code -// // 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. - -// Pandora FMS 1.x uses icons from famfamfam, licensed under CC Atr. 2.5 -// Silk icon set 1.3 (cc) Mark James, http://www.famfamfam.com/lab/icons/silk/ -// Pandora FMS 1.x uses Pear Image::Graph code //Pandora Version if (!isset($build_version)) - $build_version="PC071216"; + $build_version="PC080221"; if (!isset($pandora_version)) - $pandora_version="v1.4 Beta 1"; + $pandora_version="v1.4-dev"; // Database configuration (default ones) -//$dbname="pandora13"; // MySQL DataBase +//$dbname="pandora"; // MySQL DataBase //$dbuser="pandora"; // DB User //$dbpassword="pandora"; // Password //$dbhost="localhost"; // MySQL Host diff --git a/pandora_console/include/languages/language_en.php b/pandora_console/include/languages/language_en.php index f6bb764d35..199a23c433 100644 --- a/pandora_console/include/languages/language_en.php +++ b/pandora_console/include/languages/language_en.php @@ -7,18 +7,18 @@ // CSS and some PHP code additions // Please see http://pandora.sourceforge.net for full contribution list -$lang_label["view_agents"]="View Agents"; -$lang_label["manage_incidents"]="Manage Incidents"; -$lang_label["view_users"]= "View Users"; +$lang_label["view_agents"]="View agents"; +$lang_label["manage_incidents"]="Manage incidents"; +$lang_label["view_users"]= "View users"; $lang_label["new_incident"]="New Incident"; -$lang_label["search_incident"]="Search Incident"; +$lang_label["search_incident"]="Search incident"; $lang_label["index_myuser"]="Edit my user"; -$lang_label["manage_agents"]="Manage Agents"; -$lang_label["manage_alerts"]="Manage Alerts"; -$lang_label["manage_users"]="Manage Users"; -$lang_label["manage_groups"]="Manage Groups"; +$lang_label["manage_agents"]="Manage agents"; +$lang_label["manage_alerts"]="Manage alerts"; +$lang_label["manage_users"]="Manage users"; +$lang_label["manage_groups"]="Manage groups"; $lang_label["system_audit"]="System Audit Log"; $lang_label["ag_title"]="Pandora Agents"; @@ -217,19 +217,19 @@ $lang_label["deleting_data"]="Deleting data"; $lang_label["while_delete_data"]="while deleting data for "; $lang_label["please_wait"]="Please wait"; $lang_label["all_agents"]="All agents"; -$lang_label["db_purge"]="Database Purge"; -$lang_label["db_compact"]="Database Compact"; +$lang_label["db_purge"]="Database purge"; +$lang_label["db_compact"]="Database compact"; $lang_label["db_stat_agent"]="Database Statistics per Agent"; $lang_label["configure"]="Configure"; $lang_label["event_main_view"]="Main Event View"; $lang_label["event_name"]="Event name"; -$lang_label["view_events"]="View Events"; +$lang_label["view_events"]="View events"; $lang_label["timestamp"]="Timestamp"; $lang_label["links_header"]="Links"; $lang_label["godmode_header"]="Administration"; $lang_label["operation_header"]="Operation"; -$lang_label["db_audit"]="Database Audit"; +$lang_label["db_audit"]="Database audit"; $lang_label["db_purge_audit"]="Database Audit purge"; $lang_label["latest_date"]="Latest date"; $lang_label["first_date"]="First date"; @@ -271,7 +271,7 @@ $lang_label["doit"]="Do it!"; $lang_label["add"]="Add"; $lang_label["db_purge_event"]="Event Database cleanup"; -$lang_label["db_event"]="Database Event"; +$lang_label["db_event"]="Database event"; $lang_label["max_min"]="Max/Min"; $lang_label["max"]="Maximum"; $lang_label["min"]="Minimum"; @@ -330,7 +330,7 @@ $lang_label["purge_event_all"]="Purge all event data"; $lang_label["deleting_records"]="Deleting records for module "; $lang_label["purge_task"]="Purge task launched for agent id "; -$lang_label["manage_config"]="Manage Config."; +$lang_label["manage_config"]="Manage config."; $lang_label["config_manage"]="Configuration Management"; $lang_label["get_info"]="Get Info"; @@ -359,7 +359,7 @@ $lang_label["agent_edit"]="Edit agents"; $lang_label["alert_edit"]="Edit alerts"; $lang_label["global_profile"]="Global Profile"; $lang_label["name"]="Name"; -$lang_label["manage_profiles"]="Manage Profiles"; +$lang_label["manage_profiles"]="Manage profiles"; $lang_label["error_profile"]="ERROR: At this moment only Global Admin can manage profiles"; $lang_label["never"]="Never"; @@ -440,7 +440,7 @@ $lang_label["events_per_user"]="Events per user"; $lang_label["events_per_group"]="Events per group"; $lang_label["multormod"]="Multiple source module"; -$lang_label["db_refine"]="Database Debug"; +$lang_label["db_refine"]="Database debug"; $lang_label["filtering_datamodule"]="Filtering data module"; $lang_label["nomodules_selected"]="No modules has been selected"; $lang_label["purge_below_limits"]="Purge data out these limits"; @@ -522,10 +522,10 @@ $lang_label["users_statistics"]="User activity statistics"; $lang_label["agent_detail"]="Agent detail"; -$lang_label["snmp_console_alert"]="SNMP Alerts"; +$lang_label["snmp_console_alert"]="SNMP alerts"; $lang_label["OID"]="OID"; $lang_label["SNMP_agent"]="SNMP Agent"; -$lang_label["SNMP_console"]="SNMP Console"; +$lang_label["SNMP_console"]="SNMP console"; $lang_label["customvalue"]="Custom value"; $lang_label["agent_type"]="Agent type"; @@ -586,7 +586,7 @@ $lang_label["no_snmp_agent"]="There are no SNMP traps in database"; $lang_label["no_snmp_alert"]="There are no SNMP alerts"; $lang_label["no_agent_def"]="There are no defined agents"; -$lang_label["view_servers"]="Pandora Servers"; +$lang_label["view_servers"]="Pandora servers"; $lang_label["no_server"]="There are no servers configured into the database"; $lang_label["master"]="Master"; $lang_label["checksum"]="Check"; @@ -606,7 +606,7 @@ $lang_label["no_event"]="There are no events"; $lang_label["agent_access_rate"]="Agent access rate (24h)"; $lang_label["agent_module_shareout"]="Agent module share out"; $lang_label["int"]="Itv."; // Sort name for interval -$lang_label["manage_servers"]="Manage Servers"; +$lang_label["manage_servers"]="Manage servers"; $lang_label["update_server"]="Update Server"; $lang_label["upd_server_ok"]="Server updated successfully"; $lang_label["upd_server_no"]="There was a problem updating server"; diff --git a/pandora_console/include/languages/language_es_es.php b/pandora_console/include/languages/language_es_es.php index 12eb6c69cb..af51cda2d4 100644 --- a/pandora_console/include/languages/language_es_es.php +++ b/pandora_console/include/languages/language_es_es.php @@ -2,9 +2,9 @@ // Pandora FMS - the Free monitoring system // ======================================== -// Copyright (c) 2004-2007 Sancho Lerena, slerena@gmail.com +// Copyright (c) 2004-2008 Sancho Lerena, slerena@gmail.com // Main PHP/SQL code development and project architecture and management -// Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com +// Copyright (c) 2004-2008 Raul Mateos Martin, raulofpandora@gmail.com // CSS and some PHP additions // Copyright (c) 2006-2007 Jonathan Barajas, jonathan.barajas[AT]gmail[DOT]com // Javascript Active Console code. @@ -589,7 +589,7 @@ $lang_label["general_config"]="Configuración general"; $lang_label["no_profile"]="Este usuario no tiene ningún perfil/grupo asociado"; $lang_label["no_agent"]="No hay ningún agente incluido en este grupo"; $lang_label["no_change_field"]="Este campo no puede modificarse en el modo edición"; -$lang_label["no_alert"]="Ningún agente de este grupo tiene alguna alerta definida"; +$lang_label["no_alert"]="Ningún agente de este grupo tiene alertas definidas"; $lang_label["total_data"]="Datos totales"; $lang_label["no_incidents"]="Ningún incidente se ajusta a tu filtro de búsqueda"; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 4b502585cb..ec7a83f44e 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -453,7 +453,7 @@ div.title_line { } #menu_tab li.nomn:hover a, #menu_tab li:hover ul a:hover { - background: #66AA44; + background: #cde0ad; } #menu_tab li:hover a { background: #b2b08a url("../images/arrow.png") no-repeat right 3px; diff --git a/pandora_console/index.php b/pandora_console/index.php index d40ca0a62d..662e222848 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -24,7 +24,7 @@ // Pandora FMS 1.x uses Pear Image::Graph code //Pandora Version, if not defined here it would take from config.php -$build_version="PC080109"; +$build_version="PC080221"; $pandora_version="v1.4-dev"; global $build_version; global $pandora_version; diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index 3a073d8c92..1a1210a871 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -3,7 +3,7 @@ // ======================================== // 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 +// Copyright (c) 2004-2008 Raul Mateos Martin, raulofpandora@gmail.com // CSS and some PHP code additions // Please see http://pandora.sourceforge.net for full contribution list @@ -64,11 +64,11 @@ if (comprueba_login() == 0) {
"; echo $lang_label["free_text_search"]; - echo ""; + echo ""; echo "
"; - echo ""; + echo ""; echo "
"; echo ""; @@ -271,21 +271,21 @@ if (comprueba_login() == 0) { if ($numero_monitor <> 0){ if ($estado_general <> 0){ if ($estado_cambio == 0){ - echo ""; + echo ""; } else { - echo ""; + echo ""; } } elseif ($monitor_ok > 0) { - echo ""; + echo ""; } elseif ($numero_datamodules > 0) { - echo ""; + echo ""; } elseif ($monitor_down > 0) { - echo ""; + echo ""; } } else - echo ""; + echo ""; // checks if an alert was fired recently echo ""; @@ -293,9 +293,9 @@ if (comprueba_login() == 0) { echo ""; else { if (check_alert_fired($id_agente) == 1) - echo ""; + echo ""; else - echo ""; + echo ""; } echo ""; @@ -324,6 +324,12 @@ if (comprueba_login() == 0) { } else { echo '

'.$lang_label["no_agent"].'
'; + $id_user = $_SESSION["id_usuario"]; + if ( (give_acl($id_user, 0, "LM")==1) OR (give_acl($id_user, 0, "AW")==1 ) OR (give_acl($id_user, 0, "PM")==1) OR (give_acl($id_user, 0, "DM")==1) OR (give_acl($id_user, 0, "UM")==1 )){ + echo " "; + } } } else { diff --git a/pandora_console/operation/agentes/estado_alertas.php b/pandora_console/operation/agentes/estado_alertas.php index 39212fa042..76598ae53d 100644 --- a/pandora_console/operation/agentes/estado_alertas.php +++ b/pandora_console/operation/agentes/estado_alertas.php @@ -1,9 +1,9 @@ ".$data["times_fired"]."
"; + echo ""; echo "
'; } else { - echo "
".$lang_label["no_alerts"]."
"; + echo "
".$lang_label["no_alerts"]."
"; + $id_user = $_SESSION["id_usuario"]; + if ( (give_acl($id_user, 0, "LM")==1) OR (give_acl($id_user, 0, "AW")==1 ) OR (give_acl($id_user, 0, "PM")==1) OR (give_acl($id_user, 0, "DM")==1) OR (give_acl($id_user, 0, "UM")==1 )){ + echo " 
"; + } } } else { @@ -166,19 +170,22 @@ if (isset($_GET["id_agente"])){ echo ""; - echo ""; + echo " + "; // Show only selected groups if ($ag_group > 1) $sql='SELECT id_agente, nombre, disabled FROM tagente WHERE id_grupo='.$ag_group.' ORDER BY nombre'; else $sql='SELECT id_agente, nombre, disabled FROM tagente ORDER BY id_grupo, nombre'; - $result=mysql_query($sql); if (mysql_num_rows($result)){ $color=1; @@ -217,9 +224,9 @@ if (isset($_GET["id_agente"])){ ".$nombre_agente.""; $string .= ""; if ($data["times_fired"] <> 0) - $string .= ""; + $string .= ""; else - $string .= ""; + $string .= ""; $string = $string."" .dame_nombre_alerta($data["id_alerta"]).""; @@ -267,8 +274,10 @@ if (isset($_GET["id_agente"])){ echo "
". $lang_label["no_alert"]."
"; } - } else echo "
". - $lang_label["no_agent"].$lang_label["no_agent_alert"]."
"; + } else { + echo "
". + $lang_label["no_agent"].$lang_label["no_agent_alert"]."
"; + } } ?> diff --git a/pandora_console/operation/agentes/estado_grupo.php b/pandora_console/operation/agentes/estado_grupo.php index c9079a166f..fdef7f0160 100644 --- a/pandora_console/operation/agentes/estado_grupo.php +++ b/pandora_console/operation/agentes/estado_grupo.php @@ -1,10 +1,9 @@ // Additions to Pandora FMS 1.2 graph code @@ -260,11 +259,15 @@ } echo ""; } - echo ""; } else { echo "
".$lang_label["no_agent_def"]."
"; + $id_user = $_SESSION["id_usuario"]; + if ( (give_acl($id_user, 0, "LM")==1) OR (give_acl($id_user, 0, "AW")==1 ) OR (give_acl($id_user, 0, "PM")==1) OR (give_acl($id_user, 0, "DM")==1) OR (give_acl($id_user, 0, "UM")==1 )){ + echo " 
"; + } } - ?> diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 523c9ab38c..0d78139e07 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -1,9 +1,9 @@ "; $string=$string."". substr($data["nombre"],0,21).""; - $string=$string."". + $string=$string."". substr($data["descripcion"],0,30).""; $string=$string.""; @@ -170,9 +176,9 @@ if (mysql_num_rows($result)){ $data2=mysql_fetch_array($result_gen2); $string=$string.""; if ($data2["datos"] > 0){ - $string=$string.""; + $string=$string.""; } else { - $string=$string.""; + $string=$string.""; } $string=$string.""; @@ -181,8 +187,9 @@ if (mysql_num_rows($result)){ $string .= ""; else $string .= ""; - - $string .= human_time_comparation($data2["timestamp"]).""; + + $string .= human_time_comparation($data2["timestamp"])." + "; } } } diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index d221d0ec66..efa5bb007d 100644 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -4,7 +4,7 @@ // ======================================== // 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 +// Copyright (c) 2004-2008 Raul Mateos Martin, raulofpandora@gmail.com // CSS and some PHP code additions // Please see http://pandora.sourceforge.net for full contribution list @@ -63,21 +63,21 @@ else echo "-"; - echo ""."Monitor Not Init".""; - echo ""; + echo ""."Monitor Not Init".""; + echo ""; if ($monitor_not_init> 0) echo $monitor_not_init; else echo "-"; - echo ""."Alerts Fired".""; - echo ""; + echo ""."Alerts Fired".""; + echo ""; if ($monitor_alert > 0) echo $monitor_alert; else echo "-"; - echo ""."Alerts Total".""; - echo "".$monitor_alert_total; + echo ""."Alerts Total".""; + echo "".$monitor_alert_total; echo ""; // Data checks @@ -98,14 +98,14 @@ echo $data_not_init; else echo "-"; - echo ""."Alerts Fired".""; - echo ""; + echo ""."Alerts Fired".""; + echo ""; if ($data_alert > 0) echo $data_alert; else echo "-"; - echo ""."Alerts Total"; - echo "".$data_alert_total; + echo ""."Alerts Total"; + echo "".$data_alert_total; echo ""; // Summary diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index 26edebbe29..b4dd0de6f8 100644 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -2,9 +2,9 @@ // Pandora FMS - the Free monitoring system // ======================================== -// Copyright (c) 2004-2007 Sancho Lerena, slerena@gmail.com +// Copyright (c) 2004-2008 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 +// Copyright (c) 2005-2008 Artica Soluciones Tecnologicas, info@artica.es // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -104,9 +104,15 @@ while ($row = mysql_fetch_array($res)){ echo "
"; echo $link_string; if ($status == 0){ - echo ""; + if (($width != "") AND ($width != 0)) + echo ""; + else + echo ""; } else { - echo ""; + if (($width != "") AND ($width != 0)) + echo ""; + else + echo ""; } echo ""; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index bc97d25b96..88797498a8 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1,3 +1,4 @@ + -------------------------------------------------------------- -- Pandora FMS official tables for 1.4 version -- -------------------------------------------------------------- @@ -63,7 +64,7 @@ CREATE TABLE `tagente_datos` ( CREATE TABLE `tagent_data_image` ( `id` bigint(20) unsigned NOT NULL auto_increment, `id_agente_modulo` mediumint(8) unsigned NOT NULL default '0', - `blob` blob NOT NULL, + `blob` mediumblob NOT NULL, `filename` varchar(255) default '', `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', `id_agente` mediumint(8) unsigned NOT NULL default '0', @@ -86,7 +87,7 @@ CREATE TABLE `tagente_datos_inc` ( CREATE TABLE `tagente_datos_string` ( `id_tagente_datos_string` bigint(20) unsigned NOT NULL auto_increment, `id_agente_modulo` int(11) NOT NULL default '0', - `datos` tinytext NOT NULL, + `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, @@ -109,6 +110,7 @@ CREATE TABLE `tagente_estado` ( `current_interval` int(10) unsigned NOT NULL default '0', `running_by` int(10) unsigned NULL default 0, `last_execution_try` bigint(20) NOT NULL default '0', + `id_agent_plugin` int(20) NOT NULL default '0', PRIMARY KEY (`id_agente_estado`), KEY `status_index_1` (`id_agente_modulo`), KEY `status_index_2` (`id_agente_modulo`,`estado`) @@ -135,6 +137,7 @@ CREATE TABLE `tagente_modulo` ( `id_modulo` int(11) unsigned NULL default 0, `disabled` tinyint(3) unsigned default '0', `export` tinyint(3) unsigned default '0', + `predictive_id_module_source` bigint(100) unsigned default 0, PRIMARY KEY (`id_agente_modulo`, `id_agente`), KEY `tam_agente` (`id_agente`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -169,6 +172,31 @@ CREATE TABLE `talerta` ( PRIMARY KEY (`id_alerta`) ) 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', + `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', + `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', + `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', + PRIMARY KEY (`id_aam`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + CREATE TABLE tnotification ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(255) default '', @@ -595,3 +623,35 @@ CREATE TABLE `tlayout_data` ( `no_link_color` tinyint(1) UNSIGNED NOT NULL default 0, PRIMARY KEY(`id`) ) ENGINE = InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE tplugin ( + `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + `name` varchar(200) NOT NULL, + `description` mediumtext default "", + `max_timeout` int(4) UNSIGNED NOT NULL default 0, + `execute`varchar(250) NOT NULL, + PRIMARY KEY('id') +) ENGINE = InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE `tagent_plugin` ( + `id` int(10) unsigned NOT NULL auto_increment, + `id_agent` int(11) NOT NULL default '0', + `id_plugin` int(11) NOT NULL default '0', + `net_dst` varchar(250) default '', + `net_port` varchar(250) default '', + `access_user` varchar(250) default '', + `access_pass` varchar(250) default '', + `field1` varchar(250) default '', + `field2` varchar(250) default '', + `field3` varchar(250) default '', + `field4` varchar(250) default '', + `field5` varchar(250) default '' + + `id_module_group` int(4) unsigned default '0', + `flag` tinyint(3) unsigned default '1', + `disabled` tinyint(3) unsigned default '0', + `export` tinyint(3) unsigned default '0', + PRIMARY KEY (`id_agente_modulo`, `id_agente`), + KEY `tam_agente` (`id_agente`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + diff --git a/pandora_console/pandoradb_13_to_14.sql b/pandora_console/pandoradb_13_to_14.sql index 959608acb5..49a9d0d5de 100644 --- a/pandora_console/pandoradb_13_to_14.sql +++ b/pandora_console/pandoradb_13_to_14.sql @@ -65,8 +65,42 @@ CREATE TABLE `tnotification_component` ( KEY `tnotifcom_indx_1` (`id_notification`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE tplugin ( + `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + `name` varchar(200) NOT NULL, + `description` mediumtext default "", + `max_timeout` int(4) UNSIGNED NOT NULL default 0, + `execute`varchar(250) NOT NULL, + PRIMARY KEY('id') +) ENGINE = InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE `tagent_plugin` ( + `id` int(10) unsigned NOT NULL auto_increment, + `id_agent` int(11) NOT NULL default '0', + `id_plugin` int(11) NOT NULL default '0', + `net_dst` varchar(250) default '', + `net_port` varchar(250) default '', + `access_user` varchar(250) default '', + `access_pass` varchar(250) default '', + `field1` varchar(250) default '', + `field2` varchar(250) default '', + `field3` varchar(250) default '', + `field4` varchar(250) default '', + `field5` varchar(250) default '' + + `id_module_group` int(4) unsigned default '0', + `flag` tinyint(3) unsigned default '1', + `disabled` tinyint(3) unsigned default '0', + `export` tinyint(3) unsigned default '0', + PRIMARY KEY (`id_agente_modulo`, `id_agente`), + KEY `tam_agente` (`id_agente`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- Updated tables ALTER TABLE tagente_modulo ADD COLUMN `disable` tinyint(3) unsigned NULL default 0; ALTER TABLE tagente_modulo ADD COLUMN `export` tinyint(3) unsigned default '0'; ALTER TABLE tagente ADD COLUMN `id_parent` mediumint(8) unsigned default '0'; + +ALTER TABLE tagente_estado ADD COLUMN `id_agent_plugin` int(20) NOT NULL default '0'; +ALTER TABLE tagente_modulo ADD COLUMN `predictive_id_module_source` bigint(100) unsigned default 0; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index d4fd940aca..9e6ebbf08e 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -20,7 +20,8 @@ INSERT INTO `talerta` VALUES (9,'Synthetized Speech','flite -t _FIELD2_','Uses c /*!40000 ALTER TABLE `tconfig` DISABLE KEYS */; LOCK TABLES `tconfig` WRITE; -INSERT INTO `tconfig` VALUES (1,'language_code','en'),(3,'block_size','20'),(4,'days_purge','60'),(5,'days_compact','15'),(6,'graph_res','5'),(7,'step_compact','1'),(8,'db_scheme_version','1.3'),(9,'db_scheme_build','PD60525'),(12,'bgimage','background4.jpg'),(13,'show_unknown','0'),(14,'show_lastalerts','1'),(15,'style','pandora'); +INSERT INTO `tconfig` VALUES +(1,'language_code','en'),(3,'block_size','20'),(4,'days_purge','60'),(5,'days_compact','15'),(6,'graph_res','5'),(7,'step_compact','1'),(8,'db_scheme_version','1.4'),(9,'db_scheme_build','PD80110'),(12,'bgimage','background4.jpg'),(13,'show_unknown','0'),(14,'show_lastalerts','1'),(15,'style','pandora'); UNLOCK TABLES; /*!40000 ALTER TABLE `tconfig` ENABLE KEYS */; @@ -161,7 +162,7 @@ INSERT INTO `torigen` VALUES ('Operating System event'),('IDS events'),('Firewal -- Dumping data for table `ttipo_modulo` -- -INSERT INTO `ttipo_modulo` VALUES (1,'generic_data',0,'Generic module to adquire numeric data','mod_data.png'),(2,'generic_proc',1,'Generic module to adquire boolean data','mod_proc.png'),(3,'generic_data_string',0,'Generic module to adquire alphanumeric data','mod_string.png'),(4,'generic_data_inc',0,'Generic module to adquire numeric incremental data','mod_data_inc.png'),(6,'remote_icmp_proc',3,'Remote ICMP network agent, boolean data','mod_icmp_proc.png'),(7,'remote_icmp',2,'Remote ICMP network agent (latency)','mod_icmp_data.png'),(8,'remote_tcp',2,'Remote TCP network agent, numeric data','mod_tcp_data.png'),(9,'remote_tcp_proc',3,'Remote TCP network agent, boolean data','mod_tcp_proc.png'),(10,'remote_tcp_string',2,'Remote TCP network agent, alphanumeric data','mod_tcp_string.png'),(11,'remote_tcp_inc',2,'Remote TCP network agent, incremental data','mod_tcp_inc.png'),(15,'remote_snmp',2,'Remote SNMP network agent, numeric data','mod_snmp_data.png'),(16,'remote_snmp_inc',2,'Remote SNMP network agent, incremental data','mod_snmp_inc.png'),(17,'remote_snmp_string',2,'Remote SNMP network agent, alphanumeric data','mod_snmp_string.png'),(18,'remote_snmp_proc',1,'Remote SNMP network agent, boolean data','mod_snmp_proc.png'), (100,'keep_alive',-1,'KeepAlive','mod_keepalive.png'), (19, 'image_jpg',4,'Image JPG data', 'mod_image_jpg.png'), (20, 'image_png',4,'Image PNG data', 'mod_image_png.png'), (21, 'async_proc', 5, 'Asyncronous proc data', 'mod_async_proc.png'), (22, 'async_data', 5, 'Asyncronous numeric data', 'mod_async_data.png'), (23, 'async_string', 5, 'Asyncronous string data', 'mod_async_string.png'); +INSERT INTO `ttipo_modulo` VALUES (1,'generic_data',0,'Generic module to adquire numeric data','mod_data.png'),(2,'generic_proc',1,'Generic module to adquire boolean data','mod_proc.png'),(3,'generic_data_string',0,'Generic module to adquire alphanumeric data','mod_string.png'),(4,'generic_data_inc',0,'Generic module to adquire numeric incremental data','mod_data_inc.png'),(6,'remote_icmp_proc',3,'Remote ICMP network agent, boolean data','mod_icmp_proc.png'),(7,'remote_icmp',2,'Remote ICMP network agent (latency)','mod_icmp_data.png'),(8,'remote_tcp',2,'Remote TCP network agent, numeric data','mod_tcp_data.png'),(9,'remote_tcp_proc',3,'Remote TCP network agent, boolean data','mod_tcp_proc.png'),(10,'remote_tcp_string',2,'Remote TCP network agent, alphanumeric data','mod_tcp_string.png'),(11,'remote_tcp_inc',2,'Remote TCP network agent, incremental data','mod_tcp_inc.png'),(15,'remote_snmp',2,'Remote SNMP network agent, numeric data','mod_snmp_data.png'),(16,'remote_snmp_inc',2,'Remote SNMP network agent, incremental data','mod_snmp_inc.png'),(17,'remote_snmp_string',2,'Remote SNMP network agent, alphanumeric data','mod_snmp_string.png'),(18,'remote_snmp_proc',1,'Remote SNMP network agent, boolean data','mod_snmp_proc.png'), (100,'keep_alive',-1,'KeepAlive','mod_keepalive.png'), (19, 'image_jpg',4,'Image JPG data', 'mod_image_jpg.png'), (20, 'image_png',4,'Image PNG data', 'mod_image_png.png'), (21, 'async_proc', 5, 'Asyncronous proc data', 'mod_async_proc.png'), (22, 'async_data', 5, 'Asyncronous numeric data', 'mod_async_data.png'), (23, 'async_string', 5, 'Asyncronous string data', 'mod_async_string.png'), (24, 'predictive', 5, 'Predictive Estimation Data', 'mod_predictive.png'); -- -- Dumping data for table `tusuario` @@ -202,4 +203,3 @@ INSERT INTO `tnetwork_profile_component` VALUES (12,54,3); INSERT INTO `tnetwork_profile_component` VALUES (13,55,3); INSERT INTO `tnetwork_profile_component` VALUES (14,56,3); INSERT INTO `tnetwork_profile_component` VALUES (15,57,3); - diff --git a/pandora_console/pandoradbdata_13_to_14.sql b/pandora_console/pandoradbdata_13_to_14.sql index 8cfabce0c9..a1c4af0ce0 100644 --- a/pandora_console/pandoradbdata_13_to_14.sql +++ b/pandora_console/pandoradbdata_13_to_14.sql @@ -3,9 +3,9 @@ -- New data UPDATE tconfig SET value = '1.4-dev' WHERE token = 'db_scheme_version'; -UPDATE tconfig SET value = 'PD080110' WHERE token = 'db_scheme_build'; +UPDATE tconfig SET value = 'PD080121' WHERE token = 'db_scheme_build'; -INSERT INTO `ttipo_modulo` VALUES (100,'keep_alive',-1,'KeepAlive','mod_keepalive.png'), (19, 'image_jpg',4,'Image JPG data', 'mod_image_jpg.png'), (20, 'image_png',4,'Image PNG data', 'mod_image_png.png'), (21, 'async_proc', 5, 'Asyncronous proc data', 'mod_async_proc.png'), (22, 'async_data', 5, 'Asyncronous numeric data', 'mod_async_data.png'), (23, 'async_string', 5, 'Asyncronous string data', 'mod_async_string.png'); +INSERT INTO `ttipo_modulo` VALUES (100,'keep_alive',-1,'KeepAlive','mod_keepalive.png'), (19, 'image_jpg',4,'Image JPG data', 'mod_image_jpg.png'), (20, 'image_png',4,'Image PNG data', 'mod_image_png.png'), (21, 'async_proc', 5, 'Asyncronous proc data', 'mod_async_proc.png'), (22, 'async_data', 5, 'Asyncronous numeric data', 'mod_async_data.png'), (23, 'async_string', 5, 'Asyncronous string data', 'mod_async_string.png'), (24, 'predictive', 5, 'Predictive Estimation Data', 'mod_predictive.png'); INSERT INTO tconfig (token, value) VALUES ('string_days_purge','7'); INSERT INTO tconfig (token, value) VALUES ('image_days_purge','2');