<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page errorPage="../error.jsp"%> <%@ page import="nagios.utilities.*,nagios.ConfigurationObjects.*;" %> PARÁMETROS DE LA PLANTILLA

CONFIGURAR PLANTILLA DE HOST

<% //Se obtienen los parámetros del Host HostTO Host = null; HostTO plantilla = null; ContactgroupTO[] contactgroups = null; TimeperiodTO[] timeperiods = null; CommandTO[] commands = null; HostTO[] plnts = null; PlatformTO[] platforms = null; //Obtenemos los datos de la sesion Host = (HostTO)request.getAttribute(Constants.DATA); timeperiods = (TimeperiodTO[])request.getAttribute(Constants.TIMEPERIODS); contactgroups = (ContactgroupTO[])request.getAttribute(Constants.CONTACTGROUPS); commands = (CommandTO[])request.getAttribute(Constants.COMMANDS); plnts = (HostTO[])request.getAttribute(Constants.TMPLAVALIABLES); platforms = (PlatformTO[])request.getAttribute(Constants.PLATFORMS); if (Host != null && Host.getTemplate().getValue() != null) plantilla = (HostTO)request.getAttribute(Constants.TEMPLATE); //Si se ha encontrado algo if (Host != null){ %>

Los campos con asterisco (*) son obligatorios. En el caso de la plantilla solo nombre y alias son obligatorios.
Valor Valor de la plantilla ¿Sobreescribe plantilla?
Identificador*
Nombre* <% if (plantilla != null && plantilla.getHost_name().getValue() != null) out.println(plantilla.getHost_name().getValue()); %>
checked="true" <%} %>>
Alias* <% if(plantilla != null && plantilla.getAlias().getValue() != null) out.println(plantilla.getAlias().getValue()); %>
checked="true" <%} %>>
Name (nombre como plantilla) <% if(plantilla != null && plantilla.getName().getValue() != null) out.println(plantilla.getName().getValue()); %>
Register* <%//if(plantilla != null) out.println(plantilla.getAlias().getValue()); %>
IP <% if(plantilla != null && plantilla.getAddress().getValue() != null) out.println(plantilla.getAddress().getValue()); %>
checked="true" <%} %>>
Plataforma
plantilla <% if(plantilla != null && plantilla.getTemplate().getValue() != null) out.println(plantilla.getTemplate().getValue()); %>
Comando de chequeo <%if (plantilla != null && plantilla.getCheck_command().getValue() != null) out.println(plantilla.getCheck_command().getValue()); %>
checked="true" <%} %>>
Intentos para pasar a error <%if (plantilla != null && plantilla.getMax_check_attempts().getValue() != null) out.println(plantilla.getMax_check_attempts().getValue()); %>
checked="true" <%} %>>
Intervalo entre chequeos (min) <%if(plantilla != null && plantilla.getCheck_interval().getValue() != null) out.println(plantilla.getCheck_interval().getValue()); %>
checked="true" <%} %>>
Chequeos Activos <%if(plantilla != null && plantilla.getActive_checks_enabled().getValue() != null){ if(plantilla.getActive_checks_enabled().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getActive_checks_enabled().getValue().toString().equals("0")) out.println("Inactivo"); } %>
checked="true" <%} %>>
Chequeos Pasivos <%if(plantilla != null && plantilla.getPassive_checks_enabled().getValue() != null){ if(plantilla.getPassive_checks_enabled().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getPassive_checks_enabled().getValue().toString().equals("0")) out.println("Inactivo"); } %>
checked="true" <%} %>>
Periodo de chequeo <%if(plantilla != null && plantilla.getCheck_period().getValue() != null) out.println(plantilla.getCheck_period().getValue()); %>
checked="true" <%} %>>
obsess_over_host <%if(plantilla != null && plantilla.getObsess_over_host().getValue() != null){ if(plantilla.getObsess_over_host().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getObsess_over_host().getValue().toString().equals("0")) out.println("Inactivo"); } %>
checked="true" <%} %>>
check_freshness <%if(plantilla != null && plantilla.getCheck_freshness().getValue() != null){ if(plantilla.getCheck_freshness().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getCheck_freshness().getValue().toString().equals("0")) out.println("Inactivo"); } %>
checked="true" <%} %>>
freshness_threshold (sec) <%if(plantilla != null && plantilla.getFreshness_threshold().getValue() != null) out.println(plantilla.getFreshness_threshold().getValue()); %>
checked="true" <%} %>>
Manejador de evento <%if(plantilla != null && plantilla.getEvent_handler().getValue() != null) out.println(plantilla.getEvent_handler().getValue()); %>
checked="true" <%} %>>
Manejador de evento activo <%if(plantilla != null && plantilla.getEvent_handler_enabled().getValue() != null){ if(plantilla.getEvent_handler_enabled().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getEvent_handler_enabled().getValue().toString().equals("0")) out.println("Inactivo"); } %>
checked="true" <%} %>>
low_flap_threshold <%if(plantilla != null && plantilla.getLow_flap_threshold().getValue() != null) out.println(plantilla.getLow_flap_threshold().getValue()); %>
checked="true" <%} %>>
high_flap_threshold <%if(plantilla != null && plantilla.getHigh_flap_threshold().getValue() != null) out.println(plantilla.getHigh_flap_threshold().getValue()); %>
checked="true" <%} %>>
flap_detection_enabled <%if(plantilla != null && plantilla.getFlap_detection_enabled().getValue() != null){ if(plantilla.getFlap_detection_enabled().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getFlap_detection_enabled().getValue().toString().equals("0")) out.println("Inactivo"); } %>
checked="true" <%} %>>
process_perf_data <%if(plantilla != null && plantilla.getProcess_perf_data().getValue() != null){ if(plantilla.getProcess_perf_data().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getProcess_perf_data().getValue().toString().equals("0")) out.println("Inactivo"); } %>
checked="true" <%} %>>
retain_status_information <%if(plantilla != null && plantilla.getRetain_status_information().getValue() != null){ if(plantilla.getRetain_status_information().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getRetain_status_information().getValue().toString().equals("0")) out.println("Inactivo"); } %>
checked="true" <%} %>>
retain_nonstatus_information <%if(plantilla != null && plantilla.getRetain_nonstatus_information().getValue() != null){ if(plantilla.getRetain_nonstatus_information().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getRetain_nonstatus_information().getValue().toString().equals("0")) out.println("Inactivo"); } %>
checked="true" <%} %>>
Intervalo de notificación (min) <%if(plantilla != null && plantilla.getNotification_interval().getValue() != null) out.println(plantilla.getNotification_interval().getValue()); %>
checked="true" <%} %>>
Periodo de notificación <%if(plantilla != null && plantilla.getNotification_period().getValue() != null) out.println(plantilla.getNotification_period().getValue()); %>
checked="true" <%} %>>
Opciones de notificación [d,u,r,f] <%if(plantilla != null && plantilla.getNotification_options().getValue() != null) out.println(plantilla.getNotification_options().getValue()); %>
checked="true" <%} %>>
Notificaciones activas <%if(plantilla != null && plantilla.getNotifications_enabled().getValue() != null){ if(plantilla.getNotifications_enabled().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getNotifications_enabled().getValue().toString().equals("0")) out.println("Inactivo"); } %>
checked="true" <%} %>>
stalking_options [o,d,u] <%if(plantilla != null && plantilla.getStalking_options().getValue() != null) out.println(plantilla.getStalking_options().getValue()); %>
checked="true" <%} %>>
<%} %>

Gestión de grupos de Contactos del Host

Es obligatorio que el Host tenga un grupo de contactos

<%if(Host.getContact_groups() != null && Host.getContact_groups().length > 0){ %>
<%for(int i = 0; i < Host.getContact_groups().length; i++){ %> <%} %>
<%=Host.getContact_groups()[i].getValue() %>
<%} %>
<%if(contactgroups != null){ //Buscamos los grupos que no estan ya añadidos %>
<%for(int i = 0; i < contactgroups.length; i++){ %> <%} %>
<%=contactgroups[i].getContactgroup_name() %>
<%} %>
e-REdING. Biblioteca de la Escuela Superior de Ingenieros de Sevilla.


APLICACIÓN PARA LA GENERACIÓN Y ADMINISTRACIÓN DE LA CONFIGURACIÓN DE NAGIOS

: Bravo Ortiz, Agustín
: Ingeniería Telecomunicación
Contenido del proyecto: