2006-03-27 05:37:27 +02:00
|
|
|
<?php
|
|
|
|
// Pandora - The Free Monitoring System
|
|
|
|
// This code is protected by GPL license.
|
|
|
|
// Este codigo esta protegido por la licencia GPL.
|
2007-04-02 Raul Mateos <raulofpandora@gmail.com>
* images/ok.gif: Deleted
* images/cross.png, go.png, ok.png, upd.png: Added new images
* include/styles/pandora.css, tip.css, op.css: Updated. Deleted some
old styles, not all.
* include/languages/language_en.php, language_es_es.php: Added text
for no recon task.
* godmode/*.php, operation/*.php, help/*.php: Changed some icons,
updated several buttons with new icons.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@410 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-04-02 19:17:27 +02:00
|
|
|
// Sancho Lerena <slerena@gmail.com>, 2003-2007
|
|
|
|
// Raul Mateos <raulofpandora@gmail.com>, 2005-2007
|
2006-03-27 05:37:27 +02:00
|
|
|
|
|
|
|
// Load global vars
|
|
|
|
require("include/config.php");
|
2007-04-02 Raul Mateos <raulofpandora@gmail.com>
* images/ok.gif: Deleted
* images/cross.png, go.png, ok.png, upd.png: Added new images
* include/styles/pandora.css, tip.css, op.css: Updated. Deleted some
old styles, not all.
* include/languages/language_en.php, language_es_es.php: Added text
for no recon task.
* godmode/*.php, operation/*.php, help/*.php: Changed some icons,
updated several buttons with new icons.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@410 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-04-02 19:17:27 +02:00
|
|
|
|
2006-03-27 05:37:27 +02:00
|
|
|
if ( (give_acl($id_user, 0, "LM")==1)){
|
2007-04-02 Raul Mateos <raulofpandora@gmail.com>
* images/ok.gif: Deleted
* images/cross.png, go.png, ok.png, upd.png: Added new images
* include/styles/pandora.css, tip.css, op.css: Updated. Deleted some
old styles, not all.
* include/languages/language_en.php, language_es_es.php: Added text
for no recon task.
* godmode/*.php, operation/*.php, help/*.php: Changed some icons,
updated several buttons with new icons.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@410 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-04-02 19:17:27 +02:00
|
|
|
if (isset($_POST["update_alerta"])){ // if modified any parameter
|
2006-03-27 05:37:27 +02:00
|
|
|
$id_alerta = entrada_limpia($_POST["id_alerta"]);
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
if ($id_alerta < 4){
|
|
|
|
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Alert Management");
|
|
|
|
require ("general/noaccess.php");
|
|
|
|
}
|
2006-03-27 05:37:27 +02:00
|
|
|
$nombre = entrada_limpia($_POST["nombre"]);
|
|
|
|
$comando = entrada_limpia($_POST["comando"]);
|
|
|
|
$descripcion= entrada_limpia($_POST["descripcion"]);
|
|
|
|
$sql_update ="UPDATE talerta SET nombre = '".$nombre."', comando = '".$comando."', descripcion = '".$descripcion."' WHERE id_alerta= '".$id_alerta."'";
|
|
|
|
$result=mysql_query($sql_update);
|
2007-04-18 23:45:03 +02:00
|
|
|
if (! $result) {
|
2006-03-27 05:37:27 +02:00
|
|
|
echo "<h3 class='error'>".$lang_label["update_alert_no"]."</h3>";
|
2007-04-18 23:45:03 +02:00
|
|
|
} else {
|
2006-03-27 05:37:27 +02:00
|
|
|
echo "<h3 class='suc'>".$lang_label["update_alert_ok"]."</h3>";
|
2007-04-18 23:45:03 +02:00
|
|
|
}
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
|
|
|
|
2007-04-02 Raul Mateos <raulofpandora@gmail.com>
* images/ok.gif: Deleted
* images/cross.png, go.png, ok.png, upd.png: Added new images
* include/styles/pandora.css, tip.css, op.css: Updated. Deleted some
old styles, not all.
* include/languages/language_en.php, language_es_es.php: Added text
for no recon task.
* godmode/*.php, operation/*.php, help/*.php: Changed some icons,
updated several buttons with new icons.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@410 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-04-02 19:17:27 +02:00
|
|
|
if (isset($_POST["crear_alerta"])){ // if create alert
|
2006-03-27 05:37:27 +02:00
|
|
|
$nombre = entrada_limpia($_POST["nombre"]);
|
|
|
|
$comando = entrada_limpia($_POST["comando"]);
|
|
|
|
$descripcion= entrada_limpia($_POST["descripcion"]);
|
|
|
|
$sql_update ="INSERT talerta (nombre, comando, descripcion) VALUES ('".$nombre."', '".$comando."', '".$descripcion."')";
|
|
|
|
$result=mysql_query($sql_update);
|
|
|
|
if (! $result)
|
|
|
|
echo "<h3 class='error'>".$lang_label["create_alert_no"]."</h3>";
|
|
|
|
else
|
|
|
|
echo "<h3 class='suc'>".$lang_label["create_alert_ok"]."</h3>";
|
|
|
|
}
|
|
|
|
|
2007-04-02 Raul Mateos <raulofpandora@gmail.com>
* images/ok.gif: Deleted
* images/cross.png, go.png, ok.png, upd.png: Added new images
* include/styles/pandora.css, tip.css, op.css: Updated. Deleted some
old styles, not all.
* include/languages/language_en.php, language_es_es.php: Added text
for no recon task.
* godmode/*.php, operation/*.php, help/*.php: Changed some icons,
updated several buttons with new icons.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@410 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-04-02 19:17:27 +02:00
|
|
|
if (isset($_GET["borrar_alerta"])){ // if delete alert
|
2006-03-27 05:37:27 +02:00
|
|
|
$id_alerta = entrada_limpia($_GET["borrar_alerta"]);
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
if ($id_alerta < 4){
|
|
|
|
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Alert Management");
|
|
|
|
require ("general/noaccess.php");
|
|
|
|
}
|
2006-03-27 05:37:27 +02:00
|
|
|
$sql_delete= "DELETE FROM talerta WHERE id_alerta = ".$id_alerta;
|
|
|
|
$result=mysql_query($sql_delete);
|
|
|
|
if (! $result)
|
|
|
|
echo "<h3 class='error'>".$lang_label["delete_alert_no"]."</h3>";
|
|
|
|
else
|
|
|
|
echo "<h3 class='suc'>".$lang_label["delete_alert_ok"]."</h3>";
|
|
|
|
|
|
|
|
$sql_delete2 ="DELETE FROM talerta_agente_modulo WHERE id_alerta = ".$id_alerta;
|
|
|
|
$result=mysql_query($sql_delete2);
|
|
|
|
}
|
|
|
|
|
2007-05-27 04:55:55 +02:00
|
|
|
echo "<h2>".$lang_label["alert_config"]." > ";
|
2007-10-12 18:27:50 +02:00
|
|
|
echo $lang_label["alert_defined2"]."</h2>";
|
2007-05-24 22:03:05 +02:00
|
|
|
echo "<table width='500' cellpadding='4' cellspacing='4' class='databox'>";
|
2007-04-18 23:45:03 +02:00
|
|
|
echo "<th width='100px'>".$lang_label["alertname"]."</th>";
|
|
|
|
echo "<th>".$lang_label["description"]."</th>";
|
|
|
|
echo "<th>".$lang_label["delete"]."</th>";
|
2006-07-04 12:10:21 +02:00
|
|
|
$color=1;
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
$sql1='SELECT * FROM talerta';
|
2006-03-27 05:37:27 +02:00
|
|
|
$result=mysql_query($sql1);
|
|
|
|
while ($row=mysql_fetch_array($result)){
|
2006-07-03 12:49:42 +02:00
|
|
|
if ($color == 1){
|
|
|
|
$tdcolor = "datos";
|
|
|
|
$color = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$tdcolor = "datos2";
|
|
|
|
$color = 1;
|
|
|
|
}
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
if ($row[0] > 4){
|
2008-04-01 15:53:11 +02:00
|
|
|
echo "<tr><td class='$tdcolor'><b><a href='index.php?sec=galertas&sec2=godmode/alerts/configure_alert&id_alerta=".$row["id_alerta"]."'>".$row["nombre"]."</a></b></td>";
|
|
|
|
echo "<td class='$tdcolor'>".$row["descripcion"]."</td>";
|
|
|
|
echo "<td class='$tdcolor' align='center'><a href='index.php?sec=gagente&sec2=godmode/alerts/modify_alert&borrar_alerta=".$row["id_alerta"]."' onClick='if (!confirm(\' ".$lang_label["are_you_sure"]."\')) return false;'><img border='0' src='images/cross.png'></a></td>";
|
|
|
|
} else {
|
|
|
|
echo "<tr><td class='$tdcolor'><b>".$row["nombre"]."</b></td>";
|
|
|
|
echo "<td class='$tdcolor'>".$row["descripcion"]."</td>";
|
|
|
|
}
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
2007-05-24 22:03:05 +02:00
|
|
|
|
2007-06-06 18:23:24 +02:00
|
|
|
echo "</tr></table>";
|
2007-05-24 22:03:05 +02:00
|
|
|
echo "<table width=500>";
|
|
|
|
echo "<tr><td align='right'>";
|
2007-05-27 04:55:55 +02:00
|
|
|
echo "<form method=post action='index.php?sec=galertas&sec2=godmode/alerts/configure_alert&creacion=1'>";
|
2007-04-02 Raul Mateos <raulofpandora@gmail.com>
* images/ok.gif: Deleted
* images/cross.png, go.png, ok.png, upd.png: Added new images
* include/styles/pandora.css, tip.css, op.css: Updated. Deleted some
old styles, not all.
* include/languages/language_en.php, language_es_es.php: Added text
for no recon task.
* godmode/*.php, operation/*.php, help/*.php: Changed some icons,
updated several buttons with new icons.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@410 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-04-02 19:17:27 +02:00
|
|
|
echo "<input type='submit' class='sub next' name='crt' value='".$lang_label["create_alert"]."'>";
|
2006-03-27 05:37:27 +02:00
|
|
|
echo "</form>";
|
|
|
|
echo "</td></tr></table>";
|
|
|
|
|
2007-04-02 Raul Mateos <raulofpandora@gmail.com>
* images/ok.gif: Deleted
* images/cross.png, go.png, ok.png, upd.png: Added new images
* include/styles/pandora.css, tip.css, op.css: Updated. Deleted some
old styles, not all.
* include/languages/language_en.php, language_es_es.php: Added text
for no recon task.
* godmode/*.php, operation/*.php, help/*.php: Changed some icons,
updated several buttons with new icons.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@410 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-04-02 19:17:27 +02:00
|
|
|
} // End page
|
2006-03-27 05:37:27 +02:00
|
|
|
else {
|
2007-04-18 23:45:03 +02:00
|
|
|
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Alert Management");
|
|
|
|
require ("general/noaccess.php");
|
|
|
|
}
|
2007-05-24 22:03:05 +02:00
|
|
|
?>
|