<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page errorPage="../error.jsp"%> <%@ page import="nagios.utilities.*,nagios.ConfigurationObjects.*;" %> CONFIGURACIÓN DEL SERVICIO

CONFIGURACIÓN DEL SERVICIO

<% ServiceTO servicio = null; ServiceTO plantilla = null; ServiceTO[] plnts = null; TimeperiodTO[] timeperiods = null; CommandTO[] commands = null; ContactgroupTO[] contactgroups = null; HostTO[] hosts = null; PlatformTO[] platforms = null; //Obtenemos los datos del request servicio = (ServiceTO)request.getAttribute(Constants.DATA); hosts = (HostTO[])request.getAttribute(Constants.HOSTS); plnts = (ServiceTO[])request.getAttribute(Constants.TMPLAVALIABLES); timeperiods = (TimeperiodTO[])request.getAttribute(Constants.TIMEPERIODS); commands = (CommandTO[])request.getAttribute(Constants.COMMANDS); contactgroups = (ContactgroupTO[])request.getAttribute(Constants.CONTACTGROUPS); platforms = (PlatformTO[])request.getAttribute(Constants.PLATFORMS); if (servicio != null && servicio.getTemplate().getValue() != null){ //Se obtiene la plantilla plantilla = (ServiceTO)request.getAttribute(Constants.TEMPLATE); } //Si se ha encontrado algo if (servicio != null){ %>

Los campos con asterisco (*) son obligatorios
Valor Valor de la plantilla ¿Sobreescribe plantilla?
Identificador*
Descripción del servicio* <% if (plantilla != null && plantilla.getService_description().getValue() != null) out.println(plantilla.getService_description().getValue()); %>
checked="true" <%} %>>
Host* <% if (plantilla != null && plantilla.getHost_name().getValue() != null) out.println(plantilla.getHost_name().getValue()); %>
checked="true" <%} %>>
Name (nombre como plantilla) <% if (plantilla != null && plantilla.getName().getValue() != null) out.println(plantilla.getName().getValue()); %>
plantilla <% if(plantilla != null && plantilla.getTemplate().getValue() != null) out.println(plantilla.getTemplate().getValue()); %>
plataforma
Register* <%//if(plantilla != null) out.println(plantilla.getAlias().getValue()); %>
Volatil* <%if(plantilla != null && plantilla.getIs_volatile().getValue() != null){ if(plantilla.getIs_volatile().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getIs_volatile().getValue().toString().equals("0")) out.println("Inactivo"); } %>
checked="true" <%} %>>
Comando de chequeo* <%if (plantilla != null && plantilla.getCheck_command().getValue() != null) out.println(plantilla.getCheck_command().getValue()); %>
checked="true" <%} %>>
Argumentos del comando <% //if (plantilla.getHost_notification_period() != null) out.println(contacto.getHost_notification_period().getValue()); %>
Intentos para pasar a error* <%if (plantilla != null && plantilla.getMax_check_attempts().getValue() != null) out.println(plantilla.getMax_check_attempts().getValue()); %>
checked="true" <%} %>>
Intervalo normal entre chequeos* (min) <%if(plantilla != null && plantilla.getNormal_check_interval().getValue() != null) out.println(plantilla.getNormal_check_interval().getValue()); %>
checked="true" <%} %>>
Intervalo en estado no OK* (min) <%if(plantilla != null && plantilla.getRetry_check_interval().getValue() != null) out.println(plantilla.getRetry_check_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" <%} %>>
parallelize_check <%if(plantilla != null && plantilla.getParallelize_check().getValue() != null){ if(plantilla.getParallelize_check().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getParallelize_check().getValue().toString().equals("0")) out.println("Inactivo"); } %>
checked="true" <%} %>>
obsess_over_service <%if(plantilla != null && plantilla.getObsess_over_service().getValue() != null){ if(plantilla.getObsess_over_service().getValue().toString().equals("1")) out.println("Activo"); else if(plantilla.getObsess_over_service().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* [w,u,c,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,w,u,c] <%if(plantilla != null && plantilla.getStalking_options().getValue() != null) out.println(plantilla.getStalking_options().getValue()); %>
checked="true" <%} %>>
<%} %>

Gestión de grupos de Contactos del Servicio

Es obligatorio que el Servicio tenga un grupo de contactos

<%if(servicio.getContact_groups() != null && servicio.getContact_groups().length > 0){ %>
<%for(int i = 0; i < servicio.getContact_groups().length; i++){ %> <%} %>
<%=servicio.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: