Home

Cuaderno Tècnico_I: _Monitorizacion de Servicios y Sistemas

image

Contents

1. PHP API PHP Extension Zend Extension 22009062 Zend Extension Build API220090626 NTS PHP Extension Build AP120090626 NTS Debug Build no Thread Safety disabled https ftps compress zlib compress bzip2 php file glob data http ftp phar Zip tcp udp unix udg ssi ssIv3 ssiv2 tis Registered Stream Filters zlib bzip2 convert iconv string rot13 string toupper string tolower string strip_tags convert consumed dechunk XT i Fig 17 Comprobaci n PHP5 instalado y configurado Pag 41 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS En las p ginas de ayuda del servidor de Ubuntu se puede encontrar documentaci n sobre la instalaci n b sica del servidor Apache Tambi n ser necesario instalar el protocolo SNMP net snmp si se quiere utilizar posteriormente Si no se instala previamente la instalaci n de Nagios no lo tendr en cuenta sudo apt get install snmp No obstante es recomendable descargar el paquete de la web y compilarlo en el sistema configure make sudo make install Este paquete lleva incorporada la MIBS que ser n necesarias para utilizar SNMP m s tarde Ninguna de las opciones anteriores instala el agente SNMP en el equipo Para ello se debe instalar el paquete snmpd demonio de Linux sudo apt get install snmpd 5 2 2 Creaci n de usuarios y grupos Entrar al modo root sud
2. MAC Address 742f 689f d65d Name NONE IP Address 192 168 1 53 Class unknown Device unknown Software Version NONE CCX Version NONE State Associated Parent self SSID VLAN ji Hops To Infrastructure 1 Communication Over Interface Radio0 802 11G Clients Associated Key Mgmt type Current Rate Mb sec 0 Repeaters Associated NONE Encryption 54 0 Capability 0 Off WMM ShortHdr ShortSlot Supported Rates Mb sec 1 0 2 0 5 5 11 0 6 0 9 0 12 0 18 0 24 0 36 0 48 0 54 0 Voice Rates Mb sec disabled Association Id 123 Signal Strength dBm 38 Connected For sec 1996 Signal to Noise dBm 57 Activity TimeOut sec 60 Power save Off Last Activity sec 0 Apsd DE AC s NONE Posture Token Session TimeOut sec Reauthenticate In sec Never Receive Transmit Statistics Total Packets Input 5870 Total Packets Output 3816 Total Bytes Input 865711 Total Bytes Output 2455597 Duplicates Received 1 Maximum Data Retries 132 Necrunt Frrors 0 Maximum RTS Retries 0 Fig 123 P gina web de un AP Cisco con informaci n de clientes asociados Por ltimo el AP monitorizado con Cisco se muestra en la siguiente figura P g 122 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Calidad senal dB Clientes apcisco E 03 08 2012 13 40 57 0d1h42m24s 1 3 SNMP OK 37 o 03 08 2012 13 40 31 3
3. E Carpeta personal Equipo a 100 Q E E J Sistema de arch commands cfg contacts cfg localhost cfg printer cfg Red Disquete Papelera switch cfg templates cfg timeperiods cfg windows cfg E Descargas elementos espacio libre 6 1 GiB Fig 24 Ficheros de configuraci n de Nagios P g 48 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Los tres ficheros principales de configuraci n son nagios cfg cgi cfg y resource cfg Si alguno de los ficheros se edita o crea con el usuario root hay que asegurarse despu s que todos los ficheros pertenezcan al usuario nagios alumno nagios etc nagios h Archivo Editar Ver Buscar Terminal Ayuda alumno nagios etc nagios ls l total 68 rw rw r 1 nagios nagios 11398 2011 09 16 20 20 cgi cfg fw r r 1 root root 26 2011 09 16 20 37 htpasswd users rw rw r 1 nagios nagios 43534 2011 09 16 20 20 nagios cfg drwxrwxr x 2 nagios nagios 4096 2011 09 16 20 20 objects rw rw 1 nagios nagios 1340 2011 09 16 20 20 resource cfg alumno nagios etc nagios ls objects commands cfg localhost cfg switch cfg timeperiods cfg contacts cfg printer cfg templates cfg windows cfg alumno nagios etc nagios ls l objects total 48 rw rw r 1 nagios nagios 7696 2011 09 16 20 20 commands cfg rw rw r 1 nagios nagios 2166 2011 09 16 20 20 contacts cfg rw rw r 1 nagios nagios 5403 2011 09 16 20 20
4. Ke NO NO Entity MIB Version 2 K McCloghrie A December ASCII Bierman Coexistence between R Frye D Levi S March 2000 ASCII Version 1 Version 2 and Routhier B Version 3 of the Internet Wijnen standard Network Management Framework View based Access B Wijnen R April1999 ASCII Obsoletes DRAFT STANDARD Control Model VACM Presuhn K RFC2275 for the Simple Network McCloghrie Obsoleted by Management Protocol April 1999 ASCII SNMP Septiembre de 2012 Obsoletes RFC1908 RFC2089 Obsoleted by RFC3584 PROPOSED STANDARD RFC2576 RFC2575 U Blumenthal B Wijnen Obsoletes DRAFT STANDARD REC2274 Obsoleted by RFC3414 RFC2574_ User based Security Model USM for version 3 of the Simple Network Management Protocol SNMPv3 i Gg ff Ftd P g 155 MONITORIZACI N DE SERVICIOS Y SISTEMAS SNMP Applications D Levi P Meyer April 1999 B Stewart Obsoletes DRAFT STANDARD RFC2273 Obsoleted by RFC3413 Obsoletes DRAFT STANDARD REC2272 Obsoleted by RFC3412 Message Processing and J Case D Dispatching for the Harrington R Simple Network Presuhn B Management Protocol Wijnen SNMP An Architecture for B Wijnen D April 1999 Describing SNMP Harrington R Management Presuhn Frameworks Obsoletes DRAFT STANDARD RFC2271 Obsoleted by RFC3411 Introduction to Version 3 J Case R Mundy
5. System out write dp getData 0 dp getLength 19 http nagios sourceforge net download contrib documentation misc NSCA_Setup pdf 20 Ver apartado 14 6 del libro Nagios 2nd edition P g 91 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS System out println Sy SECMOUL prin tin enc Se ha recibido un trap longitud dp getLength bytes System out PLN EIN 22 SS System out println cadena System OU pt e e 2229 122 hn a e a ae a ge System out println REE while cadena equals adios conexion disconnect conexion close A continuaci n se muestra una captura del programa en Java que captura traps El S mbolo del sistema o l e Jasa esperando traps Dindsockets gt java cp d dsockets servidor Servidor escuchando en el puerto 162 esperando traps m OjO fpubliciI 00 L OSAOEEOCIV 707B8 14F1 4000 Hoo OS 14 4000 Hoora O d HE T ia 408 esperando traps 2 Se ha recibido un trap longitud 168 bytes 6jO0S fpubliciI 800 L OABOHIEOCIV ELO B 41 4000 20 1620 4f1 1000 EO 12000 4J1 1000 esperando traps Dindsockets gt java cp d dsockets servidor z Fig 84 Ejecuci n del servidor de lectura de traps servidor class Para ejecutarlo se debe tener instalada una m quina Java al menos JRE Se debe descomprimir y copiar en el directorio x dsockets para qu
6. httpStatistics 3 totalBytesReceivedLowWord OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the low 32 bits of the total number of of BYTEs received by the HTTP Server httpStatistics 4 totalFilesSent OBJECT TYPE SYNTAX Counter Septiembre de 2012 P g 175 MONITORIZACI N DE SERVICIOS Y SISTEMAS ACCESS read only STATUS mandatory DESCRIPTION This is the total number of files sent by this HTTP Server httpStatistics 5 totalFilesReceived OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the total number of files received by this HTTP Server httpStatistics 6 currentAnonymousUsers OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of anonymous users currently connected to the HTTP Server httpStatistics 7 currentNonAnonymousUsers OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of nonanonymous users currently connected to the HTTP Server httpStatistics 8 totalAnonymousUsers OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the total number of anonymous users that have ever connected to the HTTP Server httpStatistics 9 totalNonAnonymousUsers OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the tot
7. Para comprobar si el plugin funciona se puede utilizar la aplicaci n apache benchmarking tanto para apache como IIS Esta aplicaci n permite lanzar peticiones concurrentes a un servidor http En el siguiente ejemplo se lanzan 8000 en total en grupos de 600 concurrentes en el servidor IIS 172 25 80 132 alumno nagios ab n 8000 c 600 http 172 25 80 132 This is ApacheBench Version 2 3 lt Revision 655654 gt Copyright 1996 Adam Twiss Zeus Technology Ltd http www zeustech net Licensed to The Apache Software Foundation http www apache org Benchmarking 172 25 80 132 be patient Completed 800 requests Completed 1600 requests Completed 2400 requests Completed 3200 requests Septiembre de 2012 P g 101 Completed 4000 Completed 4800 Completed 5600 Completed 6400 Completed 7200 Completed 8000 MONITORIZACI N DE SERVICIOS Y SISTEMAS requests requests requests requests requests requests Finished 8000 requests Server Software Server Hostname Server Port Document Path Document Length Concurrency Level Time taken for tests Complete requests Failed requests Write errors Total transferred HTML transferred Requests per second Time per request Time per request Transfer rate Connection Times ms min mean Connect Processing Waiting Total 0 1 6 148 6 148 22 150 Microsoft IIS 7 5 172 25 80 132 80 689 bytes 600 2 572 second
8. CHEC_ESX Version 0 5 Along with other improvement It has new features like Cluster monitoring Storage SAN Luns Paths adapters etc Vmware Tools I like the extra feature where you can call native nagios options via vcenter or esx extra opts section file Read options from an ini file See http nagiosplugins org extra opts for usage 12 7 Anexo VII Arbol de OIDs MIB telefonia IP CISCO CCM MIB my THIS FILE WAS GENERATED BY MIB2SCHEMA org 1 3 dod 1 3 6 internet EA TA directory Mii dei mgmt WT 3860 2 experimental aL tes Kal TE FE i private WLS ATA enterprises ak Pi PE PRE D kd ei sco WH 3 Lit dig ciscoMgmt WLeSe bed oat sO OM ciscoCcmMIB T3660 e4 de 9 9 L56 ciscoCcmMIBObjects MD 3 sO Le Fits E LTE Gi ccmMIBNotificationPrefix 1 3 6 1 4 1 9 9 156 2 ciscoCcmMIBConformance Le SiO Let dis Ge 2 ASG 3 ccmGeneralInfo T3564 15455 PE T5661 4 1 ccomPhoneInfo 1 36001 646429 9s 1565 2 2 ccmGatewayInfo 1 3 6 1 4 1 9 9 156 1 3 ccmGatewayTrunkInfo WL 3 Ged AS PO A 14 comGlobalInfo 1 3601 6442 9 9 15661 0 ccmMediaDevicelnfo WT PA A E comGatekeeperInfo ML Ltd LIL N hd ccmCTIDeviceInfo 1 356 969 156 1 8 ccmAlarmConfigInfo LD at oP ar ccmNotificationsInfo ML 9 9156 110 ccmH323DeviceInfo TES AS PO OE PES PET E E Y hi ccmVoiceMailDevicelnfo WL De Beda hod 6959 156 1412 ccmQualityReportAlarmConfigInfo E SETE OEP IE EET TETT E
9. Las MIBS son CISCO CCM MIB my CISCO CDP MIB my y SYS APPL MIB my Se pueden consultar y descargar en la web de Cisco y en la web oidview com seleccionando como fabricante Cisco 9 7 Algunos OIDs interesantes para consultar en Nagios son Tabla VIII Resumen de objetos y OIDs gestionables para Cisco Call Manager 25 http exchange nagios org index php option com_mtree amp task search amp ltemid 74 amp searchw ord apache2 26 ftp ftp cisco com pub mibs supportlists callmanager callmanager supportlist html 27 http www oidview com mibs 9 md 9 1 html P g 104 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS OBJETO ccomPhoneInfo comGatewayInfo ccmPhoneStatusUpdateTable ccmPhoneExtnTable ccmPhoneEntry ccomPhoneIndex ccmPhonePhysicalAddress ccmPhoneType ccmPhoneDescription ccmPhoneUserName ccmPhonelpAddress ccmPhoneStatus ccmPhoneFailedRegFailReason ccmPhoneStatusUpdateEntry ccmPhoneStatusUpdateIndex ccomPhoneStatusPhoneIndex ccomPhoneStatusUpdateTime ccmPhoneStatusUpdateType ccmPhoneStatusUpdateReason ccmPhoneStatusUnregReason ccmPhoneStatusRegFailReason ccomActivePhones ccmInActivePhones ccomActiveGateways ccmInActiveGateways ccmRegisteredPhones Para m s detalle se puede consultar el rbol de OIDs disponible en la MIB CISCO CDP MIB my en el anexo VII y en los enlaces de Cisco y oidview com 9 7 1 Configuraci n previa del Call M
10. Para que sirva de ejemplo se ha abierto la bandeja 2 de una impresora La interfaz de Nagios muestra el siguiente mensaje P g 127 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS al dq Luni dejun 11 52 C aumo 0 ozilla Firefox drial Marcadores Herramientas Ayuda acalhost nagios ve BE Google a e Current Network Status Host Status Totals Service Status Totals festa Sg a a up Down Unreachable Pending ok Warning Unknown Critical Pending s a mo o Po me o o Po E Service Status Details For Host Facturacion Host Semice status Last Check Duration 2 famempt Status information Facturaci n Display OA 06 11 2012 11 52 35 Od Oh 3m 11s 13 BANDEJA 2 ABIERTA PREPARADA 1 Matching Service Entries Displayed Fig 126 Detecci n de bandeja abierta en una impresora Y a continuaci n muestro el mensaje que da localmente el display de la impresora Muestra alternativamente Preparada y Bandeja 2 abierta Preparada Continuar Men M wae Preparada H Continuar en gt a G em i Datos pissa Fig 127 Mensaje en el display de la impresora del aviso en Nagios 10 4 Servidores LINUX Ubuntu El fichero de configuraci n localhost cfg en el directorio objects se puede utilizar como plantilla para monitorizar m quinas Linux define host use linux server 7 Name of host template to use This host definition wil
11. use the authentication functions the default use authentication 1 x509 CERT AUTHENTICATION When enabled this option allows you to use x509 cert SSL authentication in the CGIs This is an advanced option and should not be enabled unless you know what you re doing use ssl_authentication 0 Octave y Ancho de la tabulaci n 8 Ln 14 Col 1 Fig 32 Configuraci n autentificaci n 6 1 5 Arranque y parada de Nagios Para actualizar cualquier configuraci n se debe volver a cargar Nagios sudo etc init d nagios start stop restart reload Si hay alg n problema con el servidor Apache tambi n se puede reiniciar sudo etc init d apache2 start stop restart reload Hay que tener en cuenta que para cualquier cambio en la configuraci n de Nagios se debe actualizar con el comando nagios reload Sin embargo no se debe hacer de forma continua ya que una vez actualizada la configuraci n Nagios empezar a ejecutar las tareas programadas de nuevo Para que no arranquen todas a la vez se pueden configurar los par metros max_service_check_spread y max_host_check_spread 6 2 Tipos de Objetos en Nagios La estructura de los objetos es la siguiente 10 El procedimiento se denomina spreading P g 53 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS define object type parameter value parameter value Los tipos son los siguientes se incluyen las definiciones d
12. Los objetos se definen de las tres formas siguientes El rbol de la mib 2 puede ser extendido o remplazado por una actualizaci n en un futuro mib 3 Por ejemplo RMON es el sub rbol 16 debajo de la mib 2 mib 2 16 Una MIB experimental se puede construir para una determinada aplicaci n Los objetos se pueden mover al sub rbol mgmt Extensiones de tipo privado se pueden a adir al sub rbol private ste sub rbol tiene definido s lo un hijo enterprises En este sub rbol los distintos fabricantes colocan sus objetos M s adelante se utilizar esta rama para monitorizar equipos Cisco Access Point y Call Manager P g 25 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Esta estructura permite conservar un est ndar que puede ser ampliado en cualquier momento aportando la suficiente flexibilidad para acomodar toda la funcionalidad que los fabricantes quieran aportar al modelo Los datos pueden ser de tipo UNIVERSAL integer octetstring null object identifier sequence y sequence of APPLICATION networkaddress ipaddress counter gauge timeticks opaque Tambi n se pueden definir tablas que son muy tiles para almacenar por ejemplo las conexiones activas del protocolo TCP 1 3 6 1 2 1 6 13 La tabla de este ejemplo contiene 5 entradas tcpConnState 1 3 6 1 2 1 6 13 1 1 tcpConnLocalAddress 1 3 6 1 2 1 6 13 1 2 tcpConnLocalPort 1 3 6 1 2 1 6 13 1 3 t
13. P g 134 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS r 7 ES griduva gridcontroller E Ss Otros procesos a monitorizar como por ejemplo vmx vthread permite conocer qu m quinas virtuales est n arrancadas La siguiente figura muestra los procesos correspondientes a tres m quinas virtuales arrancadas en un servidor ESXi F x ee griduva gridcontroller e ES Ed 9 Fig 133 Procesos vmx vthread de ESXi asociados a m quinas virtuales arrancadas Los otros procesos relacionados con las m quinas arrancadas son P g 135 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS EP griduva gridcontroller o I es Fig 134 Procesos asociados a una maquina virtual VMware ESXi El plugin check_esx3 0 5 pl de Nagios Exchange permite obtener informaci n del servidor y de las m quinas virtuales uso de cpu disco memoria file systems etc Se a ade en el anexo VII los par metros del plugin para que el lector pueda ver su funcionalidad con detalle En la p gina de Nagios Exchange existen muchos m s plugins para productos VMware 10 6 Servidores Windows Antes de instalar plugins adicionales y crear ficheros de configuraci n de servicios que dependen del NSClient hay que asegurarse que este software est instalado en los clientes Para ver la instalaci n con detalle consultar el cap tulo 6 Instalaci n de NSClient Las ve
14. PDU type request id error status error index variable bindings b Response PDU PDU type request id non repeaters max repetitions variable bindings c GetBulkRequest PDU d variable bindings Fig 7 Formato PDU SNMPv2 SNMP permite interrogar a los agentes de gesti n por los valores y atributos de las MIBs que tienen implementadas Es no fiable y no orientado a la conexi n utilizando UDP como protocolo de transporte Septiembre de 2012 P g 29 MONITORIZACI N DE SERVICIOS Y SISTEMAS Para la comunicaci n entre gestores y agentes utiliza las llamadas Comunidades Las comunidades son nombre strings que se definen en ambas m quinas para que puedan intercambiar informaci n La comunidad por defecto se denomina public Tabla IV Descripci n campos de la PDU de SNMP Campo Descripci n version Versi n SNMP String que sirve como mecanismo de autentificaci n entre agentes y estaci n gestora request id Identificador nico para distinguir las peticiones enviadas Cuando el campo anterior es un valor distinto de cero sirve para ampliar la informaci n del error community error index variablebindings Lista de nombres de variables y valores se explica m s adelante enterprise Tipo de objeto que genera el trap agent addr Direcci n del objeto que genera el trap Tipo de trap gen rico coldStart 0 warmStart 1 linkDown 2 linkUp 3 authentication Faillure 4 egpNeighborL
15. es muy til para no generar demasiado tr fico en la red P g 30 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 4 2 RMON RMON es un est ndar de la IETF Internet Engineering Task Force que permite que los agentes de red y los sistemas de gesti n de red intercambien datos de monitorizaci n Se utiliza habitualmente con SNMP para monitorizar por ejemplo el tr fico de un conjunto de switches conectados a la red Permite gestionar una red en vez de cada uno de los dispositivos conectados a ella Es la extensi n m s importante que se ha realizado al conjunto de est ndares de SNMP Los est ndares originales relacionados con RMON son RF1513 RFC1757 RFC2021 y RFC2074 De forma pr ctica RMON es una MIB especial para realizar funciones de monitorizaci n Es muy flexible y potente Network management station with generic RMON console application Y E RMON alarms and events A configured SNMP configured en ra and statistic collection enabled gt Workstations Workstations T Pd Zi AT Fig 8 Monitorizaci n con RMON En la red existen dispositivos capaces de implementar funcionalidad RMON como por ejemplo un router o un switch Estos procesan y env an informaci n a la estaci n gestora A un dispositivo que implementa la MIB RMON se le denomina rmon probe Es simplemente una estaci n con un agente SNMP que puede procesar y generar
16. hostname ADDRESS Host name IP Address or unix socket must be an absolute path p port INTEGER Port number default 161 i NEXE Use SNMP GETNEXT en vez de SNMP GET P _ protocol 1i22 3 VersiA n del protocolo SNMP L seclevel noAuthNoPriv authNoPriv authPriv Nivel de seguridad SNMPv3 a authproto MD5 SHA SNMPv3 auth proto x privproto DES AES SNMPv3 priv proto default DES C community STRING Cadena de comunidad opcional para comunicaciA n SNMP el predeterminado es public U secname USERNAME nombre de usuario SNMPv3 A authpassword PASSWORD contraseAta de autenticaciA n SNMPv3 X privpasswd PASSWORD contraseAta de privacidad SNMPv3 0 oid OID s Identificador es de objeto o variables SNMP cuyo valor desea consultar 16 Ver apartados 11 3 1 11 3 2 y 11 3 3 del libro Nagios 2nd edition P g 85 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS m miblist STRING List of MIBS to be loaded default none if using numeric OIDs or ALL para OID simbA licos d delimiter STRING Delimitador a usar cuando se analizan datos retornados Predeterminado Todos los datos sobre el lado derecho de la delimitador se considera que los datos que deben utilizarse en la evaluaciA n w warning THRESHOLD s Rango s de umbral de aviso c critical THRESHOLD s Rango s de umbral crA tico rate Enable rate calculation See Rate Calculation below rate multipl
17. Ancho dela tabulaci n 8 Ln33 Col39___ INS Fig 29 Configuracion de actualizaciones Tambi n es importante definir el formato de la fecha P g 51 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS nagios cfg S lo lectura etc nagios gedit Archivo Editar Ver Buscar Herramientas Documentos Ayuda 6 e 2 a Nuevo Abrir Guardar Imprimir Deshacer Rehacer Cortar Copiar Pegar nagios cfg 3 DATE FORMAT OPTION This option determines how short dates are displayed Valid options include us MM DD YYYY HH MM SS euro DD MM YYYY HH MM SS iso8601 YYYY MM DD HH MM SS strict iso8601 YYYY MM DDTHH MM SS Hate format us N TIMEZONE OFFSET This option is used to override the default timezone that this instance of Nagios runs in If not specified Nagios will use the system configured timezone 21 Soave Ancho dela tabulaci n 8 Un 1087 Co11 1057 Fig 30 Formato de fecha en Nagios Se puede definir la informaci n de contacto en nagios cfg S lo lectupa etc nagios gedit Archivo Editar Ver Buscar Herramientas Documentos Ayuda JB om t Bi Nuevo Abrir Guardar Imprimir Deshacer Rehacer Cortar Copiar Pegar _ nagios cfg ADMINISTRATOR EMAIL PAGER ADDRESSES The email and pager address of a global administrator likely you Nagios never uses these values itself but you can access them by using
18. Fig 125 Fig 126 Fig 127 Fig 128 Fig 129 Fig 130 Fig 131 Fig 132 Fig 133 Fig 134 Fig 135 MONITORIZACI N DE SERVICIOS Y SISTEMAS Comunidad y estaci n gestora de traps en Cisco Call Manager ccnciconicinnncnos 109 P ginas de ayuda de los servicios asociados a SNMP oncccicociciconocinncninnnccnnncnnos 109 Grupo de programas Cisco CallManager aniones 110 Ventana del Cisco Service Configuration viiinssiionisnitin orinando 110 Ventana de activaci n de servicios del Call Manager occcninonioninninnnnonicnnacinninnns 111 NMentTrate Config ration NN N 111 Ventana de configuraci n de Cisco RIS Data Collector eee eee 112 Monitorizaci n con Nagios de un Cisco Call Manager onccccocicncnnnnnnncncnnnaninncnnos 113 Comprobaci n de la comunidad SNMP en un switch Cisco Catalyst 114 Configuraci n par metros SNMP en un switch Cisco Catalyst 114 Ejemplo de utilizaci n primitiva Sumpre basin iaa rechec 115 Ejemplo de utilizaci n primitiva snmpgetneXxt ccccececsesessseeeseseessseseseteseseeeees 115 Uso sampwalk con filtro para consultar la velocidad de las interfaces 115 Ejemplo de utilizaci n primitiva snmpwalk con detalle del oid 116 Servicios gestionados de un switch HP Procurve2l76 ccccicicicicnnnninnonionnacinncnnos 117 Ventana de agrupaci n de servicios MAS CI tICOS ccociciconncnnnoninonannnncnranncnnncaos 118 Alarma en un switch por fallo del ve
19. MONITORIZACI N DE SERVICIOS Y SISTEMAS 7 2 2 Zyxel Prestige 650HW ES EP griduva gridcontroller a Fig 61 Configuraci n SNMP router Zyxel 7 3 Object Browser Mediante el browser de CISCO u otro determinar otros par metros a monitorizar como ifSpeed ifPhysAddress etc Las siguientes figuras muestran los oids y caracter sticas de sysUptime y ifOperStatus JN Nagios Core T Cisco SNMP Object Naviga Wes a lax Cc tools cisco com ort SNMP B O t t U e te T t S tC true ZA C snmp HUME n x Help Feedback TRANSLATE BROWSE SEARCH VIEW 8 DOWNLOAD MIBS MIB SUPPORT IN SOFTWARE SUPPORT A AA A j j __ TOOLS amp RESOURCES Translate Browse The Object Tree z Ci Support C ity Fi SNMP Object Navigator isco support Community Forum MIB Locator Translate OID into object name or object name into OID to receive object details Enter OID or object name sysUpTime examples OID 1 3 6 1 4 1 9 9 27 Translate Object Name ifindex Object Information Object sysUpTime oD 13612113 Type TimeTicks Permission read only Status current MIB SNMPV2 MIB View Supporting Images c Description The time in hundredths of a second since the network management portion of the system was last re initialized O AX Fig 62 Vista del SNMP Object Navigator de CISCO I 15 http tools cisco com Support SNMP do BrowseOID do local en P g
20. This is the total number of files sent by this HTTP Server httpStatistics 5 totalFilesReceived OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the total number of files received by this HTTP Server httpStatistics 6 currentAnonymousUsers OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of anonymous users currently connected to the HTTP Server httpStatistics 7 El interesantes define service use host_name service description generic service Inherit values monitorwindows HTTP counters files sent SNMP from a template siguiente fichero de configuraci n permite consultar algunos contadores check_command check_snmp C public o 1 3 6 1 4 1 311 1 7 3 1 5 0 define service use generic service Inherit values from a template host_name monitorwindows service description HTTP usuarios actuales check_command check_snmp C public o 1 3 6 1 4 1 311 1 7 3 1 7 0 define service use generic service Inherit values from a template host_name monitorwindows service description HTTP conexiones actuales check_command check_snmp C public o 1 3 6 1 4 1 311 1 7 3 1 13 0 define service use generic service Inherit values from a template host_name service description check_command monitorwindows HTTP num max conexiones simultaneas check_snmp C public o 1 3 6 1 4 1 311 1 7 3 1 14 0
21. tt Ge d Gf i P g 153 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Next Generation F Strauss J EXPERIMENTAL Structure of Management Schoenwaelder September ASCII Obsoletes INFORMATIONAL 2003 RFC1643 Information SMIng Definitions of Managed K Tesink September ASCII Obsoletes DRAFT STANDARD Objects for the 2003 REC2558 Synchronous Optical Network Synchronous Digital Hierarchy SONET SDH Interface Mappings to the Simple Definitions of Managed H K Lam M September ASCII Errata Objects for the Optical Stewart A Huynh 2003 STANDARD i R Frye D Levi S August 2003 ASCII Version 1 Version 2 and Routhier B Version 3 of the Internet Wijnen standard Network Management Framework Configuring Networks M MacFaden D April 2003 ASCII Partain J Saperia W Tackabury and Devices with Simple Remote Monitoring MIB A Bierman K December ASCII Extensions for High McCloghrie 2002 Capacity Alarms A Bierman D December ASCII Errata Romascanu K C 2002 STANDARD Norseth Simple Network December ASCII EXPERIMENTAL Management Protocol 2002 Over Transmission Control Protocol Transport Mapping Introduction and J Case R Mundy December ASCII Obsoletes INFORMATIONAL D Partain B 2002 REC2570 Stewart Errata Applicability Statements P g 154 Septiembre de 2012 Network Management Protocol SNMP Applicabilit
22. 2 sid KO n exit SERRORS WARNING print DISPONIBILIDAD E INDICADORES DE RENDIMIENTO DE LA INSTANCIA sid ORACLE OK exit SERRORS 0OK else print JODER QUE cojones sid user host Sport exit SERRORS CRITICAL P g 186 Septiembre de 2012
23. Accordingly it is appropriate for an agent to return a badValue response if a management station attempts to set this object to any other value If a management station sets this object to the value deleteTCB 12 then this has the effect of deleting the TCB as defined in RFC 793 of the corresponding connection on the managed node resulting in immediate termination of the connection As an implementation specific option a RST segment may be sent from the managed node to the other TCP endpoint note however that RST segments are not sent reliably tcpConnEntry 1 tcpConnLocalAddress OBJECT TYPE SYNTAX IpAddress ACCESS read only STATUS mandatory DESCRIPTION The local IP address for this TCP connection In the case of a connection in the listen state which is willing to accept connections for any IP interface associated with the node the value 0 0 0 0 is used tcpConnEntry 2 tcpConnLocalPort OBJECT TYPE SYNTAX INTEGER 0 65535 ACCESS read only STATUS mandatory DESCRIPTION The local port number for this TCP connection r tcpConnEntry 3 tcpConnRemAddress OBJECT TYPE SYNTAX IpAddress ACCESS read only STATUS mandatory DESCRIPTION The remote IP address for this TCP connection tcpConnEntry 4 tcpConnRemPort OBJECT TYPE SYNTAX INTEGER 0 65535 ACCESS read only STATUS mandatory DESCRIPTION The remote port number for this TCP connection i tcpConnEntry 5 4 1 4 M
24. C Label W2K Serial Number 28f5373e 12 used 9190MB 74308MB lt 80 OK D Label STI_DATA Serial Number 185014d2 O used 0MB 2000MB lt 80 OK SNMP OK Timeticks 34271921 3 days 23 11 59 21 1 CPU load 2 0 lt 4 OK Fig 109 Monitorizaci n con Nagios de un Cisco Call Manager Tambi n se muestra el estado de los servicios asociados SOL Server Tomcat e IIS P g 113 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS La gesti n de equipos de red como switches routers Access Point etc se suele desplegar configurando los servicios del protocolo SNMP Hay que tener en cuenta que no todos los equipos implementan este protocolo de comunicaciones por lo que se deber n consultar las especificaciones del manual del equipo Los equipos Cisco y HP Procurve de los que dispone el SACYL implementan dicho servicio por lo que se pueden gestionar de forma remota v a SNMP y cualquier aplicaci n que utilice dicho protocolo en particular Nagios Antes de configurar Nagios se deber consultar la configuraci n del equipo en particular su direcci n ip de gesti n comunidad es y versi n del protocolo SNMP a E griduva gridcontroller o le _2 Fig 111 Configuraci n par metros SNMP en un switch Cisco Catalyst La configuraci n de Nagios se realiza a trav s de los ficheros de configuraci n antes descritos que se localizan bajo el directorio etc nagios objects P g
25. Cancelar Aplicar Fig 67 Configuraci n seguridad SNMP en Windows que impidan el acceso 7 5 2 Instalaci n y configuraci n de SNMP en Linux El primer paso es instalar el demonio que implementar el agente SNMP sudo apt get install snmpd Las siguientes figuras describen el proceso P griduva monitorlinux etc snmp Fig 68 Paso 1 configurar snmpd conf y Access Control Setup Septiembre de 2012 Es importante revisar posteriormente el firewall y antivirus para desactivar las reglas El siguiente paso es configurar SNMP ejecutando el comando snmpconf creando el fichero de configuraci n snmpd conf Una vez creado se deber copiar en etc snmp P g 81 MONITORIZACI N DE SERVICIOS Y SISTEMAS r P griduva monitorlinux etc snmp Fig 69 Configurar opci n de acceso a la comunidad EP griduvaQmonitorlinux etc snmp Fig 70 Finalizaci n configuraci n snmpd EP griduva monitorlinux etc snmp Fig 71 Copia del archivo de configuraci n snmpd conf P g 82 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 8 DEFINICI N DE SERVICIOS CON SNMP 8 1 Primitivas y utilidades de SNMP Hay tres utilidades que permiten realizar consultas utilizando SNMP snmpget snmpgetnext y snmpwalk 8 1 1 SNMPGET Utiliza como par metros v versi n O n f num rico o texto c comunidad alumno nagios snm
26. Fig 20 P gina de informaci n de PHP5 a aa 45 Fig 21 P gina de inicio de Nagios niini ie tic 45 Fig 22 Directorio de plugins de Nagios minita 46 Fig 23 Directorio de configuraci n de Nagios s es esesesesrsssesesrerisristsresisenrerisrenesresresesess 48 Fig 24 Ficheros de configuraci n de Nagios s ssessesssesesresrsesresisresessesresenrerrsrenesresreseness 48 Fig 25 Propietario de los ficheros de configuraci n cocicicococnnonnnnnannnononnnncnnnanonnnncnanncnrncncns 49 Fig 26 Pichero de log de Nation ia 49 Fig 27 Inclusi n ficheros configuraci n mediante cfg_fill onnnicinininnnnninnnnnneacencrenenas 50 Fig 28 Diferentes estructuras de directorios de configuraci n ocicococonononononnnnononnnnninnnranes 51 Fig 29 Configuraci n de actualizaciones siii 51 Fig 30 Formato de fecha uNa LOS sin Rucbeettaa sites tt asynsane eaters catr a ae ace 52 Fig 31 Configuraci n de la informaci n de contacto ni eo 52 Fig 32 Configuraci n autentificaci n s ssessissessessissersisresresisrestesrisrennesstsnensrsnesressrsnensens 53 Fig 33 Herencia en la configuraci n de DOStS cuisine 56 Septiembre de 2012 Fig 34 Fig 35 Fig 36 Fig 37 Fig 38 Fig 39 Fig 40 Fig 41 Fig 42 Fig 43 Fig 44 Fig 45 Fig 46 Fig 47 Fig 48 Fig 49 Fig 50 Fig 51 Fig 52 Fig 53 Fig 54 Fig 55 Fig 56 Fig 57 Fig 58 Fig 59 Fig 60 Fig 61 Fig 62 Fig 63 Fig
27. JUST A TEMPLATE Linux host definition template This is NOT a real host just a template define host name linux server The name of this host template use generic host This template inherits other values from the generic host template check period 24x7 By default Linux hosts are checked round the clock check_interval 5 Actively check the host every 5 minutes tetry interval 1 y schedule host check retries at 1 minute intervals max_check_attempts 10 Check each Linux host 10 times max check_command check host alive Default command to check Linux hosts notification period workhours Linux admins hate to be woken up so we only notify during the day Note that the notification period variable is being overridden from the value that is inherited from the generic host template notification interval 120 p Resend notifications every 2 hours notification options Gly Why 16 Only send notifications for specific host states contact groups admins Notifications get sent to the admins by default register 0 DONT REGISTER THIS DEFINITION ITS NOT A REAL HOST JUST A TEMPLATE define host name windows server The name of this host template use generic host Inherit default values from the generic host template check period 24x7 By default Windows servers are monitored round the clock check interval 5 Actively check the server every 5 minutes retry_interval a y schedule host check retries at
28. LLL dl BOM Pele PR AAN ES 1a 2d Zo LR Meare fest ad Ll Le Sed E ILLA TS else Les aM Lilian 2d Lis Li al Lidl dod LLL P g 174 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS cDot11ClientPacketsReceived E EE a ES ARTE PONE COS POE N E E EIS PE EE DE 6 cDot11ClientBytesReceived i26 beh Le G6 OVLI Sele Ooh Le Te cDot11ClientPacketsSent Md ted 69695 27360 LL Li Bn cDot11ClientBytesSent Le DOr deed QO 273 tv ede u cDot11ClientDuplicates ENEE cle E NA E e E G LOM cDot11ClientMsduRetries ML SD Ove be thes Oe 27 Feds Sede Le LI cDot11ClientMsduFails Md 99027301 80d E 12 cDot11ClientWepErrors Li DO pleted Die loeLs Sol phe E cDot11ClientMicErrors WL O VE Le te Le Qe O27 E EROS de ted an cDot11ClientMicMissingFrames Ls 3 oO 1 e419 LIL ciscoDot11AssocMIBCompliances UL 30 TEPE TETE PE 6 Bed ciscoDot11AssocMIBGroups a Mr E IIA ED ciscoDot11AssocMIBCompliance aE ye PE el arc We barnes O dad ciscoDot11AssocMIBComplianceRevl Ls A EE PE RE RL PE 20142 ciscoDot11AssocMIBComplianceRev2 WD Sia OnE PI Dt G6 OL Seiad aed ciscoDot11AssocMIBComplianceRev3 niy 305 431 9 93273 2 144 ciscoDot11AssocMIBComplianceRev4 DU be Bs PE PR O dio ciscoDot11AssocMIBComplianceRev5 1s 3 6 EE PE ONE E A A 6 ciscoDot11AssocGlobalGroup MLB HOw di PE DE Deel Seka ek ciscoDot11ClientConfigGroup E EE O52 64 O E E E E ciscoDot11ClientStatGroup EFE VSEE Tis Oe DO phd Deis Ai ciscoDot
29. MONITORIZACI N DE SERVICIOS Y SISTEMAS ccmRegionAvailableBandWidth Mw Ey y y y y y e y y y y y Y y o Y IRRADIA AAA DDR ALADO A a AA Asa AAA a as OM Sg as SMS o A sa a 0 OS a L 16 U W WW ly y ln DDDDADDN ika ta bh kike o AS ho o Ww ccmTimeZoneEntry Tis 3e blk ccmTimeZoneIndex UT 30 Lo de ccmTimeZoneName MTB comTimeZoneOffset E 6 PTI be A comTimeZoneOffsetHours WEL comTimeZoneOffsetMinutes el ccmDevicePoolEntry FRETES S ccmDevicePoolIndex U1 364 Ludo ccmDevicePoolName Tdi Lo 4 s ccmDevicePoolRegionIndex nq comDevicePoolTimeZoneIndex eL ccmDevicePoolGroupIndex ies ccmProductTypeEntry Md ccomProductTypeIndex Mad ccmProductType 1 364 144 ccmProductName UT 35 64 Era ccmProductCategory UT 30 102 ccmPhoneTable ES PERA ccmPhoneExtensionTable ez ccmPhoneFailedTable Mel ccmPhoneStatusUpdateTable I ccmPhoneExtnTable TE ETE i ccmPhoneEntry RS A ccomPhoneIndex U1 36 14 ccmPhonePhysicalAddress 1 ccmPhoneType ENTE TETE T ccmPhoneDescription i ccmPhoneUserName 136 L 52 ccmPhonelpAddress Md Ll ccmPhoneStatus To 336 Led ccmPhoneTimeLastRegistered 4 ccmPhoneE911Location Wd ccmPhoneLoadID T3601 44 ccomPhoneLastError UD SOs Dd ccmPhoneTimelastError md ccmPhoneDevicePoolIndex md ccmPhoneInetAddressType TAR ccmPhoneInetAddress Mies ccmPhoneStatusReason Wels ccmPhoneTimeLastStatusUpdt md ccmPhoneProductTypeIndex ed ccmPhone
30. Map speedtouch PING 7 TIA 1 2011 20 55 46 0d 0h 22m 14s 1 3 ECO OK Paquetes perdidos 0 RTA 3 69 ms Hosts Pi Services Bandwidth 5d 20h 3m 10s 3 3 check_mrtgtraf Imposible abrir el archivo de registro MRTG Host Groups Usage Port 1 Link 44 5G Error de orden externa MIB search path Status UNKNOWN o2 2011 20 56 27 5d 20h 1m 50s 33 Jhomefalumnol snmp mibs ust share mibsisite usr share snmp mibs OS Uptime ERMO 02 11 2011 20 53 57 5d 20h 0m 29s 3 3 Service Check Timed Out zaxe QYPING CR o 1 2011 20 55 22 0d 0h 22m 38s 1 3 ECO OK Paquetes perdidos 0 RTA 3 08 ms Malal Port 4 Grid Bandwidth 02 11 2011 20 50 47 0d 0h 21m 13s 3 3 check_mrtgtraf Imposible abrir el archivo de registro MRTG Problems Usage Services Port 1 Link z Error de orden externa MIB search path F Pog ti DOM 02 11 2011 20 52 13 0d 0h 19m 47s 3 3 ee See ee ee Sh Uptime 02 11 2011 20 56 42 0d Oh 25m 18s 3 3 Service Check Timed Out 39 Matching Service Entries Displayed pa extinfo cgi type 28 host speedtouch amp iservice PING comments m T T T i Fig 47 Comentario sobre flapping N Nagios Core Sos c C fx bieps 192 168 1 113 n ZA E snmp Last Check lime 02 11 2011 20 55 46 Xi ificati f 5 z E N a g 10 Check Type A acne df Send custom service notification Check Latency Duration 0 102 4 116 seconds FSche SO General Next Scheduled Check 02 11 2011 21 00 46 Xni for thi 2 Last State Change 02 11 2011 20 35 4
31. P g 71 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS alias Nagios Admin 7 Full name of user email nagios localhost p lt lt CHANGE THIS TO YOUR EMAIL ADDRESS Reiniciar Nagios y forzar un fallo para recibir las notificaciones El correo incluir un asunto y texto como los siguientes Asunto PROBLEM Host Alert callmanager is DOWN Texto ARK Nagios KK KK K Notification Type PROBLEM Host callmanager State DOWN Address 172 25 80 136 Info CR TICO Anfitri n inalcanzable 172 25 80 136 Date Time Mon Jul 23 22 59 12 CEST 2012 Tambi n avisar mediante notificaci n del momento en que un servicio se restablezca Asunto RECOVERY Service Alert zyxel Switch Port 1 Interface Type is OK Texto k Kk k Nagios kK Kk k Notification Type RECOVERY Service Port 1 Interface Type Host zyxel Switch Address 172 25 80 200 State OK Date Time Mon Jul 23 23 24 02 CEST 2012 Additional Info SNMP OK 6 P g 72 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 7 MONITORIZACI N V A SNMP 7 1 Directorio de configuraci n de Nagios Los comandos SNMP que se especifiquen sin haber configurado las MIBs provocar n errores a la hora de comprobar los servicios y N Nagios Core SY error de orden externa mit WES el ss C amp bitps 192 168 1 113 ZA snmp TiuLesses 7 N a t A moodle Current Load R 02 11 2011 22 29 43 5
32. STATUS mandatory DESCRIPTION This is the number of requests using the LOCK method that have been made to this HTTP Server httpStatistics 30 totalUnlock OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the UNLOCK method that have been made to this HTTP Server httpStatistics 31 totalOthers OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests not using the OPTIONS GET HEAD POST PUT DELETE TRACE MOVE COPY MKCOL PROPFIND PROPPATCH MS SEARCH LOCK or UNLOCK method that have been made to this HTTP Server This may include LINK or other methods supported by gateway applications httpStatistics 32 currentCGIRequests OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of Common Gateway Interface CGI requests that are currently being serviced by this HTTP Server f httpStatistics 33 currentBGIRequests OBJECT TYPE SYNTAX Counter P g 178 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS ACCESS read only STATUS mandatory DESCRIPTION This is the number of Binary Gateway Interface BGI requests that are currently being serviced by this HTTP Server httpStatistics 34 totalCGIRequests OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of Common Ga
33. Wh 3 3 O de PE VE PE E T5652 Lis Ls de OU ccmH323DevAl1tGK3InetAddressType E 32 Od Bnd 9 9 156 44 Lh Dd s d ccmH323DevAltGK3InetAddress WD 83306 TDI Lie DDN ccmH323DevAl1tGK4InetAddressType LB Is adds dan ccmH323DevA1tGK4InetAddress VILO AISLADO dd dy o ccmH323DevAltGK5InetAddressType hs 3s 601s LD DADO Lts Le ccmH323DevAl1tGK5InetAddress UDALA DD ADOS LL Ll ccmH323DevActGKInetAddressType LS Odie de GEOL 56st lds TEN ccmH323DevActGKInetAddress Wd Ook LD ad LL LO ccmH323DevStatus WD MEROS ROLL OTI PES E PES E Ae 1 PE EOS dig deed O ccmH323DevStatusReason Lis Lhe le LD O die dls aa comH323DevTimeLastStatusUpdt Lila LDL ccmH323DevTimeLastRegistered VALOR IO AL IDA ccmH323DevRmtCM1InetAddressType NES 3601s AS ADO LL ccmH323DevRmtCM1InetAddress M6 cl 4ed 9 9 156 211 1126 ccomH323DevRmtCM2InetAddressType Td PE DE PE DE PE PE T5601 ds ds La a ccmH323DevRmtCM2InetAddress A Bs Cid O La DL dd 298 ccmH323DevRmtCM3InetAddressType WD B08 Ls Bie W950 156d ded AE lig oN ccmH323DevRmtCM3InetAddress ML AID 1 11 1 61530 ccmH323DevProductTypelndex LIO LA LADO e ddd Lol P g 172 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS ccmH323DevUnregReason ccmH323DevRegFailReason ccmVoiceMailDeviceTable ccmVoiceMailDeviceDirNumTable ccmVoiceMailDeviceEntry ccmVMailDevIndex ccmVMailDevName ccmVMailDevProductId ccmVMailDevDescription ccmVMailDevStatus ccmVMailDevIn
34. deber a hacer Si normalmente accede a este sitio sin problemas este error puede estar ocurriendo porque alguien est intentando suplantar al sitio y no deber a continuar iS came de qu gt Detalles t cnicos gt Entiendo los riesgos Fig 15 Comprobaci n p gina inicial Apache con https Septiembre de 2012 P g 40 MONITORIZACI N DE SERVICIOS Y SISTEMAS Mozilla Firefox Archivo Editar Ver Historial Marcadores Herramientas Ayuda https localhost Go 29 gt localhost https localhost vje EN activar ssl en apache2 e It works This is the default web page for this server X The web server software is running but no content has been added yet Fig 16 Comprobaci n p gina inicial Apache con https II Comprobaci n de PHP5 Crear el fichero phpinfo php en var www y comprobar con el navegador Go 2 bttp 192 168 1 109 phpinfo php P BOX S phpinfoo x eis Archivo Edici n Ver Favoritos Herramientas Ayuda 3 E BEREC Body of Europea Sitios sugeridos M s complementos y 3 Traductor de Google 3 Empleo P blico ECYL P E Portal de Salud de la Junta E Ministerio de Industria Tu Revista Ciencia e Ingenieri ly System Linux nagios 2 6 38 11 generic 48 Ubuntu SMP Fri Jul 29 19 05 14 UTC 2011 i686 Build Date May 2 2011 23 04 25 Server API Apache 2 0 Handler
35. forma de representarlos y nombrarlos Con el objetivo de simplicidad y escalabilidad en las MIBs s lo se pueden almacenar escalares y arrays de escalares aunque s lo se pueden transferir los primeros A diferencia de este modelo en OSI se pueden almacenar estructuras de datos complejas En particular SMI debe proveer Un mecanismo para definir la estructura de una MIB Una t cnica est ndar para definir objetos individuales incluyendo la sintaxis y el valor de cada uno de ellos Un mecanismo para codificar el valor de cada objeto Estructura general de una MIB Todos los objetos e SNMP est n organizados en una estructura jer rquica Cada uno representa un recurso una actividad o una informaci n asociada que se ha de gestionar Asociado con cada tipo de objeto en una MIB se encuentra un identificador en lenguaje ASN 1 OBJECT IDENTIFIER El identificador sirve para nombrar el objeto y por tanto la estructura jer rquica del modelo Tiene un valor asociado que consiste en una secuencia de enteros ver figura del apartado anterior Por ejemplo el objeto internet con OID 1 3 6 1 internet OBJECT IDENTIFIER iso 1 org 3 dod 6 1 El sub rbol mgmt contiene las definiciones de las bases de informaci n de gesti n que han sido aprobadas por la IAB Internet Architecture Board En la actualidad se han aprobado dos bases de datos mib 1 y mib 2 La segunda es una extensi n de la primera
36. free critical if lt 20 free check snmp load pl command definition define service use generic service 7 Name of service template to use hostgroup_name switches procurve service description CPU Usada is volatile 0 check period 24x7 max_check_attempts 3 normal check interval a retry_check_ interval 1 contact_groups switch admins notification interval 240 notification period 24x7 notification options c r check_command check_snmp_load_v1 hp 60 80 80 100 Service definition HP Procurve Switch Memoria libre define service use generic service Name of service template to use hostgroup_name switches procurve service description Memoria Libre is volatile 0 check period 24x7 max_check_attempts 3 normal check interval 5 retry_check_ interval 1 P g 142 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS contact_groups switch admins notification_interval 240 notification period 24x7 notification options c r check_command check_hpmemoryfree 2000 30000000 1000 30000000 Create a service to PING to IP host define service use generic service Inherit values from a template hostgroup_name switches procurve 7 The name of the host the service is associated with service description PING 7 The service description check_command check_ping 200 0 20 600 0 60 7 The command used to monitor the service normal_ check interval 1 7 Check the service every 5 minutes under normal condition
37. ieissistaascesivithorssiapsndsinsicdsusasigersndvisrsaavgentigtbnebbabsoolonds 17 Fig 2 Distribuci n del gasto en un centro de gesti n de red concnccccicicicnccanacininanananncnnncncns 20 Fig 3 Arquitectura protocolo SM Prost 22 Fig 4 Arquitectura software para utilizaci n de SNMP via proxy 0 0 cece 23 Fig 5 Arbol de OIDs surini rari R A A aaulmen 24 Fig 6 Formato PDU SNMP criado ad E Ed LOS oia ias 29 Fig Formato PDU SNMPY 2 ota pan pido 29 Fig 8 Monitorizaci n con MON sidonia cdo 31 Pip Funcionamiento de NN VO ranra aa eteet energies Gti ee acetate cena aie 36 Fig 10 Instalaci n de Nagios 3 desde el centro de software de Ubuntu ococicicicicicacinonass 37 Fig 11 B squeda de binarios de Nagios en Ubuntu ccccicnccccccicinononnnonononncnnncnnnonocnnnncncncncnos 38 Fig 12 Instalaci n del servidor Apache2 desde el centro de software de Ubuntu 38 Fig 13 Instalaci n de binarios de Apache crciciniataii iii 39 Fig 14 Comprobaci n de la p gina inicial del servidor Apache cocicicicococinnnnnninnnnnnnrenones 40 Fig 15 Comprobaci n p gina inicial Apache CON https coooicicicnconinoninnnncnananononncnnancnnncncns 40 Fig 16 Comprobaci n p gina inicial Apache con https Il oonininiininnninninnnnnnacnaninnnnnanas 41 Fig 17 Comprobaci n PHP5 instalado y configurado ocococnccnnnnnnonnnononnnncnnnncononncnanacaronncns 41 Fig 16 Resultado de confunda ds 43 Fig 19 P gina de inicio de Apache 44
38. 1 minute intervals max_check_attempts 10 7 Check each server 10 times max check_command check host alive Default command to check 1f servers are alive notification period 24x7 Send notification out at any time day or night notification interval 30 Resend notifications every 30 minutes notification options Ely ie Only send notifications for specific host states contact groups admins Notifications get sent to the admins by default hostgroups windows servers Host groups that Windows servers should be a member of register 0 DONT REGISTER THIS ITS JUST A TEMPLATE generic host linux server windows server Fig 33 Herencia en la configuraci n de hosts P g 56 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 6 2 2 Agrupaci n de hosts Se utiliza para agrupar un n mero determinado de hosts que aparecer n juntos en la interfaz web Adem s se pueden asociar determinados servicios a grupos de hosts por lo que no es necesario ir asign ndolos uno a uno El objeto necesario para agrupar host es hostgroup Define an optional hostgroup for Linux machines define hostgroup hostgroup name linux servers The name of the hostgroup alias Linux Servers Long name of the group members localhost Comma separated list of hosts that belong to this group Una vez definido el grupo se puede incluir el host en la secci n members La lista con los miembros se separa por comas En la
39. 10 5 MB cuando se instale Versi n 2 2 17 lubuntu1 2 apache2 Licencia C digo abierto Actualizaciones Canonical proporciona actualizaciones cr ticas para Apache HTTP Server metapackage hasta Fig 12 Instalaci n del servidor Apache2 desde el centro de software de Ubuntu P g 38 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS alumno nagios Archivo Editar Ver Buscar Terminal Ayuda alumno nagios sudo apt cache search apache2 libapache2 mod auth mysql Apache 2 module for MySQL authentication cortado streaming applet for Ogg formats gforge web apache2 collaborative development tool web part using Apache gforge web apache2 vhosts collaborative development tool web vhosts using A pache libapache mod jk doc Documentation of libapache2 mod jk package libapache mod security Tighten web applications security for Apache libapache2 authcassimple perl Apache2 module to authentificate trough a CAS se rver libapache2 authenntlm perl Perform Microsoft NTLM and Basic User Authenticatio n libapache2 mod apparmor changehat AppArmor library as an Apache module libapache2 mod apreq2 generic Apache request library Apache module libapache2 mod auth cas CAS authentication module for Apache2 libapache2 mod auth openid OpenID authentication module for Apache2 libapache2 mod auth pam module for Apache2 which authenticate using PAM libapache2 mod auth radius Apache 2 x mo
40. 114 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Hay que tener en cuenta que los equipos son capaces de manejar cientos de variables objetos SNMP por lo que se deber buscar previamente el oid que interesa gestionar Para ello una vez instalado SNMP en el servidor Nagios es de gran ayuda utilizar los comandos snmpwalk y snmpget para consultar oids y filtrar por las cadenas de inter s Las siguientes figuras muestran ejemplos de consulta utilizando estos comandos tx alumno nagios snmp mibs Archivo Editar Ver Buscar Terminal Ayuda alumnoG nagios snmp mibs snmpget v1 On cpublic 192 168 1 5 ifSpeed 1 1 3 6 1 2 1 2 2 1 5 1 Gauge32 10000000 alumno nagios snmp mibs snmpget vi of cpublic 192 168 1 5 ifSpeed 1 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed 1 Gauge32 10000000 alumno nagios snmp mibs Fig 112 Ejemplo de utilizaci n primitiva snmpeet x alumno nagios snmp mibs k Archivo Editar Ver Buscar Terminal Ayuda alumno nagios snmp mibs snmpget v1 Of cpublic 192 168 1 5 ifSpeed 1 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed 1 Gauge32 10000000 alumno nagios snmp mibs snmpgetnext v1 Of cpublic 192 168 1 5 ifSpeed 1 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed 2 Gauge32 10000000 alumnoGnagios snmp mibs alumno nagios snmp mibs alumnoGnagios snmp mibs alumno nagios s
41. 156 Mls Sie Ose Teg Aca sh ESET be Ae FT 4 1 9 9 156 4 1 9 9 156 T3601 PT WAS OE Ad USE PR CA sod TO6 TD 29 156 1 5 30 Ts ds des AED 9156 156 1 5 33 4 1 9 9 156 4 1 9 9 156 4 1 9 9 156 T5631 Gs EE LS 6 44 Ged odes 4 1 9 9 156 E PO OS 1 3 6 1 4 1 1 3 6 1 4 1 E E AS 4 1 9 9 156 1 3 6 1 4 1 UI ES E O Li Calais T Te 604 Aol EPET TEPE PE ALADO IDO 1 3 6 1 4 1 LIDO LL E56 She TA Lg EI O ewe ree E L661 Tedd 3 T6017 0161 4 1 9 9 156 PE PEL Pa Lids DA T3462 1 6464 4 1 9 9 156 156 1 8 1 4099156 LESTIE E OE PE A qn 6 A gn 9 E R EPOE LE TED CA de DA as 14 15 LO LR E com 3 go 5 bh a bh a 1 15 1 6 DO ANAND hh ta LR A 18 eh gr az qa PA d Jery 28 ST bh ha kh 6 7 10 LIN ede whom 14 E E 6 A P g 171 MONITORIZACI N DE SERVICIOS Y SISTEMAS ccmCTIDeviceIndex IS PT TIO PE E E ST TS ES E 151 ccmCTIDeviceName LS 0 Did II TIL Be ccmCTIDeviceType SA O EAS A ccmCTIDeviceDescription NL 3065 141 DE AS TAN Cid be AM ccmCTIDeviceStatus ES O ER E TAS E E ccmCTIDevicePoolIndex VEL dad AOL deL comCTIDeviceInetAddressType Nd OS Od 1 Fide RADO ddr he ccmCTIDeviceInetAddress NL POO dn Ged OO 1D Ok Oued oll ccomCTIDeviceAppInfo E Bi ts LO GL SO Ltd id Oe ccmCTIDeviceStatusReason UT OO d eA LLO did TO comCTIDeviceTimeLastStatusUpdt TA 3s Goh s
42. 2011 00 11 58 38d 20h 39m 42s 114 PROCS ACEPTAR 56 procesos con ESTADO RSZDT portatil PING GRE 28 10 2011 00 08 58 0d 0h 53m 35s 114 ECO OK Paquetes perdidos 0 RTA 3 09 ms Availability 11 Matching Service Entries Displayed Trends Fig 44 Comprobaci n servicio NSClient 6 7 Monitorizaci n de Impresoras en Red Para monitorizar impresoras se puede reutilizar la plantilla que Nagios proporciona etc nagios objects printer cfg define host use generic printer Inherit default values from a template host_name hp13j2605dn The name we re giving to this printer alias HP LaserJet 2605dn A longer name associated with the printer address 192 1684130 IP address of the printer hostgroups network printers Host groups this printer is associated with define hostgroup hostgroup_name network printers The name of the hostgroup alias Network Printers Long name of the group define service use generic service Inherit values from a template host_name hplj2605dn The name of the host the service is associated with service description Printer Status Tte rserviceldesenip clon check_command cheek hpyic es publ ie The command used to monitor the service normal_check interval 10 Check the service every 10 minutes under normal conditions metry check interval 1 Re check the service every minute until its final hard state is determined P g 66 Septiembre de 2012 MONITORIZACI N DE SERVIC
43. 21 35 08 555 Specific 1 SNMPv1 AW Message type Trap v1 Ni 21 35 08 805 Specific 1 SNMPv1 Protocol version SNMPw1 N5 21 35 09 054 Generic linkUp SNMPv1 Transport IP UDP o Evaluation vers Contact lt sales mgq soft c A Agent Address 192 168 0 5 Port 63496 3 Manager Address 192 168 1 102 Port 0 B Community public 2 SNMPv1 agent address 192 168 0 5 Las Enterprise intemet 6 3 1 1 5 Bindings 4 6 Binding 1 ifIndex 15 INTEGER 15 O Binding 2 ifDescr 15 DisplayString Vlan10 56 6C 61 6E 31 30 hex Binding 3 ifType 15 INTEGER 53 o Binding 4 enterprises 9 2 2 1 1 20 15 octet string up Fig 82 Vista detalle de trap de tipo LINKUP P g 90 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS i gt 5 SNMP Trap Ringer Console o e ajena a la ese e No Time Notification Version Generic coldStart i MA 214222578 enterprises 1315 78 1 1 0 SNMPv2c oS te essage reception time 22 03 36 739 w2 21 54 10 873 Specific 1 SNMPv1 Time stamp O days 00h 01m 43s 46th wW3 21 54 33 961 Specific 1 SNMP v1 AW Message type Trap v1 va 21 59 29 018 Specific 0 SNMPw1 Protocol version SNMP v1 ws 22 03 36 739 Generic coldStart SNMPv1 Transport IP UDP o Evaluation vers Contact lt salesGmg soft c A Agent Address 192 168 1 5 Port 57305 3 Manager Address 192 168 1 102 Port 0 B Community public 2 SNMPv1 agent addr
44. Concurrency Level Time taken for tests Complete requests Failed requests Write errors Total transferred HTML transferred Requests per second Time per request Time per request Transfer rate Connection Times ms Apache 2 2 17 172 25 80 134 80 177 bytes 800 4 988 seconds 6000 0 0 2718000 bytes 1062000 bytes 1202 97 sec mean 665 023 ms mean 0 831 ms mean across all concurrent requests 532 17 Kbytes sec received min mean sd median max Connect 0 3 S0 2 30 Processing 2 LE AO 18 4956 P g 103 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Waiting 2 7631356 17 4955 Total 9 80 316 5 20 4974 Percentage of the requests served within a certain time ms 50 20 66 22 75 24 80 26 90 31 95 233 98 1516 99 1523 100 4974 longest request alumno nagios s PID USER PR NI VIRT RES SHR S CPU MEM TIME COMMAND Fig 95 Procesos apache2 lanzados con la aplicaci n apache benchmarking En la p gina web de Nagios Exchange se pueden descargar multitud de plugins de Apache para Nagios 9 7 Cisco Call Manager Al igual que otros dispositivos y servicios es posible gestionar los servicios de telefon a IP de Cisco Adem s de las variables SNMP que se pueden consultar como otra m quina cualquiera Cisco pone a disposici n una serie de MIBs para acceder a objetos propios con informaci n sobre los servicios de telefon a IP
45. Ea EE a ee Ae Ea ee EE ee EEE Hed AAA RARA AA RARA AA RARA MARA EEE EE a Ee Ea EE ee EEA ee EE A EEE Create a service for monitoring the status of the printer Change the host_name to match the name of the host you defined above If the printer has an SNMP community string other than public change the check_command directive to reflect that define service use generic service host_name Contabilidad service_description Devices check_command check_printers public DEVICES define service use generic service host_name Facturacion service description Display check_command check_printers public DISPLAY define service use generic service host_name H51 service description Mensajes Log check_command check_printers public MESSAGES define service use generic service host_name Suministros1300 service description Modelo check_command check_printers public MODEL define service use generic service host_name A service description Estado check_command check_printers public STATUS define service use generic service host_name A service description Consumibles 1 check _command check printers public CONSUM Toner Cartridge Brother TN 550 TN 3130 TN 3145 TN 35J TN 3135 define service use generic service host_name A service description Consumibles 2 check_command check printers public CONSUM Toner Cartridge Brother TN 580 TN 3170 TN 3185 TN 37J3 TN 3175 d
46. Linux Load lmin 5min 15min on Linux Servers Warning at 3 2 2 proccess queue critical at 6 4 4 proccess queue check snmp load v1 command definition define service use generic service 7 Name of service template to use hostgroup_name linux servers service description CPU Cola Procesos is volatile 0 max check attempts 3 normal check interval 2 retry_check_ interval 1 contact_groups linux admins notification_interval 240 notification period 24x7 notification options c r P g 165 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS check _command check _snmp_ load _vl1 netsl1 3 2 2 6 4 4 Define a service to check the disk space of the root partition Warning if lt 20 free critical if lt 10 free space on partition check snmp storage pl command definition define service use generic service hostgroup_name linux servers service description File System check_command check _snmp storage v1 80 90 r G AMAMA RAMA RARA MARA AEA EL LLELE AAA EEE EH EH ea ETETE ELTETE EEEE HHHPHHEH HEHE EEA EAHA EAE EEE EH EH EEE EH EE A EE A EE EE EB Command DEFINITIONS AMARARA ARA ARA AR AA EEA AEE AEE EEE EH Ea Ee EE EE EE BE AMAAA RARA RA DAA RAM AAA AAA AAA AMARA ELEELE ELLELE ELELE EE ea EE a RAR ANARARANARA Check conection to tcp port check tcp command define command command_name check_tcp_hcuv command_line SUSER1S check_tcp H SHOSTADDRESS p SARGI w S
47. MIL SII IDO ADO ALIADA O EW EE Y AA Es IIA DIOS 8 IET SN 4 1 9 9 156 3 2 40 4 1 9 9 156 3 2 41 Ti 661549 ADO A 4 1 9 9 156 3 2 43 REA PEPE PEOR PO TR E E d P g 173 MONITORIZACI N DE SERVICIOS Y SISTEMAS ccmCTIDeviceInfoGroupRev4 ccmH323DeviceInfoGroupRev3 ccmVoiceMallDeviceInfoGroupRev2 ccmNotificationsGroup ccmNotificationsGroupkrevl ccmNotificationsGroupRev2 ccmNotificationsGroupRev3 1 1 1 1 1 1 gn 4 7 1 Ww w a 1 12 8 MIB my THIS FILE WAS GENERATED BY MIB2SCHEMA org 1 3 dod 1 3 6 internet ML Ln directory Lied 6 151 mgmt Li experimental E AA private ML Lidl enterprises Ms Ls isco WSO cds Abs OM ciscoMgmt ML Sig Ocal eed Gig OM ciscoDot11AssociationMIB ciscoDot11AssocMIBObjects ciscoDot11AssocMIBConformance cDot11AssociationGlobal cDot11ClientConfiguration cDot11ClientStatistics cDot11ParentAddress cDot11ActiveDevicesTable cDot11AssociationStatsTable cd11IfCipherStatsTable cDot11ActiveDevicesEntry cDot11lActiveWirelessClients cDot11ActiveBridges cDot11ActiveRepeaters cDot1lAssociationStatsEntry cDot11AssStatsAssociated cDot11AssStatsAuthenticated cDot11AssStatsRoamedIn cDot11AssStatsRoamedAway cDot11lAssStatsDeauthenticated cDot1lAssStatsDisassociated cd11IfCipherStatsEntry cd11IfCipherMicFailClientAddress cdl11IfCipherTkiplocalMicFailures cd11IfCipherTkipRe
48. Nagios gt Core Portal de Salud de la Junta Nagios Core Version 3 3 1 July 25 2011 Check for updates Get Started Don t Miss Start monitoring your infrastructure Attend a Nagios World Conference September 27th Change the look and feel of Nagios Nagios 5 th 201 Extend Nagios with hundreds of addons Newt A Get support total Get training Try the new Na ll interface Nagios V Snell Get certified Monitor business processes with the new Nagios BPI addon Latest News Nagios Conference Sold Out Conference Packages Nearly Sold Out Quick Links Nagios Library tutorials and docs Nagios Labs development blog Nagios Exchange plugins and addons Nagios Is Hiring Join Our Team As A Software Engineer More news Copyright 2010 2011 Nagios Core Development Team and Community Contributors Copyright 1999 2009 Ethan Galstad See the THANKS file for more information on contributors Nagios Core is licensed under the GNU General Public License and is provided AS IS with NO WARRANTY OF ANY KIND INCLUDING THE WARRANTY OF DESIGN MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE Nagios Nagios Core and the Nagios logo are trademarks servicemarks registered trademarks or registered servicemarks owned by Nagios Enterprises LLC Use of the Nagios marks is govemed by the trademark use restrictions SOURCEFORGE NET m Fig 49 Pantalla principa
49. Nagios Core E En e C amp bips 192 168 1 113 Y snmp N agio s Current Network Status Host Status Totals Service Status Totals Last Updated Fri Oct 28 00 12 33 CEST 2011 Updated every 90 seconds Nagos8Core 331 wuru naois ora mss oe Me o Los Logged in as nagiosadmin Home SS Documentation View History For all hosts o View Notifications For All Hosts A A T Current Status View Host Status Detail For Al Hosts Tactical Overview a P Map Service Status Details For All Hosts Hosts ti 107 N ce ak pt To casa NSClient Version CRI 28 10 2011 00 12 07 0d 0h Om 26s 4 NSClient 0 3 9 327 2011 08 16 PING GR 28 10 2011 00 11 26 0d 1h 31m7s 114 ECO OK Paquetes perdidos 0 RTA 4 08 ms localhost Current Load GRE 28 10 2011 00 07 35 0d 6h 22m Ss 114 OK carga media 0 00 0 01 0 05 Current Users OA 28 10 2011 00 08 58 404 21h 21m23s 1 4 USUARIOS OK 1 usuarios actualmente en HTP CRE 22 10 2011 00 08 50 40d 21h 20m 48s 114 HTTP OK HTTP 1 1 200 OK 453 bytes en 0 006 segundo tiempo de respuesta PING OKA 28 10 2011 00 09 28 40d 21h 20m 8s 114 ECO OK Paquetes perdidos 0 RTA 0 32 ms Root Partition CRI 28 10 2011 00 10 05 38d 20h 41m 35s ve DISK OK free space 6190 MB 68 inode 73 SSH GR 28 10 2011 00 10 43 38d 20h 40m 575 14 SSH OK OpenSSH_5 8p1 Debian 1ubuntu3 protocolo 2 0 Swap Usage CRI 28 10 2011 00 11 20 38d 20h 40m 20s ve SWAP OK 100 free 509 MB out of 509 MB Total Processes GR 28 10
50. Oh 43m 56s SNMP OK System Fan Status 2 SNMP OK Redundant PoWer Supply 2 Sistema Fuente Redundante OKI 06 19 2012 12 04 32 0d Oh 52m 45s Memory Usage OKA 06 19 2012 12 04 52 0d Oh 51m 47s Memory usage total 7946 37 Mb used 3707 93 Mb 47 free 4238 43 Mb 53 PING GR 06 19 2012 12 07 00 0d Oh 50m 48s PING OK Packet loss 0 RTA 1 05 ms SNMP SysUpTime OKI 06 19 2012 11 57 58 0d Oh 49m 50s Temperatura interna RE 06 19 2012 11 59 14 0d Oh 48m 34s Temperatura externa R 06 19 2012 12 00 26 0d Oh 47m 22s SNMP OK System Up Time Timeticks 112010926 12 days 23 08 29 26 SNMP OK internal Temperature 2 SNMP OK external Temperature 2 Uptime OK 06 19 2012 12 02 18 0d Oh 46m 10s System Uptime 12 day s 23 hour s 13 minute s winserver2 CA Drive Space KC 06 19 2012 12 04 32 0d Oh 43m 56s c total 97 66 Gb used 68 62 Gb 70 free 29 03 Gb 30 CPU Load O 06 19 2012 12 Od Oh 43m 56s CPU Load 2 5 min average Estado Ventilador CPU OKM 06 19 2012 12 05 51 0d Oh 53m 29s SNMP OK CPU Fan Status 2 aod 06 19 2012 12 06 20 Od Oh 52m 315 SNMP OK System Fan Status 2 Fuente Redundante RE 06 19 2012 12 07 14 0d Oh 50m 34s SNMP OK Redundant PoWer Supply 2 Memory Usage GRIN 06 19 2012 11 59 14 0d Oh 48m 34s Memory usage total 5912 02 Mb used 708 93 Mb 12 free 5203 09 Mb 88 PING OK 06 19 2012 11 59 14 0d Oh 48m 34s PING OK Packet loss 0 RTA 3 37 ms SNMP SysUpTime OKM 06 19 2012 12 00
51. SHOSTADDRESSS C SARGIS n SARG2S w SARG3S c SARG4S SARGIS define command command_name check_snmp_load_vl command line SUSER1 check_snmp_load pl H HOSTADDRESS C SARGIS T ARG2S w SARG3 c SARG4S SARGSS define command command_name check_catalyst_flash command line USER1 check_catalyst_flash pl s SHOSTADDRESS C SARG1S w SARG2 c SARG3 define command command_name check_catalyst_mem command line USER1 check_catalyst_mem pl s SHOSTADDRESS C SARGI w SARG2 c SARG3 define command command_name check_catalyst_fans command line USER1 check_catalyst_fans pl s SHOSTADDRESS C ARG1 define command command_name check_catalyst_load command line USER1 check_catalyst_load pl s SHOSTADDRESS C SARG1S w SARG2 c SARG3S if Una vez afiadidos los comandos ya se pueden utilizar en el fichero cfg del switch define service 30 http www cisco com public sw center netmgmt cmtk mibs shtml 31 http exchange nagios org directory Plugins Hardware Network Gear Cisco P g 119 Septiembre de 2012 define s define s define s MONITORIZACI N DE SERVICIOS Y SISTEMAS use host_name service description check_command ervice use host_name service description check_command ervice use host_name service description check_command ervice use host_name service description check_command generic service CiscoSwitchRed2 Mem Flash che
52. SISTEMAS RFC4710 Real time Application Quality of Service Monitoring RAQMON Framework Multimedia Terminal E Nechamkin J F December ASCII Adapter MTA Mule 2006 Management Information Base for PacketCable and IPCablecom Compliant Devices Cable Device E December ASCII Management 2006 RFC2669 Information Base for Data Over Cable Service Interface Specification DOCSIS Compliant Cable Modems and Cable Modem Termination Systems Event Notification A Ahmad G June 2006 ASCII Nakanishi Management Definitions of Managed M Bakke J May 2006 ASCII Objects for IP Storage Muchow User Identity Authorization The IEEE 802 IETF B Aboba Ed March 2006 ASCII INFORMATIONAL Relationship Definitions of Managed K Gibbons C January ASCII PROPOSED Monia J Tseng F 2006 Travostino Objects for Internet Fibre STANDARD Channel Protocol iFCP Data Over Cable System M Patrick W January ASCII Interface Specification Murwin 2006 Quality of Service Management A Siddiqui D October ASCII Romascanu E 2006 Golovinsky RFC4682 RFC4639 RFC4547 Information Base for Data over Cable Service Interface Specifications DOCSIS Compliant Cable Modems and Cable Modem Termination Systems RFC4545 aoa o o Cc CU Information Base DOCSIS QoS MIB RFC4268 Entity State MIB tog e S Ch
53. Status Information DB connect jdbc oracle thin C SMA CSMA 10 36 32 10 1521 orcl DB query select df TABLESPACE NAME df FILE_ID df BYTES fs BYTES 1024 kbytes_max df BYTES 1024 kbytes_used round df BYTES fs BYTES df BYTES 100 usage_pct from select TABLESPACE_NAME sum BYTES BYTES count distinct FILE_ID FILE_ID from dba_data files group by TABLESPACE_NAME df select TABLESPACE_NAME sum BYTES BYTES from dba_free_space group by TABLESPACE_NAME fs where df TABLESPACE _NAME fs TABLESPACE NAME order by df TABLESPACE NAME asc Name EXAMPLE Files 1 Space total 125568 KB Space used 102400 KB Space used 77 Name SYSAUX Files 1 Space total 410304 KB Space used 399360 KB Space used 97 Name SYSTEM Files 1 Space total 503104 KB Space used 501760 KB Space used 100 Name UNDOTBS1 Files 1 Space total 422080 KB Space used 215040 KB Space used 4 Name USERS Files 3 Space total 2421888 KB Space used 1270016 KB Space used 9 Performance Data Current Attempt 1 4 HARD state Fig 89 Salida del commando de comprobaci n de tablespace En el resultado se puede ver que la conexi n a la base de datos se ha realizado correctamente y por tanto podemos ejecutar la consulta SQL En la parte inferior en las cadenas que empiezan por Name se muestran los distintos tablespace que existen y porcentaje usado Este servicio utiliza el programa de Java check_tablespace_oracle El c digo com
54. TABLESPACE NAME FILE NAME BYTES MAXBYTES AUTOEXTENSIBLE dba free space TABLESPACE NAME FILE ID BYTES Show free tablespace Select tablespace name Sum bytes 1024 Total Free KB From dba_free space Group By tablespace_ name Show used tablespace Select tablespace name Sum bytes 1024 Total Used KB From dba_data files Group By tablespace name if tbspname query select df TABLESPACE NAME df FILE ID df BYTES fs BYTES 1024 kbytes_max df BYTES 1024 kbytes used round df BYTES fs BYTES df BYTES 100 usage pct from select TABLESPACE NAME sum BYTES BYTES count distinct FILE ID FILE ID from dba data files group by TABLESPACE NAME df select TABLESPACE NAME sum BYTES BYTES from dba free space group by TABLESPACE_ NAME fs where df TABLESPACE NAME fs TABLESPACE NAME order by df TABLESPACE NAME asc else query select df TABLESPACE NAME df FILE ID df BYTES fs BYTES 1024 kbytes_ max df BYTES 1024 kbytes_used round df BYTES fs BYTES df BYTES 100 usage pct from select TABLESPACE NAME sum BYTES BYTES count distinct FILE ID FILE ID from dba data files where TABLESPACE NAME tbspname dal group by TABLESPACE NAME df select TABLESPACE NAME sum BYTES BYTES from dba free space group by TABLESPACE NAME fs where df TABLESPACE _NAME fs TABLESPACE NAME order by df TABLESPACE NAME asc if debug 1 System out println DB query que
55. TABLESPACE NAME fs where df TABLESPACE NAME fsS TABLESPACE NAME 317440 KB 348160 KB 215040 KB 102400 KB current space used in percent static int kbytes warn 0 the commandline argument for warning threshold of KB used static int kbytes _ crit 0 the commandline argument for critical threshold of KB used static int dfiles total 0 the returned number of tablespace files static int kbytes_used 0 the returned tablespace value of used KB static int kbytes_total 0 the returned tablespace value of total KB available static int percent_used 0 the returned tablespace value static int return_code 0 OK gt 0 WARNING gt 1 CRITICAL gt 2 UNKNOWN gt 3 DEPENDENT gt 4 static int debug 0 normal gt 0 verbose gt 1 when d parameter is given static String output the plugin output string static String perfdata the plugin perfdata output returning the KB values static String tbspname the tablespace to check static String dbUrl the access URL for the database to query static String query the SQL query to execute public static void main String args if args length lt 6 System err println Error Missing Arguments System err println Syntax lt db user gt lt db pwd gt lt tablespace name gt lt kbytes warn gt lt kbytes crit gt System err println lt db user gt lt db pwd gt r lt tablespace name gt S
56. a o 1998 surge SNMP Simple Network Management Protocol su modelo de informaci n SMI y la MIB I Management Information Base Las MIBs son ficheros p blicos escritos en lenguaje ASN 1 Abstract Syntax Notation que representan el modelo de informaci n Adem s de las MIBs est ndar que todos los fabricantes deben respetar cada fabricante de un dispositivo puede a adir otras propias stas se deben proporcionar en el dispositivo o deben estar disponibles en su p gina web Existen algunos repositorios de MIBs en internet para pod rselas descargar En el a o 1991 se realiz una revisi n de SNMP y apareci la MIB II Por motivos principalmente de falta de seguridad en 1993 se public la versi n 2 GNMPv2 y en 1993 SNMPv3 Actualmente se trabaja con las tres versiones indistintamente en funci n del nivel de seguridad que se desee P g 23 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Las RFCs b sicas son las de la tabla siguiente Para hacer una consulta completa se recomienda buscar en bases de datos como el RFC Editor Por comodidad se incluyen en el Anexo V Tabla I RFC b sicas asociadas a SNMP RFC Concepto 1155 SMI Structure of Management Information 1157 Protocolo SNMP 1212 Definiciones MIB 1156 MIB I 1213 MIB Il 1155 SMI Structure of Management Information 4 1 2 MIBs y OIDs Las MIBs almacenan conjuntos de objetos que modelan el funcionamiento de un dispositi
57. a instalar son sudo apt get install build essential openssh server sudo apt get install apache2 libgd2 xpm dev php5 libapache2 mod php5 Si se necesita un entorno seguro se debe configurar Apache para poder acceder con conexi n segura mediante ssl sudo a2enmod ssl sudo a2ensite default ssl Reiniciar apache y comprobar que el apache2 funciona sudo etc init d apache2 restart 3 restart o relod seg n sea necesario P g 39 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Mozilla Firefox h Archivo Editar Ver Historial Marcadores Herramientas Ayuda O http localhost gt Q httpMocalhosy Je f Google It works This is the default web page for this server The web server software is running but no content has been added yet Fig 14 Comprobaci n de la p gina inicial del servidor Apache Conexi n no confiable Mozilla Firefox Archivo Editar Ver Historial A Conexi n no confiable Marcadores Herramientas Ayuda So o a https localhost v activar ssl en apache2 amp E Esta conexi n no est verificada Ha pedido a Firefox que se conecte de forma segura a localhost pero no se puede confirmar que la conexi n sea segura Normalmente cuando se intente conectar de forma segura los sitios presentan informaci n verificada para asegurar que est en el sitio correcto Sin embargo la identidad de este sitio no puede ser verificada Qu
58. at present All evaluation methods other than PR STR and SUBSTR expect that the value returned from the SNMP query is an unsigned integer Rate Calculation In many places SNMP returns counters that are only meaningful when calculating the counter difference since the last check check samp saves the last state information in a file so that the rate per second can be calculated Use the rate option to save state information On the first run there will be no prior state this will return with OK The state is uniquely determined by the arguments to the plugin so changing the arguments will create a new state file Send email to nagios users lists sourceforge net if you have questions regarding use of this software To submit patches or suggest improvements send email to nagiosplug devel lists sourceforge net 8 2 2 Plugin check_ifstatus y check_ifoperstatus Estos plugins permiten conocer el estado de las interfaces Septiembre de 2012 P g 86 MONITORIZACI N DE SERVICIOS Y SISTEMAS 8 3 Otros Plugins SNMP Se pueden descargar de la web de Nagios Exchange A continuaci n se muestra la utilizaci n de cinco de ellos escritos en lenguaje Perl check_catatlyst_temp pl check_catatlyst_flash pl check_catatlyst_mem pl check_catatlyst_fans pl check_catatlyst_load pl Antes de ejecutarlos hay que instalar el m dulo NET SNMP de Perl Si no est instalado aparecer el error Can t locate Net SNMP
59. ccmSIPDeviceInfo 1 3 6 1 41 9 9 1156 1184 ccmGroupTable Ms AAA Ls LT ccmTable 130661 ABS AS BLG ccmGroupMappingTable LS Ls DILO Lis ccmRegionTable APESE TE EE FE E E TAG A ccmRegionPairTable U1 363264 PO E PE E 156513 Lao ccmTimeZoneTable E TE PS CE A T5651 5 136 ccmDevicePoolTable 1 635 TESE E E NRE PEI PE h ccmProductTypeTable Whee S26 6d Ail 9 9 156 1608 ccmGroupEntry 1 380s 16424159 9 156645 sti ccmGroupIndex E E PA PE A RE E A E E Ld ccmGroupName MT AE DEE O21 TETTE E OT d ccmGroupTftpDefault uE TE TE E Aid E 156 ode deo ccmEntry ML Sic Ode Ay LO Lo ds ld ccmIndex ARO TAS APY MP A SS IA O ree ed ccomName L386 14nd Oo PT A Le ccmDescription MERO ALA dd ccmVersion 1306s 14d E E E OA ccmStatus ES A A A E A aoe ccmInetAddressType U1 63s 60 1 4642959 15601 123d 6 ccmInetAddress TS A PEE PES PT A 2 1 hi ccmClusterld 1 3546 L 4 646 9 9 156 1 L 2 1L 8 ccmInetAddress2Type ML BO dt Dis DADO dirt OP ccmInetAddress2 1 3 6 1 4 19099 156 1121310 ccmGroupMappingEntry 1 3 6 1 4 1 9 9 156 1 1 3 1 ccmCMGroupMappingCMPriority 13 0 144015 9 96 156 10 ES ARE A ccmRegionEntry EEE TETE ITEE dd 16 LL TEA ccmRegionIndex WT 9601 4645969 E A E A ccmRegionName PRES A POOS PE PET E PEOS di ccmRegionPairEntry UT 636 604 OL E AR IA ccmRegionSrcIndex 1 6 86002 Did LO did in ccmRegionDestIndex 1 3 6 1 8 1 9 9 156 11 561 2 Septiembre de 2012 P g 169
60. check C community COMMUNITY NAME community name for the host s SNMP agent implies SNMP vl or v2c with option l login LOGIN x passwd PASSWD 2 v2c Login and auth password for snmpv3 authentication If no priv password exists implies AuthNoPriv 2 use snmp v2c X privpass PASSWD Priv password for snmpv3 AuthPriv protocol L protocols lt authproto gt lt privproto gt lt authproto gt Authentication protocol md5 sha default md5 lt privproto gt Priv protocole des aes default des p port PORT SNMP port Default 161 n name NAME Name of the process regexp No trailing slash r noregexp Do not use regexp to match NAME in description OID f fullpath Use full path name instead of process name Windows doesn t provide full path name A param Add parameters to select processes ex named t var named chroot will only select named process with this parameter F perfout Add performance output outputs memory usage num_process cpu_usage w warn MIN MAX Number of process that will cause a warning 1 for no warning MAX must be gt 0 Ex w 1 50 c critical MIN MAX number of process that will cause an error 1 for no critical MAX must be gt 0 Ex c 1 50 Notes on warning and critical with the following options w ml x1 c m2 x2 you must have m2 lt ml lt x1 lt x2 you can omit xl or x2 or both m memory WARN CRIT checks memory usage defaul
61. check on configuration data Checking services Checked 8 services Checking hosts Checked 1 hosts Checking host groups Checked 1 host groups Checking service groups Checked O service groups Checking contacts Checked 1 contacts Checking contact groups Checked 1 contact groups Checking service escalations Checked service escalations Checking service dependencies Checked 0 service dependencies Checking host escalations Checked O host escalations Checking host dependencies Checked 0 host dependencies Checking commands Checked 24 commands Checking time periods Checked 5 time periods Checking for circular paths between hosts Checking for circular host and service dependencies Checking global event handlers Checking obsessive compulsive processor commands Checking misc settings Total Warnings 0 Total Errors 0 Things look okay No serious problems were detected during the pre flight check alumnognagios usr local nagios bin Fig 35 Comprobaci n configuraci n de Nagios 6 4 Monitorizaci n de m quinas Linux El fichero de configuraci n localhost cfg en el directorio objects se puede utilizar como plantilla para monitorizar m quinas Linux define host use linux server Name of host template to use This host definition will inherit all variables that are defined Pag 61 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y
62. de directivas de diagn stico usa el Host desiste Iniciado Manual Sisteml remote SNMP agents and forwards ois Host del servicio d El Servicio de directivas de diagn stico usa el Host del servi Iniciado Manual Servici the messages to MG SOFT WinSNMP Identidad de aplic Determina y comprueba la identidad de una aplicaci n Si s Manual Servici based management programs Informaci n dela Facilita la ejecuci n de aplicaciones interactivas con privile Iniciado Manual Sistem a id rompae Gi Iniciador de proce El servicio DCOMLAUNCH inicia los servidores COM y DC ado Autom tico Sistem _ Inicio de sesi n se Habilita procesos de inicio bajo credenciales alternadas Manual Sistem Oh Instalador de Acti Proporciona validaci n de Control de cuentas de usuario Manual Sistem _ Instalador de m d Habilita la instalaci n modificaci n y eliminaci n de actua Iniciado Manual Sistem S Instant neas dev Administra e implementa Instant neas de volumen usadas Manual Sistem Gh Instrumental dea Proporciona una interfaz com n y un modelo de objeto pa Iniciado Autom tico Sistem Oh Kaspersky Anti 3 KTMRM para DTC Coordina transacciones entre el coordinador de transac Llamada a procedi El servicio RPCSS es el Administrador de control de servicio Iniciado Autom tico Servici Machine Debug do Autor Iniciado Autom tico Sistem Manual Servici Proporciona la protecci n contra virus
63. de fallos y generaci n de informes El monitor puede analizar el tr fico en la red y detectar fallos sin necesidad de que la estaci n gestora est de forma continua realizando sondeos Pre procesamiento de informaci n El monitor puede realizar an lisis previos de los datos que recoge y enviar datos m s elaborados a la estaci n gestora M ltiples gestores Capacidad para dialogar con m s de una estaci n gestora Esta funcionalidad es til en redes complejas donde cada estaci n gestora est especializada en determinadas tareas 4 2 2 MIB RMON Grupos RMON La parte esencial de la especificaci n de la MB RMON est ahora incluida en la MIB II debajo del sub rbol 16 mib 2 16 La MIB RMON est dividida en diez grupos Grupo 1 statistics Tiene que ver con la recolecci n de estad sticas en interfaces de tipo Ethernet Grupo 2 history Tiene que ver con la recolecci n de grupos de hist ricos sobre estadisticas Grupo 3 alarm Tiene que ver con la monitorizaci n de un objeto espec fico de una MIB en un intervalo dado Grupo 4 host Contiene contadores para varios tipos de tr fico hacia y desde los host conectados a una subred Grupo 5 hostTopN Contiene estad sticas ordenadas que informan de los hosts que est n por encima de ellas en las tablas Grupo 6 matrix Muestra errores e informaci n de utilizaci n en forma de matrices Grupo 7 filter Permite
64. en d a de tal forma que los dispositivos en la red se autoconfiguren e identifiquen Los sistemas de gesti n de direcciones IP servidores DHCP nombres y nombres de dominio WINS DNS y las capacidades inherentes a los protocolos actuales como IPv6 permiten delegar a las herramientas estas tareas complejas antes resueltas de forma tediosa por los administradores y operadores de red P g 18 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 3 4 3 Accounting Esta funci n que literalmente se traduce por contabilidad permite controlar el gasto de recursos bien sean de c mputo ancho de banda tiempo de uso etc La utilidad m s inmediata es la de establecer una compensaci n econ mica aunque m s all de este prop sito estar el correcto control del uso que los usuarios hacen de los recursos El equilibrio de necesidades siempre redundar en un menor coste y mejor servicio a los usuarios 3 4 4 Gesti n de las Prestaciones Performance Las prestaciones est n normalmente ligadas a la eficiencia y al equilibrio de necesidades Para poder gestionar correctamente los recursos hay que saber primero qu uso se est haciendo de los mismos Las prestaciones se refieren normalmente a cuestiones relacionadas con el ancho de banda y latencia en la red Pero a medida que la gesti n de red se extiende a la gesti n de servicios tambi n podemos hablar de prestaciones por ejemplo en relaci n al n me
65. enero 1998 La novedad m s importante en el desarrollo de esta versi n es la incorporaci n de mecanismos de seguridad tunnelling TLS SSH Kerberos En las versiones anteriores el string de la comunidad se transmit a en ASCII plano No todos los dispositivos permiten utilizar todos los mecanismos de seguridad por lo que se aconseja verificar primero las especificaciones de cumplimiento de SNMP P g 35 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Agent Transmission from manager to agent may be authenticated to guarantee identity of sender and integrity and timeliness of message Manager SNMPv3 messages may be encrypted to ensure privacy Agent may enforce access control policy to restrict each principal to certain actions on certain portions of its data Manager Agent Fig 9 Funcionamiento de SNMPv3 Al igual que con SNMPv2 es posible la coexistencia con agentes y estaciones gestoras de las tres versiones del protocolo Muchos de los plugins y dispositivos utilizados para el desarrollo de este proyecto permiten utilizar la versi n 3 de este protocolo Por cuestiones de simplicidad ya que se supone que este documento es el primer paso para poder desarrollar la plataforma de gesti n de red se ha utilizado siempre la versi n 1 En versiones sucesivas se podr n abordar m s cuestiones de configuraci n de este protocolo P g 36 Septiembre de 2012 MONITORIZAC
66. exceeded maxMsgSize error you may need to adjust the maxMsgSize i e the maximum size of snmp message with the o option Try a value with the o AND the v option the script will output the actual value so you can add some octets to it with the o option Requirements Perl in usr bin perl or just run perl script Net SNMP file utils pm in plugin diretory usr local nagios libexec Configurations examples Changelog On CVS repository on sourceforge http nagios snmp cvs sourceforge net nagios snmp plugins Examples All examples below are considering the script is local directory Host to be checked is 127 0 0 1 with snmp community public Ayuda de la sintaxis check_snmp_storage pl h List all storage check_snmp_storage pl H 127 0 0 1 C public m zzzz w 80 c 81 v snmpv3 login check_snmp storage pl H 127 0 0 1 l login x passwd used of home is less than 80 and 90 check_snmp_storage pl H 127 0 0 1 C public m home w 80 c 90 free of home is above 10 and 5 check_snmp storage pl H 127 0 0 1 C public m home w 10 c 5 T pl Mb used of home is less than 800 Mb and 900 Mb check_snmp storage pl H 127 0 0 1 C public m home w 800 c 900 T bu Mb free of home is above 100Mb and 30Mb check_snmp_storage pl H 127 0 0 1 C public m home w 100 c 30 T bl All mountpoints have used less than 80 and 90 check_snmp storage pl H 127 0 0 1 C public m w 80
67. informaci n RMON Algunas veces se les denominan agentes RMON aunque este t rmino es menos apropiado La especificaci n de RMON define estad sticas y funciones a intercambiar y est organizado en 9 grupos RMON fue definido por la IETF en 1992 RFC 1271 y actualizado por las REC 1757 y RFC2819 El est ndar es el STD0059 2000 La nueva versi n de RMON v2 es Remote Network Monitoring Management Information Base Version 2 RFC4502 draft standard Fue desarrollada en 2006 P g 31 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 4 2 1 Objetivos de RMON Aunque es una MIB su objetivo principal es definir funciones e interfaces para proveer un mecanismo de comunicaci n entre estaciones de gesti n SNMP y estaciones monitoras remotas De forma espec fica RMON persigue Operaciones off line Son posibles bajo demanda para de recibir notificaciones de un monitor Este seguir acumulando informaci n y estad sticas hasta que vuelva a ser demandado por la estaci n gestora Esta funcionalidad es interesante en caso de fallo de otros dispositivos o para reducir el ancho de banda consumido por la gesti n de red Monitorizaci n proactiva Si el monitor tiene suficientes recursos puede estar de forma continua ejecutando diagn sticos y evaluando el comportamiento de la red Si se produce alg n fallo en la red el monitor puede enviar la informaci n de forma r pida Detecci n
68. is installed It is also able to monitor the system health of HP Bladesystems and storage systems The components checked for failures and or operation outside the normal range are CPUs power supplies fans temperatures and memory modules The latest release also checks IML log events for memory errors during POST These are very dangerous Memory initialization error The OS may not have access to all of the memory installed in the system Un resultado de este plugin ejecutado por l nea de comandos ser a el siguiente check _hpasm hostname bladecl v CRITICAL power supply 1 1 1 is present condition is failed Ser 5AXXDOAHLY403L FW SparePartNum 500242 001 power supply 1 1 2 is present condition is failed Ser S5AXXDOAHLY403Y FW SparePartNum 500242 001 power supply 1 1 3 is present condition is failed Ser 5AXXDOAHLY403W FW SparePartNum 500242 001 common enclosure KDZ BC3 condition is degraded Ser GB1147A1WH FW 2 60 SparePartNum 519345 001 power enclosure 1 1 SDF BC3 condition is degraded System bladesystem c7000 enclosure g2 S N GB1147A1WH common enclosure SDF BC3 condition is degraded Ser GB1147A1WH FW 2 60 fan 1 1 1 is present location is 1 redundance is other condition is ok fan 1 1 10 is present location is 10 redundance is other condition is ok fan 1 1 2 is present location is 2 redundance is other condition is ok fan 1 1 3 is present location is 3 redundance is o
69. line USER1 check_snmp H SHOSTADDRESSS C S USER5 o 1 3 6 1 2 1 1 4 0 l System Contact Monitor SNMP System Decription define command command_name snmp_sysDescription command line USER1 check_ snmp H SHOSTADDRESS C S USER5 o 1 3 6 1 2 1 1 1 0 l System Description Pag 144 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Monitor SNMP System Location define command command name snmp sysLocation command line SUSER1S check_snmp H SHOSTADDRESSS C SUSER5 o 1 3 6 1 2 1 1 6 0 l System Location Monitor SNMP System Up Time define command command_name snmp_sysUpTime command line SUSER1 check_snmp H SHOSTADDRESSS C SUSER5 o 1 3 6 1 2 1 1 3 0 l System SNMP Up Time Monitor HP Procurve Fan status define command command_name check_hpfan command_line SUSER1 check_snmp H SHOSTADDRESS E SUSER5S sg 1 3 6 1 4 1 11 2 14 11 1 2 6 1 4 1 w SARGIS c SARG2S 1 Fan status 12 2 ANEXO II Fichero de configuraci n servidores Windows AAAA RA ARA A RA ARA DAA RARA AA a AAA RARA ARA ARA ARA AAA ARANA RARA NARA RANA RAR AAARA RA HOST DEFINITIONS AMARA RA ARA RA ARA RARA RA RARA RARA RARA RARA ARANA RADAR ARA RANA RARA NARA RANA RAN BE Define a host for the Windows machine we ll be monitoring Change the host_name alias and address to fit your situation define host use windows server 7 Inherit default values from a template host_name winserverl 7
70. localhost cfg fw rw r 1 nagios nagios 3124 2011 09 16 20 20 printer cfg fw rw r 1 nagios nagios 3293 2011 09 16 20 20 switch cfg rw rw r 1 nagios nagios 10812 2011 09 16 20 20 templates cfg rw rw r 1 nagios nagios 3208 2011 09 16 20 20 timeperiods cfg rw rw r 1 nagios nagios 4019 2011 09 16 20 20 windows cfg alumno nagios etc nagios J Fig 25 Propietario de los ficheros de configuraci n Si no es as utilice los comandos chmod y chown para cambiar permisos y propietario respectivamente 6 1 2 Revisi n fichero de Log Es conveniente para realizar tareas de depuraci n consultar el fichero de log que est almacenado en var nagios nagios log alumnoOnagios var nagios Archivo Editar Ver Buscar Terminal Ayuda alumno nagios var nagios tail f nagios log 1319639135 Nagios 3 3 1 starting PID 1113 1319639135 Local time is Wed Oct 26 07 25 35 PDT 2011 1319639135 LOG VERSION 2 0 1319639135 Finished daemonizing New PID 1115 1319639142 Warning A system time change of Od Oh Om 2s backwards in time ha s been detected Compensating 1319639173 SERVICE ALERT localhost Current Load WARNING SOFT 1 WARNING load average 6 33 2 60 0 95 1319639233 SERVICE ALERT localhost Current Load WARNING SOFT 2 WARNING load average 5 04 2 73 1 09 1319639293 SERVICE ALERT localhost Current Load WARNING SOFT 3 WARNING load average 5 29 3 35 1 42 1319639353 SER
71. m s exactitud y de forma gradual cu ndo est fallando un equipo Esto permite poder anticiparse al fallo ya que cuando ste aparece suele ser demasiado tarde y los usuarios pueden verse gravemente afectados Hay que pensar que servicios como la telefon a anal gica o digital se asumen que funcionan siempre Todo el mundo espera tener tono de llamada en su tel fono aunque asume que en alg n momento puede fallar su conexi n de datos en el PC Por esta raz n detectar un fallo en el servicio de telefon a IP es cr tico Cuando se produce un fallo hay que poner en marcha lo antes posible los siguientes procedimientos Determinar exactamente d nde se ha producido ya que el fallo puede afectar a uno o varios servicios o dispositivos Aislar el resto de la red de tal forma que los usuarios puedan seguir trabajando Reconfigurar o modificar la red para minimizar el impacto de los equipos servicios que han dejado de funcionar Reparar o reponer los equipos o servicios da ados Restaurar la configuraci n de la red al estado inicial 3 4 2 Gesti n de configuraci n La gesti n de la configuraci n permite organizar de forma l gica el comportamiento de todos y cada uno de los componentes de la infraestructura tanto f sicos dispositivos como l gicos drivers SO La configuraci n va ligada a la identificaci n y nombrado de los distintos sistemas y servicios Estas tareas es posible automatizarlas hoy
72. of Managed Z Kielczewski D August 1994 Objects for SNA NAUs Kostick K Shih using SMIv2 Eds Definitions of Managed F Kastenholz July 1994 Objects for the Ethernet like Interface Types RFC1604 Definitions of Managed T Brown Ed March 1994 Objects for Frame Relay Service RFC1596 Definitions of Managed T Brown Ed March 1994 Objects for Frame Relay Service Definitions of Managed T Brown K March 1994 Objects for the Tesink SONET SDH Interface Type Simple Network B Wijnen G March 1994 Management Protocol Carpenter K Distributed Protocol Curran A Sehgal Interface Version 2 0 G Waters DECnet Phase IV MIB J Saperia December Extensions 1993 Definitions of Managed E Decker K September ASCII Objects for Source McCloghrie P 1993 Routing Bridges Langille A HISTORIC pub as PROPOSED STANDARD ASCII Obsoletes RFC1623 Obsoleted by REC3638 HISTORIC pub as STANDARD ASCII Obsoletes RFC1596 Obsoleted by RFC2954 PROPOSED STANDARD ASCII Obsoleted by RFC1604 PROPOSED STANDARD ASCII Obsoleted by RFC2558 PROPOSED STANDARD RFC1592 ASCII Obsoletes EXPERIMENTAL RFC1228 ff io A ASCII Obsoletes DRAFT STANDARD RFC1289 XA 44214 1447 ee O A RFC1525 Obsoletes RFC1286 HISTORIC pub as PROPOSED STANDARD RFC1516 D McMaster K ASCII Obsoletes DRA
73. ooo o o En E Hp 4 He 4 Fig 80 Tipos de traps CISCO CATALYST 3550 12G Abrir la herramienta de captura para recibir los traps En el mercado hay numerosas herramientas con versiones de evaluaci n que aunque tienen capacidades limitadas permiten leer un n mero limitado de traps y as permitir verificar la configuraci n de los equipos P g 89 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 1 Info Window d A Index Table Discovery Discover Agents Remote SNMP agent 5 Set Window 192 168 1 9 i Performance Graph MIB tree z E E Table View R Scan Agent For MIBs 3 Generic SNMP Trace n Agent Snapshot i Compare Agent Snapshots 2 Manage Agent SNMPv3 USM Users 2 gt Diffie Hellman Key Generator SNMP Agent Simulator Query results Welcome to MG SOFT MIB Browser 2010 Professional Edition Remote SNMP agent not contacted sima 000 Fig 81 Herramienta de captura de traps SNMP Trap Ringer Console de MG SOFT Seg n se env en los traps aparecer n en la ventana Esta herramienta s lo permite recibir los primeros 5 traps Despu s de esto reiniciar para seguir recibiendo m s aj ted faa Pare MW Generic linkUp No Time Notification Version i MU 21 2227 658 enterprises 1315 78 1 1 0 SNMPv2c pe a ca OLAN w2 21 35 08 308 Specific 1 SNMEYI 1 Time stamp O days 11h 08m 45s 15th w3
74. phpinfo php 8 Son necesarias tambi n para la tlima versi n de Ubuntu 11 10 9 sudo etc init d apache restart y sudo etc init d nagios restart Pag 44 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 6 8 https 1924681 109 phpinfo php O E Erord BG X 8 phpinfoo Archivo Edici n Ver Favoritos Herramientas Mo ar Autocomplete de la bara de direcciones 3 El BEREC Body of Europea Sitios sugeridos y E M s complementos y 3 Traductor de Google 3 Empleo P blico ECYL P E Portal de Salud de la Junta E Ministerio de Industria Tu R Revista Ciencia e Ingenieri m System ae Nagios 2 6 38 11 generic 48 Ubuntu SMP Fri Jul 29 19 05 14 UTC 2011 Build Date May 2 2011 23 04 25 Server API Apache 2 0 Handler Virtual Directory Support disabled Conagua File php ini etc php5 apache2 Loaded Configuration File etc php5 apache2 php ini Scan this dir for Jetcipnp5 apache2 conf d additional ini files Additional ini files parsed etc php5 apache2 conf d pdo ini PHP API 20090626 PHP Extension 20090626 Zend Extension 220090626 Zend Extension Build API220090626 NTS PHP Extension Build API20090626 NTS Debug Build no Thread Safety disabled Zend Memory Manager enabled Zend Multibyte Support disabled IPv6 Support enabled Registered PHP Strea
75. que compartir estas herramientas por lo que a menudo stas disponen de un sistema de autentificaci n de usuarios con perfiles diversos y complejos Por ltimo la complejidad de los sistemas inform ticos de muchas organizaciones es tal que el control a mano de sus sistemas es totalmente inviable En muchos casos incluso es necesario dise ar una arquitectura en varios niveles con varios equipos supervisando la red formando una jerarqu a de plataformas de gesti n de red Los propios protocolos de red como SNMP permiten trabajar de forma distribuida de forma que existen varias estaciones gestoras que controlan redes m s complejas 3 3 Objetivos de la Gesti n de Red La gesti n de red tiene los siguientes objetivos que han de tenerse siempre presente a la hora de dise ar cualquier sistema de gesti n de red Control de activos estrat gicos Muchos de los sistemas o servicios a gestionar a menudo se consideran activos estrat gicos para nuestra organizaci n Es el caso por ejemplo de un servicio web para una empresa que vende productos por Internet o la propia infraestructura de red en la mayor parte de los casos Estos activos estrat gicos han de ser supervisados y controlados en todo momento P g 16 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS e Control de complejidad Las organizaciones cada vez m s poseen sistemas de informaci n muy complejos que son muy dif ciles de gestionar de forma in
76. reporting contact A person who is to be informed by Nagios of specific events Nagios uses contact objects to show to a user via the Web front end only those things for which the user is listed as a contact person In the basic setting users do not get to see hosts and services for which they are not responsible contactgroup P g 54 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Notification of events in hosts and services takes place via the contact group A direct link between the host service and a contact person is not possible timeperiod Describes a time period within which Nagios should inform contact groups Outside such a time slot the system will not send any messages The messaging chain can be fine tuned via various time periods depending on the host service and contact contact groups command Nagios always calls external programs via command objects Apart from plugins messaging programs also include e mail or SMS messaging applications servicedependency This object type describes dependences between services If for example an application does not function without a database a corresponding dependency object will ensure that Nagios will represent the failed database as the primary problem instead of just announcing the nonfunctioning of the application servicescalation Used to define proper escalation management if a service is not available after a specific time period Nagios in
77. s ssssssssssesssssserseresrsesresresesess 44 5 2 59 Arranque Autom ticos os odon 44 52 6 Tnstali d nde plugins NAAA 44 5 2 7 Comprobaci n de la instalaci n de Nagios ssesssseseessessseeserissesesreseesesess 44 CONFIGURACI N A A ates 48 6 1 Ficheros de Configuraci n de NAGI S sssrorsiniasirinicaa indicio 48 6 1 1 Directorio de configuraci n de Nagios cocnncionicnonnnninnoninnananicnnannnnanoninacncnans 48 6 1 2 Revision fichero de LB ini adan 49 6 1 3 Fichero de configuraci n NagiOs cle isiisscessisessdsapeneicssnadenyyeessvennnddestonedoad gees 50 6 1 4 Fichero de configuraci n cgi cfg os aicsiss piston aio ineaiondasdvanns 53 6 1 5 Arranque y parada de Nagios iiiosndin ori add des 53 G2 Tipos de Objetos en NaAGiOS morrison ic dosis elena eri 53 0 2 D fiici n desatinos 55 6 22 Agrupaci n de hostsirosnsnsaiiinp nnna eae 57 6 2 3 Definici n de servicios a MON tOT ZAT ses ssccinscivitsionsseersaecessteaverstonsdentordiondinds 57 6 2 4 Contact y contacto top husii inen is de etica es 59 6 29 ELODEtO COMA eternidad rte 60 6 3 Comprobaci n de la configuraci n de Nagios ococnonicionnonnnncnnnnnonanananinncnanacanacinnos 61 6 4 Monitorizaci n de m quinas Linux nui ad 61 6 5 Utilizaci n de un ping b sico en WING OWS vsssciiiniddinias iii 62 6 6 Instalaci n NSCHEMF iii tin edil sec deis 62 6 7 Monitorizaci n de Impresoras en Reducida lenin ci n 66 6 8 Monitorizaci n de routers
78. seleccionados los OIDs se ejecuta el comando Pag 112 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS snmpget c public v1 210 0 0 2 El resultado es el siguiente SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI SNMPv2 SMI La siguiente Nagios CM Nombre CM Status CM System version CM Version GW Activos GW Registrados HTTP counters files sent SNMP IS via SNMP Media Devices SQL Server Telefono 1 Telefono 2 Telf Activos Telf Inactivos Telf Registrados Tomcat Unidad C Unidad D Uptime Windows Load enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 enterprises 9 9 156 OID STRING STRING INTEGER INTEGER STRING STRING Counter32 Counter32 Counter32 Counter32 Counter32 Counter32 Counter32 Counter32 N Risa ba li IAA y GS dy So0o99000090bk toba ba ta I OSo ovnoosobhb 210 0 0 2 4 0 0 0 2 9 IPT Red2 IPT Redl O RRR RRR ERR ananunua kR NREL SAUA WHHEHEE HE MYND wR Counter32 4 STR
79. template hostgroup_name HP O 7 The name of the host the service is associated with service description Printer Status 7 The service description check command check _hpjd C public 7 The command used to monitor the service normal check interval 10 7 Check the service every 10 minutes under normal conditions retry check interval 1 7 Re check the service every minute until its final hard state is determined define service use generic service hostgroup_name HP R Lex 0 B service description PING check_command check_ping 3000 0 80 5000 0 100 normal_check_interval 10 retry _check_interval 1 Adem s del t pico ping define un servicio espec fico para impresoras que utilizan t picamente el servicio JetDirect HP Para este servicio hay que hacer coincidir la comunidad SNMP de la impresora y la especificada en el comando check_hpjd Este comando funciona muy bien con impresoras HP y algunas otras que hemos probado Brother pero no devuelve valores correctos para otras marcas probadas Lexmark Oki Como para todos los comandos de nagios existen plugins que se pueden descargar de la p gina http exchange nagios org Para nuestro uso hemos utilizado el check_snmp_printer que pasamos a describir a continuaci n en la versi n original del programador del plugin P g 123 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Universal printer check Check for specific consumables or report on all Qu
80. that have been allowed by the bandwidth throttling settings on this HTTP Server httpStatistics 41 totalRejectedRequests OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the total number of requests that have been rejected by this HTTP Server due to bandwidth throttling settings httpStatistics 42 totalNotFoundErrors OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the total number of requests the HTTP server could not satisfy because the requested resource could not be found httpStatistics 43 P g 179 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS totalLockedErrors OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the total number of requests the HTTP server could not satisfy because the requested resource was locked httpStatistics 44 measuredBandwidth OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the I O bandwidth used by this HTTP Server averaged over a minute i httpStatistics 45 currentCALsforAuthenticatedUsers OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the current count of Client Access Licenses CALs available to this HTTP Server for simultaneous use by authenticated users z httpStatistics 46 maxCALsforAuthenticatedUsers OBJECT TYPE SYNTAX Count
81. the ADMINEMAIL and ADMINPAGER macros in your notification commands admin_email nagios localhost admin_pager pagenagios localhost DAEMON CORE DUMP OPTION This option determines whether or not Nagios is allowed to create a core dump when it runs as a daemon Note that it is generally considered bad form to allow this but it may be useful for debugging purposes Enabling this option doesn t guarantee that a core file will be produced but that s just life Values 1 Allow core dumps Do not allow core dumps default o tave Ancho dela tabulaci n 8 in 1091 Col1__ INS Fig 31 Configuraci n de la informaci n de contacto P g 52 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 6 1 4 Fichero de configuraci n cgi cfg En este fichero se podr n definir los directorios de Nagios y el uso o no de autentificaci n Por defecto la autentificaci n est habilitada cgi cfg S lo lectura etc nagios gedit Archivo Editar Ver Buscar Herramientas Documentos Ayuda DB B B 9 Nuevo Abrir Guardar Imprimir Deshacer Relfycer Q z Cortar Copiar Pegar L cgi cfg 3 possibly hitting you with a denial of service attack by filling up your drive by continuously writing to your command file Setting this value to 0 will cause the CGIs to not use authentication bad idea while any other value will make them
82. tiene dos implicaciones importantes Una sonda RMON puede monitorizar tr fico a nivel de red del modelo OSI incluyendo el protocolo IP Esto posibilita a la sonda aprender m s all de los segmentos de LAN en los que est n conectados y analizar el tr fico que reciben o generan los routers Con esta capacidad una sonda RMON puede averiguar si hay excesiva carga en la red debido al tr fico de entrada del router y qu redes o hosts son el destino origen de ese tr fico si un router est sobrecargado por excesivo tr fico saliente y el origen de ese tr fico si hay demasiado tr fico que no tiene origen o destino en la propia subred y qui n genera ese tr fico Ya que RMON puede monitorizar tr fico a nivel de aplicaci n p ej e mail transferencia de ficheros las sondas pueden registrar tr fico asociado a una 2 Subnivel de control de acceso al medio Medium Access Control del modelo IEEE802 Pag 33 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS determinada aplicaci n De esta forma se puede tener un control mucho m s exhaustivo del tr fico que generan los usuarios y aplicaciones 4 3 1 MIB RMON2 La MIB de RMON2 es simplemente una extensi n de la MIB RMON original a la que se a aden 9 grupos m s Tabla VI Grupos RMON2 Grupo RMON2 Mib 2 16 x probeconfig 19 Incluye dos funcionalidades nuevas importantes la posibilidad de utilizar objetos que permiten indexar tablas y fu
83. usage mem usage in percentage usagemb mem usage in MB swap Swap mem usage in MB overhead additional mem used by VM Server in MB overall overall mem used by VM Server in MB all mem info gt AAEH net shows net info usage overall network usage in KBps Kilobytes per Second receive receive in KBps Kilobytes per Second send send in KBps Kilobytes per Second all net info gt tt io shows disk io info read read latency in ms write write latency in ms all disk io info gt t t OA runtime shows runtime info status overall host status gray green red yellow issues all issues for the host all runtime info gt t t VM specific cpu shows cpu info wait CPU wait in ms mem shows mem info swapin swapin mem usage in MB swapout swapout mem usage in MB active active mem usage in MB io shows disk I O info usage overall disk usage in MB s runtime shows runtime info con connection state cpu allocated CPU in MHz tt t Ft tH HH Septiembre de 2012 P g 167 MONITORIZACI N DE SERVICIOS Y SISTEMAS mem allocated mem in MB state virtual machine state UP DOWN SUSPENDED consoleconnections console connections to VM guest guest OS status needs VMware Tools tools VMWare Tools status Host specific net shows net info nic makes sure all active NICs are plugged in io shows disk io info aborted aborted commands count resets bus reset
84. usr share mibs netsamp NET SNMP VACM MIB Did not find vacmAccessContextPrefix in module 1 usr share mibs netsnmp NET SNMP VACM MIB Did not find vacmAccessSecurityModel in module 1 usr share mibs netsnmp NET SNMP VACM MIB Did not find vacmAccessSecurityLevel in module 1 usr share mibs netsnmp NET SNMP VACM MIB Cannot find module SNMPv2 SMI v1 At line 11 in home alumno snmp mibs INET ADDRESS MIB V1SMI n Timeout No Response from 192 168 1 2 161 Performance Data Current Attempt 3 3 HARD state Last Check Time 03 11 2011 00 23 57 Check Type ACTIVE Check Latency Duration 0 209 6 507 seconds Mavt Srhadulad Chark 02 41 9014 0N 22 E7 O So mr mr T 1 2 Fig 53 Aviso de fichero de MIB no encontrado Las MIBs suelen estar en los siguientes directorios HOME snmp mibs usr local share snmp mibs No obstante en la herramienta se muestran las rutas en las que Nagios busca las MIBs Para averiguar las rutas exactas ejecutar el comando net snmp config default mibdirs alumno nagios etc nagios Editar Ver Buscar Terminal Ayuda alumno nagios etc nagios net snmp config default mibdirs home alumno snmp mibs usr share mibs site usr share snmp mibs usr share mib s iana usr share mibs ietf usr share mibs netsnmp alumno nagios etc nagios 14 Se pueden copiar las MIBs del paquete net snmp https sourceforge net projects net snmp files net snmp 5 7 1 Pa
85. version information P g 166 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS extra opts Section and or config file from which to load extra options may repeat H host ESX or ESXi hostname D datacenter Datacenter hostname N name Virtual machine name u username Username to connect with p password Password to use with the username f authfile Authentication file with login and password File syntax username password w warning THRESHOLD Warning threshold See http nagiosplug sourceforge net developer guidelines html THRESHOLDFORMAT for the threshold format c critical THRESHOLD Critical threshold See http nagiosplug sourceforge net developer guidelines html THRESHOLDFORMAT for the threshold format 1 command COMMAND Specify command type CPU MEM NET IO VMFS RUNTIME s subcommand SUBCOMMAND Specify subcommand S sessionfile SESSIONFILE Specify a filename to store sessions for faster authentication x exclude Specify black list t timeout INTEGER Seconds before plugin times out default 30 v verbose Show details for command line debugging can repeat up to 3 times Supported commands means blank or not specified parameter Common options for VM Host and DC cpu shows cpu info usage CPU usage in percentage usagemhz CPU usage in MHz all cpu info gt ob mem shows mem info
86. y otros programas local y remota para depuradores de sec Microsoft NET Fr Microsoft NET Framework NGEN Deshabilitado Sistem Microsoft NET Fr Microsoft NET Framework NGEN Autom tico i Sistem amp Microsoft SharePo Manual Servici 2 M dulos de creaci El servicio IKEEXT hospeda los m dulos de creaci n de clav Iniciado Autom tico Sistem Motor de filtrado El Motor de filtrado de base BFE es un servicio que admini Iniciado Autom tico Servici Net Logon Mantiene un canal seguro entre el equipo y el controlador Manual Sistem NVIDIA Display Dri Provides system and desktop level support to the NVIDIA di Iniciado Autom tico Sistem Office Source Eng Guarda los archivos de instalaci n utilizados para las actual Manual Sistem _ UA A TE E ARA ae A A iit j gt Extendido Est ndar Fig 86 Servicios relacionados con los traps SNMP P g 93 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 9 CASOS PR CTICOS DE GESTION DE SERVICIOS Y APLICACIONES 9 1 Informix Utilizando SNMP se puede monitorizar el estado de este servidor Se sondea el puerto TCP 1527 que es donde est arrancado el servidor en los sistemas del SACYL y se testea el proceso Oninit AMAAARA AR AA RA AAA ARA AAA ARMA RA ARMADA RARA RAMA RADA AARA RARA ANA RARA NARA RANA RAR ANADA Informix ONLINE SERVICE DEFINITIONS AMARA RA AR AA RA ARA R
87. 0 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Pag 11 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS NDICE DE TABLAS Tabla I REC b sicas asociadas a SNMP crias idilio Tunari ca 24 Tabla II Objeto system de la MID tescavabyeesabaniestoas ano Rong aan sees a RIN AS 28 Tabla III Objeto interfaces de la MID TA rl one 28 Tabla IV Descripci n campos de la PDU de SNMP oonconicnionnincnoninannconorionionicnnancaniaracnni nes 30 Tabla V Graps RMON usan acia ai eenean ani eeni tiiiclisd 33 Tabla VI Gtupos ARMONIA AE Gan sede pa RA oct 34 Tabla VII Par metros configuraci n instalaci n Nagios cocnicicicncnnnnnnonnnncnananononncnanacanocncns 43 Tabla VIII Resumen de objetos y OIDs gestionables para Cisco Call Manager 104 Tabla IX Tabla de OIDs en un Call Manager vivio ita cds 112 Tabla X Valores para los par metros del comando check_snmp_l0ad ooocicicccconicicinanos 133 P g 12 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 1 PR LOGO Este trabajo es el resultado pr ctico del acuerdo de la pasada asamblea ordinaria celebrada el 25 en febrero en Burgos Tiene especial relevancia para nuestra asociaci n por ser el primer cuaderno t cnico y por que sienta las bases de una nueva e interesante l nea de actividades de Aiiscyl basada en la publicaci n de material t cnico Est alineado con uno de los objetivos que desde la junta directiva estamos impul
88. 0 83 184 7 IP address of the switch hostgroups switches procurve 7 Host groups this switch is associated with notes url http 10 40 83 182 define host use generic switch 7 Inherit default values from a template host_name swchcuv2195 7 The name we re giving to this switch alias swchcuv2195 hcuv sacyl es HP ProCurve 2810 24G A longer name associated with the switch address 10 40 83 184 7 IP address of the switch hostgroups switches procurve 7 Host groups this switch is associated with notes url http 10 40 83 184 AMARA RA RARA DAA ARA EEE AAA AMARA AA RARA RARA RARA RA AARARARAR ANA RAR A Ee EE EB AMARA RARA A RA ARAN DAA AAA ARA ARA ARMADA RARA RARA RARA AARARARAR ANA RADAR ARA RANA RAR ANADA SERVICE DEFINITIONS AMARA RA ARA ARA ARA AAA AAA ARA a Ee EE Ae EE EE EH EE ea EE EE ANADA AMARA RA ARA ARA AR EAA EEA AEA AEE EA Ea EE ea Ee Ee a ee EB Service definition HP Procurve Switch Temperatura CPU define service use generic service Name of service template to use hostgroup_name switches procurve service description CPU Temperatura is volatile 0 check period 24x7 max_check_attempts 3 normal_check_interval 5 retry _ check _ interval 1 contact_groups switch admins notification interval 240 notification period 24x7 notification options c r check_command check_hptemp 4 3 5 Service definition CPU Usada Define a service to check the CPU consuption on HP Procurve Switchs Warning if lt 40
89. 0000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 1000000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 1000000000 alumnoGnagios snmp mibs SAT APS oun bt 4 4 4 4 4 Fig 114 Uso snmpwalk con filtro para consultar la velocidad de las interfaces P g 115 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS alumno nagios snmp mibs h Archivo Editar Ver Buscar Terminal Ayuda alumno nagios snmp mibs snmpwalk v1 cpublic 192 168 1 5 ifSpeed 1 IF MIB ifSpeed 1 Gauge32 10000000 alumno nagios snmp mibs snmpget v1 Of cpublic 192 168 1 5 ifSpeed 1 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed 1 Gauge32 10000000 alumno nagios Fig 115 Ejemplo de utilizaci n primitiva snmpwalk con detalle del oid El rbol completo de oids depender del fabricante por lo que se aconseja acudir a la secci n correspondiente de su p gina web 10 1 1 Switches HP Procurve Una vez estudiada la MIB del fabricante y seleccionado los oids de inter s hay que crear el fichero cfg con la definici n de host y services El siguiente extracto de c digo se puede utilizar como base para el acceso a un switch HP Procurve Define un host y varios servicios utilizando SNMP Si se desea consultar el fichero completo se encuentra en el Anexo I define host use generic switch 7 Inherit default values from a template hos
90. 09 35 31 4d 21h 46m 175 1 3 Cabinas2 Boot Partition OKI 06 26 2012 09 30 01 5d 17h 3m 515 1 3 OKA 06 26 2012 09 31 57 5d 17h 2m 395 13 OKA 06 26 2012 09 36 54 5d 17h 11m 31s 13 OKA 06 26 2012 09 35 50 4d 21h 44m 21s 1 3 Cabinas3 Boot Partition OK 06 26 2012 09 30 21 5d 17h 19m 35s 1 3 OKA 06 26 2012 09 32 17 5d 17h 2m 39s 1 3 OKA 06 26 2012 09 37 13 5d 17h 11m 31s 1 3 OKA 06 26 2012 09 36 09 4d 21h 42m 24s 1 3 OKA 06 26 2012 09 30 40 5d 18h 2m 36s 1 3 WARNING 06 26 2012 09 32 36 5d 17h 35m 41s 3 3 OKA 06 26 2012 09 37 32 5d 16h 22m 33s 1 3 OKA 06 26 2012 09 36 29 4d 21h 45m 58s 1 3 Ldapl BootPartition KW 06 26 2012 09 30 59 5d 18h Om 41s 1 3 OKA 06 26 2012 09 33 48 5d 16h 22m 41s 1 3 OKA 06 26 2012 09 36 52 0d 19h 55m 14s 1 3 OKA 06 26 2012 09 36 48 0d 22h 16m 8s 1 3 Ldap BootPartition OK 06 26 2012 09 31 19 5d 18h Om 17s 1 3 Swap linux OKI 06 26 2012 09 33 48 5d 17h 32m 39s 1 3 OKA 06 26 2012 09 37 11 5d 16h 22m 33s 1 3 OKA 06 26 2012 09 37 07 4d 21h 42m 5s 1 3 boot 28 used 27MB 99MB lt 90 OK boot 28 used 27MB 99MB 4 used 2191MB 61934MB lt 90 OK PING OK Packet loss 0 RTA 0 94 ms Swap space O used 0MB 5952MB lt 60 OK boot 28 used 27MB 99MB lt 90 OK boot 28 used 27MB 99MB 4 used 2192MB 61934MB lt 90 OK PING OK Packet loss 0 RTA 1 09 ms Swap space 0 used OMB S952MB lt 60 OK boot 12 used 12MB 99MB lt 90
91. 1 value in cisco cisco CPU usage 3 values CPU average on 5sec 1 min 5 min cata cisco catalyst CPU usage 3 values CPU average on 5sec 1 min 5 min nsc Netscreen CPU usage 3 values CPU average on 5sec 1 min amp 5 min fg Fortigate CPU usage 1 value in bc bluecoat CPU usage 1 value in nokia nokia CPU usage 1 value in hp HP procurve switch CPU 1 value in usage lp Linkproof CPU usage 1 value in hpux HP UX load 3 values load average on 1 min 5 min 15 min El siguiente c digo define el comando a utilizar y el servicio para el host Cada uno de ellos se debe copiar en el fichero cfg correspondiente define command command_name check snmp load v1 command line USER1 check_snmp_load pl H HOSTADDRESS C SARGIS T ARG2 w ARG3 c SARG4S ARG5 define service use generic service host_name monitorlinux service description Linux Load check_command check_snmp load _v1 public nets1 4 3 3 8 5 5 kya La siguiente figura muestra el resultado de la ejecuci n de comando p OK 14 07 2012 20 19 23 Od 6h 8m 515 13 E 35 used 3204MB 9070MB lt 80 OK Apache Processes DR 14 07 2012 20 23 22 Dd Sh 34m 52s 13 4 process matching apache2 gt 3 lt 100 OK Mem 3 3Mb OK Cpu HOP AO 14 07 2012 20 23 14 1d 5h 36m 26s 14 HTTP OK HTTP 1 1 200 OK 453 bytes en 0 001 segundo tiempo de Linux Load OK 14 07 2012 20 24 29 Od Oh 17m 55s 113 Load 0 14 0 06 0 06 OK PING OKA 1
92. 10 36 32 10 1521 orcl CSMA CSMA d define command command_name check_tablespace_oracle2 command line java classpath usr local nagios libexec check_tablespace oracle 10 36 32 10 1521 orcl CSMA CSMA USERS 1000000 3000000 define command command_name check_users_ oracle command line java classpath usr local nagios libexec check users oracle 10 36 32 10 1521 orcl CSMA CSMA 70 100 SERVICIOS define service use local service Name of service template to use host_name oracleserver service description PING check _command check ping 100 0 20 500 0 60 define service use local service Name of service template to use host_name oracleserver service_description PUERTO_tcp_1521 check_command check_tcp_10 define service use local service 7 Name of service template to use host_name oracleserver service_description ORACLE_ESTADO check_command check_oracle_instant 1521 orcl CSMA CSMA define service use local service 7 Name of service template to use host_name oracleserver service description ORACLE tablespace check_command check _tablespace oracle P g 184 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS define service use local service 7 Name of service template to use host_name oracleserver service description ORACLE tablespace USERS check_command check_tablespace_oracle2 define service use local service 7 Name of service template to use host_name oracleserv
93. 11ClientInfoGroup WT Debs le A whe Gs 9 273 2 2040 ciscoDot11ApAssocGlobalGroup WD eB a 04 oD Oe OSA Sees E ciscoDot11IfAssocStatGroup BEI bedi PO A PL 27S E ciscoDot1l1IfCipherStatGroup Id Otal ciscoDot11ClientAuthenGroup IA Pa E 4d 9s A E P AE ciscoDot11ClientConfigExtGroup WD D6 O00 O PE EPS ciscoDot11ClientNewAuthenGroup Ds Sis Od Ae Di Be ls LO 12 9 Anexo IX HTTP MIB HTTPSERVER MIB DEFINITIONS BEGIN IMPORTS enterprises OBJECT TYPE Counter FROM RFC1155 SMI internetServer FROM INTERNETSERVER MIB s microsoft OBJECT IDENTIFIER enterprises 311 gt software OBJECT IDENTIFIER microsoft 1 gt internetServer OBJECT IDENTIFIER software 7 httpServer OBJECT IDENTIFIER internetServer 3 httpStatistics OBJECT IDENTIFIER httpServer 1 Http Server Statistics totalBytesSentHighWord OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the high 32 bits of the total number of of BYTEs sent by the HTTP Server httpStatistics 1 totalBytesSentLowWord OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the low 32 bits of the total number of of BYTEs sent by the HTTP Server httpStatistics 2 totalBytesReceivedHighWord OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the high 32 bits of the total number of of BYTEs received by the HTTP Server
94. 18 13 35 49 CEST 2012 Service Status Details For Host pacientes Ce O ECN ATA AT ee a pacientes CPU Cola Procesos WARNING 18 06 2012 13 31 19 0d 2h 49m 30s Load 3 25 3 30 3 48 3 25 gt 3 WARNING CPU en uso GR 18 06 2012 13 35 06 Sd2h32m1s 1 3 CPU used 6 0 lt 40 OK File System GRU 18 06 2012 13 31 25 6d3h34m24s 1 3 F 9 used 12GB 125GB lt 80 OK File System boot O 18 06 2012 13 30 34 643h35m18s 1 3 boot 20 used 0GB 0GB lt 90 OK File System copia fx GRIN 18 06 2012 13 31 25 6d3h34m24s 1 3 Icopia_ifx 45 used 131GB 295GB lt 90 OK File System datos fx GRIN 18 06 2012 13 29 43 6d3N40m15s 1 3 Idatos_ifx 51 used 150GB 295GB lt 90 OK IFX Proceso Oninit GRIN 18 06 2012 13 33 01 040h22m48s 1 3 20 process named oninit gt 0 FX Serv ifx 1527 O 18 06 2012 13 27 47 446h3m31s 1 3 TCP OK 0 009 second response time on port 1527 Memoria Swap en uso GRIN 18 06 2012 13 33 55 3d23h58m3s 1 3 Ram 69 Swap 0 OK PING GRU 18 06 2012 13 31 45 1412h39m4s 1 4 ECO OK Paquetes perdidos 0 RTA 0 34 ms SSH Puerto GRU 18 06 2012 13 34 42 4d5h33m43s 1 4 TCP OK 0 003 second response time on port 22 SSH Servidor O 18 06 2012 13 35 22 17d3h55m30s 1 4 SSH OK OpenSSH_3 9p1 protocolo 1 99 Telnet Puerto GRE 18 06 2012 13 33 21 1743h25m17s 1 4 TCP OK 0 001 second response time on port 23 Telnet Sesiones activas RE 18 06 2012 13 31 34 0d0h14m15s 1 3 147 proces
95. 2 97 NOTIFICATION LOG MIB nlmConfigGlobalEntryLimit 0 Gauge32 500 NOTIFICATION LOG MIB n1mConfigGlobalAge0ut 0 Gauge32 15 minutes NOTIFICATION LOG MIB nlmStatsGlobalNotificationsLogged Counter32 O notifications NOTIFICATION LOG MIB nlmStatsGlobalNotificationsBumped Counter32 O notifications alumno nagios snmp mibs Ww w gt lt a w INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER ub AA nw nw on WOON OUPBPWNrR PH Ww w w w w y y www www U uu uy y uy y uy y uy y uy uy uy RRA A A A A A A A A A lo A A A A A A A A A pl pl ps pl ps a 1 al wae p ol 1 cds eds 1 bake pas l ap 1 Fig 73 Salida del comando smpwalk x alumno nagios snmp mibs Archivo Editar Ver Buscar Terminal Ayuda alumno nagios snmp mibs snmpwalk v1 Of cpublic 192 168 1 5 grep ifSpeed iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod inter
96. 2 RFC1213 RFC2012 SNMPv2 Management K McCloghrie Ed ASCII November Obsoleted by PROPOSED Information Base for the 1996 RFC4022 STANDARD Transmission Control Updates Protocol using SMIv2 RFC1213 A Fe oe eR E Ke O P g 157 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS RFC2011 SNMPv2 Management Information Base for the Internet Protocol using SMIv2 K McCloghrie Ed November ASCII 1996 STANDARD RFC1910 G Waters Ed HISTORIC pub as EXPERIMENTAL User based Security Model for SNMPv2 An Administrative K McCloghrie Ed February ASCII Infrastructure for 1996 SNMPv2 Management J Case K January ASCII Obsoletes DRAFT STANDARD Information Base for McCloghrie M RFC1450 Version 2 of the Simple Rose S Obsoleted by Waldbusser RFC3418 Transport Mappings for J Case K January ASCII Obsoletes DRAFT STANDARD Version 2 of the Simple McCloghrie M RFC1449 Network Management Rose S Obsoleted by Protocol S5NMPv2 Waldbusser REC3417 Protocol Operations for J January ASCII Obsoletes DRAFT STANDARD Version 2 of the Simple McCloghrie M 1996 RFC1448 Network Management Rose S Obsoleted by Protocol SNMPv2 Waldbusser RFC3416 Conformance Statements J Case K January ASCII Obsoletes DRAFT STANDARD for Version 2 of the McCloghrie M RFC1444 Simple Network Rose S Obsoleted by
97. 20 52 13 0d Oh 19m 47s 3 3 mitered oleh ae hanna ieee Ws Se Uptime 02 11 2011 20 56 42 0d Oh 25m 18s 3 3 Service Check Timed Out 39 Matching Service Entries Displayed bin extinfo cgi type 28h uch PING m ar T T T _ Fig 46 Aviso de flapping Tambi n indicar que hay un comentario P g 68 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS N Nagios Core el 2 C amp bips 192 168 1 113 na9 ZA E snmp TIULESSES A N a moodle Current Load GRE 02 11 2011 20 54 43 5d 21h 32m 425 1 4 OK carga media 0 00 0 04 0 40 Current Users OK 02 11 2011 20 57 32 5d 21h 31m 39s 1 4 USUARIOS OK 1 usuarios actualmente en F HOP COR 02 11 2011 20 57 24 0d 2h 34m 5s 1 4 HTTP OK HTTP 1 1 200 OK 453 bytes en 0 010 segundo tiempo de re General PING OKA 02 11 2011 20 54 14 0d Oh 33m 46s 1 4 ECO OK Paquetes perdidos 0 RTA 2 57 ms Home Root Partition OK 02 11 2011 20 53 34 5d 21h 28m 30s 1 4 DISK OK free space 6190 MB 68 inode 73 Documentation SSH ARA 02 1 1 2011 20 54 55 0d 2h 36m 24s 1 4 SSH OK OpenSSH_5 8p1 Debian tubuntu3 protocolo 2 0 Current Swap Usage OKI 02 11 2011 20 56 15 5d 21h 31m 23s 1 4 SWAP OK 98 free 498 MB out of 509 MB Total 02 11 2011 20 57 36 5d 21h 30m 20s 1 4 PROCS ACEPTAR 61 procesos con ESTADO RSZDT Processes s Tanal portatil PING OKA 02 11 2011 20 53 25 0d Oh 34m 35s 1 4 ECO OK Paquetes perdidos 0 RTA 1 46 ms verview
98. 204 Gauge32 100000000 IF MIB 205 Gauge32 0 IF MIB 401 Gauge32 0 IF MIB 501 Gauge32 8000000 IF MIB 502 Gauge32 8000000 IF MIB 503 Gauge32 25600000 IF MIB 505 Gauge32 0 IF MIB 506 Gauge32 0 IF MIB 601 Gauge32 IF MIB 602 Gauge32 IF MIB 603 Gauge32 0 alumno nagios etc nagios objects snmpwalk v 1 c public 192 168 1 2 grep i fSpeed j k MONA e tt A 1 O wu Fig 64 Comprobaci n de objetos con el comando snmpwalk P g 79 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS IN Nagios Core Cisco SNMP Object Navigs x es fe x C amp bips 192 168 1 113 nagios ZA snmp 7 3 Em PUR Un irri LVU UR 499 LES en V U 1U seyuTUU UerIpu ue a HOP SX OR 03 11 2011 04 57 24 0d 10h 37m 51s 1 4 ES PING CRI 03 11 2011 04 59 14 Od 8h 37m 32s 1 4 ECO OK Paquetes perdidos 0 RTA 3 72 ms Root Partition CK 03 11 2011 04 58 34 6d 5h 32m 16s 1 4 DISK OK free space 6137 MB 67 inode 73 General SSH 2 SRI 03 11 2011 04 57 40 0d 10h 40m 20s 1 4 SSH OK OpenSSH _5 8p1 Debian tubuntu3 protocolo 2 0 Home Swap Usage CRI 03 11 2011 05 01 15 6d 5h 35m 9s 1 4 SWAP OK 98 free 498 MB out of 509 MB Documentation Total Processes OKA 03 11 2011 04 57 36 6d 5h 34m 6s 1 4 PROCS ACEPTAR 58 procesos con ESTADO RSZDT Current Status PING OKA 03 11 2011 04 57 55 0d 8h 38m 21s 1 4 ECO OK Paquetes perdidos 0 RTA 4 40 ms Tacti
99. 26 0d Oh 47m 22s SNMP OK System Up Time Timeticks 451234 1 15 12 34 Temperatura Interna RE 06 19 2012 12 02 18 0d Oh 46m 10s Temperatura externa RE 06 19 2012 12 04 32 0d 0h 43m 56s Uptime OK 06 19 2012 12 04 32 0d Oh 43m 56s SNMP OK internal Temperature 2 SNMP OK external Temperature 2 System Uptime 0 day s 1 hour s 19 minute s SHESESESEISES SSHSESH SESE SESSSESS 38 Matching Service Entries Displayed Nagios Core Mozilla F alumno nagios etc n El alumno nagios Descargas alumno nagios De Fig 135 Gestion en Nagios de servidores Windows Proliant A continuaci n se muestra el fichero con los comandos requeridos HMAAARA AR AA RARA AA RA ARA RRA RRA AAA RARA ARA AAA ARA RAMA RANA RARA NARA RANA RAN ANARANA HOST DEFINITIONS AMARA RA ARA RA AR RA DAA RAR RRA ARA ARALAR ARA ARA ARA ARA ARA ARANA RARA NARA RANA RAR AAARA RA Define a host for the Windows machine we ll be monitoring Change the host_name alias and address to fit your situation define host use windows server 7 Inherit default values from a template host_name winserverl 7 The name we re giving to this host alias Aplicacionesl 7 A longer name associated with the host address 10 36 64 85 7 IP address of the host define host use windows server host_name winserver2 alias Aplicaciones2 address 10 36 64 86 AMARA AAA RARA RARARARARARARARARARARAR ARA ARA ARARARARARA
100. 4 07 2012 20 26 07 1d 5h 44m 47s 114 ECO OK Paquetes perdidos 0 RTA 0 40 ms SSH ee OK 14 07 2012 20 25 57 1d 5h 42m 17s 114 SSH OK OpenSSH_5 8p1 Debian 1ubuntu3 protocolo 2 0 Swap OK 14 07 2012 20 26 17 Od 7h 41m 57s 13 Swap space O used 1MB 1022MB lt 80 OK Uptime OK 14 07 2012 20 28 02 1d Sh 40m 12s 113 SNMP OK Timeticks 11092392 1 day 6 48 43 92 Fig 131 Resultado de la ejecuci n del commando check_snmp_load en Nagios 10 5 Servidores VMware ESX ESXi Los servidores ESX para desplegar infraestructuras basadas en virtualizaci n son en esencia servidores con Linux Red Hat Para gestionar estas m quinas con Nagios el procedimiento es similar al anterior mediante el protocolo SNMP P g 133 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Para poder gestionar a bajo nivel la configuraci n del servidor o las m quinas virtuales se pueden ejecutar comando v a ssh o scripts en Perl Nagios permite la creaci n de comandos personalizados para estas tareas m s avanzadas El siguiente fichero de configuraci n define los servicios que se han identificado como importantes en la monitorizaci n de estos servidores AMARA RA ARA RA AAA RRA AAA RARA ARMA RARA AA RARA RAR AMARA RARA ANA DARAN ARA RANA RAR ANARA VMWare ESX Server SERVICE DEFINITIONS AMARA RA ARA A AEH HEHE EEE a Ee Ea Ee a Ee Ea ee a Ee Ee EE BE Define a service to check if process exist Proceso vpxa
101. 6 F E z B ana N A notification 0 X Disable flap detection for this service Is This Service Flapping YES 15 99 state change Current e Stat In Scheduled Downtime INOT i a Last Update 02 11 2011 20 59 47 Od Oh Om 2s ago Overview Active Checks ENABLED Map Passive Checks ENABLED a Obsessing ENABLED Host Groups Notifications ENABLED Event Handler ENABLED Flap Detection ENABLED Home Documentation Service Groups 23 y Service Comments D Add a new comment Delete all comments m AN A ta A 02 11 Notifications for this service are being suppressed because it was detected as 2011 Nagios having been flapping between different states 21 3 change gt 20 0 4 No Flap NA zi 20 35 57 Process threshold When the service state stabilizes and the flapping stops Detection sj SAR notifications will be re enabled Fig 48 Informaci n de servicio haciendo flapping detalle 6 10 Actualizaci n de Nagios En la p gina principal de Nagios hacer clic en Check for updates P g 69 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS ae a P 20 X E nagios Core AA 1192 168 1 113 nagios e 3 e https Archivo Edici n Ver Favoritos Herramientas Ayuda oi E RFC4113 Internet Drafts and RFCs BEREC Body of Europea Sitios sugeridos E M s complementos J Traductor de Google 3 Empleo P blico ECYL P
102. 638 a it P g 149 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Transport Layer Security TLS Transport Model for the Simple Network Management Protocol SNMP Transport Layer Security TLS Transport Model for the Simple Network Management Protocol SNMP Expressing SNMP SMI Datatypes in XML Schema Definition Language Definitions of Managed Objects for Mapping SYSLOG Messages to Simple Network Management Protocol SNMP Notifications Mapping Simple Network Management Protocol SN MP Notifications to SYSLOG Messages Remote Authentication Dial In User Service RADIUS Usage for Simple Network Management Protocol SNMP Transport Models Remote Authentication Dial In User Service RADIUS Authorization for Network Access Server NAS Management Secure Shell Transport Model for the Simple Network Management Protocol SN MP Transport Security Model for the Simple Network Management Protocol SNMP y a W Hardaker M Ellison B Natale J Schoenwaelder A Clemm A Karmakar V Marinov J Schoenwaelder D Nelson G Weber D Harrington J Salowey W Hardaker D Harrington W Hardaker DRAFT STANDARD July 2011 ASCII August 2010 ASCII August 2010 ASCI Errata October ASCII Errata 2009 October ASCII 2009 August 2009 ASCII Errata July 2009 ASCI June 2009 ASCII June 2009 ASCII PROPOSED ST
103. 64 Fig 65 Fig 66 Fig 67 MONITORIZACI N DE SERVICIOS Y SISTEMAS Comandos de Nagios plugins sion pes 60 Comprobaci n configuraci n de Nagios es sssssssssseseressesesresiesesesrrsssnenresessesesreses 61 Mensaje de error antes de instalaci n NSClient s ss s sssssseseesesissereesesrsesreseeeesess 63 Conexi n Naeios com NSChenteE rusas iio ii rea 63 Instalaci n NSClhent His a rad on 63 Contenido del directorio libexeC ooococnnononccionononnconnrsrcrcorncconcrnnrnnncnrcnncnnnons 64 Error de configuraci n de password NSClient oocoicnninonocinnnnnonnnncnnnnnnrnnncnnnnncnanccnnos 64 Error de configuraci n de password en NSCient detalle cece 65 Configuraci n password en NSC ini vaiisivear par ioigans oir idear 65 Restart de servicio NSClienten Win do WS sirenas cinismo acreencias 66 Comprobaci n servicio NSClient cision iis ida 66 S mbolo asociado a motes UTI orgia psiso psa 68 Aviso de FLA PUAN enina ioa AE E T A a 68 Comentario sobre flapping io iio as 69 Informaci n de servicio haciendo flapping detalle onniinnicnnninnnnmmmmm 69 Pantalla principal de Nagios para acceso a actualizaci n oooonicicncnnnonicnnnnoninncnnos 70 Pantalla de informaci n de actualizaciones mia a 70 Error de configuraci n de SNMP MIB no encontrada cccncccnocicnnnnonnnncnnnnnananacanos 73 Error de configuraci n de SNMP MIB no encontrada detalle del servicio 73 Aviso de fichero de MIB no encon
104. 7 5 Instalaci n de agentes SNMP 7 5 1 Instalaci n y configuraci n del agente SNMP en Windows En el Panel de Control seleccionar agregar caracter sticas de Windows y luego protocolo SNMP Una vez instalado ir de nuevo al Panel de Control Herramientas administrativas Servicios SNMP Propiedades de Servicio SNMP Equipo local m m General Iniciar sesi n Recuperaci n Agente Capturas Seguridad Dependencias El servicio SNMP proporciona una administraci n de red de protocolos TCP IP y IPX SPX Si se requieren capturas se deber n especificar uno o varios nombres de comunidad Los destinos de capturas deben ser nombres de host direcciones IP o direcciones IPX Nombre de la comunidad h Agregar a la lista Quitar de la lista Destinos de capturas Obtener m s informaci n acerca de SNMP Aceptar Cancelar Apicar Fig 66 Configuraci n comunidad SNMP en Windows P g 80 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Propiedades de Servicio SNMP Equipo local General Iniciar sesi n Recuperaci n Agente Capturas Seguridad Dependencias V Enviar captura de autenticaci n Nombres de comunidad aceptados Comunidad Derechos public S LO LECTU Edtar Gutar Aceptar paquetes SNMP de cualquier host Aceptar paquetes SNMP de estos hosts Agregar Obtener m s informaci n acerca de SNMP Aceptar
105. 78 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS N Nagios Core ats SNMPv2 SMI v1 Cisco SNMP Object Navig eli es C tools cisco com Support SNMP do BrowseOID do objectInput ifOperStatus amp translate Translate amp submitValue SUBMIT amp submitClicked true ZA snmp SNMP Object Navigator Translate OD into object name or object name into OI to receive object details Enter OD or object name fOperstatus examples OD 1 36 1 41 9927 Translate Object Name ifindex Object Information Object ifOperStatus oD 1361212218 Type INTEGER Permission read only Status current Values j t onerational sta the interface The eat m E T Tr T Y y ti ne o inet Tal Fig 63 Vista del SNMP Object Navigator de CISCO ID Para comprobar de forma interactiva los OIDs se puede utilizar el comando sampwalk alumno nagios etc nagios objects Archivo Editar Ver Buscar Terminal Ayuda Cannot find module IPV6 TCP MIB At line 1 in none Cannot find module IPV6 UDP MIB At line 1 in none Cannot find module IP FORWARD MIB At line 1 in none Cannot find module SNMP NOTIFICATION MIB At line 1 in none Cannot find module SNMPv2 TM At line 1 in none IF MIB 101 Gauge32 0 IF MIB 102 Gauge32 0 IF MIB 103 Gauge32 100000000 IF MIB 201 Gauge32 100000000 IF MIB 202 Gauge32 100000000 IF MIB 203 Gauge32 100000000 IF MIB
106. 9 qsenbeuqxenqe9 qsenbeujes GetResponse GetRequest GetNextRequest SetRequest esuodseujen Mensajes SNMP E a Agente SNMP Protocolos de subred Protocolos de subred Fig 3 Arquitectura protocolo SNMP P g 22 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Para dispositivos que no hablen directamente TCP IP es posible la comunicaci n a trav s de un agente proxy Proxy Agent Mapping Function Agent Process Proxied Device Management process Management Station Fig 4 Arquitectura software para utilizaci n de SNMP v a proxy 4 1 1 Desarrollo del protocolo El proceso de normalizaci n ha sido lento y contempor neo al modelo de gesti n OSI La normalizaci n se ha desarrollado utilizando las RFC Request For Comment de la IETF que generalmente es un proceso r pido y sin demasiada burocracia La primera aproximaci n data del a o 1987 coincidente con el aumento del tr fico en Internet En los inicios de los protocolos de gesti n se encuentran SGMP Simple Gateway Monitoring Protocol Protocolo dise ado para la monitorizaci n de gateways Desarrollado en 1987 HEMS High level entity Management Protocol Fue una generalizaci n de HMP Host Monitoring Protocol el primer protocolo de gesti n en Internet CMOT CMIP over TCP IP Fue una iniciativa para extender la familia de protocolos de la ISO en Internet En el
107. 9C8C97F DHCPOFFER chaddr 1C4BD66F60C9 DHCPOFFER ciaddr 0 0 0 0 DECPOFFER yiaddr 192 168 1 102 DHCPOFFER siaddr 192 168 1 1 DHCPOFFER giaddr 0 0 0 0 Option 52 0x01 Option 54 0x04 Opticon 51 0x04 Option 1 0x04 Option 3 0x04 Option 6 0x08 Option 15 0x04 Tiempo de vida 86400 segundos Tiempo de renovaci n 0 segundos P g 46 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS P g 47 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 6 CONFIGURACI N 6 1 Ficheros de Configuraci n de NAGIOS 6 1 1 Directorio de configuraci n de Nagios La configuraci n de la herramienta se hace desde el directorio etc nagios cuya estructura se refleja en la siguiente figura nagios Archivo Editar Ver Ir Marcadores Ayuda gt 9 5 q a Atr s Adelante Subir Detener Recargar Carpeta personal Equipo alumno S N Ey pone Sistema de arch objects cgi cfg htpasswd users nagios cfg Red z Disquete S E Papelera SS resource cf Documentos 3 M sica Im genes V deos E Descargas 5 elementos espacio libre 6 1 GiB A Fig 23 Directorio de configuraci n de Nagios En el directorio etc nagios objects se almacenan los ficheros de configuraci n de objetos Archivo Editar Ver Ir Marcadores Ayuda gt tt Atras Adelante Subir Detener Recargar v Xx al etc nagios objects B alumno f Escritorio
108. ANDARD PROPOSED STANDARD PROPOSED STANDARD PROPOSED STANDARD DRAFT STANDARD pub as PROPOSED STANDARD P g 150 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Transport Subsystem for D Harrington J DRAFT STANDARD the Simple Network Schoenwaelder pub as PROPOSED Management Protocol STANDARD SNMP Management Event S Channabasappa Management W De Ketelaere Information Base MIB E Nechamkin for PacketCable and IPCablecom Compliant Devices INFORMATIONAL Simple Network J Schoenwaelder Management Protocol SNMP Traffic Measurements and Trace Exchange Formats Simple Network J Schoenwaelder Management Protocol SNMP Context EnginelD Discovery DRAFT STANDARD pub as PROPOSED STANDARD Signaling MIB for G Beacham S PacketCable and Kumar S IPCablecom Multimedia Channabasappa Terminal Adapters MTAs Ethernet in the First Mile November Copper EFMCu 2007 Interfaces MIB Definitions and Managed M Squire June 2007 Objects for Operations Administration and Maintenance OAM Functions on Ethernet Like Interfaces Simple Network November Management Protocol 2006 Transport Mappings for A Siddiqui D October Real time Application Romascanu E 2006 Quality of Service Golovinsky M Monitoring RAQMON Rahman Y Kim Protocol Data Unit PDU SNMP over IEEE 802 Networks Septiembre de 2012 P g 151 MONITORIZACI N DE SERVICIOS Y
109. ARA ARA ARA Ee a Ee ae Ee ae Ea ee Ee RAR AAADA Define a service to check if process exist Proceso Oninit comando check_snmp_process_lento define service use generic service Name of service template to use host_name pacientes service description IFX Proceso Oninit check_command check _snmp process lentoloninit 010 xY Define a service to check the conection to TCP port Warning over 1 second on time response critical over 2 seconds Puerto Informix 1527 define service use generic service Name of service template to use hostgroup_name informix servers service_description IFX Serv_ifx 1527 check_command check_tcp_hceuv 1527 1 2 El comando modificado check_snmp_lento se utiliza cuando es necesario ampliar el timeout en la ejecuci n del mismo debido a la sobrecarga del servidor y el consiguiente tiempo de respuesta en ejecutarlo Se puede a adir al fichero commands cfg check snmp process lento command definition Servidor lento Comprueba si se encuentra en ejecuci n el proceso suministrado como argumento define command command_name check_snmp_process_lento command_line SUSER1 check_snmp process lento pl H SHOSTADDRESSS C SUSER5S n SARG1IS w SARG2S c SARG3S SARG4 7 SARG1S proceso a comprobar 7 SARG2S warning 7 SARG3S er tical 7 SARG4 par metros opcionales r Check conection to tcp port check tcp command define command command_name check_tcp_hcuv comma
110. ARG2 c SARG3 7 SARG1S port 7 SARG2 warning 7SARG3 critical Command to check the disk space of partitions on linux server define command command_name check_snmp_storage_vl command_line SUSER1 check_snmp_storage pl H SHOSTADDRESSS C SUSER5 m SARGIS w SARG2 c SARG3 SARG4 check snmp process lento command definition Servidor lento Comprueba si se encuentra en ejecuci n el proceso suministrado como argumento define command command_name check _snmp process lento command line SUSER1 check_snmp process _lento pl H SHOSTADDRESSS C SUSER5 n ARGI w ARG2 c ARG3 SARG4 7 ARG1 proceso a comprobar 7 SARG2 warning SARG3S critical 7 SARG4S par metros opcionales r check ping command definition define command command_name check ping command line SUSER1 check ping H SHOSTADDRESSS w ARG1 c SARG2S p 5 check_ssh command definition define command command_name check_ssh command_line SUSER1S check_ssh S ARG1S SHOSTADDRESS Monitor Linux Memory and Swap use real amp define command command _name check _ snmp mem v1 command_line USER1 check_snmp_mem pl H SHOSTADDRESSS C SUSER5 SARG S w ARG2 c SARG3 ARG4 Anexo VII Plugin check_esx3 0 5 pl usage esx_cpu pl D H N u p f lf s x PEt Swed fee V h usage Print usage information h help Print detailed help screen V version Print
111. Bie d 94 D156 1 Bd E E comCTIDeviceTimeLastRegistered 4S 3 60 DA ADO LB ccmCTIDeviceProductTypelndex DI 1 SD 9156 ds Ls Los BOY comCTIDeviceInetAddressIPv4 u 360d LILA desde Lat ccomCTIDeviceInetAddressIPv6 A 3 P E PE IDAS JO IET Ks ER 3B di Lebo ccmCTIDeviceUnregReason Wig B90 A Bie De PE A EA AL ccmCTIDeviceRegFailReason WL COCs IL O 6 Lid LCE BU ccmCTIDeviceDirNumEntry E EEE LL DADO Ltd ccomCTIDeviceDirNumIndex LAI dF edit ADO 8 trado ccmCTIDeviceDirNum ERES TI E RO 156618823 Te 2M ccmCallManagerAlarmEnable A PAE Ge Dod E OE N ccmPhoneFailedAlarmInterval MLB ITA dee O ccmPhoneFailedStorePeriod TIO LISAS Op Ps D3 ccomPhoneStatusUpdateAlarmInterv MIS 3s 641345029 91565 1 9 4 ccmPhoneStatusUpdateStorePeriod ML Ls LA RATO Lidia ccmGatewayAlarmEnable PIAR PASTA FOO DS A LO E ES ccmMaliciousCallAlarmEnable MA Ls Les DTD Li ah ccmAlarmSeverity WT Ls Ti Dd Td LO LN ccmFailCauseCode A AAA PE E E A OA ccmPhoneFailures Te 3660454 PE MER PES PA 1566461053 ccmPhoneUpdates JAS ENT EE RE PEEL PE AY A ccmGatewayFailCauseCode E E E IA der LO ccmMediaResourceType Ml did dd LIO 1036 ccmMediaResourceListName ML S386 A oly 929 106 ol OT ccmRouteListName T3060 1 461 9 9 156 1 106 8 ccmGatewayPhysIfIndex MV ADOOS gn ccmGatewayPhysIfL2Status NT OL ds 9 s Oe LOO EN A Os OF ccmMaliCallCalledPartyName ND dll DIABLO LA ccmMaliCallCalledPartyNumber 13 64 1 42529 IDOL 105952 ccmMaliCallCal
112. CTIDeviceDirNumTableStateld ccmPhStatUpdtTblLastAddedIndex ccmPhFailedTblLastAddedIndex ccmSystemVersion ii ccmInstallationlId hs ccmPartiallyRegisteredPhones ccmH323TableEntries ccmSIPTableEntries I ccmMediaDeviceTable ccmMediaDeviceEntry comMediaDeviceIndex ccmMediaDeviceName ME ccmMediaDeviceType Es ccmMediaDeviceDescription ccmMediaDeviceStatus ccmMediaDeviceDevicePoolIndex ccmMediaDeviceInetAddressType ccmMediaDeviceInetAddress ccmMediaDeviceStatusReason ccmMediaDeviceTimeLastStatusUpdt ccmMediaDeviceTimeLastRegistered ccmMediaDeviceProductTypeIndex ccmMediaDeviceInetAddressIPv4 ccmMediaDeviceInetAddressIPv6 ccmMediaDeviceUnregReason ccmMediaDeviceRegFailReason ccmGatekeeperTable Fiy ccmGatekeeperEntry nE ccmGatekeeperIndex Is ccmGatekeeperName vis ccmGatekeeperType HES ccmGatekeeperDescription ccmGatekeeperStatus comGatekeeperDevicePoolIndex comGatekeeperInetAddressType comGatekeeperInetAddress ccmCTIDeviceTable ES ccmCTIDeviceDirNumTable ccmCTIDeviceEntry Mbs Ww Ww Ww Ww Ww Ww Ww y ny ly D DON kh a ta DON kh ta ta A DDD mR Rh ta A 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 ala wI MTs WA 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 A AA aia ki Go o lo o E www y E sr o PRR www a
113. Counter FROM RFC1155 SMI internetServer FROM INTERNETSERVER MIB microsoft OBJECT IDENTIFIER enterprises 311 a software OBJECT IDENTIFIER microsoft 1 gt internetServer OBJECT IDENTIFIER software 7 httpServer OBJECT IDENTIFIER internetServer 3 httpStatistics OBJECT IDENTIFIER httpServer 1 Http Server Statistics totalBytesSentHighWord OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the high 32 bits of the total number of of BYTEs sent by the HTTP Server httpStatistics 1 j totalBytesSentLowWord OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the low 32 bits of the total number of of BYTEs sent by the HTTP Server i httpStatistics 2 totalBytesReceivedHighWord OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the high 32 bits of the total number of of BYTEs received by the HTTP Server httpStatistics 3 24 La MIB complete se puede consultar en el anexo IX P g 100 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS totalBytesReceivedLowWord OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the low 32 bits of the total number of of BYTEs received by the HTTP Server httpStatistics 4 totalFilesSent OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION
114. DADARARA RAR dd dd dd dd dade HOST GROUP DEFINITIONS AMARA AAA RARA RARA RARARARARARARARARAR ARA ARA ARARARARADARARARA RAR AR AAA RAMA dd the Define a hostgroup for Windows machines All hosts that use the windows server template will automatically be a member of this group define hostgroup hostgroup_name windows servers The name of the hostgroup alias Windows Servers Long name of the group define hostgroup hostgroup_name informatica alias Informatica members winserverl winserver2 HHHPHH EHH EH HEHEHE EH AEE RAMA EAE EEA EH EE eA Ee Ee EE AMADA SERVICE DEFINITIONS RNA RA ARA AAA RAM RRA AAA RARA AAA AEA EH EEA Ea EE eA Ee EE EE EE EB Define a service to ping the local machine P g 137 Septiembre de 2012 define service use hostgroup_name service description check_command MONITORIZACION DE SERVICIOS Y SISTEMAS generic service Name of service template to use informatica PING check_ping 100 0 20 500 0 60 Create a service for monitoring the uptime of the server Change the host_name to match the name of the host you defined above define service use hostgroup_name service description check _command generic service informatica Uptime check_nt UPTIME Create a service for monitoring CPU load Change the host_name to match the name of the host you defined above define service use hostgroup_name service_description check_command ge
115. E AMAAARA ARA DAA RRA AAA AAA RARA ARA ARA ARA RARA RANA RARA AARARARAR ANA RAR ANA RARA NARARANARA Intenta conectar al puerto TCP 23 usado por servidor Telnet define service use local service 7 Name of service template to use host_name pacientes service_description Telnet Puerto check_command check_tcp_hcuv 23 1 2 Define a service to check the disk space of the boot partition Warning if lt 10 free critical if lt 5 free space on partition check_snmp_storage_vl command definition define service use generic service host_name pacientes name Pac Check LinDisk boot service description File System boot check_command check _snmp storage v1 boot 90 95 r G Define a service to check the disk space of the copia_ifx partition Warning if lt 10 free critical if lt 5 free space on partition check_snmp_storage_vl command definition define service use generic service host_name pacientes name Pac Check LinDisk copia ifx service description File System copia_ifx check_command check _snmp storage v1 copia ifx 90 95 r G Define a service to check the disk space of the datos_ifx partition Warning if lt 10 free critical if lt 5 free space on partition check_snmp_storage_vl command definition define service use generic service host_name pacientes name Pac Check _LinDisk datos ifx service description File System datos_ifx check_command check _s
116. E 27 10 2011 23 51 58 38d 20h 19m 27s 1 4 PROCS ACEPTAR 56 procesos con ESTADO RSZDT portatil PNG GRE 27 10 2011 23 48 58 0d Oh 33m 20s 114 ECO OK Paquetes perdidos 0 RTA 1 48 ms 11 Matching Service Entries Displayed ar mr SS T a Fig 40 Error de configuraci n de password NSClient P g 64 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS N Nagios Core C amp bips 192 168 1 113 SNMP Service Information Service Last Updated Thu Oct 27 23 51 23 CEST 2011 NSClient Version Updated every 90 seconds On Host Nagios Core 3 3 1 www nagios org Logged in as negiosadmin PC de casa View Information For This Host casa View Status Detail For This Host View Alert History For This Service Member of E ew Aiert Histoaran For The Service No servicegroups View Availability Report For This Service View Notifications For This Service 192 168 1 120 Service State Information Service Commands Current Status ORCA for 0d 0h 17m 16s J Disable active checks of this senice Status Information CRITICAL Tiempo finalizado de zA calo despuA s de 10 segundos ai Re schedule the next check of this service E Performance Data Y Y Submit passive check result for this service Current Attempt 4 4 HARD state x Stop accepting passive checks for this service Last Check Time 27 10 2011 23 47 07 JE Stop obsessing over thi
117. E cisco IP Telephony Sol EAH 1449 Fig 103 Paginas de ayuda de los servicios asociados a SNMP En el grupo de programas Cisco Call Manager arrancar Cisco Service Configuration P g 109 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS T Cisco CallManager 4 0 Administration Cisco CallManager Administration Microsoft Internet Explorer File Edit View Favorites Tools Help eck gt O A Asearch Favorites meda 4 El B Address E http J210 0 0 2 CCMAdmin Main asp Y 6 uns E Service Feature Device User Application Help em Route Plan Cisco Systems For Cisco IP Telephony Solutions Cisco CallManager 4 0 Administration Details Copyright 1999 2003 Cisco Systems Inc All rights reserved J E calmanager Administration Inited States and local country laws governing import export El Cisco Service Configuration not imply third party authority to import export distribute or responsible for compliance with U S and local country laws nd regulations If you are unable to comply with U S and to comply with applicable laws ai 9 internet CallManager 4 0 File Edit View Favorites Tools Help Back gt gt O A A Qsearch jFavorites meda lt 4 E S Address fa http 210 0 0 2 CCMService serviceconfig asp Go Tools For Cisco IP Telephony Solutions Service Activation Server Select a Server Status Ready la javascr
118. EE AS RS E PO A NINAS i MELIA Es PRE OPES IE E EET d Bide 9 29 DE E DE N EE dr dad 156 tT 1261 de 18 oie otras hares lear ra ease ad 4 1 9 9 156 1 12 1 1 3 VV Oe GAS6 1612 LA DDO AOS ot 4 1 9 9 156 1 12 1 1 6 Wels 99 Sd dd dl AD 90 dde Ll Ls 8M DBE Ls SIDO LD PORA Ce Et LI T5601 121 des TOM MIL A TO Dd La LL A ALETA LSO le LL Ls ADD Le LL DLL ELIO Ade OPES TE LL do ALIADAS dl dde IS 60 Li 12 Li Len VILO ALDO LIL 156 1 14 1 P56 de baie A TM LS OT ae Los Ted 156 1 14 1 1 2 4 1 9 9 156 1 14 1 1 3 4 1 9 9 156 1 14 1 1 4 ALA IIS OSO TA Die Mo 4 1 9 9 156 1 14 1 1 6 ERTELE PE DD ds Ad fh 156 1 14 1 1 8 1338 A As LA Dd Dn AA AD Os LA LO ALLI M562 14 DL RN Qi de Ge 9156611 Ved AD 4 1 9 9 156 2 BoA 99 156 31 T5643 3 BEV De GLO Se de ABD N Lal BA OG ADO Li Bole 9 9 156 31 40 BIA OCG EI 63 Lett AL 9156 31 06 4 1 9 9 156 3 1 7 ALI der ANS PI ea ALDO 2 AV OG AS Oe LT 156 3 2 4 Behe GeO AR P E 4 1 9 9 156 3 2 6 4 1 9 9 156 3 2 7 ALDO ERES E A ARS RS ALDO SZ el OM EEES A 12 AN Ge DADOS 4 1 9 9 156 3 2 14 WA Bie 6 0 Ets NL Si TO Fo LA AB A LS TR PA E G PA O O E ROS IC E A IES EN OE Ae ds PR DO DE ll MI dd RA is LOM ALO 3 ana SON ARE 209 E O E EST RO Pl ADAL IDO als G 4 1 9 9 156 3 2 24 EA E 156 A T3866 BAT DS DO A ET IO O d ALADO 362 27 A929 196 LS Es 3 66d pat OO LO OS GLO 2 ALTO G15 6322 30 LISTO SL B Mo Ji Es CE E O s ADS Ls BA 156 3 2 34 ele a RO PRES e
119. Easy Setup wizard Intuitive web based GUI HTTP HTTPs d Advanced configuration via telnet Command Line Interface CLI gt Remote management access control Management Multi level user protection Event logging gt DHCP server client and relay DHCP to PPP spoofing gt DNS server client and relay gt Time synchronization gt SNTPv1 SNTPv2 SNTPv3 and SNTPv4 gt System logging gt SNMPv1 agent with MIB II gt Firmware upgradeable via upgrade wizard on Setup CD Fig 58 Especificaciones de un router residencial relacionadas con SNMP 7 2 1 Alcatel Speedtouch 580 Lo primero es verificar si el agente SNMP est activado Para ello hacer un telnet y ejecutar el comando service system list P g 76 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS EP griduva gridcontroller koa fama RESPONDER Fig 59 Estado del protocolo SNMP en router Alcatel Speedtouch Al no estar activado no permitir ninguna consulta Activar mediante los comandos service system modify name SNMP_AGENT state enabled snmp community add securityname RWCommunity communityname public Comprobar la configuraci n de SNMP ahora service system list name SNMP_AGENT expand enabled El resultado es el siguiente 3 griduva gridcontroller Lo JLo mesa Se re A x snmp GET Fig 60 Resultado configuraci n SNMP en router Alcatel Speedtouch 580 Pag 77 Septiembre de 2012
120. F is possible define own selects reference value operator lt gt eq ne etc Description select my results sub array _ rows my Sarray_ rows my rows array rows return Srows sub trim my string shift string s st string s st 8 return string sub logon open SOL home nagios Descargas instantclient10_1 sglplus 5 JODER CARDON DESCRIPTION ADDRESS PROTOCOL TCP AN Host 10 36 32 10 Port 1521 CONNECT_DATA SID orcl lt dev null or die while my res lt SQL gt f if res ORA d 5 return 1 if logon eq ORA 01017 P g 185 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS for my i 0 i lt array_rows lfparam array Si print param array i 2 n open SQL home nagios Descargas instantclient10_1 sglplus s Suser Spass DESCRIPTION ADDRESS PROTOCOL TCP Host Shost Port Sport CO NNECT_DATA SID sid lt lt EOF set pagesize 0 set numformat 999 999 Sparam_array i 3 EOF or die while my res lt SQL gt print trim Sres n if res s St push Gresults trim res for Si 0 Si lt results Sit print i hodnota je result i a ma byt param array i 0 eval unless Sresults i param_array i 1 param_array i 0 print1 param array 1
121. FT STANDARD Definitions of Managed Objects for IEEE 802 3 McCloghrie REC1368 Repeater Devices Obsoleted by RFC2108 A P g 159 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS RFC1515 Definitions of Managed D McMaster K Objects for TEEE 802 3 McCloghrie S STANDARD Medium Attachment Units MAUs RFC1514 Host Resources MIB Obsoleted by PROPOSED REC2790 STANDARD ag HISTORIC pub as PROPOSED Token Ring Extensions to S Waldbusser the Remote Network Monitoring MIB RFC1512 FDDI Management J Case A September Information Base Rijsinghani 1993 pub as PROPOSED STANDARD RFC1503 Algorithms for K McCloghrie M August 1993 ASCII INFORMATIONAL Automating Rose Administration in SNMPv2 Managers RFC1493 Definitions of Managed E Decker P July 1993 ASCII Obsoletes DRAFT STANDARD Objects for Bridges Langille A RFC1286 Rijsinghani K Obsoleted by McCloghrie RFC4188 RFC1461 SNMP MIB extension for D Throop May 1993 ASCII HISTORIC Multiprotocol pub as PROPOSED Interconnect over X 25 STANDARD RFC1452 Coexistence between J Case K April1993 ASCII version 1 and version 2 of McCloghrie M the Internet standard Rose S Waldbusser Manager to Manager April 1993 ASCII HISTORIC Management McCloghrie M Information Base Rose S Waldbusser Management J Case K April1993 ASCII Obsolet
122. I N DE SERVICIOS Y SISTEMAS 5 INSTALACI N Y CONFIGURACI N DE UNA PLATAFORMA DE GESTI N DE RED La instalaci n de la herramienta Nagios se puede realizar de formas diferentes manual y automatizada La instalaci n manual supone la descarga del c digo fuente configuraci n de los ficheros a compilar compilaci n y configuraci n manual de las tareas post instalaci n Aunque no es un proceso demasiado complicado requiere algunos conocimientos de administraci n de sistemas UNIX LINUX Con la instalaci n automatizada a trav s del repositorio se descargan los ficheros binarios y se realizan la mayor parte de tareas de instalaci n y configuraci n Si la distribuci n del repositorio es correcta y est bien mantenida el resultado deber ser equivalente a la instalaci n manual por lo que deben existir los mismos directorios con el mismo o equivalente contenido Tiene la ventaja de que s lo se necesita el conocimiento de las herramientas propias de descarga e instalaci n como aptitude Advanced Packaging Tool APT o equivalentes En el manual para este curso se ha decidido incluir los dos modos el manual y el autom tico Como recomendaci n general se suele realizar la instalaci n con binarios a menos que se necesite alguna configuraci n especial en la instalaci n en cuyo caso la instalaci n manual es m s espec fica 5 1 Instalaci n automatizada La instalaci n de Nagios es muy parecida en las distintas distribucione
123. IB II RFC1213 Junto con la MIB de Ethernet es la mib estandar mas importante Define la segunda version de la MIB original MIB I RFC1156 MIB II es mas amplia que su antecesora incluyendo nuevos objetos y grupos system Informacion general del sistema interfaces Informacion sobre cada uno de las interfaces del dispositivo at address translation Deprecado ip Informacion relativa al protocolo IP icmp Informacion relativa al protocolo ICMP tcp Informaci n relativa al protocolo TCP udp Informaci n relativa al protocolo UDP P g 27 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS egp Informaci n relativa al protocolo EGP dot3 Informaci n sobre reglas de transmisi n y protocolos de cada interfaz snmp Informaci n sobre implementaci n y ejecuci n del protocolo SMP en el sistema Si un dispositivo por ejemplo implementa el protocolo icmp entonces debe implementar todos los objetos debajo de icmp Por su gran importancia a continuaci n se muestran las tablas con los objetos de system mib 2 1 e interfaces mib 2 2 Tabla II Objeto system de la MIB II Objeto Sintaxis Acceso Descripci n sysDescr DisplayString SIZE 0 255 RO Descripci n hardware SSOO 2 sysObjectID OBJECT IDENTIFIER Identificaci n fabricante El tiempo desde que se reinici el software de red 4 sysContact DisplayString SIZE 0 255 RW Informaci n persona de con
124. ING 4 0 1 figura muestra los par metros monitorizados de un Call Manager en OK 06 02 2012 13 28 03 OK 06 08 2012 13 28 52 OK 06 08 2012 13 19 42 OK 06 08 2012 13 20 31 OK 06 08 2012 13 21 21 OK 06 08 2012 13 22 11 OK 06 08 2012 13 23 00 camcaL 06 08 2012 13 23 23 OK 06 08 2012 13 23 50 OKT 06 08 2012 13 24 39 OK 06 08 2012 13 25 29 OK 06 08 2012 13 28 08 OK 06 08 2012 13 28 10 camcaL 06 08 2012 13 23 20 OK 06 08 2012 13 29 29 OK 06 08 2012 13 22 31 GR 06 08 2012 13 28 30 OK 06 08 2012 13 21 27 3d 1h 11m 31s 3d 1h 10m 42s 3d 1h 9m 52s 3d 1h 9m 3s 3d 1h 8m 13s 3d 1h 7m23s 0d 0h 0m 39s 3d 23h 30m 54s 3d 1h 6m 34s 3d 23h 46m 11s 3d 1h Sm 44s 3d 1h 4m 55s 3d 1h 4m5s 3d 1h 12m 14s 3d 1h 11m 24s 3d 23h 46m 14s 3d 23h 20m Ss 3d 23h 37m 3s 3d 23h 31m 4s 2d 12h 18m7s 13 13 13 113 113 13 13 13 13 13 13 13 1 3 13 113 113 13 SNMP OK 210 0 0 2 SNMP OK 2 SNMP OK 4 0 1 SNMP OK 4 0 0 0 SNMP OK 8 SNMP OK 8 SNMP OK 0 3 process matching svchost lt 3 WARNING lt 100 0K Mem 6 1Mb OK Cpu 0 OK SNMP OK 4 1 process matching sqlservr lt 3 WARNING lt 100 0K Mem 75 3Mb gt 30 CRITICAL Cpu 0 OK SNMP OK 9 SNMP OK 9 SNMP OK 2 SNMP OK 0 SNMP OK 2 1 process matching tomcat lt 3 WARNING lt 100 0K Mem 37 1Mb gt 30 CRITICAL Cpu 0 oK
125. IOS Y SISTEMAS define service use generic service host_name hp132605dn servi ce ndeser prion PING check _command check ping 3000 0 80 5000 0 100 normal check interval 10 fetry check interval T Adem s del t pico ping define un servicio espec fico para impresoras que utilizan t picamente el servicio JetDirect HP Para este servicio hay que hacer coincidir la comunidad SNMP de la impresora y la especificada en el comando check_hpjd 6 8 Monitorizaci n de routers y Switches En las plantillas etc nagios objects switches y etc nagios objects routers se definen las caracter sticas b sicas de acceso a estos equipos Sin configurar previamente SNMP en estos equipos el nico servicio que funcionar ser el check_ping En la parte II del manual de instalaci n y configuraci n de Nagios se detallar el proceso de configuraci n de SNMP Las plantillas proporcionadas se pueden utilizar directamente No obstante el servicio informar de errores ya que no se habr n configurado las MIBs define host use generic switch Inherit default values from a template host_name linksys wrt610N The name we re giving to this switch alias Linksys WRT610N Switch A longer name associated with the switch address 10 Soil dl IP address of the switch hostgroups switches Host groups this switch is associated with notes url https 192 168 1 1 Con el comando use se heredan todas las caracter sticas definidas en el
126. ITICAL level Consumibles 2 OK 05 23 2012 15 06 31 0d 3h 26m 13s 1 3 Toner Cartridge Brother TN 580 TN 3170 TN 3185 TN 37 TN 3175 is OK Drum Unit OKA 05 23 2012 15 11 51 Od 3h 30m 535 1 3 Drum Unit Brother DR 520 DR 3100 DR 3115 DR 31 DR 3150 61 c 5 Estado WARNING 05 23 2012 15 05 14 0d 5h 1m 30s 3 3 WARNING Printer status is 1 Contei Devices WARNING 0529 2012 15 06 32 2d 1h 23m 558 3 3 o Series status is 3 WARNING Hewlett Packard Dynamic RAM Disk status is 2 Facturaci n Display OK 05 23 2012 15 10 34 0d Oh 22m 10s 1 3 PREPARADA Consumibles Kit 7 1 HS ji amis 05 23 2012 15 07 37 0d 4h 45m7s 13 Maintenance Kit is OK Consumibles Toner DR 05 23 2012 15 08 37 0d 4h 44m 7s 1 3 Black Toner is OK H51 Mensajes Log DR 05 23 2012 15 11 14 0d 4h 41m 30s 1 3 54 A2 6E 65 72 20 62 61 6A 6F Nivel bdja1 bajo He Bandeja 1 OKA 05 23 2012 15 03 03 0d 4h 49m 41s 1 3 Tray 1 is OK Bandeja 2 OKI 05 23 2012 15 04 10 0d 4h 48m 34s 1 3 Tray 2 is OK Numero de paginas OK 05 23 2012 15 05 57 0d 4h 26m 48s 1 3 Pagecount is 212 555 se PING OK 05 23 2012 15 10 24 Od 5h 2m 205 1 3 PING OK Packet loss 0 RTA 1 13 ms Suministros1300 Modelo OK 05 23 2012 15 04 41 2d 1h 39m 34s 1 3 hp LaserJet 1300n Serial CNCD139127 14 Matching Service Entries Displayed fe Nagios Core Mozilla F BW alumno nagios etc n E alumno nagios alumno nagios usr l objects D Fig 125 Vista gesti n de impresoras en Nagios
127. LocalSystem Manual LocalSystem Disabled LocalSystem Automatic LocalSystem Automatic LocalSystem Fig 98 Configuraci n del contacto y localizaci n en SNMP Configurar la comunidad y los permisos para esa comunidad Se pueden a adir varias con distintos perfiles cada una Configurar tambi n las estaciones que pueden acceder a este servicio para consultar objetos a trav s de SNMP Enables st Sy Security Accounts Manager Stores sec SNMP Service Properties Local Computer M A A D A M A D D A M A M M D A A Fig 99 Configuraci n de comunidad y permisos en el Call Manager Septiembre de 2012 P g 107 MONITORIZACI N DE SERVICIOS Y SISTEMAS By Runds Service Enables st Disabled y security Accounts Manager Stores sec Started Automatic exalta SNMP Service Configuration READ ONLY NONE NOTIFY Manual READ ONLY Automatic READ WRITE Manual READ CREATE Manual Disabled Automatic Automatic O _ cm Fig 101 Asignaci n permiso READ ONLY en comunidad public del Call Manager Si se desean recibir traps por ejemplo en el que caso de que un Gateway de voz no se encuentre accesible se deben configurar en la pesta a correspondiente P g 108 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS SNMP Service Properties Local Computer 2 xl General
128. Log On Recovery Dependencies Agent Traps Security The SNMP Service provides network management over TCP IP and IP lt SP protocols If traps are required one or more community names must be specified Trap destinations may be host names IP addresses or IPX addresses m Community name public Addito list Remove from list Trap destinations DK Cancel Apply Fig 102 Comunidad y estaci n gestora de traps en Cisco Call Manager Una vez configurado SNMP hay que revisar el estado de los servidores en el Call Manager Se puede consultar la ayuda proporcionada por el servidor Es interesante revisar el checklist para estar seguros de que se configura correctamente Y Cisco IP Telephony Solutions Help Microsoft Internet Explorer 3 e El aj x File Edit View Favorites Tools Help eA Gt Qsearch Favorites Leda lt 4 Eh Sy Address ja http 210 0 0 2 help wwhelp js htmljframes htm o Links Cisco Systems MEAR NANI Home Using Help More Information snmp Search CCM System Guide Remote Network Management Cisco RIS Data Collector Contents SNMP Configuration Checklist Table 18 1 provides an overview of the steps for configuring SNMP CCM Serviceability System Guide Use the CDP Driver Access CDP Driver Control Cisco CallManager Performance Count Simple Network Management Protocol Simple Network Management Protocol Remote Se
129. Management Protocol Waldbusser RFC2580 Textual Conventions for J Case K January ASCII Obsoletes DRAFT STANDARD Version 2 of the Simple McCloghrie M 1996 RFC1443 Network Management Rose S Obsoleted by Protocol S5NMPv2 Waldbusser REC2579 Structure of Management J Case K ASCII Obsoletes DRAFT STANDARD Information for Version 2 McCloghrie M 1996 RFC1442 of the Simple Network Rose S Obsoleted by Management Protocol Waldbusser REC2578 SNMPv2 Introduction to J Case K January ASCII McCloghrie M 1996 Rose S Waldbusser SNMPv2 Community based IEEE 802 5 Station Source K McCloghrie F December ASCII Routing MIB using Baker E Decker 1994 SMIv2 i ii HISTORIC pub as EXPERIMENTAL RFC1907 Network Management Protocol S5NMPv2 RFC1906 o o No No o Oo RFC1905 RFC1904 Ke No o RFC1903 RFC1902 RFC1901 SNMPv2 ft Ff bo Gg i et l A A Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS TEEE 802 5 MIB using K McCloghrie E December ASCII Obsoletes DRAFT STANDARD SMIv2 Decker 1994 RFC1743 RFC1231 Updated by RFC1749 RFC1743 IEEE 802 5 MIB using SMIv2 K McCloghrie E December Decker 1994 Obsoletes DRAFT STANDARD RFC1231 Obsoleted by RFC1748 ASCII RFC1666 Definitions
130. NET SNMP VACM MIB Did not find vacmAccessContextPrefix in module 1 usr share mibs netsnmp NET SNMP VACM MIB mods A Did not find vacmAccessSecurityModel in module 1 usr share mibs netsamp NET SNMP VACM MIB P Did not find vacmAccessSecurityLevel in module 1 usr share mibs netsnmp NET SNMP VACM MIB Cannot find module SNMP FRAMEWORK MIB At line 10 in usr share mibs netsamp NET SNMP EXAMPLE Senda Cannot find module INET ADDRESS MIB At line 13 in usr share mibs netsnmp NET SNMP EXAMPLES MI Groups Did not find SnmpAdminString in module 1 usr share mibs netsnmp NET SNMP EXAMPLES MIB Did not find InetAddressType in module 1 usr share mibs netsnmp NET SNMP EXAMPLES MIB Did not find InetAddress in module 4 1 usr share mibs netsnmp NET SNMP EXAMPLES MIB Cannot find module SNMP FRAMEWORK MIB At line 10 in usr share mibs netsnmp NET SNMP PASS MIE Did not find SnmpAdminString in module 1 usr share mibs netsnmp NET SNMP PASS MIB Cannot find module INET ADDRESS MIB At line 9 in home alumno snmp mibs TCP MIB my Did not find InetAddress in module 1 home alumno snmp mibs TCP MIB my Did not find InetAddressType in module 1 home alumno snmp mibs TCP MIB my Did not find InetPortNumber in module 1 home alumno snmp mibs TCP MIB my Cannot find module INET ADDRESS MIR1 At line A in home alumna enmn mihell INP MIR mv Fig 52 Error de configuraci n de SNMP MIB no encontrada
131. NTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the OPTIONS method that have been made to this HTTP Server httpStatistics 17 totalGets OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the GET method that have been made to this HTTP Server httpStatistics 18 totalPosts OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the POST method that have been made to this HTTP Server httpStatistics 19 totalHeads OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the HEAD method that have been made to this HTTP Server f httpStatistics 20 totalPuts OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the PUT method that have been made to this HTTP Server httpStatistics 21 totalDeletes OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the DELETE method that have been made to this HTTP Server httpStatistics 22 totalTraces OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the TRACE method that have been made to this HTTP Server h
132. Nagios Core E SNMPv2 SMI vi gt TO ftp ftp cisco c 3 snmp view bas x 4 snmpv2 smi v1 E ByteSphere s MI x ME mibDepot MIB aS SNMPLink org JO Cisco SNMP Ob C amp hitps 192 168 1 113 nagios ZA SNMP N a g i e External Command Interface Last Updated Thu Nov 3 00 31 44 CET 2011 Nagios Core 3 3 1 www nagios org Sener Logged in as nagiosadmin Home You are requesting to schedule a host check Documentation Command Options Command Description This command is used to schedule the next check of a particular host Host Name speedtouch Nagios will re queue the host to be checked at the time you specify If you Tactical 5 442 34 select the force check option Nagios will force a check of the host Overview Check Time 03 11 2011 00 31 44 a a e a z Map Force Check not checks are enabled for the host Hosts Commit Reset Services t Groups ary Please enter all required information before committing the command Required fields are marked in red Failure to supply all required values will result in an error Groups Tr mr ___ a Fig 57 Re scheduling de un servicio 7 2 Activar SNMP en router tipo residencial Speedtouch Zyxel No todos los routers switches llevan incorporado SNMP En las especificaciones del producto debe aparecer Chapter 1 Your SpeedTouch Configuration gt Home Install Wizard
133. OK OMB OMB datos informix 91 used 67672MB 74587MB boot 12 used 12MB 99M Warliipinfsitpc_pipefs O used 1B sys O used OMB OMB 17 used 23015MB 133539MB proc sys ts binfmt_misc O used OMB OMB gt 90 WARNING PING OK Packet loss 0 RTA 0 72 ms Swap Space O used OMB 1984MB lt 60 OK boot 36 used 35MB 99MB lt 90 OK Iboot 36 used 35MB 99MB 58 used 3378MB 5796MB var 65 used 14439MB 22206MB lt 90 OK PING OK Packet loss 0 RTA 1 05 ms Swap Space 44 used 902MB 2048MB lt 60 OK boot 36 used 35MB 99MB lt 90 OK Jboot 36 used 35MB 99MB 53 used 3081MB 5796MB var 64 used 14279MB 22206MB lt 90 OK PING OK Packet loss 0 RTA 1 08 ms Swap Space 11Y used 223MB 2048MB lt 60 OK Fig 129 Utilizaci n en Nagios del comando check_snmp_storage Swap Linux 10 4 3 Check_snmp_process Es un script en lenguaje Perl que se utiliza para conocer los procesos que se estan ejecutando en memoria35 La sintaxis del comando se puede consultar en el anexo IV o ejecutando Y el script con la opci n h ORI 14 07 2012 19 09 23 O 14 07 2012 19 13 22 if RI 14 07 2012 19 13 14 14 07 2012 19 13 27 if GI 14 07 2012 19 15 57 GRE 14 07 2012 19 16 17 OK 14 07 2012 19 08 02 Dd 4h 57m 3s Dd 4h 23m 4s 1d 4h 24m 38s 1d 4h 32m 59s 1d 4h 30m 29s Dd 6h 30m 9s 1d 4h 28m 24s E 35 used 3204MB 9070MB lt 80 OK 4 process matching apac
134. OK 06 19 2012 12 07 29 0d Oh 50m 19s 1 3 SNMP OK Rejected Phones 0 p pe 06 19 2012 11 59 14 0d Oh 48m 34s 1 3 SNMP OK aan A 1 Intel R Xeon R CPU 3050 2 13GHz 2048 MB UnRegistered Phones OKI 06 19 2012 12 00 26 0d 0h 47m 22s 1 3 SNMP OK UnRegistered Phones 0 13 SNMP OK Timeticks 52631802 6 days 2 11 58 02 Up Time GRE 06 19 2012 12 00 26 0d Oh 47m 22s UNKNOWN 06 19 2012 12 01 01 04 Oh 46m 10s UNKNOWN 06 19 2012 12 02 18 0d Oh 43m 56s KA 06 19 2012 12 06 02 0d Oh 53m 58s egistered Phones UNKNOWN 06 19 2012 11 59 14 Od Oh 53m Os jected UNKNOWN 06 19 2012 12 00 26 0d Oh 52m 1s ion UNKNOWN 06 19 2012 12 02 18 Od 0h Sim 3s UNKNOWN 06 19 2012 12 04 32 0d Oh 50m 4s Up UNKNOWN 06 19 2012 12 04 32 0d Oh 48m 34s CA Drive Space GRERIGAI 06 19 2012 12 02 18 0d Oh 47m 22s CPU Load O 06 19 2012 12 02 18 Od Oh 46m 10s Estado Ventlador CPU SREM 06 19 2012 12 02 18 0d Oh 46m 10s Estado Ventilador External command error Timeout No Response from 10 38 132 12 161 PING OK Packet loss 0 RTA 0 94 ms External command error Timeout No Response from 10 38 132 12 161 External command error Timeout No Response from 10 38 132 12 161 External command error Timeout No Response from 10 38 132 12 161 External command error Timeout No Response from 10 38 132 12 161 c total 135 66 Gb used 126 68 Gb 93 free 8 98 Gb 7 CPU Load 15 5 min average SNMP OK CPU Fan Status 2 06 19 2012 12 04 32 Od
135. P OK 6 OK 06 08 2012 13 17 48 6d 17h 46m41s 1 3 SNMP OK 2 OK 06 08 2012 13 18 50 6d 17h 45m39s 1 3 SNMP OK 100000000 OK 06 08 2012 13 19 51 6d 17h 44m38s 1 3 SNMP OK 2 OK 06 08 2012 13 20 52 6d 17h 43m37s 1 3 SNMP OK Timeticks 173078057 20 days 0 46 20 57 OK 06 08 2012 13 18 37 2d 23h 45m52s 1 3 OK chassis normal Fig 119 Monitorizaci n con Nagios de un switch Cisco Catalyst Dispositivos de la red inal mbrica Point de Cisco permiten monitorizaci n utilizando SNMP Adem s de los habituales para cualquier sistema Linux Unix como por ejemplo p sysUpTime check_http check_ping los APs de Cisco permiten ser s de forma m s detallada utilizando las MIBs correspondientes a cada modelo stas se pueden descargar de la web de Cisco Por ejemplo para APs de la serie C1100 est n disponibles las MIBS CISCO DOT11 ASSOCIATION MIB y CISCO DOT11 IF MIB que pueden ser interesantes para un conocimiento b sico del estado del AP alumno n 1 3 BL agios snmpget g public y1 192 168 1 10 1 3 6 1 4 1 9 9 273 1 1 2 1 1 1 ALA IL Led dos P g 120 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS F 7 EP alumno nag e Ejes Fig 120 Consulta en SNMP de clientes asociados en un AP de Cisco F 7 EP alumno nag e i x Fig 121 Uso de la herramienta snmpwalk con MIB privadas Enterprise La lista completa con todos los OIDs disponibles se p
136. PAGECOUNT se obtiene el n mero de p ginas impresas por la impresora Al final de todos los comandos se pueden pasar los argumentos 3 y 4 del ejemplo P g 126 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS command line USER1 check _snmp printer H SHOSTADDRESS C SARG1S x SARG2 w ARG3 c ARG4 para pasar un valor num rico del umbral en el que queremos que Nagios nos de un WARNING o un CRITICAL como por ejemplo check _snmp printer public CONSUM Toners 20 10 Con la anterior configuraci n de Nagios obtenemos la siguiente respuesta en la interfaz Web Aplicaciones Lugares Sistema ae Nagios Core Mozilla Firefox Archivo Editar Ver Historial Marcadores Herramientas Ayuda N Nagios Core X Nagios Core x N Nagios Exchange The offici x g N localhost ttps localhost nagios Current Network Status Last Updated Wed May 23 15 12 44 CEST 2012 Updated every 90 seconds Nagios Core 3 3 1 wwww nagios org Logged in as nagiosadmin View History For all hosts View Notifications For All Hosts View Host Status Detail For All Hosts Host Status Totals Service Status Details For All Hosts Host Service Status Last Check Duration 1 Attempt Status Information A Consumibles 1 A 05 23 2012 15 05 11 0d 3h 31m 33 3 3 Toner Cartridge Brother TN 550 TN 3130 TN 3145 TN 35J TN 3135 is at CR
137. PDeviceInfoGroup ccmPhoneInfoGroupRev3 ccmGatewayInfoGroupRev3 ccmMediaDeviceInfoGroupRev2 ccmCTIDeviceInfoGroupRev2 ccmH323DeviceInfoGroupRevl 1 md 1 ni 1 1 1 wi 1 277 1 tig 1 1 1 ccmVoiceMailDeviceInfoGroupRev1 ccmPhoneInfoGroupRev4 ccmSIPDeviceInfoGroupRev1 ccmNotificationsInfoGroupRev3 ccmInfoGroupRev4 ccmPhoneInfoGroupRev5 ccmMediaDeviceInfoGroupRev3 ccmSIPDeviceInfoGroupRev2 ccmNotificationsInfoGroupRev4 ccmH323DeviceInfoGroupRev2 ccmCTIDeviceInfoGroupRev3 ccmPhoneInfoGroupRev6 ccmNotificationsInfoGroupRev5 ccmGatewayInfoGroupRev4 ccmMediaDeviceInfoGroupRev4 Ww Ww Ww Ww Ww y Ww DO tk ta D IIE aono kike HR ta 1 1 mi 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 mi 1 1 EF 1 1 1 1 1 ZT 1 1 Ww aaar ADL Laga kh te ht th Dita 00 Swwt w w amp wt Ww My So to bh E y WW amp W amp Ww DALADAAADALS ALS AAAAADAADALAAAASD RRO HRR RRR O a ONO bs bs es e e e es e ORR e Mut Swwwwwwt w wt oe w Ww Ww wt Ww WW Ww a a RRR oy do na o to a bh hh ta toto to to kh m kh Septiembre de 2012 AID e La Lidl diaz E SR PT PONES TE AO IN AIDA
138. Protocol Mid ccmPhoneName M1636 14 ccomPhoneInetAddressIPv4 I ccmPhoneInetAddressIPv6 ML ccmPhonelPv4Attribute Mes ccmPhonelPv6Attribute Ma ccmPhoneActiveLoadID MT ccmPhoneUnregReason Md ccmPhoneRegFailReason T ccmPhoneExtensionEntry K ccmPhoneExtensionIndex 1 ccmPhoneExtension WT 6 338 Oi Lts ccomPhoneExtensionIpAddress 1 ccmPhoneExtensionMultiLines ccmPhoneExtensionInetAddressType ccmPhoneExtensionInetAddress ccmPhoneFailedEntry mek ccmPhoneFailedIndex Ia ccmPhoneFailedTime ML Lts ccmPhoneFailedName MD Lats ccmPhoneFailedInetAddressType ccmPhoneFailedInetAddress WI ccmPhoneFailCauseCode Md ccmPhoneFailedMacAddress MTs ccomPhoneFailedInetAddressIPv4 ccomPhoneFailedInetAddressIPv6 ccmPhoneFailedIPv4Attribute ccmPhoneFailedIPv6Attribute ccmPhoneFailedRegFailReason ccmPhoneStatusUpdateEntry Mile ccmPhoneStatusUpdatelndex dz ccmPhoneStatusPhoneIndex TEs ccmPhoneStatusUpdateTime TKa ccmPhoneStatusUpdateType I ccmPhoneStatusUpdateReason at ccmPhoneStatusUnregReason 1 ccmPhoneStatusRegFailReason ccmPhoneExtnEntry AAA ccmPhoneExtnIndex E Dt ccmPhoneExtn E 386 23 4s ccmPhoneExtnMultiLines 1 ccmPhoneExtnInetAddressType ccmPhoneExtnInetAddress gal ccmPhoneExtnStatus 1 366 Lodo ccmGatewayTable UT 30d ccmGatewayEntry Tal Lets A o ooo ba ba bos bos bo bo ba be ba ts OO bs ba ba ba os ts ts O O ps HOW WL Loro 000 kh b
139. RARA EA EAE A EE ANA RAR ANA RAR ANADA Monitor HP Procurve Switch Temperature status define command command_name check hptemp command line SUSERI check_snmp H SHOSTADDRESS E SUSERS 0 1 3 6 1 4 1 11 2 14 11 1 2 6 1 4 4 w ARG1S c ARG2 l Temprature status Monitor CPU Load for several systems define command command_name check _ snmp load v1 command line SUSER1 check_snmp load pl H SHOSTADDRESS C SUSER5 T SARGIS w SARG2 c SARG3S ARG4 7 SARG1S Tipo sistema netsl Linux load 1 5 15 netsc Linux CPU Usage 7 SARG1S Tipo sistema hp Procurve Switch CPU Usage stand Windows CPU Usage ARG2 warning 7 SARG3 critical 7 SARG4S optional args Monitor HP Procurve Switch Memory free define command command_name check_hpmemoryfree command_line SUSERI check_snmp H SHOSTADDRESS E SUSERS 0 1 3 6 1 4 1 11 2 14 11 5 1 1 2 1 1 1 6 1 t 5 w ARG1 c ARG2 u megabytes l HP Memory Free check ping command definition define command command_name check ping command line SUSER1 check_ ping H SHOSTADDRESSS w S ARG1S c SARG2S p 5 Monitor HP Procurve Switch Power Suply status define command command_name check_hppower command_line SUSERI check_snmp H SHOSTADDRESS C SUSERS g 1 3 6 1 4 1 11 2 14 11 1 2 6 1 4 2 w SARGI1S c SARG2 1 Power Supply status Monitor SNMP System Contact define command command_name snmp_sysContact command
140. SISTEMAS in or inherited by the linux server host template definition host_name moodle alias servidor moodle address T92 Aog il lS i Define a service to ping the local machine define service use local service Name of service template to use host_name moodle service description PING check_command check ping 100 0 20 500 0 60 Hay que tener en cuenta que en el fichero localhost cfg ya hay definido un grupo que se puede utilizar para incluir estas m quinas define hostgroup hostgroup name linux servers The name of the hostgroup alias Linux Servers Long name of the group members localhost moodle Comma separated list of hosts that belong to this group Este tipo de monitorizaci n no requiere la instalaci n de ning n agente adicional en la m quina a monitorizar 6 5 Utilizaci n de un ping b sico en Windows Se puede utilizar la plantilla b sica etc nagios objects windows cfg como punto de partida define host use windows server Inherit default values from a template host_name winserver The name we re giving to this host alias My Windows Server A longer name associated with the host address WO Sida IP address of the host Y a adir el ping b sico define service use local service Name of service template to use host_name winserver service description PING check_command check ping 100 0 20 500 0 60 El resto de los servicios se implementan con el cliente d
141. Ser CN8921D08D FW net connector 1 1 4 is present model is HP HP VC 8Gb 24 Port FC Module Ser CN8921D087 FW server blade 1 1 1 linuxbl1 is present status is value unknown powered is value unknown server blade 1 1 9 linuxbl2 is present status is value unknown powered is value unknown 39 Descargar en http labs consol de nagios check_hpasm P g 139 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 11 BIBLIOGRAF A 1 The Nagios Exchange Disponible en http www nagiosexchange org 2 Nagios mailing lists Disponible en http www nagios org support mailinglists php 3 Multi router traffic grapher MRTG Disponible en http www mrtg org 4 Nagios 274 edition Wolfgang Barth Ed No starch press http nostarch com nagios htm 5 Learning Nagios 3 0 Wojciech Kocjan Ed Packt Publishing 6 Nagios Core 3 x Documentation Disponible en http library nagios com library products nagioscore manuals 7 Net snmp project Disponible en http net snmp sourceforge net 8 MIBS de productos CISCO http www cisco com public sw center netmgmt cmtk mibs shtml 9 CISCO Object Browser http tools cisco com Support SNMP do BrowseOID do local en 10 CISCO OIDs por MIB ftp ftp cisco com pub mibs oid 11 CISCO oid view http www oidview com mibs 9 md 9 1 html 12 Nagios NCSA http nagios sourceforge net download contrib documentation misc NSCA_Setup pdf 13 VM
142. Status Summary For All Host Groug View Status Grid For All Host Groups Tactical Ove Map P Hosts Host Status Details For All Host Groups Last Check Duration EA 28 10 2011 01 53 30 Od Oh 2m 49s ECO OK Paquetes perdidos 0 RTA 3 03 ms 28 10 2011 01 51 11 0d 3h 13m 23s ECO OK Paquetes perdidos 0 RTA 124 04 ms 28 10 2011 01 52 51 0d Oh 24m 31s ECO OK Paquetes perdidos 0 RTA 3 16 ms 28 10 2011 01 53 41 0d 0h 16m7s ECO OK Paquetes perdidos 0 RTA 4 82 ms 28 10 2011 01 53 51 40d 23h 4m 17s ECO OK Paquetes perdidos 0 RTA 0 40 ms 28 10 2011 01 52 01 0d 1h 29m 28s ECO OK Paquetes perdidos 0 RTA 4 07 ms 28 10 2011 01 52 11 0d 2h 35m51s ECO OK Paquetes perdidos 0 RTA 1 79 ms 28 10 2011 01 51 17 0d 0h 1m17s ECO OK Paquetes perdidos 0 RTA 5 42 ms 8 Matching Host Entries Displayed Trends Alerts Fig 45 S mbolo asociado a notes_url 6 9 Aviso de Flapping Algunas veces los servicios se vuelven inestables y se entra en una situaci n de flap Nagios lo indica mediante el aviso correspondiente Nagios Core c C fx bieps 192 168 1 113 n E snmp Tiucesses gt N a 1 A moodle Current Load K 02 11 2011 20 54 43 5d 21h 32m 42s 1 4 OK carga media 0 00 0 04 0 40 g Current Users RE 02 11 2011 20 57 32 5d 21h 31m 39s 1 4 USUARIOS OK 1 usuarios actualmente en e HOP RI 02 11 2011 20 57 240d2h34m5s 1 4 HTTP OK HTTP 1 1 200 OK 453 bytes en 0 010 segundo t
143. The name we re giving to this host alias Aplicacionesl 7 A longer name associated with the host address 10 36 64 85 7 IP address of the host define host use windows server host_name winserver2 alias Aplicaciones2 address 10 36 64 86 AMARA MARA MARA RARA RARA RARA RARA RARA RARA RARA RARA AAA AAA AAA A RARA AMAN dd dd dd dada dhe HOST GROUP DEFINITIONS AMARA MARA MARA RARA RARA RARA RARA RARA RARA RARA ARA AAA A AAA AAA A dada ada dd dd dd dd dd dd dee Define a hostgroup for Windows machines All hosts that use the windows server template will automatically be a member of this group define hostgroup hostgroup_name windows servers The name of the hostgroup alias Windows Servers Long name of the group define hostgroup hostgroup_name informatica alias Informatica members winserverl winserver2 AMARA AA RRA A AMARA AA RARA AA RARA MARA EEE EEE EEE EEA EEA Ee EEA EE A EE SERVICE DEFINITIONS HHH A ARA AAA EE EEE EEE EEE EEE EEE EEE EEE EEE EA Ee EEA EE A EE Define a service to ping the local machine define service use generic service Name of service template to use hostgroup_name informatica service description PING check_command check_ping 100 0 20 500 0 60 i Create a service for monitoring the uptime of the server Change the host_name to match the name of the host you defined above define service use generic service hostgroup_name informatica service description Uptime ch
144. VICE ALERT localhost Current Load 0K SOFT 4 0K load average Dad 3517 1 08 1319642733 Auto save of retention data completed successfully Fig 26 Fichero de log de Nagios P g 49 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 6 1 3 Fichero de configuraci n nagios cfg La configuraci n de Nagios se maneja desde este fichero que incluye a su vez otros ficheros Esto posibilita organizar mejor toda la informaci n de configuraci n Para ello se utiliza el par metro cfg_file que incluye un fichero de configuraci n que contiene otros objetos nagios cfg S lo lectura etc nagios gedit Archivo Editar Ver Buscar Herramientas Documentos Ayuda ODB Ha 9 q Cortar Copiar Pegar Nuevo Abrir Guardar Imprimir Deshacer Rehacer _ nagios cfg 3 log_file var nagios nagios log OBJECT CONFIGURATION FILE S These are the object configuration files in which you define hosts host groups contacts contact groups services etc You can split your object definitions across several config files if you wish as shown below or keep them all in a single config file You can specify individual object config files as shown below cfg file etc nagios objects commands cfg cfg file etc nagios objects contacts cfg cfg file etc nagios objects timeperiods cfg cfg file etc nagios obj cfg Definitions for monitoring the local Linux host cfg file etc nagios
145. Y RMON 4 1 SNMP El protocolo SNMP Simple Network Management Protocol es un protocolo especialmente dise ado para tareas de gesti n de redes interconectadas mediante TCP IP No s lo especifica cuestiones del protocolo sino tambi n del modelo de informaci n asociado Se basa en la utilizaci n de los siguientes elementos Estaci n de gesti n Es la estaci n que se va a encargar de gestionar los dispositivos Interrogar a los distintos agentes recibiendo la informaci n de cada uno de ellos Agente de gesti n Es un software que se ejecuta en la estaci n o dispositivo a monitorizar Ocupa pocos recursos de CPU y memoria y tiene un comportamiento pasivo es decir que se limita a escuchar las peticiones de la estaci n gestora y a devolver la informaci n solicitada MIB Management Information Base o base de conocimiento Es un fichero escrito en lenguaje ASN 1 que describe las propiedades de un dispositivo Protocolo de gesti n de red Basado en la utilizaci n de datagramas UDP est dise ado para ser simple y eficaz Utiliza tan s lo tres primitivas get getnext y set Adem s de las anteriores tambi n permite enviar traps y notificaciones que se disparan de forma as ncrona por eventos producidos en la estaci n a monitorizar Estaci n de gesti n SNMP Agente SNMP Recursos monitorizados SSeS oe A e e Objetos SNMP gestionados Aplicaci n de Gesti n 3s nb y4
146. _data_files TABLESPACE NAME FILE NAME BYTES MAXBYTES AUTOEXTENSIBLE dba free space TABLESPACE NAME FILE ID BYTES Show free tablespace Select tablespace name Sum bytes 1024 Total Free KB From dba_free space Group By tablespace_ name Show used tablespace Select tablespace name Sum bytes 1024 Total Used KB From dba_data files Group By tablespace_ name query SELECT username sid serial FROM v session execute query Statement statement connection createStatement ResultSet rs statement executeQuery query while rs next get content from column 1 4 usuarios conectados output rs getString 1 rs close Pag 183 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS statement close connection close catch java sql SQLException e System err println e System exit 3 Unknown System out println output if usuarios conectados gt usuarios warn if usuarios conectados gt usuarios crit System exit 2 else System exit 1 else System exit 0 12 12 Anexo XII Comandos y servicios de Oracle configurados COMANDOS define command command_name check oracle instant command line SUSER1 check oracle instant SHOSTADDRESS SARG1S SARG2 SARG3S SARG4S define command command_name check _tablespace oracle command line java classpath usr local nagios libexec check_tablespace_oracle
147. a 20100820 frank4dd version 1 0 A n Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS e mail support at frank4dd com web http www frank4dd com howto nagios db monitoring htm This nagios plugin queries the Oracle dba_free_space and dba data files system tables Supported are Oracle versions 10g and up Pre requisites Oracle JDBC driver installed and a valid DB user Jy ee en ee ee O O O SO ee as Example Output df BYTES fs BYTES 1024 kbytes_max gt java check tablespace oracle 127 0 0 1 1521 XE system test d DB connect jdbc oracle thin system test 127 0 0 1 1521 XE DB query select df TABLESPACE NAME df FILE_ID df BYTES 1024 kbytes_used round df BYTES fs BYTES df BYTES from select TABLESPACE NAME sum BYTES BYTES dba_data_files group by TABLESPACE NAME df ZZ 374912 KB Space 350208 KB Space 384384 KB Space 203136 KB Space used used used used order by df TABLESPACE NAME asc Name SYSAUX Files 1 Space total Space used 82 Name SYSTEM Files 1 Space total Space used 99 Name UNDO Files 1 Space total Space used 21 Name USERS Files 1 Space total Space used 2 ff CARO Rann ene Senn EE import java sql class check_tablespace_oracle 100 usage_pct count distinct FILE ID FILE_ID from select TABLESPACE NAME sum BYTES BYTES from dba_free_space group by
148. a desarrollar mas comandos en Nagios 17 http exchange nagios org directory Plugins Network Protocols SNMP P g 87 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Estos comandos una vez comprobado su funcionamiento se pueden integrar en los ficheros cfg de Nagios La ejecuci n anterior se ha hecho sobre un switch CISCO CATALYST 3550 12G Este switch no soporta la consulta sobre sensores de temperatura Otros switches de CISCO s dan una lectura correcta 8 4 SNMP Traps 8 4 1 Env o y recepci n de traps Para poder recbir traps primero hay que configurar el dispositivo Una vez habilitadas y configurada la estaci n que recibir estos traps hay que utilizar una herramienta que sea capaz de leerlas UDP puerto 162 La siguiente figura muestra unas traps recibidas al desconectar un puerto Ethernet tipo linkdown en un switch CISCO CATALYST 3550 Ed la laa E Pause j No Time Notification Version Message Ty Destination Address Desti Transport M Specific 1 MA 18 07 34 607 enterprises 1315 78 1 1 0 SNMPv2c Notification 210 1 1 107 0 IP UDP Hier tecepllon de 0901 1 2011 essage reception time 18 08 51 112 2 18 08 48 854 Specific 2 SNMPvI Traplv1 210 1 1 107 0 IP UDP Time stamp 13 days 02h 18m 12s 08th 3 180849113 Specific 2 SNMPvI Traplv1 210 1 1 107 0 IP UDP AW Message type Trap vi A 18 08 50 859 Specific 1 SNMPv1 Traplvi 210 1 1 107 0 IP UDP 3 Pi
149. aii ey t Asociaci n Inform ticos de Instituciones Sanitarias de Castilla y Le n I CUADERNO T CNICO MONITORIZACI N DE SERVICIOS Y SISTEMAS Autores Mariano Raboso Mateos Juan Luis Bl zquez Jim nez Diego Calvo Avil s Luis Mateos Gonz lez Arturo Quesada Olmo Coordinador Mariano Raboso Mateos Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS O 2012 ISBN pendiente de asignaci n This work is licensed under the Creative Commons Attribution NonCommercial NoDerivs 3 0 Unported License To view a copy of this license visit http creativecommons org licenses by nc nd 3 0 or send a letter to Creative Commons 444 Castro Street Suite 900 Mountain View California 94041 USA P g 2 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS CONTENIDO E PROLOGO ni anitats eats utes ctaaintecid wit can cements 13 2 OBJETIVOS DEL CUADERNO T CNICO cuina il 14 3 INTRODUCCI N A LA GESTI N DE RED adan 16 Bile Deriiciones tilda ici iia litres 16 J2 CJUS CACI N is A hh EE AR 16 3 3 Objetivos dela Gesti n de Red inniniaasii lado der 16 3 4 Areas de la Gesti n de Red definidas por la ISO cecccsssssssesssesssesssessseesseesseesseeees 17 BAds Gesti ndetallos cuida dad 18 34 2 Gesti nde con UTC i 18 Ai A O Goa sauna E 19 3 4 4 Gesti n de las Prestaciones Performance cccseeseseseeeeseeeeseeeseseeeesees 19 34 5 E A a A aa n a a 19 3 5 Organizaci n de Centr
150. al service Inherit values from a template informatica Temperatura Interna check _snmp C SACYLCom o 1 3 6 1 4 1 232 6 2 6 3 0 w 3 c 4 1 internal service Inherit values from a template informatica Estado Ventilador Sistema check_snmp C SACYLCom o 1 3 6 1 4 1 232 6 2 6 4 0 w 3 c 4 1 System service Inherit values from a template informatica Estado Ventilador CPU check _snmp C SACYLCom o 1 3 6 1 4 1 232 6 2 6 5 0 w 3 c 4 1 CPU Fan Create a service for monitoring the System Up Yime define service use hostgroup_name generic service informatica P g 138 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS service description SNMP SysUpTime check_command check_snmp C SACYLCom o 1 3 6 1 2 1 1 3 0 1 System Up Time No se han podido realizar todas las pruebas pertinentes ya que hubiera significado desconectar la alimentaci n o para los ventiladores de una CPU en servicio Respecto al tama o de disco y otros valores comprobables la informaci n se corresponde fielmente con la realidad Existen m s plugins en la p gina de Exchange de Nagios Muchos de ellos necesitan que en el cliente HPASM est instalado para que de una respuesta correcta A continuaci n se incluye el texto original en ingl s describiendo el comando check_hpasm This plugin monitors the hardware health of HP Proliant Servers provided that the hpasm HP Advanced Server Management software
151. al monitor buscar paquetes que se correspondan con filtros definidos Grupo 8 capture Configura la forma de enviar la informaci n a la estaci n gestora P g 32 Septiembre de 2012 RMON GROUP Statistics HostTopN Filters Packet Capture Events MONITORIZACI N DE SERVICIOS Y SISTEMAS Grupo 9 event Proporciona una tabla con todos los eventos generados por la estaci n RMON Grupo 10 tokenRing Informaci n de gesti n para redes Token Ring en desuso Tabla V Grupos RMON FUNCTION Contains statistics measured by the probe for each monitored interface on this device Records periodic statistical samples from a network and stores them for later retrieval Periodically takes statistical samples from variables in the probe and compares them with previously configured thresholds If the monitored variable crosses a threshold an event is generated Contains statistics associated with each host discovered on the network Prepares tables that describe the hosts that top a list ordered by one of their base statistics over an interval specified by the management station Thus these statistics are rate based Stores statistics for conversations between sets of two addresses As the device detects a new conversation it creates a new entry in its table Enables packets to be matched by a filter equation These matched packets form a data stream that might be captured or that might genera
152. al number of nonanonymous users that have ever connected to the HTTP Server httpStatistics 10 maxAnonymousUsers OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the maximum number of anonymous users simultaneously connected to the HTTP Server httpStatistics 11 maxNonAnonymousUsers OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the maximum number of nonanonymous users simultaneously connected to the HTTP Server httpStatistics 12 currentConnections OBJECT TYPE SYNTAX INTEGER ACCESS read only STATUS mandatory DESCRIPTION This is the current number of connections to the HTTP Server httpStatistics 13 maxConnections OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the maximum number of simultaneous connections to the HTTP Server httpStatistics 14 P g 176 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS connectionAttempts OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of connection attempts that have been made to the HTTP Server httpStatistics 15 logonAttempts OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of logon attempts that have been made to this HTTP Server httpStatistics 16 totalOptions OBJECT TYPE SY
153. anager Antes de utilizar las herramientas para consultar los servicios de telefon a IP con SNMP hay que asegurarse de que los servidores est n correctamente instalados El primer paso es verificar en los servicios de Windows si el servicio de agente SNMP est arrancado y verificar haciendo doble clic la configuraci n del agente Se debe verificar que la comunidad y permisos para la comunidad est n configurados correctamente En la ventana de servicios en el men de herramientas administrativas se pueden ver los servicios relacionados con la telefon a IP que est n corriendo P g 105 Septiembre de 2012 Services MONITORIZACI N DE SERVICIOS Y SISTEMAS Tree Services Local Sy Alerter Notifies sel Ey Application Management Provides s By ASF Agent Bs Automatic Updates Enables th Sy Background Intelligent Transfer Service Transfers f By Cisco BARS Scheduler Cisco BARS By Cisco CallManager By Cisco CDR Insert Ba Cisco CTIManager Bs Cisco CTL Provider a Cisco Database Layer Monitor Bs Cisco Extended Functions By Cisco IP Voice Media Streaming App Bs Cisco Messaging Interface By Cisco MOH Audio Translator By cisco RIS Data Collector Ba cisco Serviceability Reporter Bs cisco Telephony Call Dispatcher Sy cisco Tftp By Cisco Tomcat Sy ClipBook Supports C By COM Event System Provides a Ey Computer Browser Maintains a Moca se Started Sta
154. ar a los de HP por lo que en este documento solamente se describir n algunos plugins interesantes Antes de probarlos hay que asegurarse que SNMP est activado y configurado correctamente V ase el comando snmp server y la configuraci n de SNMP en el apartado anterior En la web de Nagios Exchange se pueden descargar numerosos plugins interesantes por ejemplo check_catalyst_load check_catalyst_flash check_catalyst_mem check_catalyst_fans y check_catalyst_temp Estos scripts est n escritos en Perl Su uso es sencillo y similar para todos check_catalyst load h Usage check_catalyst_load pl s lt SWITCH gt C lt COMMUNITY STRING gt w lt WARNLEVEL in 5s 1min 5min gt c lt CRITLEVEL in 5s 1min 5min gt La salida de la ejecuci n para los cuatro primeros es la siguiente OK I O valid Used 3017144B Free 5371464B 64 Processor valid Used 10661848B Free 36332176B 77 WARING lt 20 CRITICAL lt 10 OK Onboard system FLASH Size 15998976 Free 6638592 41 Status available VPP installed OK CPUO 0 2 1 OK chassis normal Para a adir los comandos editar el fichero commands cfg o a adir uno nuevo check snmp storage command definition define command command_name check_snmp_storage command_line SUSER1 check_snmp storage pl H SHOSTADDRESS ARG1 check snmp command definition define command command_name check snmp process command line SUSER1 check_snmp process pl H
155. at Java Do Need You must have a copy of JDK 7 Docs JRE 7 Docs for FREE the JRE Java Runtime Environment on your system e to run Java applications and applets To develop a Subscribe Today Java applications and applets you need the JDK A ET II Java Development Kit which includes the JRE ReadMe ReadMe ReleaseNotes ReleaseNotes Oracle License Oracle License Java SE Products Java SE Products Fig 85 Pagina de descarga de Java JDK o JRE En caso de tener una herramienta de este tipo ya instalada hay que deshabilitar el servicio para liberar el puerto del servicio no puede haber dos servidores arrancados usando el mismo puerto En este caso configurar el inicio manual parar no suele ser suficiente Cy Servicios locales MG SOFT SNMP Trap Service Nombre 7 Descripci n Estado Tipodeinicio Iniciar Ch Fax Le permite enviar y recibir faxes con los recursos disponibl Manual Servici So Gj Firewall de Windo Firewall de Windows ayuda a proteger su equipo al impedir Iniciado Autom tico Servici ae i Google Software Google Updater keeps your Google software up to date I Manual Sistem Hora de Windows Mantiene la sincronizaci n de fecha y hora en todos los cli Manual Servici Descripci n Gk Host de proveedo El servicio FDPHOST hospeda proveedores de detecci n de Iniciado Manual Servici pc millo ps Sh Host de sistema d El Servicio
156. bs shtml Para HP http h40060 www4 hp com procurve includes software index php cc es amp lc es amp content mibs oct09 P g 116 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Algunos servicios utilizan el comando check_snmp est ndar instalado con Nagios en usr local nagios libexec y otros como check_snmp_load en Perl Otros comandos se crean en base a stos para seleccionar alguna funcionalidad por ejemplo el comando check_hpmemoryfree Monitor HP Procurve Switch Memory free define command command_name check hpmemoryfree command line SUSER1 check_snmp H SHOSTADDRESS E SUSER5S S 0 1 3 6 1 4 1 11 2 14 11 5 1 1 2 1 1 1 6 1 t 5 w SARGIS c ARG2 u megabytes l HP Memory Free Las siguientes figuras muestran las vistas de los servicios de Nagios con la configuraci n del switch Se muestra un switch funcionando de formal normal una p gina de Nagios con un resumen compacto de aquellos hosts y servicios que se consideran cr ticos y por ltimo la detecci n de un fallo en el ventilador de un switch Cinco Sia Host Status Totals Service Status Totals Last Updated on Jun 18 13 33 36 CEST 2012 Up Down Unreachable Pending Ok warning Unknown Critical Pending Mio o Molo o of o mos Vew Hsin For Tha Hoa A 7 ACI ANC View Service Status Detail For All Hosts Service Status Details For Host swchcuv2176 Host S
157. bytes_used gt kbytes_crit System out println Tablespace CRIT output System exit 2 CRIT if args length 7 amp amp args 5 equals r System out println Tablespace OK output System exit 0 OK 12 11 Anexo XI C digo Java de check_users_oracle a a an check tablespace oracle java 20100820 frank4dd version 1 0 RS Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS e mail support at frank4dd com web http www frank4dd com howto nagios db monitoring htm tA This nagios plugin queries the Oracle dba_free_space and dba data files system tables Supported are Oracle versions 10g and up Pre requisites Oracle JDBC driver installed and a valid DB user AAA na maa a ha a na A A a a Example Output gt java check tablespace oracle 127 0 0 1 1521 XE system test d DB connect jdbc oracle thin system test 127 0 0 1 1521 XE DB query select df TABLESPACE NAME df FILE ID df BYTES fs BYTES 1024 kbytes_max df BYTES 1024 kbytes_ used round df BYTES fs BYTES df BYTES 100 usage pct from select TABLESPACE NAME sum BYTES BYTES count distinct FILE ID FILE ID from 1 dba_data_files group by TABLESPACE NAME df select TABLESPACE NAME sum BYTES BYTES from dba_free_ space group by TABLESPACE NAME fs where df TABLESPACE_NAME fs TABLESPACE_NAME order by df TABLESPACE NAME asc Name SYSAUX Files 1 Space
158. c 90 used of mountpoint only is less than 80 and 90 check_snmp_storage pl H 127 0 0 1 C public m r w 80 c 90 sused of mountpoint index 1 only is less than 80 and 90 check_snmp storage pl H 127 0 0 1 C public m 1 p w 80 c 90 Swap used is less than 80 and 90 check_snmp storage pl H 127 0 0 1 C public m Swap w 80 c 90 Memory used is less than 80 and 90 check_snmp_storage pl H 127 0 0 1 C public m Real Memory w 80 c 90 Salida de check_snmp_storage pl h example Browse storage list lt script gt C lt community gt H lt host gt m lt anything gt w 1 c 2 v the m option allows regexp in perl format Test drive C F G H I on Windows m CFGHI Test all mounts containing var m var Test all mounts under var m var Test only var m var r Test all swap spaces m Swap Test all but swap spaces m Swap e P g 131 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Un ejemplo de la informaci n que se gestiona con este plugin es la siguiente adem s de las correspondientes notificaciones por correo A ae ca SK gt boot 28 used 27MB 99MB lt 90 OK boot 28 used 27MB 99MB 7 used 4129MB 61934MB lt 90 OK PING OK Packet loss 0 RTA 1 73 ms Swap space 0 used OMB 5952MB lt 60 OK OKA 06 26 2012 09 29 42 5d 17h 40m 17s 1 3 AA H 13 OKA 06 26 2012 09 36 48 5d 17h 11m 31s 1 3 OKA 06 26 2012
159. cache search nagios3 ndoutils nagios3 mysql This provides the NDOUtils for Nagios with MySQL suppor t nagios3 A host service network monitoring and management system nagios3 cgi cgi files for nagios3 nagios3 common support files for nagios3 nagios3 core A host service network monitoring and management system core file s nagios3 dbg debugging symbols and debug stuff for nagios3 nagios3 doc documentation for nagios3 alumnoGnagios ff Fig 11 B squeda de binarios de Nagios en Ubuntu Centro de software de Ubuntu Archivo Editar Ver Ayuda fp Obtener programas 4 obtener programas gt Resultados de la b squeda y Apache HTTP Server metapackage 6 Suministrado por Ub _ _ _ _ O Socios de Canonical 13 Apache HTTP Server AAA ie a metapackage del gt E2 Software instalado apache2 valoraciones Historial Gratuito Instalar N The Apache Software Foundation s goal is to build a secure efficient and extensible HTTP server as standards compliant open source software The result has long been the number one web server on the Internet It features support for HTTPS virtual hosting CGI SSI IPv6 easy scripting and database integration request response filtering many flexible authentication schemes and more e ay Sitio web A adidos u Proxy advertisement zapper add on adzapper Detalles Tama o total 3127 kB a descargar
160. cal t 58 ik k Taan B 03 11 2011 04 58 50 0d 0h 22m 56s 1 3 SNMP OK 2 SRY 02 11 2011 05 00 55 0d 0h 10m 51s 1 3 SNMP OK 0 14 7 af 14 e6 GRIN 03 11 2011 05 00 12 0d Oh 21m 34s 1 3 SNMP OK 1 GR 03 11 2011 05 01 34 Od Oh 20m 12s 1 3 SNMP OK 2 OKA 03 11 2011 04 52 56 0d Oh 18m 50s 1 3 SNMP OK 1 CRI 03 11 2011 04 56 02 0d Oh 5m 44s 1 3 SNMP OK ethport4 TOURS GRIN 03 11 2011 04 56 46 0d 2h 45m0s 1 3 ECO OK Paquetes perdidos 0 RTA 3 52 ms lod UNKNOWN 03 11 2011 04 55 06 6d 4h 6m 56s 3 3 check_mrtgtraf Imposible abrir el archivo de registro MRTG GR 03 11 2011 04 58 44 0d 2h 13m2s 1 3 SNMP OK Timeticks 956871 2 39 28 71 PK 03 11 2011 05 00 39 0d 1h 11m 7s 1 3 SNMP OK 0 a0 c5 83 f7 b9 OK 03 11 2011 04 58 13 Od 8h 26m 24s 1 3 ECO OK Paquetes perdidos 0 RTA 3 18 ms KNOWN 03 11 2011 05 00 47 0d 8h 24m 59s 3 3 check mrtatraf Imposible abrir el archivo de registro MRTG GR 03 11 2011 05 00 52 0d 1h 10m 54s 1 3 SNMP OK 100000000 CRI 03 11 2011 04 52 14 0d 5h 39m 32s 1 3 SNMP OK 1 CRI 03 11 2011 04 52 20 0d 1h 9m 26s 1 3 SNMP OK 10000000 E CRI 03 11 2011 04 54 24 Od 1h 47m 22s 1 3 SNMP OK 1 CRI 03 11 2011 04 53 48 0d 1h 7m 58s 1 3 SNMP OK 0 CRI 03 11 2011 04 55 53 Od 1h 45m 53s 1 3 SNMP OK 2 OK 03 11 2011 04 56 42 0d 5h 35m4s 1 3 SNMP OK Timeticks 3079100 8 33 11 00 50 Matching Service Entries Displayed oo Tar Tar N _ a Fig 65 Vista de Nagios con varios servicios SNMP
161. car a los usuarios antes de enviar correo saliente El primer paso es instalar las herramientas y el servidor de correo Nagios instala autom ticamente postfix No obstante hay que comprobar su estado y configuraci n apt get install mailutils ln s usr bin mail bin mail apt get install postfix Comprobar primero si existe Si no configurar de tipo General Type y asignar el nombre del servidor igual al de la m quina Editar el fichero etc postfix main cf y a adir relayhost smtp gmail com 587 smtp_use_tls yes smtp tls CAfile fetc postfix cacert pem smtp_sasl_auth_enable yes smtp_sasl_password_maps hash etc postfix sasl passwd smtp_sasl_security_options noanonymous Crear el fichero etc postfix sasl passwd con la autenticaci n smtp gmail com 587 usuariofgmail com contrase a Asignar permisos adecuados y transformar a un fichero indexado hash Reiniciar postfix chmod 600 etc postfix sasl passwd postmap etc postfixsasl passwd cat etc ssl certs Equifax Secure CA pem gt gt etc postfix cacert pem etc init d postfix restart Para probar el envio ejecutar el comando mail s asunto usuario gmail com A continuaci n editar el fichero objects contacts cfg y modificar la direcci n de correo de la persona a la que se le enviar n las notificaciones define contact contact_name nagiosadmin 7 Short name of user use generic contact Inherit default values from generic contact template
162. ci n configuraci n MPA id 82 Fig 71 Copia del archivo de configuraci n Snmpd conf cocccicicnccnnnnnoninnnnnnanononncnnnncanacncns 82 Fig 72 Salida del comando simpre oo 83 Fig 73 Salida del comando sp Walk oros ta is 84 Fig 74 Filtrado de la salida de Simpwalkii A 84 Fig 75 Salidas con detalle del comando snmpwalk con par metro fijado oonicio 84 Fig 76 Salida con y sin detalle de snmpwalk con par metro fijado ocociicicicinononenrnnnnes 85 Fig 77 Scripts en Perl para desarrollar m s comandos en Nagios ccicccocncnnnnnnnonncninnnnncns 87 Fig 78 Traps SNMP enviadas por un swtch y recibidas en la estaci n de gesti n 88 Fig 79 Configuraci n comunidad y traps SNMP en switch CISCO conccicicicicicinnnnnnnnnnes 89 Fig 80 Tipos de traps CISCO CATALYST 3550 12G sssiscarstssaateseviaschenias eiii 89 Fig 81 Herramienta de captura de traps SNMP Trap Ringer Console de MG SOFT 90 Fig 82 Vista detalle de trap de tipo LINKUP ci n ticdb atico dc 90 Fig 83 Vista detalle de trap de tipo coldsstar ti antro 91 Fig 84 Ejecuci n del servidor de lectura de traps servidor class 0 0 0 0 eens 92 Fig 85 P gina de descarga de Java JDK o JRE cssstesbvacarivatiacdeusncstersndetentaaegeptiaiderbbalsnnhogss 93 Fig 86 Servicios relacionados con los traps SNMP coocicicicicionononncncnnnncnnecnncrorncororacaranarananes 93 Fig 87 Estado de los servicios monitorizados para la gesti n de pacientes 95 Fi
163. ck_catalyst_flash C public 20 10 generic service CiscoSwitchRed2 Mem RAM check_catalyst_mem C public 20 10 generic service CiscoSwitchRed2 Ventiladores check _catalyst_fans C public generic service CiscoSwitchRed2 Load check catalyst_load C public 80 80 80 90 90 90 A continuaci n se muestra un switch de Cisco monitorizado con Nagios Load Mac Address Mem Flash Mem RAM PING Port 1 Interface Speed Port 1 Interface Type Port 1 Link Status Port 2 Interface Speed Port 2 Interface Type Port 2 Link Status Port 3 Interface Speed Port 3 Link Status Uptime Ventiladores 10 2 Los Access comandos check_snm gestionado ERI 06 08 2012 13 17 02 2423h 47m27s 1 3 OK CPUO 0 0 0 OK 06 08 2012 13 19 42 6d 17h 44m47s 1 3 SNMP OK 00 11 21 A1 AF 01 OK 06 08 2012 13 14 15 2d23hStm31s 1 3 OK Onboard system FLASH Size 15998976 Free 6638592 41 Status available VPP installed OK VO valid Used 3017144B Free 5371464B 64 Processor valid Used 10661704B Free CN 06 08 2012 13 17 49 2d 23h 46m40s 1 3 263923208 17 TORII 06 08 2012 13 20 43 6d 17h 43m46s 1 3 ECO OK Paquetes perdidos 0 RTA 1 18 ms OK 06 08 2012 13 23 35 6d 17h 41m43s 1 3 SNMP OK 100000000 OK 06 08 2012 13 17 47 5d 17h 46m42s 1 3 SNMP OK 6 OK 06 08 2012 13 14 48 6d 17h 39m41s 1 3 SNMP OK 1 OK 06 08 2012 13 15 50 6d 17h 38m39s 1 3 SNMP OK 10000000 OK 06 08 2012 13 23 35 5d 17h 50m54s 1 3 SNM
164. cpConnRemAddress 1 3 6 1 2 1 6 13 1 4 tcpConnRemPort 1 3 6 1 2 1 6 13 1 5 the TCP Connection table The TCP connection table contains information about this entity s existing TCP connections tcpConnTable OBJECT TYPE SYNTAX SEQUENCE OF TcpConnEntry ACCESS not accessible STATUS mandatory DESCRIPTION A table containing TCP connection specific information si tcp 13 tcpConnEntry OBJECT TYPE SYNTAX TcpConnEntry ACCESS not accessible STATUS mandatory DESCRIPTION Information about a particular current TCP connection An object of this type is transient in that it ceases to exist when or soon after the connection makes the transition to the CLOSED state INDEX tcpConnLocalAddress tcpConnLocalPort tcpConnRemAddress tcpConnRemPort tcpConnTable 1 TepConnEntry SEQUENCE tcpConnState INTEGER tcpConnLocalAddress IpAddress tcpConnLocalPort INTEGER 0 65535 tcpConnRemAddress IpAddress tcpConnRemPort INTEGER 0 65535 tcpConnState OBJECT TYPE SYNTAX INTEGER closed 1 listen 2 synSent 3 synReceived 4 established 5 finWaitl1 6 finWait2 7 closeWait 8 lastAck 9 P g 26 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS closing 10 timeWait 11 deleteTCB 12 ACCESS read write STATUS mandatory DESCRIPTION The state of this TCP connection The only value which may be set by a management station is deleteTCB 12
165. d 23h 7M 37s 1 4 OK carga media 0 00 0 01 0 05 g Current Users RE 02 11 2011 22 32 32 5d 23h 6m 34s 1 4 USUARIOS OK 1 usuarios actualmente en HOP A 41 2011 22 32 24 0d 4h9m0s 1 4 HTTP OK HTTP 1 1 200 OK 453 bytes en 0 010 segundo tiempo de re PING SKIN 02 11 2011 22 29 14 0d 2h 8m41s 1 4 ECO OK Paquetes perdidos 0 RTA 2 77 ms Home Root Partition OK 02 11 2011 22 28 34 5d 23h 3m 25s 1 4 DISK OK free space 6190 MB 68 inode 73 Documentation SSH ARA 02 1 1 2011 22 29 55 0d 4h 11m 29s 1 4 SSH OK OpenSSH_5 8p1 Debian tubuntu3 protocolo 2 0 a Swap Usage 02 11 2011 22 31 15 5d 23h 6m 18s 1 4 SWAP OK 98 free 499 MB out of 509 MB Status Total S o 1 2011 22 32 36 5d 23h 5m 155 1 4 PROCS ACEPTAR 58 procesos con ESTADO RSZDT Processes E Tarea portatil PING OR 02 11 2011 22 28 25 0d 2h 9M 30s 1 4 ECO OK Paquetes perdidos 0 RTA 1 49 ms wverview Map speedtouch yy PING CR o 1 2011 22 30 46 0d 1h 57m9s 1 3 ECO OK Paquetes perdidos 0 RTA 3 69 ms Hosts Port 1 Services Bandwidth 02 11 2011 22 25 06 5d 21h 38m 5s 3 3 check_mrtgtraf Imposible abrir el archivo de registro MRTG Host Groups Usage Port 1 Link y Error de orden externa MIB search path y tary Status UNKNOWN 02 4 AA SS EO nome alumno snmp mibs usr share mibs site usr share snmp mibs REA Uptime CRMA 02 11 2011 22 23 57 5d 21h 35m 24s 3 3 Service Check Timed Out Groups zyxel Sy pino CR o 1 2011 22 30 22 0d 1h 57m 33s 1 3 ECO OK Paquetes perdi
166. d in users on the local machine Warning if gt 20 users critical if gt 50 users 11 En la versi n 2 de Nagios esto no es posible P g 57 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS define service use local service Name of service template to use host_name localhost Service description Current Users check_command checkwlocalguise ms 210i 0 Define a service to check the number of currently running procs on the local machine Warning if gt 250 processes critical if gt 400 users define service use local service Name of service template to use host_name localhost Service description ietel Processes check_command check_local_procs 250 400 RSZDT Define a service to check the load on the local machine define service use local service Name of service template to use host_name localhost service description Current Load check_command check local borers a0 Wy Shc W E IO OO E70 Define a service to check the swap usage the local machine Critical if less than 10 of swap is free warning if less than 20 is free define service use local service Name of service template to use host_name localhost service description Swap Usage check_command check_local_swap 20 10 Define a service to check SSH on the local machine Disable notifications for this service by default as not all users may have SSH enabled define service use l
167. d service notifications via email host_notification_commands notify host by email send host notifications via email register 0 DONT REGISTER THIS DEFINITION ITS NOT A REAL CONTACT JUST A TEMPLATE 6 2 5 El objeto command Cualquier cosa que Nagios es capaz de ejecutar se hace mediante comandos En el fichero commands cfg estan algunos check local disk command definition define command command_name check_local_disk command line SUSER1 check_ disk w SARG1S c ARG2 p SARG3 Los par metros encerrados entre el s mbolo son llamadas a macros Si se han instalado los plugins stos estar n almacenados en el directorio usr local nagios libexec alumno nagios Jusg local nagios libexec Archivo Editar Ver Buscar Terminal Ayuda alumno nagios usr local nagios libexec dir check apt check _flexlm check mailq check ping check _udp check breeze check ftp check mrtg check pop check ups check by ssh check hpjd check mrtgtraf check procs check users check _clamd check http check _nagios check real check wave check cluster check icmp check _nntp check_rpc negate check dhcp check ide smart check nt check sensors urlize check dig check ifoperstatus check ntp check_smtp utils pm check disk check ifstatus check ntp peer check snmp utils sh check disk smb check imap check ntp time check ssh check dns check ircd check _nwstat check swap check_dummy check load check oracle check tcp check file age check log chec
168. d0h25m43s 1 3 SNMP OK 2 Wireless Asociados Clientes Wireless 03 08 2012 13 38 34 2d 17h 14m47s 1 3 SNMP OK 54700 Asociados Totales HTTP 03 08 2012 13 39 53 3d 18h 1m28s 4 4 HTTP WARNING HTTP 1 1 401 Unauthorized 192 bytes en 0 022 segundo tiempo de respuesta sone ox 03 08 2012 13 41 18 0d1h42m3s 1 3 SNMP OK 58 senal dBm Port 1 Interface 03 08 2012 13 35 32 2d 18h 7m 49s 113 SNMP OK 54000000 Speed Port 2 Interface 03 08 2012 13 37 00 2d 18h6m50s 1 3 SNMP OK 100000000 Speed Uptime OK 03 08 2012 13 35 24 3d 17h 58m24s 1 3 SNMP OK Timeticks 146912584 17 days 0 05 25 84 Fig 124 Cisco Access Point monitorizado con Nagios Las ligeras diferencias de nivel y calidad de se al del cliente se deben al momento exacto de la lectura de los objetos 10 3 Impresoras de red Para la monitorizaci n de impresoras se puede utilizar la plantilla que Nagios proporciona etc nagios objects printer cfg define host use generic printer 7 Inherit default values from a template host_name Contabilidad 7 The name we re giving to this printer alias Contabilidad4050 7 A longer name associated with the printer address 10 37 13 63 7 IP address of the printer hostgroups HP Host groups this printer is associated with define hostgroup hostgroup_name network printers 7 The name of the hostgroup alias Network Printers 7 Long name of the group define service use generic service Inherit values from a
169. dC Serial Number fca858e2 45 used 11108MB 24474MB lt 80 OK Fig 93 Servidor Microsoft Internet Information Server monitorizado con Nagios 9 6 Apache El comando incluido en el fichero commands cfg permite comprobar el funcionamiento del servidor http check http command definition define command command_name command_line check_http USER1 check_http I HOSTADDRESS ARG1 Septiembre de 2012 P g 102 MONITORIZACI N DE SERVICIOS Y SISTEMAS monitorlinux 1 GR 03 08 2012 14 33 40 3d 19h 38m51s 1 3 1 44 used 4036MB 9070MB lt 80 OK Ay ells 03 08 2012 14 38 09 3d 19h 24m22s 1 3 7 process matching apache2 gt 3 lt 100 0K Mem 7 5Mb OK Cpu 0 OK HTTP OK 03 08 2012 14 42 07 3d 19h 35m24s 1 4 HTTP OK HTTP 1 1 200 OK 453 bytes en 0 002 segundo tiempo de respuesta Linux Load MOR 03 08 2012 14 38 05 3d 19h 34m26s 1 3 Load 0 00 0 01 0 05 OK PING OK 03 08 2012 14 40 03 3d 19h 38m28s 1 4 ECO OK Paquetes perdidos 0 RTA 0 50 ms SSH OK 03 08 2012 14 42 11 3d 19h 35m20s 1 4 SSH OK OpenSSH_5 8p1 Debian tubuntu3 protocolo 2 0 Swap OK 03 08 2012 14 38 09 3d 19h 34m22s 1 3 Swap space 1 used 6MB 1022MB lt 80 OK Uptime OK 03 08 2012 14 42 15 3d 19h 30m16s 1 3 SNMP OK Timeticks 34663151 4 days 0 17 11 51 Fig 94 Resultado de la comprobaci n de un servidor Apache El fichero de configuraci n de la m quina a monitorizar deber contener la l nea define
170. de datos e Protocolos y servicios de comunicaciones e Pasarelas hacia otros sistemas de gesti n de red e Sistemas con capacidad de gesti n distribuida 3 7 Modelos de Gesti n de Red OSI e Internet Por su gran difusi n el modelo que se seguir en este documento es el de la gesti n de red en Internet El modelo OSI mucho m s potente se utiliza a nivel de operadores de telecomunicaci n y est fuera de los objetivos de este documento El modelo de Internet es el modelo m s extendido llegando al 98 de penetraci n Es un modelo para equipamiento simple no para operadores de telecomunicaci n Es pragm tico y sencillo y pretende solucionar los problemas del momento Este modelo pone de manifiesto un axioma Si la gesti n de red es esencial entonces debe ser implementada en TODOS los equipos de la red Debe ser un modelo de gesti n que quepa en el m s peque o de los recursos de forma que se asegure que funcionar en todos los dem s Como consecuencia los agentes programas que se ejecutan en los dispositivos deben ser simples y peque os Por esta raz n la complejidad es asumida por el gestor Los equipos s lo han de escuchar y saber responder a preguntas simples Los protocolos se basan en intercambio de primitivas sencillas e intercambio de datos simples cadenas de texto y valores num ricos simples P g 21 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 4 LOS PROTOCOLOS SNMP
171. definici n de host tambi n se puede utilizar el par metro hostgroup Se pueden combinar ambas definiciones En Nagios 3 011 se pueden hacer asociaciones de grupos y as crear una jerarqu a Tambi n se puede utilizar en el campo members para incluir a todos los hosts 6 2 3 Definici n de servicios a monitorizar Un servicio en Nagios consiste en la combinaci n de un host y un nombre de servicio Esta combinaci n debe ser nica Los nombres de servicios pueden aparecer m s de una vez ya que pueden estar asociados a otros hosts El servicio m s simple es un ping Testea si un host est online y adem s devuelve informaci n sobre el tiempo de respuesta y la p rdida de paquetes Nagios realiza un host check si no puede testear ning n otro servicio en el host Es menos til que un ping Ejemplo de definici n de servicios Define a service to ping the local machine define service use Tocal service Name of service template to use host_name localhost service description PING check_command check ping 100 0 20 500 0 60 4 Define a service to check the disk space of the root partition on the local machine Warning if lt 20 free critical if lt 10 free space on partition define service use local service Name of service template to use host_name localhost service description Root Partition check_command check_local_disk 20 108 Define a service to check the number of currently logge
172. dependiente y manual Por ejemplo se pueden tener cientos de alarmas de dispositivos que s lo est n accesibles a trav s de un router en la red Si ste se cae O tiene un problema de conectividad con dicha red se disparar n un n mero elevado de alarmas El sistema autom tico debe distinguir esta situaci n y enviar solamente las alarmas necesarias y significativas De igual forma debe asignar un conjunto de prioridades en la gesti n de las alarmas e Mejora del servicio La mejora de los servicios ofrecidos siempre debe ser una constante en el personal encargado del dise o y administraci n de los sistemas de informaci n Los sistemas y el volumen de la informaci n est n en constante crecimiento por lo que tambi n lo estar n la demanda de ancho de banda y la capacidad de almacenamiento o CPU e Equilibrio de necesidades A menudo muchos administradores tienen los recursos mal dimensionados ya que no conocen de forma detallada el uso que los usuarios hacen de determinados recursos Un ancho de banda mal gestionado por ejemplo puede provocar que los usuarios que generan un tr fico interactivo con requisitos de tiempo de respuesta se vean afectados por otros que usan protocolos que tienden a consumir todo el ancho de banda disponible por ejemplo el protocolo FTP e Reducci n de indisponibilidades Las indisponibilidades suponen graves p rdidas econ micas y de otra ndole para las empresas Muchas de stas se pueden evitar La sig
173. detalle del servicio P g 73 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Este error se produce porque no se han encontrado las MIBs en el sistema Para solucionarlo descargar las MIBs y copiarlas en el directorio apropiado Seg n se vayan copiando ya no aparecer n los errores correspondientes As se pueden ir eliminando hasta que no haya ninguno m s Hacer un restart de Nagios despu s de a adir m s MIBs J N Nagios core ats SNMPY2 SMI vi x tip fipcisco c 29 snmp view bas gt srmpy2 smi vi_ X BE ByteSphere s MI Y H mibDepot MIE 37 SNMPLink org gt Q Cisco SNMP Ob EEES C amp bieps 192 168 1 113 nagios wit SNMP Ee ee Speedtouch Switch View Information For This Host N a g View Status Detail For This Host s eedtouch El View Alert History For This Service View Trends For This Service View Alert Histogram For This Service Member of Home ca No servicegroups Documentation gt 7 192 168 1 2 Status Tactical Service State Information i Overview Current Status UNKNOWN for 0d 1h 7m 1s mr Status Information Error de orden externa MIB search path Hess an i home alumno snmp mibs usr share mibs site usr share snmp mibs usr share mibs iana usr share mibs ietf ee Cannot find module SNMP VIEW BASED ACM MIB At line 16 in usr share mibs netsnmp NET SNMP VACI Host Groups Did not find vacmGroupName in module 1
174. dor verificando el proceso mysqld Para ello se puede utilizar el comando snmp para verificar los procesos que est n arrancados define service use generic service host_name monitorlinux service description Mysql service check_command check _snmp process public mysqld 0 2 0 2 P g 99 Septiembre de 2012 Current Status GK tor 0d 8h 43m 56s MONITORIZACI N DE SERVICIOS Y SISTEMAS 9 4 SQL server Para monitorizar el estado del servidor se puede gestionar el proceso sqlservr define service use host_name service description check_command generic service callmanager SQL Server check snmp process public sqlservr 3 100 0 2 m 20 30 u 90 99 Un ejemplo de monitorizaci n se puede ver en la gesti n de un Call Manager de Cisco mas adelante en este capitulo 9 5 IIS IIS ofrece los contadores para servicios de SNMP Estos contadores se definen con m s detalle en tres archivos MIB Inetsrv mib Http mib y Ftp mib que se pueden encontrar en la carpeta Windirl System32 Inetsrv MIB es un objeto contenedor para los otros dos archivos y por tanto no contiene contadores En la MIB HTTP MIB se pueden ver alguno de ellos por ejemplo el n mero de ficheros enviados 1 3 6 1 4 1 311 1 7 3 1 5 0 o los usuarios an nimos actuales atendidos por el servidor 1 3 6 1 4 1 311 1 7 3 1 7 0 Ver el siguiente fragmento de la MIB2 HTTPSERVER MIB DEFINITIONS BEGIN IMPORTS enterprises OBJECT TYPE
175. dos 0 RTA 3 21 ms Port 4 Bandwidth 02 11 2011 22 30 47 0d 1h 56m8s 3 3 check_mrtgtraf Imposible abrir el archivo de registro MRTG Usage E Port 1 Link Error de orden externa MIB search path 7 Status UNKNOWN 02 4 AS A e home alumno snmp mibs usr share mibs site usr share snmp mibs Uptime CRMA 02 11 2011 22 26 42 0d 2h0m13s 3 3 Service Check Timed Out 39 Matching Service Entries Displayed ih Fig 51 Error de configuraci n de SNMP MIB no encontrada J N Nagios Core 3 error de orden externa mib x Wee elf 38 amp bips 192 168 1 113 nagios ZA O snmp s 192 168 1 2 a Nagic i AA Service State Information General Current Status UNKNOWN for 0d Oh 24m 4s Home Status Information Error de orden externa MIB search path Documentation home alumno snmp mibs usr share mibs site usr share samp mibs usr share mibs iana usr share mibs ietf AE z Cannot find module SNMP FRAMEWORK MIB At line 9 in usr share mibs netsnmp NET SNMP AGENT MIE peta Did not find SnmpAdminString in module 1 usr share mibs netsnmp NET SNMP AGENT MIB Cannot find module SNMP FRAMEWORK MIB At line 9 in usr share mibs netsnmp NET SNMP VACM MIB Tater Cannot find module SNMP VIEW BASED ACM MIB At line 16 in usr share mibs netsnmp NET SNMP VACI dl Did not find SnmpAdminString in module 1 usr share mibs netsnmp NET SNMP VACM MIB Map Did not find vacmGroupName in module 4 1 usr share mibs netsnmp
176. dows Management Instrumentation Drive Provides s By windows Time Sets the co By Wireless Configuration Provides a By Workstation Provides n By World Wide Web Publishing Service Provides W Started Started Started Started Started Started Started Started Started Started Started Started Started Started Disabled Automatic Automatic Manual Manual Automatic Automatic Automatic Disabled Automatic Manual Automatic Disabled Disabled Automatic Manual Automatic Manual Manual Disabled Automatic Automatic LocalSystem LocalSystem LocalSystem LocalSystem LocalSystem LocalSystem ASQLSvc LocalSystem LocalSystem LocalSystem LocalSystem LocalSystem LocalSystem LocalSystem LocalSystem LocalSystem LocalSystem LocalSystem Local5ystem LocalSystem LocalSystem LocalSystem Fig 97 Servicios SNMP del Cisco Call Manager Septiembre de 2012 P g 106 MONITORIZACI N DE SERVICIOS Y SISTEMAS A Disabled LocalSystem By Security Accounts Manager s Starke Automatic LocalSystem eS a Automatic LocalSystem Manual LocalSystem Manual LocalSystem SNMP Service Properties Local Computer r ax Manual LocalSystem Automatic ASQLSwc Automatic LocalSystem Disabled LocalSystem Automatic LocalSystem Manual LocalSystem Automatic LocalSystem Disabled LocalSystem Disabled LocalSystem Automatic LocalSystem Manual LocalSystem Automatic LocalSystem Manual
177. dule for RADIUS authentication libapache2 mod auth sys group Module for Apache2 which checks user against sys tem group libapache2 mod authn sasl SASL authentication backend provider for Apache libapache2 mod authz unixgroup access control based on on unix group membershi p for Apache libapache2 mod bw bandwidth limiting module for apache2 libapache2 mod chroot run Apache in a secure chroot environment libapache2 mod defensible module for Apache2 which provides DNSBL usage libapache2 mod dnssd Zeroconf support for Apache 2 via avahi libapache2 mod encoding Apache2 module for non ascii filename interoperability libapache2 mod evasive evasive module to minimize HTTP DoS or brute force atta cks libapache2 mod fcgid an alternative module compat with mod fastcgi libapache2 mod geoip GeoIP support for apache2 libapache2 mod gnutls Apache module for SSL and TLS encryption with GnuTLS libapache2 mod jk Apache 2 connector for the Tomcat Java servlet engine libapache2 mod layout Apache web page content wrapper libapache2 mod ldap userdir Apache module that provides UserDir lookups via LD AP libapache2 mod lisp An Apache2 module that interfaces with Lisp environments Fig 13 Instalacion de binarios de Apache 5 2 Instalaci n Manual 5 2 1 Prerrequisitos y preparaci n de la instalaci n Como prerrequisitos se necesitan instalar las herramientas de compilaci n librer as y el servidor web Apache Los paquetes
178. e Openi Y N Nagios Echange Master YTO srecacana757 Procures O iim ai nagioshcuvhcuvsacyl es na wa Nagios SS Host Status Totals Service Status Totals Nag A uo Down Unreachabie Pendina ae ms ca ar Ei mm Ce ile an Ta Service Overview For All Host Groups Win FTP Servers of HCUV Rpwin servers EmA Eo ius Snare oL HCUV inanan ion sis Services Actions fume oc lao E ia esuelos ETE E Status Services ws 213 HCUY windows servers Win File Sharing Sears CUY uinfs servers actions Hoss Status Services y sor Een OBA Fig 117 Ventana de agrupaci n de servicios m s cr ticos Si hubiese alg n problema en el switch como por ejemplo un fallo en un ventilador deber a aparecer un mensaje como el que se muestra en la siguiente figura Current Network Status Host Status Totals Service Status Totals Down Unreachable Pending Unknown Critical Pending Poe fo Bo gt MT 7 All Problems All Types oo 23 ias Nagios Core 3 3 1 www nagios org Logged in as nagiosadmin View History For This Host View Notifications For This Host View Service Status Detail For All Hosts Service Status Details For Ho
179. e Windows que se describe en el apartado siguiente 6 6 Instalaci n NSClient Antes de instalar el agente en la m quina aparecer el siguiente estado P g 62 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS N Nagios Core el 38 C fx bitps 192 168 1 113 nagios Ela SNMP Current Network Status Host Status Totals Service Status Totals Last Updated Thu Oct 27 23 45 07 CEST 2011 pe Unknow e 3 Ja Nagios Core 3 3 1 www nacios ora y o o E O ee All Problems All Ty All Problems All Types View History For This Host aaa View Notifications For This Host z A W Fe IH Service Status Details For Host casa Beba a Last Check E GCA 27 10 2011 23 42 07 ANE CRITICAL Tiempo finalizado de z calo despuA s de 10 segundos GR 27 10 2011 23 41 26 Od 1h 3m41s i4 ECO OK Paquetes perdidos 0 RTA 4 44 ms 2 Matching Service Entries Displayed T mr Sa T Fig 36 Mensaje de error antes de instalaci n NSClient La siguiente figura muestra c mo Nagios se conecta a la m quina Windows utilizando el cliente Windows Machine Fig 37 Conexi n Nagios con NSClient Instalar el servicio con la siguiente configuraci n modificar seg n el caso la direcci n del servidor Nagios y NSClient Win32 n NSClient Configuration Old configuration wa
180. e funcione la l nea de la captura anterior Esta herramienta tan s lo pretende ser un ejemplo de captura Existen librer as en Java para poder decodificar los paquetes recibidos 21 http www oracle com technetwork java javase downloads index html P g 92 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS E Java SE Downloads Archivo Edici n Ver Favoritos Herramientas Ayuda 3 Ji gpugrid BEREC Body of Europea m Empleo P blico ECYL Po Fa Forums Cisco Developer E Galer a de Web Slice Internet Drafts and RFCs amp Ministerio de Industria Tu E Portal de Salud de la Junta TEVE EE Java ME Java SE Downloads ies BB ore Glassfish Java SE Support Java ME E Latest Release Next Acce Embedded Use Previous Releases Java SE Advanced 8 Suite JavaFX Java Embedded Java Card JavaFX NetBeans IDE 7 Java DB amp amp Java Resources gt S E Web Tier 2 g NetBeans 4 Java EE New to Java Java Card Java 3 APIs aay Download 3 Code Samples amp Apps penta ack Java Platform JDK 7ut JavaFX 2 0 JDK 7u1 NetBeans Bundle JDK 7u1 Java EE Bundle Developer Training a 3 Documentation Java Magazine s Here are the Java SE downloads in detail a Javanet Student Developer Java Platform Standard Edition Tutorials Java SE 7u1 JDK JRE o Mer This release includes many security fixes Learn Y macs ava Abra Gat it now Wh
181. eck_command check_nt UPTIME Create a service for monitoring CPU load Change the host_name to match the name of the host you defined above define service use generic service hostgroup_name informatica service description CPU Load check_command check_nt CPULOAD 1 5 80 90 P g 145 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Create a service for monitoring memory usage Change the host_name to match the name of the host you defined above define service use generic service hostgroup_name informatica service description Memory Usage check_command check_nt MEMUSE w 80 c 90 Create a service for monitoring C disk usage Change the host_name to match the name of the host you defined above define service use generic service hostgroup_name informatica service_description C Drive Space check_command check_nt USEDDISKSPACE 1 Cc w 80 c 90 define service use generic service Inherit values from a template hostgroup_name informatica service description Fuente Redundante check_command check_snmp C SACYLCom o 1 3 6 1 4 1 232 6 2 9 1 0 w 3 c 4 1 Redundant PoWer Supply define service use generic service Inherit values from a template hostgroup_name informatica service_description Temperatura externa check_command check_snmp C SACYLCom o 1 3 6 1 4 1 232 6 2 6 1 0 w 3 c 4 1 external Temperature define service use generic service I
182. ed by PROPOSED Information Base for McCloghrie M version 2 of the Simple _ Rose S Network Management Waldbusser Protocol S5NMPv2 Network Management RFC1907 STANDARD Transport Mappings for J April1993 ASCII McCloghrie M Rose S Waldbusser Framework version 2 of the Simple Septiembre de 2012 ff PROPOSED STANDARD Obsoleted by RFC1908 RFC1451 RFC1450 RFC1449 PROPOSED STANDARD Obsoleted by RFC1906 Network Management Protocol S5NMPv2 ff fof f P g 160 MONITORIZACI N DE SERVICIOS Y SISTEMAS a RFC1905 STANDARD E oa April 1993 il i Wa April 1993 Fi fi ri J Case K April 1993 ASCII Obsoleted by PROPOSED McCloghrie M RFC1904 STANDARD Rose S Waldbusser J Case K April 1993 ASCII McCloghrie M Rose S Waldbusser J Case K April 1993 ASCII McCloghrie M April1993 ASCII Rose S Waldbusser S Bostock March 1993 ASCII Obsoletes RFC1298 G Minshall M March 1993 ASCII Ritter RFC1418 SNMP over OSI M Rose March 1993 ASCII Obsoletes RFC1161 pub as PROPOSED Protocol Operations for version 2 of the Simple Network Management Protocol S5NMPv2 April 1993 Party MIB for version 2 of the Simple Network Management Protocol SNMPv2 J April 1993 RFC1446 Security Protocols for version 2 of the Simple J Galvin K McCloghr
183. ed_passwor d JwOKAUUdX 1 AAUWASDAAB PASSWORD This is the password s that is required to access NSClient remotely If you leave this blank everyone will be able to access the daemon remotly passwor d secr et password passwor d sacyl ALLOWED HOST ADDRESSES This is a comma delimited list of IP address of hosts that are allowed to talk to the all daemons If leave this blank anyone can access the deamon remotly NSClient still requires a valid password The syntax is host or ip mask so 192 168 0 0 24 will allow anyone on that subnet access jal lowed_hosts 127 0 0 1 32 3 USE THIS FILE Fig 42 Configuraci n password en NSC ini Una vez configurado el password en el fichero NSC ini arrancar de nuevo el servicio P g 65 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS EM Administrador S mbolo del sistema aa iC Users mrabosoma gt net stop nsclientpp El servicio de NSClient Win32 esta deteni ndose El servicio de NSClient Win32 se detuvo correctamente iC Users mrabosoma gt net start nsclientpp El servicio de NSClient Win32 est inici ndose l servicio de NSClient Win32 se ha iniciado correctamente IC Users mrabosoma gt iC Users mrabosoma gt _ Fig 43 Restart de servicio NSClient en Windows Una vez configurado aparecer como OK N
184. efine service use generic service host_name A service description Drum Unit check _command check _printers public CONSUM Drum Unit Brother DR 520 DR 3100 DR 3115 DR 31J DR 3150 define service use generic service host_name HS service description Consumibles Toner check _command check printers public CONSUM Black Toner define service use generic service host_name H5 service description Consumibles Kit Mantenimiento check_command check_printers public CONSUM Maintenance Kit define service P g 125 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS use generic service host_name H8 service description Bandeja 1 check_command check _printers public TRAY 1 define service use generic service host_name H8 service description Bandeja 2 check_command check printers public TRAY 2 define service use generic service host_name H8 service description Numero de paginas check_command check printers public PAGECOUNT El primer check utilizado es DEVICES y nos da informaci n de los distintos dispositivos hardware que se testean en la m quina Con el check DISPLAY vemos el mensaje que se muestra en el visor LCD de la impresora Con el check MESSAGES devuelve el valor que tiene en event log messages seg n las pruebas realizadas devuelve informaci n hexadecimal que no hemos llegado a descifrar Con el check MODEL devuelve el modelo y n mero de serie de la impresora C
185. el manual de Nagios host The host object describes one of the network nodes that are to be monitored Nagios expects the IP address as a parameter here or the Fully Qualified Domain Name and the command that should define whether the host is alive The host definition is re referenced in the service definition hostgroup Several hosts can be combined into a group This simplifies configuration since entire host groups instead of single hosts can be specified when defining services the service will then exist for each member of the group In addition Nagios represents the hosts of a host group together in a table in the Web front end which helps to increase clarity service The individual services to be monitored are defined as service objects A service never exists independently of a host So it is quite possible to have several services with the same name as long as they belong to different hosts The following code define service i name PING host_name linux01 define service name PING host_name linux03 describes two services that both have the same service name but belong to different hosts So in the language of Nagios a service is always a host service pair servicegroup As it does with host groups Nagios combines several services and represents these in the Web front end as a unit with its own table Service groups are not absolutely essential but help to improve clarity and are also used in
186. empts 3 normal check interval 3 retry _ check interval 1 contact_groups switch admins notification interval 240 notification period 24x7 notification options c r check_command snmp_sysLocation Service definition HP Procurve Switch sysUpTime define service use generic service 7 Name of service template to use hostgroup_name switches procurve service description System Up Time is _volatile 0 check period 24x7 max_check_attempts 3 Septiembre de 2012 P g 143 MONITORIZACI N DE SERVICIOS Y SISTEMAS normal check interval 5 retry_check_interval 1 contact_groups switch admins notification interval 240 notification period 24x7 notification options c r check_command snmp_sysUpTime Service definition HP Procurve Switch Estado ventiladores define service use generic service 7 Name of service template to use hostgroup_name switches procurve service description Ventiladores Estado is volatile 0 check period 24x7 max check _attempts 3 normal check interval 5 retry_check_interval 1 contact_groups switch admins notification_interval 240 notification period 24x7 notification options c r check_command check_hpfan 4 3 5 AMARA RA AR AA DAA RAM AEA EEE EE AEH AEE EH EE eA EE Ea EE EE AALL RARA DAA RAM EEA EEE AEA AEH AEH EE a EEE Ee EE EEEE Command DEFINITIONS AMAMARA AAA ARA AA RA AAA AAA AAA ARANA MARA RARA EH AEA EE Ha EE Ee ee ETETE AALL RARA RA MARA RAMA RARAAARAR AMARA RARA DAMA
187. en NagiOS cciconiciconnnnnnoncnnnenisnoninrcananncncacncnans 91 8 5 Desarrollo de una Herramienta de captura de TlaPS coooccininiccinnnnnnnnnnnccnnninnnnnos 91 CASOS PR CTICOS DE GESTI N DE SERVICIOS Y APLICACIONES 94 NN o O O O 94 O 95 9 2 1 Servicio de comprobaci n de la m quina Ping eeeeeee eerste 96 9 2 2 Servicio de comprobaci n del puerto del servidor Oracle ieee 96 9 2 3 Servicio ORACLE tablespace lidades 96 9 24 ORACLE t blespace USERS din 97 9 2 5 ORACLE estadon cons sin sayin saute E E E A a AR 98 Ob Us tanos ORACLE pena e eo 99 A A O 99 94 BOLBE aTa aa a icid 100 ASTE T E A E E tat een E E EES 100 9 6 Apaches raita bea 102 9 7 Cisco Call Manager a as 104 9 7 1 Configuraci n previa del Call Manager sisi scsintasieciassiavaeersearonoapvecre 105 9 7 2 Consulta de objetos del rbol de OIDs de la MIB CISCO CCM MIB 112 P g 5 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 10 CASOS PR CTICOS DE GESTION DE SISTEMAS circense 114 10 1 Monitorizaci n de dispositivos de red switches 114 10 11 Switches HP PEU iia 116 101 2 Swatches Cisco Catal Vsti aint de itnlinsee 119 10 2 Dispositivos de la red inal mbrica c oonoiionidcitapaci ralaiadrid saan geen alondra 120 10 3 o A sale deat ceo eer ln aE 123 10 4 Servidores LINUX Ubuntu da Ad A a 128 T04 Eheck SIMP al 129 10 42 Check simp st rage nenesinin aips kiadatni 130 10 43 Check simp protesi
188. er ACCESS read only STATUS mandatory DESCRIPTION This is the maximum count of Client Access Licenses CALs used by this HTTP Server for simultaneous use by authenticated users httpStatistics 47 totalCALFailedAuthenticatedUser OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the total number of HTTP requests that have failed on this HTTP server due to a Client Access License CAL being unavailable for an authenticated user httpStatistics 48 currentCALsforSecureConnections OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the current count of Client Access Licenses CALs available to this HTTP Server for simultaneous use by secure connections httpStatistics 49 maxCALsforSecureConnections OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the maximum count of Client Access Licenses CALs available to this Http Server for simultaneous use by secure connections httpStatistics 50 totalCALFailedSecureConnection OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the total number of HTTP requests that have failed on this HTTP server due to a Client Access License CAL being unavailable for use by a secure connection f httpStatistics 51 j END 12 10 Anexo X C digo Java check_tablespace_oracle a aE check tablespace oracle jav
189. er service description Usuarios oracle check_command check_users_oracle 12 13 Anexo XIII C digo fuente de Check_Oracle_Instant usr bin perl host SARGV 0 Sport SARGV 1 Ssid SARGV 2 user SARGV 3 pass SARGV 4 sub trim S my result my ERRORS OK gt 0 WARNING gt 1 CRITICAL gt 2 my param_array 90 gt Dictionary Cache Hit Ratio SELECT 1 Sum getmisses Sum gets Sum getmisses 100 FROM v Srowcache 95 gt Library Cache Hit Ratio SELECT 1 Sum reloads Sum pins Sum reloads 100 FROM v Slibrarycache 89 gt DB Block Buffer Cache Hit Ratio SELECT 1 phys value db value cons value 100 FROM v Ssysstat phys v Ssysstat db v Ssysstat cons WHERE phys name physical reads AND db name db block gets AND cons name consistent gets 98 gt Latch Hit Ratio SELECT 1 Sum misses Sum gets 100 FROM vi latch 5 lt DESK Sort Ratio SELECT disk value mem value 100 FROM v Ssysstat disk v Ssysstat mem WHERE disk name sorts disk AND mem name sorts memory 5 lt Rollback Segment Waits SELECT Sum waits Z Sum gets 100 FROM vi rollstat 50 lt Dispatcher Workload SELECT NVL Sum busy Sum busy Sum idle 100 0 FROM v Sdispatcher 51 lt Usuarios concurrentes select count from v session where username is not null End M
190. eric service service description Printer Model check_command check_snmp_printer public MODEL define command command_namecheck_printers command_line SUSER1S check_snmp printer H SHOSTADDRESS C SARGI1 x ARG2S w SARG3 c ARG4 Para que el plugin funcione hay que descargar el script en la carpeta donde est n los dem s plugins en nuestro caso est en usr local nagios libexec y cambiarle los propietarios y los permisos de ejecuci n para que pueda funcionar Editar el fichero y comprobar despu s de la descarga que no se ven caracteres extra os en el c digo fuente Una vez resueltos todos los problemas hay que definir el comando en el fichero commands cfg se trata de copiar y pegar las ltimas tres l neas del define command que est n en negrita seg n las instrucciones del autor para que Nagios pueda utilizarlo quedando el fichero de la siguiente forma define command command_namecheck_printers command_line SUSER1S check_snmp printer H SHOSTADDRESS C SARGI1 x SARG2S w SARG3S c SARG45 Pag 124 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Despu s de esto ya podernos utilizarlo en nuestro Nagios como el siguiente ejemplo IMA AA RRA AA RRA A AA RARA AA RARA RARA RAMA RA RARA RA RAMA RARA RADAR ARAN AR ARAN AD ARARARA IMA RA ARA A RARA AA RARA AA RARA MARA RAMA RA RAMA RARA RARA RADAR AR ARAR AR ARARADARARARA SERVICE DEFINITIONS Heed PEE EE EEE AA RARA AA a EE EEE
191. ervice Status 7 LastCheck Duration 1 attempt Status Information CPU ao swehcuv2176 y 18 06 2012 13 32 05 3d 2h S6m31s 1 3 SNMP OK Temprature status 4 Temperatura CPU Usada 18 06 2012 13 28 55 4d Sh 29m44s 1 3 CPU used 6 0 lt 60 80 OK Memoria Libre OK 18 06 2012 13 29 47 2d 23h 18m 49s 1 3 SNMP OK HP Memory Free 16880048 megabytes PING OKA 18 06 2012 13 32 52 4d Sh 29m 15s 1 3 ECO OK Paquetes perdidos 0 RTA 2 38 ms E A 12 06 2012 19 30 28 20230 11m 108 113 SNMP OK Power Supply status 4 System Contact OK 18 06 2012 13 33 14 0d 2h 25m 22s 1 3 SNMP OK System Contact CSG Redes System Ena SNMP OK System Description ProCurve J9021A Switch 2810 24G revision D 18 06 2012 13 32 19 4d 5h 26m23s 1 3 N 11 25 ROM N 10 01 swicode buidfoass oh2 H wooo 18 06 2012 13 28 36 4d 5h 30m 1s 1 3 SNMP OK System Location HCUV C P D Informatica S S SNMP OK System SNMP Up Time Timeticks 656198085 75 days 22 46 20 85 ET o 18 06 2012 13 33 22 3d 2h 50m 14s 1 3 SNMP OK Fan status 4 system uo ine BR 18 06 2012 13 32 04 44 sn 20m 53s 1 13 10 Matching Service Entries Displayed Fig 116 Servicios gestionados de un switch HP Procurve2176 22 Script check_snmp_load pl de Patrick Proy Patrick at proy org en http nagios manubulon com P g 117 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS IT N usos core O Nagios Search Results hp Y N Nagios Exchange CTN Nagios Exchang
192. ery model serial event messages tray status and much more Originally based on Monitoring Solutions check _snmp printer this provides friendly output quick execution and thorough pre flight checking NOW COMPATIBLE WITH UBUNTU I liked the original plugin but wanted to be able to report the status of all consumables For some devices this output can get huge When only 1 component is empty it becomes a challenge to find what needs to be replaced in the output So this script was born I added checks for user input and better feedback for improper parameters The same goes for SNMP status before any code is executed this is tested Usage is as follows check _snmp printer H HOSTADDRESS C COMMUNITY x CHECK w WARNING c CRITICAL S separator string V h CHECK can be one of the following CONSUM string TEST ALL DEVICES DISPLAY MESSAGES MODEL PAGECOUNT STATUS TRAY number s TEST ALL VERSION If you want the output for consumables to contain multiple lines pass the following argument 9 pr Then you need to edit your service notifications Just after the SSERVICEOUTPUTS macro you will need to add nSLONGSERVICEOUTPUTS E mails will finally contain lines 2 and up of the output The CONSUM option gives results for all consumable names that match the string passed For instance you can pass CONSUM Toner and see all toner levels no staple cartridges or imaging units Simila
193. es la m s adecuada a la infraestructura hospitalaria objetivo de este proyecto Consiste en utilizar SNMP para consultar a los servidores tambi n en Windows A continuaci n se muestran algunos comandos que se han seleccionado por su importancia en la gesti n de la infraestructura hospitalaria 10 4 1 Check_snmp Es el comando snmp b sico que est disponible en la instalaci n est ndar de Nagios Con este comando se puede consultar la informaci n que devuelve un host con un agente SNMP instalado El siguiente fichero de configuraci n consulta el objeto sysUpTime y la velocidad de la interfaz 1 ifSpeed 1 Monitor uptime via SNMP define service use generic service Inherit values from a template host_name zyxel service description Uptime check_command check _snmp C public o sysUpTime 0 Monitor interface speed via SNMP define service use generic service host_name zyxel P g 129 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS service description Port 1 Interface Speed SA check _snmp C public o ifSpeed 1 r 1 m RFC1213 MIB Con este comando y averiguando el oid a consultar se puede monitorizar cualquier dispositivo v a SNMP No obstante a veces es interesante escribir un script customizado para conseguir averiguar el estado del dispositivo Es muy habitual encontrar scripts hechos en lenguaje Perl ya que es un lenguaje muy apropiado para desarrollar aplicaciones de red 10 4 2 C
194. ess 10 1 1 1 Las Enterprise internet 6 3 1 1 5 E Bindings 2 Binding 1 sysUpTime 0 TimeTicks O days 00h 01m 43s 46th Binding 2 enterprises 9 2 1 2 0 octet string power on 4 m 6 SNMP notifications received Fig 83 Vista detalle de trap de tipo cold start 8 4 2 NSCA configuraci n de traps en Nagios Nagios tiene un sistema para poder recibir notificaciones mediante una tuber a pipe de UNIX Se denomina NSCA19 Nagios Service Check Acceptor Sin embargo se debe instalar un software que adapte los traps y se los env e a este componente de Nagios Para ello si no se ha hecho antes se debe instalar el paquete completo net snmp que incluye la herramienta samptrap 8 5 Desarrollo de una Herramienta de captura de Traps A continuaci n se muestra el c digo fuente en Java de un programa que captura los paquetes enviados mediante los traps del protocolo SNMP package dsockets import java net import java io public class servidor public static void main String Args throws IOException byte buffer new byte 500 String cadena int p 162 DatagramSocket conexion new DatagramSocket p System out println Servidor escuchando en el puerto p DatagramPacket dp int i 1 do dp new DatagramPacket buffer buffer length System out println esperando traps conexion receive dp buffer dp getData cadena new String buffer substring 0 dp getLength
195. etAddressType ccmVMailDevInetAddress ccmVMailDevStatusReason ccmVMailDevTimeLastStatusUpdt ccmVMailDevTimeLastRegistered ccmVMailDevProductTypeIndex ccmVMailDevUnregReason ccmVMailDevRegFailReason ccmVoiceMailDeviceDirNumEntry ccmVMailDevDirNumIndex ccomVMailDevDirNum ccmQualityReportAlarmEnable ccmSIPDeviceTable ccmSIPDeviceEntry ccmSIPDevindex ccmSIPDevName ccmSIPDevProductTypeIndex ccmSIPDevDescription ccmSIPDevInetAddressType ccmSIPDevInetAddress ccmSIPInTransportProtocolType ccmSIPInPortNumber ccmSIPOutTransportProtocolType ccmSIPOutPortNumber ccmSIPDevInetAddressIPv4 ccmSIPDevInetAddressIPv6 ccmMIBNotifications ciscoCcmMIBCompliances ciscoCcmMIBGroups ciscoCcmMIBCompliance ciscoCcmMIBComplianceRevl ciscoCcmMIBComplianceRev2 ciscoCcmMIBComplianceRev3 ciscoCcmMIBComplianceRev4 ciscoCcmMIBComplianceRev5 ciscoCcmMIBComplianceRev6 ciscoCcmMIBComplianceRev7 ccmInfoGroup ccmPhoneInfoGroup ccmGatewayInfoGroup ccmInfoGroupRev1 ccmPhoneInfoGroupRevl ccmGatewayInfoGroupRevl ccmMediaDeviceInfoGroup ccmGatekeeperInfoGroup ccmCTIDeviceInfoGroup ccmNotificationsInfoGroup ccmInfoGroupRev2 ccmPhoneInfoGroupRev2 ccmGatewayInfoGroupRev2 ccmMediaDeviceInfoGroupRevl ccmCTIDeviceInfoGroupRev1 ccmH323DeviceInfoGroup ccmVoiceMailDeviceInfoGroup ccmNotificationsInfoGroupRevl ccomInfoGroupRev3 ccmNotificationsInfoGroupRev2 ccmSI
196. for nagios 3 3 1 07 25 2011 General Options Nagios executable Nagios user group Command user group Embedded Perl Event Broker Install prefix Lock file Check result directory Init directory Apache conf d directory Mail program Host OS Web Interface Options HTML URL CGI URL Traceroute used by WAP nagios nagios nagios nagios nagcmd no yes usr local nagios var nagios nagios lock var nagios spool checkresults etc init d etc apache2 conf d bin mail Linux gnu http localhost nagios http localhost nagios cgi bin Review the options above for accuracy If they look okay type make all to compile the main program and CGIs alumno nagios nagios nagios make all sed i s for file in includes rss for file in includes rss g html Makefile ed i s for file in includes rss extlib for file in includes rss extlib g html Makefile make install make install init make install commandmode make install config Fig 18 Resultado de configure Septiembre de 2012 P g 43 MONITORIZACI N DE SERVICIOS Y SISTEMAS Los comandos marcados con las l neas son los que hay que ejecutar si se instala con Ubuntus 5 2 4 Configuraci n de la interfaz web Apache Instalar interfaz web y a adir usuario administrador web sudo make install webconf cd etc nagios sudo htpasswd c htpasswd users nagiosadmin Arrancar de nue
197. forms a further or different circle of people This can also be configured on multiple levels in any way you want hostdependency Like servicedependency but for hosts hostscalation Like servicescalation but for hosts 6 2 1 Definici n de hosts El siguiente c digo define localhost en el fichero de ejemplo localhost cfg que por defecto crea la herramienta en la instalaci n define host use linux server Name of host template to use This host definition will inherit all variables that are defined in or inherited by the linux server host template definition host_name localhost alias localhost address 127 010 T Utiliza las plantillas definidas en el fichero etc nagios objects templates cfg define host name generic host The name of this host template P g 55 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS notifications_enabled al Host notifications are enabled event_handler_ enabled alt 7 Host event handler is enabled flap detection enabled 1 p Flap detection is ensbled failure prediction ensbled 1 7 Failure prediction is ensbled process perf data T Process performance data retain _ status information Ht Retain status information across program restarts retain_nonstatus_information 1 Retain non status information across program restarts notification_period 24x7 Send host notifications at any time register 0 DONT REGISTER THIS DEFINITION ITS NOT A REAL HOST
198. ft MB left or MB used Output options S S can have 3 options lt type gt lt where gt lt cut gt lt type gt Make the output shorter 0 only print the global result except the disk in warning or critical 1 Don t print all info for every disk lt where gt optional if 1 put the OK WARN CRIT at the beginning lt cut gt take the lt n gt first caracters or lt n gt last if n lt 0 With the following disks home 51 used and 90 used 99 home 51 used 1012MB 1969MB 90 used 5781MB 6390MB lt 99 OK 90 home 51 used 1012MB 1969MB 90 used 5781MB 6390MB gt 90 WARNING S0 90 All selected storages lt 99 OK 34 Descargar en http nagios manubulon com P g 130 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS S0 99 90 used 5781MB 6390MB gt 90 WARNING S1 90 home 51 90 lt 99 OK S1 99 home 51 90 used 5781MB 6390MB gt 90 WARNING S0 1 90 OK lt 993 All selected storages S0 1 90 WARNING gt 90 90 used 5781MB 6390MB S1 2 99 h 51 90 lt 99 OK Lp p28 99 me 51 90 lt 99 OK 50 1 2 30 WARNING gt 30 me 51 used 1012MB 1969MB 90 used 5781MB 6390MB Performance output f option The performance will remove any weird caracters 1 3 4 lt gt from the drive name Msg size option o option In case you get a ERROR running table Message size
199. g 74 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Fig 54 Directorios de b squeda de MIBs Para averiguar cu les son los directorios de configuraci n de SNMP ejecutar el siguiente comando net snmp config snmpconfpath alumno nagios etc nagios h Archivo Editar Ver Buscar Terminal Ayuda alumno nagios etc nagios net snmp config default mibdirs home alumno snmp mibs usr share mibs site usr share snmp mibs usr share mib s iana usr share mibs ietf usr share mibs netsnmp alumno nagios etc nagios net snmp con snmpconfpath etc snmp usr share snmp usr lib snmp home alumno snmp var lib snmp alumno nagios etc nagios Fig 55 Directorios de busqueda de MIBs Una vez copiadas p e al directorio home alumno snmp y hecho el restart de Nagios aparecer n como OK en unos minutos Para forzar una comprobaci n hacer clic en los host command servicio SNMP definido y hacer clic en Re schedule the next check of this host J N Nagios Core sto SNMPV2 SMI O fep tp csco c gt E snmp view bas gt Y snmpv2 smi vi_ x EZ ByteSphere s MI x YHE mibDepot MIB 1 x Ex SNMPLinkorg Cisco SNMP Ob EEE 3 C fx bups 192 168 1 113 nagios FA O snmp N a g i e Host Information Host O Speedtouch Switch General J ENN 3 3 1 piula iais speedtouch Home View Status Detail For This Host Documentation View Alert History For T
200. g 88 Servicios de Oracle monitorizados iii 96 Fig 89 Salida del commando de comprobaci n de tablespace 00 0 0 teens 97 Fig 90 Resultado de la consulta del tablespace USERS coooicicicicicicnnonononcncncorororocncnrnnanananos 97 Fig 91 Resultados de rendimiento de Oracle cocina nia 98 Fig 92 Resultado de Oracle US a ido 99 Fig 93 Servidor Microsoft Internet Information Server monitorizado con Nagios 102 Fig 94 Resultado de la comprobaci n de un servidor Apache 0 0 cece eens 103 Fig 95 Procesos apache2 lanzados con la aplicaci n apache benchmarking 104 Fig 96 Servicios de telefon a IP de CISCO nr vacacds yonctSs toadetin teaveeh sadhanatdodgaeice 106 Fig 97 Servicios SNMP del Cisco Call Manager c ccs2 setsciiveciisel etietesiteanisnaasestataotitn 106 Fig 98 Configuraci n del contacto y localizaci n en SNMP ocicicicinococicononinnonocnnnnnrincnnnes 107 Fig 99 Configuraci n de comunidad y permisos en el Call Manager 0 0 0 107 Fig 100 Detalle de permisos en la configuraci n de las comunidades ocicicicccnonicincncnos 108 Fig 101 Asignaci n permiso READ ONLY en comunidad public del Call Manager 108 P g 9 Septiembre de 2012 Fig 102 Fig 103 Fig 104 Fig 105 Fig 106 Fig 107 Fig 108 Fig 109 Fig 110 Fig 111 Fig 112 Fig 113 Fig 114 Fig 115 Fig 116 Fig 117 Fig 118 Fig 119 Fig 120 Fig 121 Fig 122 Fig 123 Fig 124
201. ge01 cfg gt ae A osts services cfg edge02 cfg services hostgroups cfg backbone cfg Fig 28 Diferentes estructuras de directorios de configuraci n Control de actualizaciones nagios cfg S lo lectura etc nagios gedit Archivo Editar Ver Buscar Herramientas Documentos Ayuda De wo e ek GO Nuevo Abrir Guardar Imprimir Deshacer Rehacer Cortar Copiar Pegar nagios cfg CHECK FOR UPDATES This option determines whether Nagios will automatically check to see if new updates releases are available It is recommend that you enable this option to ensure that you stay on top of the latest critical patches to Nagios Nagios is critical to you make sure you keep it in good shape Nagios will check once a day for new updates Data collected by Nagios Enterprises from the update check is processed in accordance with our privacy policy see http api nagios org for details check for updates 1 BARE UPDATE CHECK This option deterines what data Nagios will send to api nagios org when it checks for updates By default Nagios will send information on the current version of Nagios you have installed as well as an indicator as to whether this was a new installation or not Nagios Enterprises uses this data to determine the number of users running specific version of Nagios Enable this option if you do not want this information to be sent Octave
202. h ta aa AA WTS BO Des tl Te Des DTD O Lcd OM 156 DO 156 CS ERRE W133 ee a Stier Mad les See ae ad hy D a a bea LITO S Pe vee E Ga Pins re I TE ee Po ret AD HEE ES Ga TE ES QOL 5 6 deL het IE Pel ae hes aN Ba Bir te E red LADO Li 29129 ALS O AL ds OIL 2 9 156 1 15 EPR ee P AA 414 158 253 DE EAM Pel ere Ane de Dia Lia E PO ESA A ADO 102 Lo Led load ELL ol Da DLS 6s To 2 eA E ac Si do ele 2 6 legs Two Pel iar pe ra ee oe Pit ae ara ed Pe DGD Dz 09 GTS D2 ghee Ais We De TOM Esla de E Sa HOG LO 6 LEZ ILL Les 9 9 156 1 2 Did Lo Oe Dia 9 9 156 1 2 PE GLb AO 929 ADO 1 2 Laa Edie on t PPE EN ZO LISIS Le AD Ez Dd Lo dia GG E E 2 s AN AI 9 9 156 1 2 dida RAIZ Ds IST Lil AR D9 Laa EER EPS PE LS IBAS 691 ET TO 9 OD bh 6 Lie 2s 9 9 1S Gd 2s SES EPA EEES TE ores A 604 441 G P ME A RS 6s ds 2s E PES A Dies ETE A PIO RRE TA P PS NO e E E 969 6 1 4 1 9 9 IA E O AA SED E FECSA 9 DAD Ode aS pa el nay ee ire De Dc lO Ge Lees 9590156 Lili 9 9 156 1 2 Lo Ore disse 66 1041 9 9 E ier fee reel a ashes Ose ok a Arta T 9 9 156 1 2 66 Te ES O 96 Gul 565 12 thes Zid LGM AGS of Dore SE E ad Septiembre de 2012 WRN a kh qn Belag 3 qn 5 O NNN KH BE Qu 3 qn 2 qe rn gr bh ha Liz ALS An Lo 26 EY i wher RHR RHR e218 eae 223 24 rag 26 27a ION bb bs HH RK baba bs bs bes b
203. he2 gt 3 lt 100 OK Mem 3 3Mb OK Cpu 0 OK HTTP OK HTTP 1 1 200 OK 453 bytes en 0 001 segundo tiempo de respuesta ECO OK Paquetes perdidos 0 RTA 0 40 ms SSH OK OpenSSH_5 8p1 Debian 1ubuntu3 protocolo 2 0 Swap space 0 used 1MB 1022MB lt 80 OK SNMP OK Timeticks 10612390 1 day 5 25 43 90 Fig 130 Consulta en Nagios utilizando el comando check_snmp_process El fichero de configuraci n que refleja la consulta de la figura anterior es el siguiente define service use generic service host_name monitorlinux service description Apache Processes check_command check _snmp process public apache2 3 100 0 2 m 20 30 u 90 99 Se puede averiguar el n mero de procesos de un tipo y el consumo de recursos de memoria y cpu 35 Descargar en http nagios manubulon com index_commands html process Septiembre de 2012 P g 132 MONITORIZACI N DE SERVICIOS Y SISTEMAS 10 4 4 Check_snmp_load Este script en Perl permite averiguar la carga de CPU de una maquina Windows o Linux ademas de varios dispositivos de red de Cisco y otros fabricantes La siguiente tabla muestra las distintas opciones disponibles Tabla X Valores para los par metros del comando check_snmp_load T value System w amp c values netsl Linux load provided by Net 3 values load average on 1 min 5 min 15 min absolute SNMP netsc Linux CPU usage given by 1 value in net snmp as400 as400 CPU usage
204. heck_snmp_storage El script check_snmp_storage pl 4 escrito en lenguaje Perl se ha utilizado para monitorizar el estado de los sistemas de almacenamiento Para poder utilizar este comando se han de configurar los siguientes ficheros e Crear un fichero de comandos nuevo por ejemplo miscomandos cfg A adir el nuevo comando con los par metros correspondientes check snmp storage command definition define command command_name check_snmp_storage command line SUSER1 check_snmp storage pl H SHOSTADDRESS ARG1S Editar el fichero nagios cfg y a adir el nuevo fichero de comandos creado cfg _file etc nagios objects miscomandos cfg e Editar el fichero de configuraci n del host servicio a adiendo el comando al servicio con los par metros deseados define service use generic service host_name monitorlinux service description Swap check_command check_snmp_storage C public m Swap w80 c 90 Descripci n This scripts checks by snmp V1 and v3 disks memory swap everthing in hrStorage table Storages selection can be done by perl regexp on description or index m and optional by storage type q Other Ram VirtualMemory FixedDisk RemovableDisk FloppyDisk CompactDisk RamDisk FlashMemory NetworkDisk One or multiple storages can be selected It is also possible to sum all selected storages s Warning and critical levels can be checked based on Percent of disk used Percent of disk le
205. his Host pee ee of D View Trends For This Host switches pe a e en E View Availability Report For This Host Extra Notes gt View Notifications For This Host 192 168 1 2 E Tactical Overview Host State Information Host Commands Host Status UP for Od 6h 11m 28s ias Status Information ECO OK Paquetes perdidos 0 RTA 2 89 ms S Performance Data rta 2 894000ms 3000 000000 5000 000000 0 0000 faLocate host on m Disable a a checks of this hos o A Re schedule the next check of this host pe a pl 0 80 100 0 E sinfe z Current Attempt 1 10 HARD state x S as i Per Last Check Time 03 11 2011 00 29 07 x Sto Se aes SHS TBS ACTIVE x Disable notifications for this host Check Latency Duration 0 115 4 157 seconds a Send custom host notification F Sche ime for this Schedule downtime for all services on this host X Disable notifications for all services on this host Ta Enable notifications for all services on this host K Schedule a check of all services on this host iy Next Scheduled Active Check Last State Change 02 11 2011 18 20 37 Last Notification 02 11 2011 18 20 37 notification 0 Is This Host Flapping NO 0 00 state change 03 11 2011 00 34 17 4 Fig 56 Opciones para el host Re scheduling de un servicio P g 75 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS y N
206. hot ta ba AAA Gan Fea nan JAJA A A A DN Sea SA A A Es ba 1 3 AAAA lala ta ta o 0 5 wi IIS AA 1 1 E 1 E WA E a o o o o o o o o A Pt PoParhrorhPhorhph hob h 1 UA UA AA FG a SAPS p Pi A EPH G AOHOSOOGODQ_ q_AAAAAAAL AALS AYA LL ALLY ALYY 0 O y wow Saas 3 N z ayas E E seen Gs a TP wher a o tr Sw E E i RHR w 45 46 156 3 2 47 LE 22 33 48 Pa 5 5 4 DD a Sy 9 is Sees Anan TL die 9 9 Die LARES de Bits Anexo VIII rbol de OIDs de la MIB CISCO ASSOCIATION 273 EET E REN ETE T PEATE TE t KPA Lie 27 ds 273 Lidl 2d TEOT ADS EZ S de dia EEIT OSE 273 Lidl AA NL NS es A Ll La ST D RE SE O 0c Te 9 9 273 114 3541 21S Lede Bit Td Bet De 2IZ A RES e PDA Ll Lele sede 30 273343 E TE E PE EE TE IR A PE acl P PE E ILLAS LAT 273 1 1644 Pa es bene E PE LE et PE PP re d 4 1 9 9 273 1 1 4 1 2 tds Br 90273 1 0 64313 4 1 9 9 273 1 1 4 1 4 AA Ll dd da 4 1 9 9 273 1 1 4 1 6 Pec are PE PRL ARAN ke ION pare a O DENIA 952731624401 BIS dido PA TEEPE E 2M Ll dde 273 LL ds FERIE IY SETE EE LIL e ACES PE AZ E JO Ad dG 272d ee Leh EEEIEI TETE ST GM Lyte LO POI SL Al ele LEM ISI Lt le E a ETETE E 4 1 9 9 273 1 2 1 1 14 al dido ada E E TE SE Y 21 de Lido Lider ALIAS Ll e EG E DOO REE Aedes he AO Ae TO 9 2735 Lt Des EL el Lido EE OF Y i 273 LL aan Pc DA E PR OO ES PON Aa
207. ie Network Management Protocol SNMPv2 RFC1445 Administrative Model for version 2 of the Simple Network Management Protocol S5NMPv2 J Galvin K McCloghrie Conformance Statements for version 2 of the Simple Network Management Protocol SNMPv2 PROPOSED STANDARD Textual Conventions for version 2 of the Simple Obsoleted by RFC1903 Network Management Protocol S5NMPv2 PROPOSED STANDARD Structure of Management Information for version 2 of the Simple Network Management Protocol SNMPv2 Obsoleted by RFC1902 HISTORIC pub as PROPOSED Introduction to version 2 of the Internet standard Network Management Framework J Case K McCloghrie M Rose S Waldbusser RFC1420 SNMP over IPX E p A F A A d d E E 5 3 5 5 RFC1419 SNMP over AppleTalk RFC1283 STANDARD iti i fio iii iii P g 161 Septiembre de 2012 RFC1414 RFC1407 RFC1406 ft ft i RFC1382 RFC1381 z a RFC1352 C1351 z MONITORIZACI N DE SERVICIOS Y SISTEMAS Identification MIB Definitions of Managed Objects for the DS3 E3 Interface Type Definitions of Managed Objects for the DS1 and E1 Interface Types SNMP MIB Extension for the X 25 Packet Layer SNMP MIB Extension for X 25 LAPB Definitions of Managed Objects for Administration of SNMP Parties SNMP Security Pro
208. iempo de re General PING OKA 02 11 2011 20 54 14 0d Oh 33m 46s 1 4 ECO OK Paquetes perdidos 0 RTA 2 57 ms Home Root Partition OKM 02 11 2011 20 53 34 5d 21h 28m 30s 1 4 DISK OK free space 6190 MB 68 inode 73 Documentation SSH 02 11 2011 20 54 55 Od 2h 36m 34s 1 4 SSH OK OpenSSH_5 8p1 Debian tubuntu3 protocolo 2 0 Current Swap Usage KE 02 11 2011 20 56 15 5d 21h 31m 23s 1 4 SWAP OK 98 free 498 MB out of 509 MB Status a 02 11 2011 20 57 36 5d 21h 30m 20s 1 4 PROCS ACEPTAR 61 procesos con ESTADO RSZDT h oe portatil PING OKA 02 11 2011 20 53 25 0d Oh 34m 35s 1 4 ECO OK Paquetes perdidos 0 RTA 1 46 ms werview Map speedtouch Sy PING ORI 02 11 2011 20 55 46 0d 0h 22m 14s 1 3 ECO OK Paquetes perdidos 0 RTA 3 69 ms Hosts Port 4 Services Bandwidth al 06 5d 20h 3m 10s 3 3 check_mrtgtraf Imposible abrir el archivo de registro MRTG Host Groups Usage Port 4 Link FE 5G Error de orden externa MIB search path i Status a ESOS es home alumno samplmibs usr share mibs site lusr share samp mibs sa Uptime GRIMICAIINN 02 11 2011 20 53 57 5d 20h 0m 29s 3 3 Service Check Timed Out Se e Groups zyxel gt PING 02 11 2011 20 55 22 0d 0h 22m 38s 1 3 ECO OK Paquetes perdidos 0 RTA 3 08 ms Port 4 Bandwidth uno 6 1 2011 20 50 47 0d 0h 21m 13s 3 3 check_mrtgtraf Imposible abrir el archivo de registro MRTG Usage E Port 4 Link S Error de orden externa MIB search path i Status DOM 02 11 2011
209. ier Converts rate per second For example set to 60 to convert to per minute s string 5TRING Devuelve un estado OK para esta OID si CADENA coincide exactamente E Sreg REGEX Return OK state for that OID if extended regular expression REGEX matches R eregi REGEX Return OK state for that OID if case insensitive extended REGEX matches invert search Invert search result CRITICAL if found 1 label STRING Prefix label for output from plugin u units STRING Etiqueta s de unidades para datos de salida p ej seg D output delimiter STRING Separates output on multiple OID requests t timeout INTEGER Seconds before connection times out default 10 e retries INTEGER NA mero de intentos a usar en las peticiones v verbose Show details for command line debugging Nagios may truncate output This plugin uses the snmpget command included with the NET SNMP package Si no tiene el paquete instalado necesitarAj descargarlo desde http net snmp sourceforge net antes de usar este complemento Notas Multiple OIDs may be indicated by a comma or space delimited list lists with internal spaces must be quoted Maximum 8 OIDs 56e http nagiosplug sourceforge net developer guidelines html THRESHOLDFORMAT for THRESHOLD format and examples Cuando se comprueban mA ltiples OID separe los rangos con comas como A w 1 10 1 20A Note that only one string and one regex may be checked
210. imple Network Management Protocol SNMPv3 U Blumenthal B January Wijnen 1998 Obsoleted by PROPOSED RFC2274 STANDARD a SNMPv3 Applications ASCII PROPOSED STANDARD D Levi P Meyer January Obsoleted by RFC2273 ASCII PROPOSED STANDARD Message Processing and Obsoleted by RFC2272 Dispatching for the 1998 Simple Network Management Protocol SNMP g NO gl 8 fed R lt An Architecture for Describing SNMP Management Frameworks PROPOSED STANDARD D Harrington R Presuhn B January ASCII Obsoleted by RFC2271 G G ASCII Agent Extensibility M Daniele B January AgentX Protocol Wijnen D 1998 Version 1 Francisco Obsoleted by RFC2741 PROPOSED STANDARD ASCII Network Services Monitoring MIB N Freed S Kille PROPOSED STANDARD Obsoletes REC1565 Obsoleted by RFC2788 January 1998 RFC2089 V2ToV1 Mapping B Wijnen D Levi January SNMPv2 onto SNMPv1 1997 within a bi lingual SNMP agent ASCII Obsoleted by INFORMATIONAL RFC2576 O 8 Entity MIB using SMIv2 K McCloghrie A October Bierman 1996 ASCII Obsoleted by REC2737 PROPOSED STANDARD MAA RFC2013 SNMPv2 Management K McCloghrie Ed November ASCII Obsoleted by PROPOSED Information Base for the RFC4113 STANDARD User Datagram Protocol Updates using SMIv
211. ion Status Information null CSMA SYSMAN null SYSMAN SYSMAN SYSMAN DBSNMP SYSMAN DBSNMP null null SYSMAN null null null null null null null null null null null Performance Data Current Attempt 1 4 HARD state Last Check Time 15 06 2012 17 30 32 Check Type ACTIVE Fig 92 Resultado de Oracle users El servicio que se utiliza se define como define service use local service 7 Name of service template to use host_name oracleserver service description Usuarios oracle check _command check users oracle Utiliza el comando check_users_oracle define command command_name check_users_oracle command_line java classpath usr local nagios libexec check_users_oracle 10 36 32 10 1521 orcl CSMA CSMA 70 100 Este nuevo comando creado utiliza el programa Java check_users_oracle que se incluye de forma completa en el anexo XI Para optimizar este commando se deberian quitar algunos null y los usuarios de sistema Tambi n hay que tener en cuenta que algunos usuarios como por ejemplo CSMA es un usuario de una aplicaci n 9 3 Mysql Al igual que en Oracle este gestor permite verificar muchos de los par metros que antes se han identificado como cr ticos Sin embargo Oracle se utiliza mucho m s en los servicios por lo que el trabajo se ha centrado en dicha herramienta Adem s de ver el estado de las tablas el espacio en disco o memoria tambi n se puede monitorizar el estado del servi
212. ipt ccmHelp index html Fig 105 Ventana del Cisco Service Configuration Seleccionar el servidor y comprobar que est n activados los servicios en concreto el Cisco RIS Data Colector que es el encargado de enviar la informaci n de configuraci n cuando se interrogue al Call Manager P g 110 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS E Cisco CallManager 4 0 Serviceability Service Activation Microsoft Internet Explorer File Edit view Favorites Tools Help SBak gt Q A Qsearch Favorites meda lt 4 hr S Address E http 210 0 0 2 CCMService serviceconfig asp NodelD 47AE8FBES B6DE 4889 4782 32EFD448F8BB gf 210 0 0 2 Status Ready Update Set Default Service Name Activation Status NT Service WV Cisco CallManager Activated VW Cisco Tftp Activated WV Cisco Messaging Interface Activated W Cisco IP Voice Media Streaming App Activated VV Cisco CTIManager Activated WW Cisco Telephony Call Dispatcher Activated W Cisco MOH Audio Translator Activated WM Cisco RIS Data Collector Activated Mo Cisco Database Layer Monitor Activated Cisco CDR Insert Activated f Cisco CTL Provider Activated Cisco Extended Functions Activated WV Cisco Serviceability Reporter Activated Tomcat Web Service TP Cisco WebDialer Deactivated TO Cisco IP Manager Assistant Deactivated m Cisco Extension Mobility Deactivated Note While deactivating a service make sure to deactivate al
213. isholm D November ASCII Perkins 2005 Septiembre de 2012 P g 152 MONITORIZACI N DE SERVICIOS Y SISTEMAS RFC4188 Definitions of Managed K Norseth Ed E September ASCII Obsoletes Objects for Bridges Bell Ed 2005 REC1493 Errata Entity MIB Version 3 A Bierman K August 2005 ASCII Obsoletes McCloghrie RFC2737 Errata Management S Green K ASCII Information Base for Ozawa E Data Over Cable Service Cardona Ed A Interface Specification Katsnelson Middlebox M Barnes Ed June 2005 ASCII INFORMATIONAL Communications MIDCOM Protocol Evaluation Uniform Resource June 2005 ASCII Identifier URI Scheme Management W Sawyer April 2005 ASCII Information Base for Data Over Cable Service Interface Specification DOCSIS Cable Modem Termination Systems for Subscriber Management DOCSIS Cable Modems and Cable for the Simple Network Management Protocol Policy Based S Waldbusser J March 2005 ASCII Management MIB Saperia T Hongal RFC4133 RFC4131 Systems for Baseline Privacy Plus RFC4097 Modem Termination RFC4088 SNMP RFC4036 RFC4011 The Advanced Encryption Standard AES Cipher Algorithm in the SNMP User based Security Model U Blumenthal F June 2004 ASCII RFC3806 Printer Finishing MIB June 2004 ASCII INFORMATIONAL RFC3805 Printer MIB v2 R Bergman H June 2004 ASCII Lewis I McDonald
214. isi n y control de la red Aunque algunas organizaciones por su tama o nunca necesitar n crear un centro o departamento independiente las funciones y distribuci n de responsabilidades que involucran tendr n que asignarse igualmente a uno o varios administradores P g 19 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Hoy en d a no hay ninguna excusa ni siquiera de car cter econ mico para no disponer de una plataforma de gesti n de red y algunos recursos humanos dedicados a la misma La siguiente figura muestra una distribuci n aproximada de los recursos dedicados a la gesti n de red La mayor partida de recursos est asociada al gasto corriente La p rdida de servicio o ineficiencia del mismo tambi n se pueden contabilizar como gasto 100 90 i 80 70 60 50 4 29 40 330 30 ca erry 20 Y 0 oe di 0 l i r y Gasto Personal Amortizaci n P rdidas Corriente Servicio Fig 2 Distribuci n del gasto en un centro de gesti n de red Aunque depender del nivel de la organizaci n el personal asociado al servicio suele tener los siguientes perfiles e Operadores Suelen ser usuarios poco cualificados entrenados para detectar problemas simples y concretos s lo supervisi n Suelen dar el servicio de soporte a usuarios o helpdesk e Administradores Son personal de mayor cualificaci n con capacidad para resolver determinados prob
215. k _overcr check time alumno nagios usr local nagios libexec check ping H 192 168 1 120 w 3000 0 80 c 5000 0 100 p 5 ECO OK Paquetes perdidos 0 RTA 189 82 ms rta 189 822998ms 3000 000000 50 00 000000 0 000000 pl 0 80 100 0 alumno nagios usr local nagios libexec Z Fig 34 Comandos de Nagios plugins P g 60 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 6 3 Comprobaci n de la configuraci n de Nagios Siempre es recomendable la comprobaci n de la configuraci n de Nagios antes de arrancar la herramienta Esta comprobaci n de puede realizar con la opci n v alumno nagios usr local napios bin Archivo Editar Ver Buscar Terminal Ayuda alumnognagios usr local nagios bin sudo nagios v etc nagios nagios cfg Nagios Core 3 3 1 Copyright c 2009 2011 Nagios Core Development Team and Community Contributors Copyright c 1999 2009 Ethan Galstad Last Modified 07 25 2011 License GPL Website http ww nagios org Reading configuration data Read main config file okay Processing object config file etc nagios objects commands cfg Processing object config file etc nagios objects contacts cfg Processing object config file etc nagios objects timeperiods cfg Processing object config file etc nagios objects templates cfg Processing object config file etc nagios objects localhost cfg Read object config files okay Running pre flight
216. l tema que como se puede observar es amplio y profundo Esperamos que tanto los socios como cualquier lector interesado que tenga oportunidad de acceder al documento le resulte de utilidad Queremos tambi n animaros a reportar al correo de la asociaci n aiiscyl gmail com las mejoras y sugerencias que nos permitan mantener vivo el documento enriquecer su contenido y publicar futuras versiones mejoradas y ampliadas Juan F Nieto presidente de AUSCYL P g 13 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 2 OBJETIVOS DEL CUADERNO T CNICO Este cuaderno t cnico sobre gesti n de red se ha realizado para que sea un documento til en el que los administradores de sistemas puedan entender los principios b sicos de la gesti n de red y sobre todo disponer de una gu a pr ctica para desplegar una plataforma de gesti n de red En concreto pretende cubrir los siguientes objetivos Conocer qu es la gesti n de red y cu les son sus funciones Comprender la importancia de la existencia de un centro de gesti n de red Aprender las caracter sticas b sicas de los modelos de gesti n de red en especial del modelo de gesti n en Internet Conocer la estructura y funcionamiento del protocolo SNMP y de RMON Conocer las principales plataformas de gesti n de red disponibles en el mercado Instalar y configurar correctamente una plataforma de gesti n de red Identificar las necesidades de ge
217. l de Nagios para acceso a actualizaci n Aparecer otra p gina en la que se obtendr la informaci n correspondiente m Eea LA E http www nagios org checkforupdates versic O B X 83 Nagios Nagios Update Ch AR 8 Archivo Edici n Ver Favoritos Herramientas Ayuda da E RFC4113 E Internet Drafts and RFCs E BEREC Body of Europea Sitios sugeridos 2 M s complementos y jj Traductor de Google m Empleo P blico ECYL P Portal de Salud de la Junta Network Enterprise Support Library Labs Exchange A opengear Embedded Nagios Checks Whats New Download Conference Nagios Home News Products Documentation Support Projects About Get Involved Home Nagios Update Check Nagios Update Check Print E mail Up To Date Your installation of Nagios Core 3 3 1 is up to date so no upgrade is required The latest version of Nagios Core is 3 3 1 was released on 2011 07 25 60 Contact Us Phone 1 888 NAGIOS 1 Email sales nagios com Stay Informed E sues Subscribe To Our Newsletter EY SafeSubseribe Support Get help with community and commercial support options Learn More gt Awards ona Network onal Nagios Enterprises Nagios About Company Info Contact Us Nagios Library pos Te Ti Nagios Support jagios Legal Terms of Use Privacy Policy Trademarks ae ms Nagios Exchange Nagios Ideas A AT a AA Fig 50 Pan
218. l inherit all variables that are defined 7 in or inherited by the linux server host template definition host_name moodle alias servidor moodle address 192 168 1 115 Define a service to ping the local machine define service use local service 7 Name of service template to use host_name moodle service description PING check_command check ping 100 0 20 500 0 60 P g 128 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Hay que tener en cuenta que en el fichero localhost cfg ya hay definido un grupo que se puede utilizar para incluir estas m quinas define hostgroup hostgroup name Jlinux servers The name of the hostgroup alias Linux Servers Long name of the group members localhost moodle 7 Comma separated list of hosts that belong to this group Este tipo de monitorizaci n no requiere la instalaci n de ning n agente adicional en la m quina a monitorizar Si se quiere monitorizar una m quina remota hay varias soluciones La primera consiste en la instalaci n del software NRPE Nagios Remote Plugin Executor La siguiente figura muestra la arquitectura software de este plugin Monitoring Host Remote Linux Unix Host Fig 128 Monitorizaci n remota v a NRPE La segunda posibilidad es utilizar el comando check_by_ssh Este comando tambi n permite consultar informaci n de forma remota pero consume m s recursos de cpu en la m quina donde est instalado Nagios La tercera
219. l of the services that are dependent on this service Please refer to on line help for service dependencies for single server and multi server configuration Y ETT E internet a Astart 4 8 151 cisco CallManager 4 0 HP 14 45 Fig 106 Ventana de activaci n de servicios del Call Manager En el men Trace Configuration se desplegar n los servicios a configurar 3 Cisco CallManager Serviceal Trace Configuration Microsoft Internet Explorer File Edit View Favorites Tools Help a Back gt A A Qsearch Favorites meda A S Address El http 210 0 0 2 CCMService traceconfig asp X Eao Links Alarm r Application Trace Configuration Current Server 210 0 0 2 al 210 0 0 2 Status Ready Configured Services Cisco Database Layer Monitor Cisco Extended Functions Cisco IP Voice Media Streaming App Cisco Messaging Interface Cisco MOH Audio Translator isco Telep ony Call Dispatcher Cisco Tttp z E Done EE Start lj geo E cisco CallManager 4 0 Fig 107 Men Trace Configuration Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Comprobar que est n activados los servicios de SNMP 3 Cisco CallManager 4 0 Serviceability Trace Configuration Microsoft Internet Explorer File Edit View Favorites Tools Help Back gt A A Asearch Favorites Ameda 4 B Ey Address a http 210 0 0 2 CCMService traceconfig asp Go Links F Tool
220. ledDeviceName LB LATE AUTO 12106 3 ccmMaliCallCallingPartyName LB AID 1 10 14 ccmMaliCallCallingPartyNumber Ls LILIA LALO do ccmMaliCallCallingDeviceName MES ILL AOL TO 10 ccmMaliCallTime WEIL AE DEY Ds 9 156 ds LOS LR ccmQualityRprtSourceDevName LO LAI LLO ccmQualityRprtClusterld WL A AO E LOO dk 10 LOH ccmQualityRprtCategory Mes Sl DIES LLO 201 ccmQualityRprtReasonCode Ls dd LLL TO LL ccmQualityRprtTime A Feds AN ccmTLSDevName NP TE E NE EN RAS ccmTLSDevInetAddressType ULE Seb PE E IE MOS EL POE IS E 10524 ccmTLSDevInetAddress WEL Eset E di Qi Os LOO IR 258 comTLSConnFailTime UT 36 604 84129 9 15665 O JO ccmTLSConnectionFailReasonCode ML td III Ls L027 ccmGatewayRegFailCauseCode is 30 DL G6 LOS Til 0 28 ccmH323DeviceTable T3864 Lita Ls De IET Ls DA ccmH323DeviceEntry US TI PIE PE E EN DI E a ccmH323DevIndex E EE TAC PE E SE a ie IS Lied PE Gad ccmH323DevName h E LL dd DT dee ccmH323DevProductld ML dd De OS LOO LAT LS ccmH323DevDescription Md Lie BO ADO E E E LD ccmH323DevInetAddressType iS IDO Ls dedo ccmH323DevInetAddress Ml Li DILO de TE Ts 126 ccmH323DevCnfgGKInetAddressType 133 601 401 909 2565101901000 ccmH323DevCnfgGKInetAddress Te Oe EN ERES PE E E 6 1 TE 1 DP ccmH323DevAl1tGKl1InetAddressType ETETE S E RADO Ls LE hd ccmH323DevAltGKlInetAddress DILE LSD ALDO LA des LON ccmH323DevAltGK2InetAddressType MC Ls RADO dd din ccmH323DevA1tGK2InetAddress
221. lemas Sus funciones son Control de operadores Gestion de inventario Gesti n de seguridad claves Gesti n de configuraciones e Analistas Perfil del personal con capacidad para enfrentarse a nuevos problemas Tambi n se encargan de la preparaci n de procedimientos y el an lisis de la calidad de servicio Intervienen en los redise os de red e Planificadores Son el enlace entre la parte t cnica y ejecutiva Se encargan de establecer la pol tica de telecomunicaciones y la de costes y presupuestos 3 6 Elementos de un sistema de Gesti n de Red Los distintos elementos que componen un sistema de gesti n de red son e Elementos gestionables PC SAI dispositivos de red etc Hoy en dia pr cticamente cualquier dispositivo es gestionable o se le puede acoplar un m dulo externo que lo permita Gestores de elementos P g 20 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Agentes software Peque os programas que consumen pocos recursos y que corren en los dispositivos a gestionar Bases de informaci n Modelo de conocimiento que utiliza el sistema de gesti n de red para llevar a cabo sus funciones Hoy en d a los sistemas de gesti n integran e Interfaces de usuario Servicios de presentaci n de datos visualizaci n gr fica de datos en tiempo real estad sticas etc tanto para desktops como dispositivos port tiles smartphones e Aplicaciones de gesti n e Bases
222. lumno nagios snmp mibs h Archivo Editar Ver Buscar Terminal Ayuda alumno nagios snmp mibs snmpwalk v1 cpublic 192 168 1 5 ifSpeed 1 IF MIB ifSpeed 1 Gauge32 10000000 alumno nagios snmp mibs snmpget v1 Of cpublic 192 168 1 5 ifSpeed 1 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed 1 Gauge32 10000000 alumno nagios snmp mibs Fig 76 Salida con y sin detalle de snmpwalk con par metro fijado 8 2 Plugins SNMP de Nagios16 8 2 1 Plugin check_snmp Este plugin comprueba valores de OIDs utilizando el protocolo SNMP M s adelante en esta memoria se detallan servicios que se pueden configurar con este comando Puesto que es un comando muy utilizado se adjunta la salida de la ayuda del comando check_snmp h check_snmp v1 4 15 nagios plugins 1 4 15 Copyright c 1999 2007 Nagios Plugin Development Team lt nagiosplug devel lists sourceforge net gt Comprueba el estado de mAjquinas remotas y obtiene informaciA n del sistema vA a SNMP Usos check snmp H lt ip address gt o lt OID gt w warn_range c crit_range C community s string r regex R regexi t timeout e retries 21 label u units p port number d delimiter D output delimiter zm miblist l P snmp version L seclevel U secname a authproto A authpasswd x privproto X privpasswd Options Sly Print detailed help screen V version Print version information H
223. mber ASCII 2002 Protocol SNMP RFC5343 Simple Network D Levi P Meyer December ASCII Management Protocol B Stewart SNMP Applications Management RFC5590 User based Security U Blumenthal B December ASCII Obsoletes STANDARD Model USM for version Wijnen REC2574 3 of the Simple Network Updated by Management Protocol RFC5590 SNMPv3 STANDARD Frameworks Obsoletes STANDARD RFC2572 Updated by RFC5590 Message Processing and Dispatching for the Simple Network Management Protocol SNMP jit Obsoletes STANDARD RFC2573 N N S N N View based Access B Wijnen R December ASCII Obsoletes STANDARD Control Model VACM Presuhn K 2002 REC2575 for the Simple Network McCloghrie Management Protocol SNMP Version 2 of the Protocol R Presuhn Ed December ASCII Obsoletes STANDARD Operations for the 2002 RFC1905 Simple Network Management Protocol SNMP STD0062 Transport Mappings for R Presuhn Ed December ASCII Obsoletes STANDARD RFC3417 the Simple Network 2002 RFC1906 Management Protocol Updated by SNMP REC4789 RFC5590 Management R Presuhn Ed December ASCII STANDARD Information Base MIB 2002 for the Simple Network Management Protocol SNMP STD0050 Reserved for Definitions ASCII Errata icp 4 y of Managed Objects for the Ethernet like Interface Types See RFC 3
224. mbre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Manager agent request response Una entidad SNMPv2 actuando como gestor env a una petici n a una entidad SNMPv2 actuando como agente sta responde con una confirmaci n Se utiliza como en SNMPvl pero con confirmaci n Manager manager request response Una entidad SNMPv2 actuando con el rol de gestora env a una petici n a otra actuando con el mismo rol sta devuelve una respuesta Este tipo se utiliza para notificar el rol de manager entre estas entidades Agent manager unconfirmed Una entidad SNMPv2 actuando como agente env a un mensaje no solicitado trap a una entidad gestora sin enviar respuesta Se utiliza para notificar a la estaci n gestora un evento en el dispositivo monitorizado SNMPv2 incluye una nueva MIB manager to manager MIB que permite utilizar tablas para controlar eventos disparados por diversas circunstancias Otra ventaja de SNMPv2 es que a ade la primitiva GetBulk que permite aumentar el volumen de datos que se pueden transferir en una PDU reduciendo as el excesivo n mero de PDU de SNMP que se enviaban en la versi n 1 Tambi n optimiza la primitiva Get La primitiva GetBulk permite enviar tablas de datos operaci n que antes se deb a hacer utilizando una primitiva por fila 4 5 SNMPv3 SNMPv2 ampl a SNMPv1 pero no a ade seguridad al protocolo Por este motivo se desarroll SNMPv3 normalizado originalmente en RFC2271 a RFC2275
225. motMicFailures cd11IfCipherTkipCounterMeasInvok cd11IfCipherCcmpReplaysDiscarded cd11IfCipherTkipReplaysDetected cDot11ClientConfigInfoTable cDot11ClientConfigInfoEntry cDot11ClientAddress cDot11ClientParentAddress cDot11ClientRoleClassType cDot11ClientDevType cDot11ClientRadioType cDot11ClientWepEnabled cDot11ClientWepKeyMixEnabled cDot11ClientMicEnabled cDot11Client PowerSaveMode cDot11ClientAid cDot11ClientDataRateSet cDot11ClientSoftwareVersion cDot11ClientName cDot11ClientAssociationState cDot11ClientIpAddressType cDot11ClientIpAddress cDot11ClientVlanId cDot11ClientSubIfIndex cDot11ClientAuthenAlgorithm cDot11ClientAdditionalAuthen cDot11ClientDot1xAuthenAlgorithm cDot11ClientKeyManagement cDot11ClientUnicastCipher cDot11ClientMulticastCipher cDot11ClientDevObjectID cDot11ClientNewKeyManagement cDot11ClientStatisticTable cDot11ClientStatisticEntry cDot11ClientCurrentTxRateSet cDot11ClientUpTime cDot11ClientSignalStrength cDot11ClientSigQuality cDot11ClientAgingLeft EEE TER TT a Stein EEEO ER E Se 7 7 7 m7 7 1 3 1 7 1 1 1 1 1 7 7 7 m7 7 7 1 1 4 1 1 1 4 1 1 1 1 Ww Ww Ww a ha Ww Ww WwW ww DORA Ww WW y ln DNANAD HHH HR Ww W Uy Ww Ww ly DANAAAND HHH HR fon fon ha fon D D um ha kh
226. mp WW WW ww W W DADHALAADAL SY AAADAAHAAAAAAGD Ww o kh www Pa DARL LADD LO Ww aA LS Eo a RK As DADAHARL ALLY Ww Www DOM kika kk RR to o hit hh OHO Roa da bs bs bs e e es es lo o o Oh KH Septiembre de 2012 baba da e des des bs bs e fo bes es ha ES HR Quan ta GN Ww bh ha ROR RRR RR amp amp amp WW 6g ig amp amp WW amp boda da bs bs bs e e bs e bs a y py e bs bs es wake Ave kh aa 5 Gn gn gn LO PS 9 9 156 LL 1 5 14 rE EORR E PE A d E PE ELE 9 9 156 9 9 156 na Di ee rey Y 9 9 156 9 9 156 CL E Ee N DR LSC 9 9 156 Di G15 6 BS Teac ree ol Ny LD 6 651 A Odo hs ao Es Treg hh hw Ra a a So ba ta a a BR YORK bin 156 156 156 156 Li Le 156 00101010 ha 6 6 eg De ppa 6 9 156 ia 9 39 29 6 di P56 ST EE LS TIO AS A RP T5601 33 Lis 4 1 9 9 156 Poet ds Ls De BEN OG 156 4 1 9 9 156 4 1 9 9 156 4 1 9 9 156 4 1 9 9 156 RS Fe ka Ace sh MESS 641 aed BEM OG LO 4 1 9 9 156 4 1 9 9 156 Bs DO PE DG 4 1 9 9 156 4 1 9 9 156 4 1 9 9 156 4 1 9 9 156 Bie 9 9 136 4 1 9 9 156 4 1 9 9 156 4 1 9 9 156 LSP Sd TO Lie ETOR R A 4 1 9 9 156 A O15 Ge 4 1 9 9 156 THe A 41199 156 4 1 9 9 156 4 1 9 9 156 4 1 9 9 156 SEE PA AAC cd 4 1 9 9 156 4 1 9 9 156 4 1 9 9 156 4 1 9 9 156 Li ed ER IDE PP 1 3 6 1 4 1 E A 9156 4 1 9 9
227. ms https ftps compress zlib compress bzip2 php file glob data http ftp phar zip Registered Stream Socket tcp udp unix udg ssl ssiv3 ssiv2 tis Transports Registered Stream Filters zlib bzip2 convert iconv string rot13 string toupper string tolower sstring strip_tags convert consumed dechunk lt lt at ot 1 ee Fig 20 Pagina de informacion de PHP5 Nagios https direccionIP nagios Go 192 168 1 109 nagios Nagios Core Archivo Edici n Ver J El BEREC Body of Europea Eavoritos Herramientas Sitios sugeridos S M s complementos y 3 Traductor de Google my Empleo P blico ECYL P Ayuda Portal de Salud de la Junta E Ministerio de Industria Tu X Revista Ciencia e Ingenieri Nagios Core E Nagios Core Y Overvi Version 3 3 1 July 25 2011 m ilability Trends Get Started Start monitorin our infrastructure Change the look and feel of Nagios Extend Nagios with hundreds of addons Check for updates Don t Miss N a OS Atend the Nagios World Conference September 27th World Conference North America Get support sah Rob 8 A Get training Try the new Nagios V Shell interface Get certified Monitor business processes with the new Nagios BP addon Quick Links Latest News Nagios Library tutorials and docs Nagios Labs developme
228. n will monitor used on drives warn if used gt warn and critical if used gt crit v verbose print extra debugging information and lists all storages h help print this help message H hostname HOST name or IP address of host to check C community COMMUNITY NAME community name for the host s SNMP agent implies SNMP v1 2 V20 P g 146 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Use snmp v2c 1 login LOGIN x passwd PASSWD Login and auth password for snmpv3 authentication If no priv password exists implies AuthNoPriv X privpass PASSWD Priv password for snmpv3 AuthPriv protocol L protocols lt authproto gt lt privproto gt lt authproto gt Authentication protocol md5 sha default md5 lt privproto gt Priv protocole deslaes default des x passwd PASSWD Password for snmpv3 authentication p port PORT SNMP port Default 161 m name NAME Name in description OID can be mounpoints home or Swap Space This is treated as a regexp m var will match var var log opt var Test it before because there are known bugs ex trailling No trailing slash for mountpoints q storagetype Other Ram VirtualMemory FixedDisk RemovableDisk FloppyDisk CompactDisk RamDisk FlashMemory NetworkDisk Also check the storage type in addition of the name It is possible to use regular expressions FixedDisk FloppyDisk r noregexp Do not u
229. ncionalidad o el control sobre los ya gestionados P g 15 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 3 INTRODUCCI N A LA GESTI N DE RED 3 1 Definiciones Desde el punto de vista de la gesti n de red es necesario distinguir claramente los conceptos de supervisi n y de control e La supervisi n consiste en conocer el estado actual de la red desde un puesto Esta funci n es equivalente a monitorizar el estado de la red No se ejerce ninguna acci n de control como mucho se activa una alarma o se avisa a la persona correspondiente El control es la capacidad de detecci n de errores y su correcci n Implica la configuraci n de equipos de forma remota Es una funci n de gesti n de red mucho m s completa y compleja ya que involucra la participaci n de recursos humanos y la reconfiguraci n de dispositivos 3 2 Justificaci n La gesti n de red tuvo su origen en la necesidad de automatizar todos los procesos de supervisi n y control de las redes La filosof a que subyace debajo de la gesti n de red ha tenido tanto xito que hoy en d a se ha extendido para gestionar tambi n servicios y aplicaciones A menudo las herramientas y plataformas de gesti n de red disponibles en el mercado como el caso de Nagios o HP Openview permiten tanto la gesti n de dispositivos de red como servicios y aplicaciones Esta situaci n conlleva que tanto los administradores de la red como los de sistemas tengan
230. ncionalidad para filtrar en funci n del cambio de valor de un objeto desde la ltima vez que se sonde 4 4 SNMPv2 Uno de los problemas m s graves con los que se ha identificado al protocolo SNMP es su falta de seguridad En efecto este protocolo ha sido uno de los agujeros de seguridad m s importantes ya que el uso de nombres de comunidad y mensajes en texto plano es una t cnica muy insegura Al igual que otros protocolos en sus inicios los desarrolladores estuvieron m s preocupados por la funcionalidad o las prestaciones que en la seguridad que por entonces no era un problema tan acuciante como en la actualidad En la versi n 1 la arquitectura es totalmente centralizada Una estaci n gestora s lo se comunica con los agentes por lo que se genera mucho tr fico hacia la estaci n que adem s es responsable de una carga de procesamiento considerable Con SNMPv2 la arquitectura puede ser distribuida pudiendo haber varias estaciones gestoras que se comuniquen entre s SNMPv2 extiende la funcionalidad de SNMP para Incluir gesti n basada en OSI CMIP over TCP Ampliar su capacidad introduciendo nuevas definiciones de objetos tablas notificaciones y m dulos de informaci n Las PDUs de SNMPv2 pueden ser encapsuladas en mensajes SNMPv1 y SNMPv3 Con respecto al protocolo SNMPv2 hay tres tipos de acceso a la informaci n de gesti n Solamente es nuevo en SNMPv2 el segundo tipo de comunicaci n P g 34 Septie
231. nd line SUSER1 check_tcp H HOSTADDRESS p SARGIS w SARG2 c SARG3 7 SARG1S port 7 SARG2Z warning 7 SARG3 critical El fragmento de c digo modificado del script snmp_process en Perl es el siguiente usr bin perl w PARAR AAA RARA RARA RA MARA RARA RAR Check snmp process HH RARA thet my Version 1 10 Date Oct 12 2007 Author Patrick Proy patrick at proy dot org Help http nagios manubulon com Licence GPL http www fsf org licenses gpl txt Contrib Makina Corpus adam At greekattic d0t com P g 94 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS TODO put o delta as an option If testing on localhost selects itself AMARA MARA RARA RARA RARA RARA RARA RARARAD ARA RARA RARA AAA dd dd ddd ddd dee help check_snmp_ process h use strict use Net SNMP use Getopt Long IAMAMA MAMA RARA A BASE DIRECTORY FOR TEMP FILE my o base dir tmp tmp Nagios proc my file history 2000 number of data to keep in files my delta_of time to make average 300 5minutes by default Nagios specific my STIMEOUT 15 my STIMEOUT 70 Como ejemplo pr ctico se puede consultar el fichero de configuraci n completo para la gesti n de pacientes en el anexo VI El resultado es el de la figura siguiente Host Status Totals Service Status Totals so aca Pei o mio tn cial Pe ae ai econ per E Ec Current Network Status Last Updated Mon Jun
232. neric service informatica CPU Load check_nt CPULOAD 1 5 80 90 Create a service for monitoring memory usage Change the host_name to match the name of the host you defined above define service use hostgroup_name service description check_command generic service informatica Memory Usage check_nt MEMUSE w 80 c 90 Create a service for monitoring C disk usage Change the host_name to match the name of the host you defined above define service use hostgroup_name service description check_command define service use hostgroup_name service description check_command generic generic service informatica C Drive Space check_nt USEDDISKSPACE 1 c w 80 c 90 service Inherit values from a template informatica Fuente Redundante Redundant PoWer Supply define service use hostgroup_name service description check_command Temperature define service use hostgroup_name service description check_command Temperature define service use hostgroup_name service description check_command Fan Status define service use hostgroup_name service description check_command Status generic generic generic generic check_snmp C SACYLCom Q 1 3 6 1 4 1 232 6 2 9 1 0 w 3 c 4 1 service Inherit values from a template informatica Temperatura externa check_snmp C SACYLCom o 1 3 6 1 4 1 232 6 2 6 1 0 w 3 c 4 1 extern
233. net mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed 100000000 iso org dod internet mgmt interfaces ifTable ifEntry ifSpeed 4294967295 iso org dod internet mgmt interfaces ifTable ifEntry ifSpeed 1000000000 iso org dod internet mgmt interfaces ifTable ifEntry ifSpeed 1000000000 iso org dod internet mgmt interfaces ifTable ifEntry ifSpeed 1000000000 alumno nagios snmp mibs 0 O un YN iu bow we we one Fig 74 Filtrado de la salida de snmpwalk Lx alumno nagios snmp mibs h Archivo Editar Ver Buscar Terminal Ayuda alumnoG nagios snmp mibs snmpwalk v1 On cpublic 192 168 1 5 ifSpeed 1 1 3 6 1 2 1 2 2 1 5 1 Gauge32 10000000 alumno nagios snmp mibs snmpwalk v1 Of cpublic 192 168 1 5 ifSpeed 1 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed 1 Gauge32 10000000 alumno nagios snmp mibs Fig 75 Salidas con detalle del comando snmpwalk con par metro fijado P g 84 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS a
234. nherit values from a template hostgroup_name informatica service description Temperatura Interna check_command check _snmp C SACYLCom o 1 3 6 1 4 1 232 6 2 6 3 0 w 3 c 4 1 internal Temperature define service use generic service Inherit values from a template hostgroup_name informatica service_description Estado Ventilador Sistema check_command check_snmp C SACYLCom o 1 3 6 1 4 1 232 6 2 6 4 0 w 3 c 4 1 System Fan Status define service use generic service Inherit values from a template hostgroup_name informatica service_description Estado Ventilador CPU check_command check_snmp C SACYLCom o 1 3 6 1 4 1 232 6 2 6 5 0 w 3 c 4 1 CPU Fan Status Create a service for monitoring the System Up Yime define service use generic service hostgroup_name informatica service description SNMP SysUpTime check_command check _snmp C SACYLCom o 1 3 6 1 2 1 1 3 0 1 System Up Time 12 3 Anexo III Sintaxis comando check_snmp_storage SNMP Disk Monitor for Nagios version 1 3 3 c 2004 2007 Patrick Proy Usage check_snmp_storage v H lt host gt C lt snmp_community gt 2 l login x passwd X pass L lt authp gt lt privp gt p lt port gt m lt name in desc oid gt q storagetype w lt warn_level gt c lt crit_level gt t lt timeout gt T pllpulbllbu r s i G e S 0 1 1 lt car gt o lt octet_length gt R lt reserved gt By default plugi
235. nmp mibs alumnoGnagios snmp mibs Fig 113 Ejemplo de utilizaci n primitiva sampgetnext x alumno nagios snmp mibs Archivo Editar Ver Buscar Terminal Ayuda alumno nagios snmp mibs snmpwalk v1 Of cpublic 192 168 1 5 grep ifSpeed iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 10000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 100000000 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 4294967295 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed Gauge32 100000
236. nmp storage vl datos ifx 90 95 r G Define a service to check if process exist Proceso Oninit comando check_snmp_process_lento define service use generic service Name of service template to use host_name pacientes service description IFX Proceso Oninit check_command check_snmp_process_lento oninit 0 0 r Define a service to check if process exist Proceso in telnetd comando check_snmp_process_lento define service use generic service 7 Name of service template to use host_name pacientes service description Telnet Sesiones activas check_command check snmp process lento in telnetd 0 0 r AMARA RA NARA HEHEHE AEA AEE AEE AEA AEH Ea EE Ee ANARARANARA HHHPHHEH AEH DAA RAM AAA RAM RARA ARA RAMA RARA Aa EEE EEA EA EE Ea Ee ANA TETEE EEE P g 164 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS SERVICE DEFINITIONS HHHPHH EHH EH AEE EEA EEA AEE AEA AAA AEE Ea EE A EE A EE EE BE AMAMA RARA RA RAMA EEE HAE EA EEA EH AEH Ea EE A EEE EE Ee EEEE Define a service to ping all linux servers define service use local service 7 Name of service template to use hostgroup_name linux servers service description PING check_command check ping 100 0 20 500 0 60 Intenta conectar a un servidor SSH a un servidor especifico y puerto define service use local service 7 Name of service template to use hostgroup_name linux servers service description SSH Se
237. ns check_ircd check_nwstat check_swap check_dummy check_load check_oracle check_tcp check_file age check_log check_overcr check_time alumno nagios etc nagios Fig 39 Contenido del directorio libexec Hay que configurar el password en el agente y en la configuraci n de Nagios Si no se hace aparecer el error invalid password N Nagios Core P j 3 e C amp bips 192 168 1 113 nagios ZA snmp Ea Host Status Totals Service Status Totals Las Use Th 002 235218 CES 201 Us Down Unreachable Pending Er ee ET e Mei gt v A Service Status Details For All Hosts CE A A E A e ae EE 0d 1h 10m 52s 0 RTA 4 50 ms bno localhost Current Load CRE 27 10 2011 23 47 35 0d6h 1m50s 14 OK carga media 0 01 0 02 0 05 Current Users GRE 27 10 2011 23 48 58 40d 21h 1m8s ve USUARIOS OK 1 usuarios actualmente en HP GRE 27 10 2011 23 48 50 40d 21h Om 31s 14 HTTP OK HTTP 1 1 200 OK 453 bytes en 0 009 segundo tiempo de respuesta PNG GRE 27 10 2011 23 49 28 40d 20h 59m53s 1 4 ECO OK Paquetes perdidos 0 RTA 0 28 ms Root Partition GRE 27 10 2011 23 50 05 38420N21m208 1 4 DISK OK free space 6191 MB 68 inode 73 SSH GRE 27 10 2011 23 50 43 38d 20h 20m42s 1 4 SSH OK OpenSSH_5 8p1 Debian tubuntu3 protocolo 2 0 Swap Usage GRE 27 10 2011 23 51 20 38d 20h 20m Ss 114 SWAP OK 100 free 509 MB out of 509 MB Total Processes GR
238. nt blog Nagios Exchange plugins and addons Conference Packages Nearly Sold Out Nagios Is Hiring Join Our Team As A Software Engineer Nagios Conference Sponsorships Available More news Copyright 2010 2011 Nagios Core Development Team and Community Contributors Copyright 1999 2009 Ethan Galstad See the THANKS file for more information on contributors Nagios Core is licensed under the GNU General Public License and is provided AS IS with NO WARRANTY OF ANY KIND INCLUDING THE WARRANTY OF DESIGN MERCHANTABILITY AND FITNESS FORA PARTICULAR PURPOSE registered trademarks or registered Nagios Nagios Core and the Nagios logo are trademarks servicemarks servicemarks owned by Nagios Enterprises LLC Use of the Nagios marks is govemed by the ark use restri mn Nagios plugins Fig 21 P gina de inicio de Nagios P g 45 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS alumno nagios Jusg local nagios libexec Archivo Editar Ver Buscar Terminal Ayuda alumno nagios usr local nagios libexec dir check apt check flexlm check mailq check ping check udp check breeze check ftp check mrtg check pop check_ups check by ssh check hpjd check mrtgtraf check procs check_users check_clamd check_http check_nagios check_real check wave check cluster check icmp check nntp check_rpc negate check dhcp check ide smart check_nt check sensors urlize check dig check ifoperstatus check
239. ntajas e inconvenientes de este plugin son fundamentalmente que funciona bien pero requiere instalar el cliente en la m quina a monitorizar En las pruebas que se han realizado en el hospital de vila se ha utilizado esta opci n y se ha combinado con un chequeo directo con SNMP a otros dispositivos de las m quinas Windows como ventiladores y temperaturas de CPU A continuaci n se muestra el ejemplo de dos m quinas Windows servidores Proliant MD360 junto a otros dispositivos 37 http exchange nagios org directory Plugins Operating Systems Virtual Environments VMWare Vmware ESX 26 VM host details 38 http exchange nagios org directory Plugins Operating Systems 2A Virtual Environments VMWare P g 136 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 3 Aplicaciones Lugares Sistema EY O Mar 19 de Jun 12 08 alumno 0 Nagios Core Mozilla Firefox Archivo Editar Ver Historial Marcadores Herramientas Ayuda N Nagios Core 3 N Nagios Exchange check_hp 2 N Nagios Exchange check_hp 9 N localhost https localhost nagios va IEW HUST Saws DewIrFUrAIrHUSIS 9 y Google Oe Service Status Details For All Hosts SNMP OK CCM Version 5 1 3 2000 3 Last event 13 SNMP OK Server power restored PING 14 PING OK Packet loss 0 RTA 0 81 ms Registered Phones 13 SNMP OK Registered Phones 0 Rejected Phones
240. ntilador ooioccnninnicnnnncnnonnononnnnnnnnncnannono 118 Monitorizaci n con Nagios de un switch Cisco Catalyst ooooncncnnocicicnnoninninons 120 Consulta en SNMP de clientes asociados en un AP de CISCO uo cee 121 Uso de la herramienta snmpwalk con MIB privadas Enterprise 0 121 Lectura SNMP del nivel de se al y relaci n se al ruido en AP Cisco 122 P gina web de un AP Cisco con informaci n de clientes asociados 122 Cisco Access Point monitorizado con Nagios ccooccccononnnnnnncnnnnncnanncnnonncnnncncnnncnos 123 Vista gesti n de impresoras en Nagios mivsiiasiiiontir indoor 127 Detecci n de bandeja abierta en una impresora mcccocconocicnnnnnnnoninnnnnnnncnninnnnanacanos 128 Mensaje en el display de la impresora del aviso en Nagios occicninonicinonininninnos 128 Monitorizaci n remota v a NRPE itinerante tierna iaa 129 Utilizaci n en Nagios del comando check_snmp_storage Swap Linux 132 Consulta en Nagios utilizando el comando check_snmp_process 044 132 Resultado de la ejecuci n del commando check_snmp_load en Nagios 133 Procesos vpxa arrancados en un Servidor ESXi cocccicccccccconiconnnincnnnncnncnnononannnnno 134 Procesos vmx vthread de ESXi asociados a m quinas virtuales arrancadas 135 Procesos asociados a una m quina virtual VMware ESXi osese 136 Gesti n en Nagios de servidores Windows Proliant onnnnicininnnnninnnninnecinninnos 137 P g 1
241. ntp check smtp utils pm check disk check ifstatus check ntp peer check snmp utils sh check disk smb check imap check ntp time check ssh check dns check ircd check nwstat check swap check dummy check load check oracle check tcp check file age check log check_overcr check time alumnoGnagios usr local nagios libexec check ping H 192 168 1 120 w 3000 0 80 c 5000 0 100 p 5 ECO OK Paquetes perdidos 0 RTA 189 82 ms rta 189 822998ms 3000 000000 50 00 000000 0 000000 pl 0 80 100 0 alumnoGnagios usr local nagios libexec Fig 22 Directorio de plugins de Nagios A continuaci n se muestra el resultado de la ejecuci n del comando check_dhcp que comprueba el estado de un servidor dhcp 192 168 0 1 Es recomendable probar con una direcci n MAC de vuestra red alumno nagios usr local nagios libexec check dhcp v s 192 168 1 1 t 5 0 m 1c 4b d6 6f 60 c9 Direcci n de servidor solicitada 192 168 1 1 Direcci n de hardware 1c 4b d6 6f 60 c9 DHCP socket 3 DHCPDISCOVER a 255 255 255 255 puerto 67 DHCPDISCOVER XID 1506331007 0x59C8C97F DHCDISCOVER ciaddr 00 010 DHCDISCOVER yiaddr GO 0 0 0 DHCDISCOVER siaddr ODO DHCDISCOVER giaddr 00 010 resultado send dhcp packet 548 recv result l 548 recv result 2 348 resultado receive dhcp packet 548 Fuente receive ldhcpipacker 12 cl el Resultado 0K DHCPOFEFER desde la direcci n IP 192 168 1 1 v a 192 168 1 1 DHCPOFFER XID 1506331007 0x5
242. o Este commando adem s de hacer una connexion con la base de datos puede comprobar los par metros de rendimiento de la base de datos que se necesiten en cualquier momento La siguiente figura muestra el resultado de la ejecuci n del comando GRY tor 0d 9h 49m 28s Status Information Dictionary Cache Hit Ratio 98 356 Library Cache Hit Ratio 99 431 DB Block Buffer Cache Hit Ratio 99 974 Latch Hit Ratio 99 996 Disk Sort Ratio 000 Rollback Segment Waits 005 Dispatcher Workload 000 Usuarios concurrentes 9 000 Fig 91 Resultados de rendimiento de Oracle La definici n del servicio es la siguiente define service use local service 7 Name of service template to use host_name oracleserver service description ORACLE ESTADO check_command check oracle instant 1521 orcl CSMA CSMA El servicio ORACLE_ESTADO utiliza el comando check_oracle_instant Este es un script escrito en lenguaje Perl El listado completo de este script se puede consultar en el anexo XIII P g 98 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 9 2 6 Usuarios ORACLE Este commando es interesante por dos motivos En primer lugar utilizando este comando se puede averigar qu usuarios est n conectados Adem s tambi n permite conocer el n mero de conexiones simult neas que existen en un determinado instante La siguiente figura muestra el resultado de la ejecuci n del servicio Service State Informat
243. o s Crear el usuario nagios useradd m s bin bash nagios passwd nagios Crear un grupo y asociar los usuarios nagios y www data usuario Apache2 groupadd nagcmd usermod a G nagcmd nagios usermod a G nagcmd www data 5 2 3 Compilaci n Descargar y descomprimir el c digo fuente de Nagios core y plugins mkdir nagios cd nagios wget http prdownloads sourceforge net sourceforge nagios nagios 3 3 1 tar gz wget http prdownloads sourceforge net sourceforge nagiosplug nagios plugins 1 4 15 tar gz taria gos E OZ cd nagios Primero se ha de compilar la herramienta y despu s los plugins 4 https help ubuntu com 11 04 serverguide C httpd html 5 http net snmp sourceforge net 6 http www net snmp org download html 7 Comprobar con sudo grep USER etc apache2 envvars P g 42 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Tabla VII Par metros configuraci n instalaci n Nagios etc nagios sysconfdir nagios 9000 Nagios user UserID Nagios group GroupID Nagios Command Group nagemd 9001 with nagios user with command group Preparar la instalaci n con configure configure sysconfdir etc nagios localstatedir var nagios with command group nagcmd Una vez haya terminado se mostrar el resumen de la instalaci n que se va a realizar alumno nagios nagios nagios h Archivo Editar Ver Buscar Terminal Ayuda Configuration summary
244. o de comprobaci n del puerto del servidor Oracle El servidor Oracle escucha en el puerto TCP 1521 Para monitorizar este servico se ha creado el comando check_tcp_10 define service use local service Name of service template to use host_name oracleserver service description PUERTO_tcp_1521 check_command check_tcp_10 El comando check_tcp_10 se define de laa siguiente manera en base al est ndar de Nagios check_tcp define command command_name check_tcp_10 command line SUSERI check_tcp H 10 36 32 10 p 1521 9 2 3 Servicio ORACLE tablespace Este servicio comprueba el estado de un tablespace El servicio se define de la forma define service use local service 7 Name of service template to use host_name oracleserver service_description ORACLE tablespace 22 Ver instalaci n de Nagios en el cap tulo correspondiente de este libro 23 Descargar Java SE JRE o JSDK en http www oracle com technetwork java javase downloads index html P g 96 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS check_command check _tablespace oracle Este servicio utiliza el comando check_tablespace_oracle que se crea con el siguiente c digo define command command_name check _tablespace oracle command line java classpath usr local nagios libexec check tablespace_ oracle 10 36 32 10 1521 orcl CSMA CSMA d La salida se puede observar en la siguiente figura IORI tor 0d 9h 42m 27s
245. objects localhost cfg Definitions for monitoring a Windows machine c a file etc nanios nhiects windows_cfa Octave Ancho de la tabulaci n 8 Ln 1 Col 1 INS Fig 27 Inclusi n ficheros configuraci n mediante cfg_file Tambi n es posible incluir un directorio Nagios buscar e incluir todos los ficheros bajo la estructura del directorio especificado cfg dir etc nagios SACYL Se recomienda hacer un an lisis previo de los requisitos y organizar la estructura de forma adecuada Para grandes organizaciones se recomienda definir objetos en ficheros separados y agrupar en subdirectorios P g 50 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS global commands mysite check host alive cfg check _http cfg check_icmp cfg linux services AN contacts nagios cfg hosts p linux01 cfg nagios cfg linux02 cfg templates host_generic_t cfg service generic t cfg service perfdata_t cfg linux03 cfg resource cfg windows htpasswd services We wie ate so hosts timeperiods sites mysite cgi cfg i contactgroups cfg win03 cfg foreignsite misccommands cfg win09 cfg E eee cs contacts cfg z router services timeperiods cf i mysite p g services EEE checkcommands cfg hosts services hosts cfg ed
246. objeto generic switch definido en templates cfg define service use generic service Inherit values from a template host_name linksys wrt610N The name of the host the service is associated with Service description PING The service description check_command check_ping 200 0 20 600 0 60 The command used to monitor the service normal_check_interval 5 7 Check the service every 5 minutes under normal conditions Terry ienheckiinterva ll ARS checks theservilcc every minute ties tinal hardesitaters ls determined Se puede definir un acceso mediante url a una pagina con mas informacion sobre el dispositivo En este caso aparecer un s mbolo de una carpeta al lado del host 12 Los detalles del servicio se pueden ver haciendo clic en el servicio del host Se ver un diagn stico del error por ejemplo que las mibs no se han encontrado P g 67 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS N Nagios Core el z C amp bi ps 192 168 1 113 nagios ZA C snmp Na g ios Current Network Status Host Status Totals acia lio Todd Pee ae Ok Warning Unknown Critical Pending General Nagios Core 3 3 1 www nagios ora E 5 Logged in as nagiosadmin Home Documentation View Service Status Detail For All Host Groups View Status Overview For All Host Groups Current Status View
247. ocal service Name of service template to use host_name localhost Service description SSH check_command check_ssh notifications enabled 0 Define a service to check HTTP on the local machine Disable notifications for this service by default as not all users may have HTTP enabled define service use local service Name of service template to use host_name localhost service description HUNT check_command check_http notifications enabled 0 Estos servicios incluyen la definici n de local service incluido en el fichero templates cfg Generic service definition template This is NOT a real service just a template define service name generic service The name of this service template active checks enabled Active service checks are enabled passive_checks enabled Passive service checks ate enabled accepted Paralilelize check 7 Active service checks should Le parallelized disabling this can lead to major performance problems obsess over service 7 We should obsess over this service if necessary check Preshiness 0 f Debeult 13 to NOL check service freshness notifications enabled Service notifications are enabled event_handler_enabled Service event handler is enabled P g 58 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS flap detection enabled 1 y kiep detection is enabled Failure prediction enabled 1 Failure prediction is enabled process perf data i Pr
248. ocess performance data retain_status_information 1 Retain status information across program restarts retain nonstatus information 1 Retain non status information across program restarts is_volatile 0 o The service is not volatile check_period 24x7 y The service cam be checked at any time of the day max check attempts 3 Pre check thesserniice up tos eimesi in order to determine its final hard state normal_check_interval 10 y Check the service every 10 minutes under normal conditions retry_ check interval 2 y Re check the service every two minutes until a herd state can be determined contact_groups admins Notifications get sent out to everyone in the admins group notification options w U C Y Send notifications about warning unknown critical and recovery events notification interval 60 Re notify about service problems every hour notification period Zisa Notifications can be sent out at any time register 0 7 DONT REGISTER THES DEFINITION ITS NOT A REAL SERVICE JUST A TEMPLATE Local service definition template This is NOT a real service just a template define service name local service The name of this service template use generic service Inherit default values from the generic service definition max check attempts 4 A Re check the service up to 4 times in order to determine its final hard state normal_check_interval 5 y Check the service every 5 minutes under normal conditions retr
249. of the Internet standard D Partain B Network Management Stewart Framework Obsoleted by INFORMATIONAL RFC3410 ASCII Obsoletes PROPOSED RFC1595 STANDARD Obsoleted by RFC3592 Definitions of Managed March 1999 Objects for the SONET SDH Interface Type ASCII Obsoletes PROPOSED RFC2265 STANDARD Obsoleted by REC2575 View based Access Control Model VACM for the Simple Network Management Protocol SNMP Obsoletes PROPOSED RFC2264 STANDARD Obsoleted by REC2574 User based Security U Blumenthal B Model USM for version Wijnen 3 of the Simple Network Management Protocol SNMPv3 SNMPv3 Applications D Levi P Meyer Obsoletes PROPOSED RFC2263 STANDARD Obsoleted by RFC2573 Obsoletes PROPOSED RFC2262 STANDARD Obsoleted by RFC2572 Message Processing and Dispatching for the Simple Network Management Protocol SNMP Obsoletes PROPOSED RFC2261 STANDARD Obsoleted by RFC2571 An Architecture for D Harrington R Describing SNMP Management Frameworks 5 y e A F A E A Jes O PO O S IO O P g 156 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS View based Access B Wijnen R Control Model VACM Presuhn K for the Simple Network McCloghrie Management Protocol SNMP Obsoleted by PROPOSED RFC2275 STANDARD RFC2264 User based Security ASCII Model USM for version 3 of the S
250. olocol version SNMPVI 5 180851112 Specific 1 SNMPvI Traplv1 2101 1107 0 IP UDP Transport IP UDP o Evaluation vers Contact lt sales mg soft c 2 Agent Address 210 1 1 4 Port 58056 Manager Address 210 1 1 107 Port 0 B Community traps 2 SNMPv1 agent address 210 1 1 4 Las Enterprise enterprises 9 9 41 2 Bindings 5 9 Binding 1 enterprises 9 9 41 1 2 3 1 2 30 octet sting LINK Binding 2 enterprises 9 9 41 1 2 3 1 3 30 integer 4 Binding 3 enterprises 9 9 41 1 2 3 1 4 30 octet sting UPDOWN Binding 4 enterprises 9 9 41 1 23 1 5 30 tEthemet0 1 changed state to down Binding 5 enterprises 9 9 41 1 2 3 1 6 30 timeticks 13 days 02h 18m 12 06th 4 m 6 SNMP notifications received a TE r r T T Fig 78 Traps SNMP enviadas por un swtch y recibidas en la estaci n de gesti n Las l neas siguientes habilitan el env o de traps a la estaci n gestora 192 168 1 10018 en un switch snmp desde modo config snmp server community public ro snmp server community private rw snmp server host 192 168 1 100 traps public snmp server enable traps 18 Desactivar el firewall de la estaci n o a adir reglas para ICMP y UDP en los puertos involucrados P g 88 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 2 EP 192 168 1 5 PuTTY S Fig 79 Configuraci n comunidad y traps SNMP en switch CISCO l p 192 168 1 5 PuTTY Wla Co oo coo o
251. on el check STATUS devuelve el estado de la impresora Los valores van de 1 a 5 y dependiendo del modelo se refieren a WarmUp OK Printing etc Si el estado no es uno de estos devuelve un WARNING Lo m s seguro es que devuelva un WARNING ya que si el t ner y el nivel de papel es bajo entonces el estado devuelto es el 1 WARNING aunque la impresora funciona perfectamente Con el check CONSUM nos devuelve el estado de los consumibles de la impresora Los argumentos que se pueden pasar a CONSUM son string TEST ALL Con ALL devuelve informaci n de todos los consumibles sin ordenar Si ejecutamos TEST nos devuelve el nombre string de todos los consumibles que se pueden testear Una vez obtenidas estas cadenas de caracteres se puede construir un comando como check_printers public CONSUM Black Toner o check_printers public CONSUM Toner Cartridge Brother TN 580 I N 3170 I N 3185 TN 37 IN 3175 donde despu s de CONSUM se escribe el string que antes obtuvimos en la opci n de TEST Con el check TRAY vemos el estado de las bandejas Los argumentos que se pueden pasar a TRAY son number s TEST ALL Al igual que el check anterior con ALL devuelve informaci n de todas las bandejas sin ordenar Si ejecutamos TEST nos devuelve el n mero de bandejas que se pueden testear Una vez obtenidos estos n meros se puede construir un comando como check_printers public TRAY 1 o check_printers public TRAY 2 Con el check
252. os de Gesti n de Red oonociiicicnnnnnnnnonnnnonanncnnncncnanacnnacncnos 19 3 6 Elementos de un sistema de Gesti n de Red oonicconicocionnanionioninnninnorarnoccnnnincnnas 20 3 7 Modelos de Gesti n de Red OSI e Internet oonioniononnnnnionionononiinninnorarnocccnniniannss 21 4 LOS PROTOCOLOS SNMP Y RMON sv as 22 Ale SNMP Sa EEE EN Gguiaa sibs us cabanas E EAN 22 4 1 1 Desarrollo del protocol IS tds 23 ANA NB OIDO da ton 24 4 1 3 SMI Structure of Management Information ccccicicocnnnnonnnnonananononncnanncanonncns 25 AFA MB ARE CI A ty ean ohana E Gays Aa DRA NALD 27 4 1 5 Especificaci n del protoc lo dns epsssisiaesieskarignbriamehstnaenauorameseae 29 EZ RMON an c a 31 42T Objetivos de RMON acire eee iei iaee aa E a EA seat enaA aiia 32 4 2 2 MIB RMON Grupos RMON ada dio cie 32 43 RMON As 33 431 MIB RMON 2 aa 34 4A SNMP A coo 34 15 AMEN ONES Ad 35 5 INSTALACI N Y CONFIGURACI N DE UNA PLATAFORMA DE GESTI N DERED natal ii till asias 37 5 1 Instalaci n automatas dnangh Snape cureabean meena 37 52 Instalaci n Manta Data 39 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 5 2 1 Prerrequisitos y preparaci n de la instalaciOn eects teense 39 5 2 2 Creaci n de usuarios y grUpOS sees esssiesseseesesresiesestsrestntsresererisresesresreseness 42 523 Compilaci fiene one ae E A a n bap teetetanuatenas 42 5 2 4 Configuraci n de la interfaz web Apache
253. oss 5 enterprise Specific 6 specific trap C digo espec fico de trap Elapsed time entre la ltima inicializaci n de la entidad de red y la generaci n del trap Contiene el valor de sysUpTime generic trap time stamp Las comunidades pueden ser de lectura o de lectura escritura ya que el protocolo permite actualizar variables mediante la primitiva set Normalmente el protocolo se encuentra desactivado no hay comunidad o s lo hay una comunidad de lectura read only community El motivo principal es porque en algunos sistemas puede existir un agujero de seguridad al utilizar este protocolo La comunidad se debe definir en todos los dispositivos y sistemas switches routers m quinas Windows y Linux etc Los problemas m s importantes de la versi n 1 son que las claves no est n cifradas y no hay ACKs confirmaciones Hay que tener en cuenta que los objetivos iniciales de dise o fueron la simplicidad y la eficiencia Las primitivas son GET oid GET_NEXT oid SET oid instancia valor TRAP Alarma transmitida por el agente Cuando se produce un evento de un tipo determinado el dispositivo env a un aviso o trap Los motivos pueden ser coldstart warmstart linkup linkdown authentic faillure neighbour loss Variable bindings Es un procedimiento que se utiliza cuando se desea agrupar un n mero determinado de operaciones del mismo tipo get set o trap en un nico mensaje Este procedimiento
254. p mibs Archivo Editar Ver Buscar Terminal Ayuda alumno na ia ae snmpget vl On cpublic 192 168 1 5 ifSpeed 1 10 SEAT E 1 5 1 Gauge32 10000000 io alumno S snmp mibs snmpget yA Of cpublic 192 168 1 5 ifSpeed 1 iso org dod internet mgmt mib 2 interfaces ifTable ifEntry ifSpeed 1 Gauge32 10000000 alumno nagios snmp mibs 8 1 2 SNMPGETNEXT Muestra el siguiente elemento en el rbol alumno nagios snmp mibs Terminal yuda i snmp mibs snmpget v1 Of cpublic 192 168 1 5 ifSpeed 1 od inter rnet mgmt mib 2 interfaces ifTable ifEntry a 1 Gauge32 10000000 alumno nagios snmp mibs snmpgetnext v1 Of cpublic 192 168 1 ifSpeed 1 a tabled ne enced Gauge32 10000000 DD owo wo a a Fig 72 Salida del comando snmpgetnext 8 1 3 SNMPWALK Hace una consulta de todos par metros o filtra por alguno en particular Se puede utilizar la opci n Of para ver el rbol completo P g 83 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS x alumno nagios snmp mibs Archivo Editar Ver Buscar Terminal SNMPv2 SMI mib 2 ke SNMPv2 SMI mib 2 SNMPv2 SMI mib 2 SNMPv2 SMI mib 2 SNMPv2 SMI mib 2 SNMPv2 SMI mib 2 SNMPv2 SMI mib 2 SNMPv2 SMI mib 2 SNMPv2 SMI mib 2 SNMPv2 SMI mib 2 SNMPv2 SMI mib 2 SNMPv2 SMI mib 2 SNMPv2 SMI mib 2 SNMPv2 SMI mib 2 INTEGER SNMPv2 SMI mib 2 4 1 0 Timeticks 10297 0 01 4
255. pleto se puede consultar en el anexo X Para invocarlo se puede ejecutar el comando desde la l nea de comandos java classpath usr local nagios libexec check tablespace oracle 10 36 32 10 1521 orcl CSMA CSMA d 9 2 4 ORACLE tablespace USERS Se utiliza el mismo c digo pero esta vez s lo consulta un tablespace El tablespace monitorizado es USERS En el comando se fijan los parametros de warning y error La salida se muestra en la siguiente figura Service State Information Current Status WARNING for Od 9h 44m 2s Status Information Tablespace WARN USERS 9 used Performance Data USERS 3 datafiles used 1270016 KB of 2421888 KB total Fig 90 Resultado de la consulta del tablespace USERS Se utiliza el servicio Oracle tablespace USERS Pag 97 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS define service use local service z Name of service template to use host_name oracleserver service description ORACLE tablespace USERS check_command check _tablespace_oracle2 Este servicio utiliza un nuevo comando rescrito check_tablaspace_oracle2 define command command_name check_tablespace_oracle2 command_line java classpath usr local nagios libexec check_tablespace_oracle 10 36 32 10 1521 orcl CSMA CSMA USERS 1000000 3000000 Como en el servicio anterior utiliza el programa de Java check_tablespace_oracle El c digo completo se puede consultar en el anexo X 9 2 5 ORACLE estad
256. pm Para instalarlo ejecutar los siguientes comandos sudo perl MCPAN e shell En la shell que aparecer ejecutar el install es posible que pregunte cosas aceptar todo CPAN gt install Net SNMP Una vez instalado hay que modificar la ruta a los plugins de Nagios Para ello editar cada uno de los scripts y modificar las l neas para especificar la ruta correcta use lib usr lib nagios plugins use lib usr local nagios libexec La imagen siguiente muestra la ejecuci n de los scripts alumno nagios Escritorio Archivo Editar Ver Buscar Terminal Ayuda alumno nagios Escritorio check catalyst fans pl s 192 168 1 5 C public OK chassis normal alumnoG nagios Escritorio check catalyst flash pl s 192 168 1 5 C public w 90 c 70 CRITICAL Onboard system FLASH Size 16128000 Free 1004032 6 Status avail able VPP installed alumnoGnagios Escritorio check catalyst_mem pl s 192 168 1 5 C public w 90 c 70 CRITICAL 1 0 valid Used 3224076B Free 5164532B 61 Processor valid Us ed 15601544B Free 27475916B 63 WARING lt 90 CRITICAL lt 70 alumnoGnagios Escritorio check catalyst load pl s 192 168 1 5 C public c 90 90 90 w 70 70 70 OK CPUO 0 1 2 alumnoGnagios Escritorio check catalyst load pl s 192 168 1 5 C public c 90 90 90 w 70 70 70 OK CPUO 16 2 3 alumno nagios Escritorio Z Fig 77 Scripts en Perl par
257. relacionado con HA Cluster VMWare comando check snmp process define service use generic service 7 Name of service template to use hostgroup_name vmware esx servers service_description HA VMWare Proc VPXA check_command check_snmp_process vpxa 0 0 r Define a service to check if process exist Proceso vmware hostd relacionado con HA Cluster VMWare comando check snmp process define service use generic service 7 Name of service template to use hostgroup_name vmware esx servers service_description HA VMWare Proc VMWARE HOSTD check_command check_snmp_process vmware hostd 0 0 r Define a service to check the disk space of the var log partition Warning if lt 20 free critical if lt 10 free space on partition check snmp storage pl command definition define service use generic service hostgroup_name vmware esx servers service description File System var log check_command check _snmp storage v1 var log 80 90 r G En el servidor se monitoriza el proceso y servicio vmware vpxa vCenter Server Agent Este permite a un servidor vCenter conectarse a servidores ESX vpxa es el canal de comunicaci n con el hostd que a su vez permite la conexi n con el kernel r 7 EP griduva gridcontroller o 8 Fig 132 Procesos vpxa arrancados en un servidor ESXi 36 Ver la herramienta vSphere Remote Command Line descargable desde la pagina web del servidor ESXi
258. rly CONSUM Black will show you the Black imaging unit and Black toner levels all at once The ALL option gives all consumable status at once and TEST will show you which CONSUMABLES can be monitored CONSUMX reports on consumables that match the eXact string passed to it This helps alleviate problems when a unique string is not possible For example CONSUMX Black Toner would give an error unless the FULL description of the consumable from a CONSUM TEST is Black Toner Any consumable named Black Tonerl or Black Toner Cartridge would be overlooked TRAY can be passed a number or list of numbers comma separated as a parameter The ALL parameter reports all tray statuses and TEST lets you know which trays the device has In addition to generic status the tray function tries to calculate paper remaining as a of capacity if possible although this only works as good as the sensors on the device and often only returns values at fixed intervals such as 25 50 75 etc DEVICE DISPLAY MESSAGES MODEL and STATUS report information about the printer s hardware devices physical display event log messages model serial or overall status respectively If looking to add this to a new configuration your command descriptions should look something like the following define service use generic service service description Toner Supply check_command check_snmp_printer public CONSUM Toners 20 10 define service use gen
259. ro de transacciones con un servidor de base de datos o la utilizaci n de la CPU La gesti n de las prestaciones es crucial para verificar los acuerdos de nivel de servicio SLA Service Level Agreement que se negocian con los proveedores El caso m s frecuente tiene que ver con la supervisi n del ancho de banda contratado con el ISP En determinados casos el operador llega a instalar equipos propios para poder gestionar y monitorizar sus enlaces El incumplimiento de los SLA es causa frecuente de demandas por lo que es crucial disponer de pruebas que reflejen con datos exhaustivos el comportamiento de los equipos de la red 3 4 5 Gesti n de la Seguridad Si bien es cierto que hace unos a os los esfuerzos se concentraban en desarrollar nuevas funcionalidades en protocolos y herramientas hoy en d a son in tiles si no van protegidas por el paraguas del sistema de seguridad a todos los niveles El mismo protocolo SNMP que en sus or genes s lo ten a un sistema simple de control de acceso en versiones posteriores ha introducido sistemas de seguridad en varios niveles Las estad sticas demuestran que la mayor parte de los ataques producidos a las redes se realizan desde el interior Por este motivo la gesti n de red debe integrar sus propios sistemas de seguridad en las transmisiones y en el control de acceso 3 5 Organizaci n de Centros de Gesti n de Red Un centro de gesti n de red es una organizaci n dedicada a la superv
260. rted Started Started Started Started Started Started Started Started Started Started Started Started Started Started Started Started Disabled Disabled Automatic Disabled Disabled Automatic Automatic Automatic Automatic Automatic Automatic Automatic Automatic Automatic Automatic Automatic Automatic Automatic Automatic Automatic Disabled Automatic Automatic LocalSystem LocalSystem LocalSystem LocalSystem LocalSystem LocalSystem ACCMSer ACCMCDR ACCMSer ACCMSer ASQLS c ACCMSer ACCMSer ACCMSer ACCMSer ASQLSwc ACCMSer s CCMSer ACCMSer ACCMSer LocalSystem LocalSystem LocalSystem AAA OS e Fig 96 Servicios de telefon a IP de Cisco Adem s de la telefon a es necesario configurar el servicio SNMP Para ello localizar el servicio SNMP Service action view Tree Services Local ByRunds Service Enables st By Security Accounts Manager Stores sec By Server Provides R Manages a Provides s Includes a By SOLSERVERAGENT By System Event Notification Tracks syst By Task Scheduler Enables a Sa TCP IP NetBIOS Helper Service Enables su Sy Telephony Provides T Sy Terminal Services Provides a Sy Uninterruptible Power Supply Manages 4 By utility Manager Starts and By WNC Server By windows Installer Installs re By Windows Management Instrumentation Provides s By Win
261. rviceability Tools and Progr Remote Serviceability Options Checklis Cisco RIS Data Collector Remote Serviceability Tools Table 18 1 SNMP Configuration Checklist Configuration Steps Related Procedures and Topics Step 1 Ensure Microsoft Windows 2000 SNMP service Refer to Microsoft Windows 2000 is installed on the Cisco CallManager network online help Step 2 Set the SNMP agent security Configuring SNMP Security Cisco CallManager Serviceability Administration Guide Step 3 Start the SNMP service Starting the Cisco CallManager Definitions SNMP Extension Agent SNMP MIBs Cisco CallManager Serviceability Administration Guide Step 4 Configure the traps Setting the SNMP Trap Receiver Cisco CallManager Serviceability Administration Guide Performance Monitoring Tools Alarm Definitions Simple Network Management Protocol SNMP Basics SNMP Management Information Base Configuring the Cisco CallManager SNMP Traps Traps Cisco CallManager Serviceability SNMP Community Strings Administration Guide SNMP Agent Step 5 Configure Cisco Real Time Information Server Starting the Cisco RIS Data SNMP Configuration Checklist RIS data collector to send configuration Collector Cisco CallManager CiscoWorks2000 information from the Cisco CallManager Serviceability Administration Guide 4 5 database to the RIS database zl a E FT O temet HAstart T 8 E Ejcsco Calanager 4 0 se
262. rvidor check_command check_ssh Intenta conectar al puerto TCP 22 usado por servidor SSH define service use local service 7 Name of service template to use hostgroup_name linux servers service description SSH Puerto check_command check_tcp 22 1 2 Define a service to check the Memory and Cache use on Linux Servers Warning at 80 memory used and 60 swap used critical at 95 memory and 90 swap check snmp mem v1 command definition check snmp mem pl command definition define service use generic service 7 Name of service template to use hostgroup_name linux servers service_description Memoria Swap en uso is_volatile 0 check period 24x7 max_check_attempts 3 normal_check_interval 2 retry check interval 1 contact_groups linux admins notification interval 240 notification period 24x7 notification options C T check_command check _ snmp mem v1 N 80 60 95 90 o Define a service to check the Linux CPU Use Warning at 40 of CPU use critical at 60 check snmp load v1 command definition define service use generic service 7 Name of service template to use hostgroup_name linux servers service description CPU en uso is volatile 0 max check _attempts 3 normal check interval 5 retry_check_interval 1 contact_groups linux admins notification_interval 240 notification period 24x7 notification options pt check_command check_snmp_load_v1 netsc 40 60 Define a service to check the
263. ry execute query Statement statement connection createStatement ResultSet rs statement executeQuery query while rs next get content from column 1 4 if debug 1 System out format Name 220s rs getString 1 TBSP_NAME VARCHAR 128 System out format Files 32d rs getInt 2 TBSP_TOTAL SIZE KB BIGINT System out format Space total 10d KB rs getInt 3 TBSP TOTAL SIZE KB BIGINT E E E System out format Space used 10d KB rs getInt 4 TBSP_ USED SIZE KB BIGINT System out format Space 3 used 33d la rs getInt 5 1 TBSP_UTILIZATION PERCENT BIGINT tbspname rs getString 1 dfiles_total rs getInt 2 kbytes_total rs getInt 3 kbytes_used rs getInt 4 percent_used rs getInt 5 rs close statement close connection close catch java sql SQLException e System err println e System exit 3 Unknown perfdata tbspname dfiles total datafiles used kbytes used KB of kbytes total KB total output tbspname percent _ used used perfdata if kbytes warn 0 amp amp kbytes erit 0 if kbytes used lt kbytes warn System out println Tablespace OK output System exit 0 OK if kbytes_used gt kbytes_warn amp amp kbytes_used lt kbytes_crit System out println Tablespace WARN output System exit 1 WARN if k
264. s retry_check_interval 0 5 7 Re check the final hard state is determined Service definition HP Procurve Switch Estado Power Supply define service every minute until its use generic service 7 Name of service template to use hostgroup_name switches procurve service description Power Supply Estado is volatile 0 check period 24x7 max_check_attempts 2 normal_check_interval 5 retry check interval 1 contact _groups switch admins notification interval 240 notification period 24x7 notification options c r check_command check_hppower 4 3 5 Service definition HP Procurver Switch system Description define service use generic service 7 Name of service template to use hostgroup_name switches procurve service description System Description is volatile 0 check period 24x7 max_check_attempts 3 normal_check_interval 5 retry check interval 1 contact_groups switch admins notification interval 240 notification period 24x7 notification options c r check_command snmp_sysDescription Monitor SNMP System Up Time define command command_name snmp_sysUpTime command_line USER1 check_snmp H HOSTADDRESS C USER5 o 1 3 6 1 2 1 1 3 0 l System SNMP Up Time Service definition HP Procurver Switch System Location define service use generic service 7 Name of service template to use hostgroup_name switches_procurve service description System Location is_volatile 0 check period 24x7 max_check_att
265. s 8000 0 0 7456000 bytes 5512000 bytes 3110 38 sec mean 192 902 ms mean 0 322 ms mean across all concurrent requests 2830 93 Kbytes sec received sd median max 2 4 Pi 16 22 7 150 200 22 7 149 200 20 9 EST 201 Percentage of the requests served within a certain time ms 50 151 66 157 75 159 80 160 90 165 95 180 98 189 99 190 100 201 longest request alumno nagios La siguiente figura muestra el servidor IIS monitorizado en Nagios monitorwindows Explorer HTTP conexiones actuales HTTP counters files sent SNMP HTTP num max conexiones simultaneas HTTP usuarios actuales IIS W3SVC IS via SNMP NSClient Version Unidad C Uptime Windows Load WARNING 03 08 2012 14 47 19 0d0h17m31s 3 3 03 08 2012 14 52 54 0d0h31mS6s 1 3 explorer exe Running 03 08 2012 14 54 15 0d0h2m50s 1 3 SNMP OK 600 03 08 2012 14 52 47 0d 0h 38m2s 1 2 SNMP OK 464395 03 08 2012 14 53 34 0d 0h 3m55s 1 3 SNMP OK 603 03 08 2012 14 54 27 0d 0h 29m38s 1 3 SNMP OK 1 03 08 2012 14 48 21 0d 0h 36m29s 1 3 W3SVC Started 03 08 2012 14 48 17 0d 0h 36m33s 1 3 NSClient 0 4 0 172 2012 05 08 03 08 2012 14 49 15 0d 0h 45m35s 1 3 03 08 2012 14 51 23 0d 0h 43m27s 1 3 SNMP OK Timeticks 26466487 3 days 1 31 04 87 03 08 2012 14 52 08 0d 0h2m42s 1 3 1 CPU load 0 0 lt 4 OK 15 process matching svchost gt 3 lt 100 0K Mem 29 1Mb gt 20 WARNING Cpu 1 OK C Label Unida
266. s m dulos y aplicaciones de interconexi n con otras herramientas y servicios Tambi n hay disponibles en la red multitud de tutoriales y foros donde los administradores pueden resolver sus dudas sobre la instalaci n y configuraci n de esta herramienta Para instalar y configurar correctamente la herramienta el lector puede seguir paso a paso cada una de las tareas propuestas En algunos casos se dan recomendaciones de P g 14 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS uso o configuraci n as como ciertas comprobaciones que se deben tener en cuenta Para cada tarea se adjuntan capturas de pantalla reales de la herramienta instalada en un sistema Ubuntu 11 06 Es importante tener cuidado con la sintaxis de los comandos ya que un error podr a hacer que la herramienta no se instalara o configurara correctamente En el cap tulo 6 se describe la configuraci n de los distintos servicios de la herramienta Debido a la extensi n de los mismos en este documento se reflejan aquellos que se han considerado m s importantes Se muestran detalles de la configuraci n de los ficheros de Nagios sobre los pasos b sicos para monitorizar m quinas basadas en Sistemas Operativos Linux y Windows y los pasos a seguir para actualizar el software principal de Nagios Nagios Core y Nagios Plugins Por ltimo en este cap tulo se describen los pasos para configurar el env o de notificaciones Como ejemplo se muestran los detalle
267. s Application CISCO SYSTEMS For Cisco IP Telephony Solutions Trace Configuration Current Service Cisco RIS Data Collector Current Server 210 0 0 2 Status Ready Update SetDefault Configured Services Cisco RIS Data Collector y M Trace On F apply to All Nodes Debug Trace Level Error z cisco RIS Data Collector Trace Fields W Enable RISDC Trace WV Enable RISX Trace Enable Link Services Trace PM Enable RISDC Access Trace Y Enable RISDB Trace Enable Real Time Monitoring Tool Trace Y Enable SNMPDC Trace Y Enable CCM SNMP Agent Trace TF Enable AXL Serviceability API Trace F Device Name Based Trace Monitoring Select Devices z E Done PT 6 internet PAstart e ae f cisco CallManager 4 0 EB 14 47 Fig 108 Ventana de configuraci n de Cisco RIS Data Collector 9 7 2 Consulta de objetos del rbol de OIDs de la MIB CISCO CCM MIB Una vez activados y configurados los servicios es posible realizar consultas utilizando SNMP A continuaci n se muestran los resultados de consultar las OIDs Tabla IX Tabla de OIDs en un Call Manager ccmVersion ccmStstus ccmPhoneType ccmPhoneDescription ccmPhoneDescription ccmActivePhones ccmInActivePhones comActiveGateways ccmInActiveGateways ccmRegisteredPhones ccmUnregisteredPhones ccmRegisteredGateways ccmUnregisteredGateways ccomRegisteredMediaevices comSystemVersion Una vez
268. s LINUX En este manual se utilizar como referencia Ubuntu LINUX En el manual se utilizar la versi n 11 04 Centro de software de Ubuntu Archivo r programas 214 Obtener programas Resultados de la b squeda A host service network monitoring and management system Suministrado por Ub Socios de C ical i i i qa A host service network monitoring and a Para comprar gt Software instalado 3 Historial management system nagios3 Gratuito Nagios is a monitoring and management system for hosts services and networks Nagios features include Monitoring of network services via TCP port SMTP POP3 HTTP NNTP PING etc Plugin interface to allow for user developed service checks Contact notifications when problems occur and get resolved via email pager or user defined method Ability to define event handlers to be run during service or host events for proactive problem resolution Web output current status notifications problem history log file etc Nagios was written in C and is designed to be easy to understand and modify to fit your own needs This is a metapackage which depends on the nagios core and the webfrontend Fig 10 Instalaci n de Nagios 3 desde el centro de software de Ubuntu P g 37 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS alumno nagios h Archivo Editar Ver Buscar Terminal Ayuda alumno nagios sudo apt
269. s count kernel kernel latency in ms device device latency in ms queue queue latency in ms vmfs shows Datastore info name info for datastore with name name all datastore info runtime shows runtime info con connection state health checks cpu storage memory sensor status maintenance shows whether host is in maintenance mode list vm list of VMWare machines and their statuses service shows Host service info names check the state of one or several services specified by names syntax for names show all services DC specific EXA AAA eH AA AAA io shows disk io info aborted aborted commands count resets bus resets count kernel kernel latency in ms device device latency in ms queue queue latency in ms vmfs shows Datastore info name info for datastore with name name all datastore info runtime shows runtime info list vm list of VMWare machines and their statuses listhost list of VMWare esx host servers and their statuses recommendations shows recommendations for cluster name recommendations for cluster with name name A all clusters recommendations CHEC_ESX Version 0 5 Posted new Version 0 5 Examples ESX Base OS check esx H 10 8 3 115 u xxx p xxx 1 cpu CHECK _ ESX OK cpu usage 1169 82 MHz 4 99 cpu_usagemhz 1169 82Mhz cpu_usage 4 99 check_esx H 10 8 3 115 u xxx p xxx 1 cpu s
270. s dian e id 132 1044 Check sninp load aiii acid 133 10 5 Servidores VMware ESX ESXi ccccccesccsesssessceseeseeseeeeceseesecseeeeeeeesaeesseneeeeeenees 133 10 6 Servidores WINdOWS iii is 136 Ti BIBLIOGRAF A asst OPC rele s O taal cee ut alae 140 124 ANEXO ai O ca 142 12 1 ANEXO I Fichero de configuraci n switch HP Procurve ss 142 12 2 ANEXO II Fichero de configuraci n servidores WindoWS cciciccononicinnncno 145 12 3 Anexo III Sintaxis comando check_snmp_storage occoicicncncnnncnnnnncnanncnnnnncnos 146 12 4 Anexo IV Sintaxis commando check_snmp_procesSS ococcccnnconiccnnnnoncnncannninon 147 12 5 ANEXO V RFCs relacionadas con SNMP sssssssssesseississeresesseresisesesrssresenrese 148 12 6 Anexo VI Fichero de configuraci n de gesti n de pacientes 163 12 7 Anexo VII rbol de OIDs MIB telefon a IP CISCO CCM MIB my 169 12 8 Anexo VIII rbol de OIDs de la MIB CISCO ASSOCIATION MIB my 174 12 9 A ex IX HTTP MIB bad is 175 12 10 Anexo X C digo Java check_tablespace_oracle ooocicninnnininnnnmmmnmm mmm s 180 12 11 Anexo XI C digo Java de check_users_oracle iii 182 12 12 Anexo XII Comandos y servicios de Oracle configuradoS coicninioinininnnonos 184 12 13 Anexo XIII C digo fuente de Check_Oracle_InStaMt oocicociciininnnmmmmmm 185 P g 6 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS NDICE DE FIGURAS Fig 1 Capacidad total y capacidad Well
271. s e be es a D m N MNNNND Ww un Ww ly ha kh can soi 6 4 gn gn 10 ela 2 12 4 P g 170 MONITORIZACI N DE SERVICIOS Y SISTEMAS ccmGatewayIndex A ccmGatewayName UIs ccmGatewayType da ccmGatewayDescription ccmGatewayStatus Ta ccmGatewayDevicePoolIndex ccmGatewayInetAddressType ccmGatewayInetAddress comGatewayProductId comGatewayStatusReason ccmGatewayTimeLastStatusUpdt ccmGatewayTimeLastRegistered ccmGatewayDChannelStatus ccmGatewayDChannelNumber ccmGatewayProductTypeIndex ccmGatewayUnregReason ccmGatewayRegFailReason ccmGatewayTrunkTable ccmGatewayTrunkEntry ccmGatewayTrunkIndex ccmGatewayTrunkType ccmGatewayTrunkName ccmTrunkGatewayIndex ccmGatewayTrunkStatus ccmActivePhones 1 ccmInActivePhones t ccmActiveGateways E ccmInActiveGateways ccmRegisteredPhones ccmUnregisteredPhones ccmRejectedPhones Es ccmRegisteredGateways ccmUnregisteredGateways ccmRejectedGateways ccmRegisteredMediaDevices ccmUnregisteredMediaDevices ccmRejectedMediaDevices ccmRegisteredCTIDevices ccmUnregisteredCTIDevices ccmRejectedCTIDevices ccmRegisteredVoiceMailDevices ccmUnregisteredVoiceMailDevices ccmRejectedVoiceMailDevices ccmCallManagerStartTime ccmPhoneTableStateld ccmPhoneExtensionTableStateld ccmPhoneStatusUpdateTableStateld ccmGatewayTableStateld ccmCTIDeviceTableStateld ccm
272. s named in telnetd gt 0 14 Matching Service Entries Displayed Fig 87 Estado de los servicios monitorizados para la gesti n de pacientes 9 2 Oracle En la siguiente figura se muestran los servicios de Oracle que se han seleccionado como los importantes para monitorizar en el servicio Adem s de la comprobaci n de conexi n utilizando un ping y del puerto de escucha TCP del servidor se han incluido comprobaciones de los tablespace que se han identificado como importantes P g 95 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS CE Service ETS oracleserver ORACLE tablespace K ORACLE tablespace USERS ORACLE ESTADO PING PUERTO tcp 1521 Usuarios oracle Fig 88 Servicios de Oracle monitorizados Para la monitorizaci n de los servicios en Nagios se han creado comandos especf cos Algunos son variaciones de los comandos est ndar de Nagios y otros son nuevos utilizando scripts de Perl y programas en Java Ser necesario tener instalado el int rprete de Perl y al menos el runtime de Java2 9 2 1 Servicio de comprobaci n de la m quina ping Para comprobar que la m quina est online se usa el comando de comprobaci n que utiliza el comando check_ping integrado en la instalaci n base de Nagios define service use local service Name of service template to use host_name oracleserver service description PING check_command check _ping 100 0 20 500 0 60 9 2 2 Servici
273. s not found Di Allowed hosts this is the IP of the nagios or other server NSClient password only used via check_nt lodules to load Enable common check plugins Enable nsdient server check_nt Enable NRPE server check_nrpe Enable NSCA client dont enable unless you really use NSCA Enable WMI checks a a E lt Fig 38 Instalaci n NSClient P g 63 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS El comando a utilizar check_nt se puede encontrar en el directorio libexec alumnofOnagios etc nagios Archivo Editar Ver Buscar Terminal Ayuda Total Warnings 0 Total Errors 0 Things look okay No serious problems were detected during the pre flight check alumno nagios etc nagios y sudo etc init d nagios reload Running configuration check done Reloading nagios configuration done alumno nagios etc nagios ls usr local nagios libexec check_apt check_flexlm check_mailq check_ping check_udp check_breeze check_ftp check_mrtg check_pop check_ups check_by_ssh check_hpjd check_mrtgtraf check_procs check_users check_clamd check_http check_nagios check_real check_wave check cluster Maeda check_nntp check_rpc negate check_ide smart check_nt check_sensors urlize check dig check_ifoperstatus check_ntp check_smtp utils pm check_disk check_ifstatus check_ntp peer check snmp utils sh check_disk_smb check_imap check_ntp_time check_ssh check_d
274. s para configurar las notificaciones por correo electr nico De igual forma se puede configurar el servicio de env o de notificaciones por SMS Los siguientes cap tulos 7 y 8 se dedican a SNMP Se describe la instalaci n y configuraci n de servicios basados en la utilizaci n de este protocolo base para la gesti n aqu propuesta En el cap tulo 8 se describe con mayor profundidad la configuraci n del protocolo y el uso de primitivas y plugins basados en SNMP Adem s de las configuraciones b sicas de servidores dispositivos de red etc en los cap tulos 9 y 10 se muestran casos pr cticos concretos de monitorizaci n que se han identificado como importantes e incluso cr ticos en el trabajo diario del personal del servicio de inform tica del SACYL Por ltimo se incluye la bibliograf a y anexos para que el lector pueda ampliar sus conocimientos sobre la gesti n de red Este documento pretende ser una gu a til de forma que cualquier instalaci n o configuraci n documentada se pueda replicar para su uso directo en la infraestructura de servicios del SACYL Para ello se ha contado con personal experimentado en la gesti n de dichos servicios que ha trabajado para integrar la gesti n de los mismos en una nica plataforma de gesti n de red Como l neas futuras de trabajo una vez que los usuarios desplieguen esta infraestructura se pretende integrar m s servicios no contemplados en esta edici n as como ampliar la fu
275. s service Check Type ACTIVE Re Acknowledge this service problem Check Latency Duration 0 116 10 102 seconds Disable notifications for this service Next Scheduled Check 27 10 2011 23 52 07 XK Delay next senice notification Last State Change 27 10 2011 23 34 07 ef Send custom senice notification Last Notification 27 10 2011 23 37 26 notification 1 sf Schedule downtime for this service Is This Service Flapping MNO 5 99 state change X Disable event handler for this service In Scheduled Downtime NGI X Disable ap detection for this service Last Update 27 10 2011 23 51 16 0d Oh 0m 7s ago Fig 41 Error de configuraci n de password en NSCient detalle Configurar el password en el fichero de configuraci n de Nagios a adiendo la opci n s define command command_name check_nt command _line SUSER1 check_ nt H SHOSTADDRESS 5 p 12489 v SARG1S SARG2 command_line SUSER1 check_nt H SHOSTADDRESS p 12489 s sacyl v S ARG1S SARG2 Configurar el password en el fichero NSC ini en la carpeta del programa 5 NSCint Bloc de notas Archivo Edici n Formato Ver Ayuda settings OBFUSCATED PASSWORD This is the same as the password option but here you can store the password in an obfuscated manner Sh NOTICE obfuscation is NOT the same as encryption someone with access to this file can still figure out the a assword Its just a bit harder to do it at first glance obfuscat
276. sando consistente en dotar de herramientas para mejorar la capacitaci n t cnica de los socios y la organizaci n de los trabajos Todo ello basado en buenas pr cticas rigor t cnico y calidad organizativa El tema elegido es la monitorizaci n de sistemas y servicios por ser procesos comunes de los responsables de sistemas en cualquier instalaci n La supervisi n y el control son tareas imprescindibles para conocer el estado de la instalaci n y los servicios as como para tener capacidad de detecci n y correcci n de errores En un ecosistema tecnol gico tan rico heterog neo y variado como es el sanitario donde las relaciones e interdependencias entre servicios cada vez son mayores y la criticidad es muy alta es imprescindible tener un control de la instalaci n mantener el rendimiento en condiciones ptimas y anticiparse a los problemas para evitar paradas e indisponibilidades Es la monitorizaci n la herramienta que nos ayuda en estas tareas Debo agradecer al coordinador y a los compa eros que han participado en su realizaci n el esfuerzo generoso que han realizado as como felicitarlos por el resultado Un cuaderno principalmente pr ctico pero bien sustentado en disciplina t cnica que se ajusta perfectamente a las ideas iniciales que les hab amos transmitido cuando les realizamos el encargo Tambi n por ajustarse a los plazos ya que en pocos meses han sido capaces de expresar de forma ordenada todo su conocimiento sobre e
277. se regexp to match NAME in description OID S sum Add all storages that match NAME used space and total space THEN make the tests i index Parse index table instead of description table to select storage e exclude Select all storages except the one s selected by m No action on storage type selection T type TYPE pl calculate percent left pu calculate percent used Default bl calculate MegaBytes left bu calculate MegaBytes used w warn INTEGER percent MB of disk used to generate WARNING state you can add the sign c critical INTEGER percent MB of disk used to generate CRITICAL state you can add the sign R reserved INTEGER reserved blocks for superuser For ext2 3 filesystems it is 5 by default G gigabyte output warning amp critical levels in gigabytes f perfparse Perfparse compatible output S short lt type gt lt where gt lt cut gt lt type gt Make the output shorter 0 only print the global result except the disk in warning or critical exi lt 80 2 OK 1 Don t print all info for every disk ex 66 used lt 80 OK lt where gt optional if 1 put the OK WARN CRIT at the beginning lt cut gt take the lt n gt first caracters or lt n gt last if n lt 0 o octetlength INTEGER max size of the SNMP message usefull in case of Too Long responses Be carefull with network filters Range 484 65535 default are usually 1472 1452 1460 or 1440
278. service use local service Name of service template to use host_name monitorlinux service description HTTP check_command check_http notifications enabled 0 Adem s de este servicio se puede monitorizar el n mero de procesos de apache y as controlar el estado de las peticiones que Apache est sirviendo define servicel use generic service host_name monitorlinux service description Apache Processes check_command check_snmp_process public apache2 3 100 0 2 m 20 30 u 90 99 Para comprobar si el plugin funciona se puede utilizar la aplicaci n apache benchmarking tanto para apache como IIS Esta aplicaci n permite lanzar peticiones concurrentes a un servidor http En el siguiente ejemplo se lanzan 8000 en total en grupos de 600 concurrentes en el servidor apache 172 25 80 134 alumno nagios ab n 6000 c 800 http 172 25 80 134 This is ApacheBench Version 2 3 lt Revision 655654 gt Copyright 1996 Adam Twiss Zeus Technology Ltd http www zeustech net Licensed to The Apache Software Foundation http www apache org Benchmarking 172 25 80 134 be patient Completed 600 requests Completed 1200 requests Completed 1800 requests Completed 2400 requests Completed 3000 requests Completed 3600 requests Completed 4200 requests Completed 4800 requests Completed 5400 requests Completed 6000 requests Finished 6000 requests Server Software Server Hostname Server Port Document Path Document Length
279. st swchcuv1757 Host Service Status Last Check Duration I Attempt Status Information swehcuv1757 Sy CPU Temperatura 18 06 2012 13 30 58 3d 2h 58m 44s 1 3 SNMP OK Temprature status 4 CPU Usada OKA 18 06 2012 13 30 34 3d 23h 54m 17s 1 3 CPU used 8 0 lt 60 80 OK Memoria Libre OK 18 06 2012 13 32 24 2d 23h 22m 19s 1 3 SNMP OK HP Memory Free 10025952 megabytes PING OKI 18 06 2012 13 34 12 4d 0h 25m16s 1 3 ECO OK Paquetes perdidos 0 RTA 0 99 ms Boe BRI 12 25 2012 133220 2420 18m 38s 113 SNMP OK Power Supply status 4 system Contact OK 18 06 2012 13 29 51 0d 2h 29m 528 1 3 SNMP OK System Contact CSG Redes System y SNMP OK System Description ProCurve J4899A Switch 2650 revision Descriot 18 06 2012 13 29 53 4d 0h 24m36s 1 3 1 10 83 ROM H 06 02 swicodefbuldrfish mkts System Location 18 06 2012 13 33 36 4d 0h 30m 36s 1 3 SNMP OK System Location HCUV Armario Administracion Direccion 5 UoTi B 12 05 2012 122250 44 0n20msss pm ea ee 865172282 100 days AS IN 052012133202 3d 1h 44m41s 3 3 SNMP CRITICAL Fan status 2 10 Matching Service Entries Displayed Fig 118 Alarma en un switch por fallo del ventilador P g 118 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 10 1 2 Switches Cisco Catalyst Para los switches de Cisco se recomienda consultar las MIBS de Cisco en su p gina web La utilizaci n de las MIBS y SNMP no plantea ning n problema y es simil
280. sti n de red en las organizaciones En los siguientes cap tulos se desarrollan los principales servicios que ofrecen hoy en d a las herramientas de gesti n de red Primeramente se desarrollan una serie de conceptos b sicos sobre la gesti n de red Estos conceptos b sicos se describen en el cap tulo 3 Introducci n a la Gesti n de Red Este cap tulo es importante ya que se sientan las bases sobre la gesti n de red subrayando la importancia de disponer de herramientas que puedan realizar esta funci n con eficacia y eficiencia En el siguiente cap tulo se describen los dos protocolos utilizados en el modelo de gesti n de internet SNMP y RMON Aunque no se entra en profundidad son necesarios unos conocimientos m nimos sobre los protocolos de gesti n m s importantes Se describen las tres versiones del protocolo SNMP v1 v2 y v3 as como RMON y RMON2 Se a aden las referencias bibliogr ficas m s importantes para que el lector interesado pueda ampliar sus conocimientos Una vez completada la parte te rica se propone la instalaci n y configuraci n de una plataforma de gesti n de red En el cap tulo 5 se propone la instalaci n de Nagios una de las mejores herramientas del mercado debido a su gran difusi n y capacidades Es una herramienta de libre distribuci n y gratuita En la actualidad hay un gran n mero de desarrolladores en la red que ampl an d a a d a la funcionalidad de esta herramienta a adiendo plugin
281. t timeout INTEGER timeout for SNMP in seconds Default 5 V version prints version number Note with T pu or T bu OK lt warn lt crit with T pl ot T bl crit lt warn lt OK If multiple storage are selected the worse condition will be returned i e if one disk is critical the return is critical example Browse storage list lt script gt C lt community gt H lt host gt m lt anything gt w 1 c 2 v the m option allows regexp in perl format Test drive C F G H I on Windows m CFGHI Test all mounts containing var m var Test all mounts under var o m var Test only var o m var r Test all swap spaces m Swap Test all but swap spaces m Swap e 12 4 Anexo IV Sintaxis commando check_snmp_process SNMP Process Monitor for Nagios version 1 10 GPL licence c 2004 2006 Patrick Proy Pag 147 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Usage check_snmp_process pl v H lt host gt C lt snmp community gt 2 1 login x passwd p lt port gt n lt name gt w lt min proc gt lt max proc gt c lt min proc gt max proc m lt warn Mb gt lt crit Mb gt a u lt warn gt lt crit gt d lt delta gt t lt timeout gt o lt octet_length gt f A F r V 9 v verbose print extra debugging information and lists all storages h help print this help message H hostname HOST name or IP address of host to
282. t max of all process values are warning and critical values in Mb a average makes an average of memory used by process instead of max u cpu WARN CRIT checks cpu usage of all process values are warning and critical values in of CPU usage if more than one CPU value can be gt 100 100 1 CPU d delta seconds make an average of lt delta gt seconds for CPU default 300 5min g getall In some cases it is necessary to get all data at once because process die very frequently This option eats bandwidth an cpu for remote host at breakfast o octetlength INTEGER max size of the SNMP message usefull in case of Too Long responses Be carefull with network filters Range 484 65535 default are usually 1472 1452 1460 or 1440 t timeout INTEGER timeout for SNMP in seconds Default 5 V version prints version number Note CPU usage is in of one cpu so maximum can be 100 number of CPU example Browse process list lt script gt C lt community gt H lt host gt n lt anything gt v the n option allows regexp in perl format All process of opt soft bin n opt soft bin f All named process n named 12 5 ANEXO V RFCs relacionadas con SNMP P g 148 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS STD0062 An Architecture for D Harrington R December ASCII Obsoletes RFC3411 Describing Simple 2002 RFC2571 Network Management Updated by Dece
283. t_name swchcuv2176 7 The name we re giving to this switch alias swchcuv2176 hcuv sacyl es HP ProCurve 2650 A longer name associated with the switch address 10 40 83 184 7 IP address of the switch hostgroups switches procurve 7 Host groups this switch is associated with notes url http 10 40 83 182 Service definition CPU Usada Define a service to check the CPU consuption on HP Procurve Switchs Warning if lt 40 free critical if lt 20 free check snmp load pl command definition define service use generic service Name of service template to use hostgroup_name switches procurve service description CPU Usada is volatile 0 check period 24x7 max_check_attempts 3 normal check interval 5 retry_check_ interval 1 contact _groups switch admins notification interval 240 notification period 24x7 notification options c r check_command check_snmp_load_v1 hp 60 80 80 100 Service definition HP Procurve Switch Memoria libre define service use generic service Name of service template to use hostgroup_name switches procurve service description Memoria Libre is volatile 0 check period 24x7 max_check_attempts 3 normal check interval 5 retry_check_interval 1 contact_groups switch admins notification_interval 240 notification_period 24x7 notification_options c r check_command check_hpmemoryfree 2000 30000000 1000 30000000 28 Para Cisco consultar http www cisco com public sw center netmgmt cmtk mi
284. tacto 5 sysName DisplayString SIZE 0 255 RW Nombre del nodo sysLocation DisplayString SIZE 0 255 Nombre ubicaci n f sica del nodo Un valor num rico que indica el conjunto de servicios que ofrece 3 sysUpTime TimeTicks RO sysServices INTEGER 0 127 Tabla III Objeto interfaces de la MIB II OIDs Objeto Sintaxis Acceso Descripci n 2 1 ifNumber INTEGER RO N mero de interfaces de red 2 2 ifTable SEQUENCE QE NA Lista de entradas de interfaz ifEntry 2 2 ifEntry SEQUENCE NA Entrada de interfaz 2251 ifIndex INTEGER RO Identifcador nico de cada interfaz DisplayString SIZE Informaci n fabricante nombre 0 255 producto versi n Gauge RO Velocidad bps de la interfaz 2 Lo ifPhysAddress PhysAddress RO MAC address zq ifAdminStatus INTEGER RW Estado deseado upt downl testing 3 Estado actual up 1 down 2 testing 3 Valor de sysUpTime desde el valor actual del estado de la inerfaz ifOperStatus INTEGER RO 2 1 9 ifLastChange TimeTicks RO 2 2 1 10 ifInOctets Counter RO Numero total de octetos recibidos N mero total de paquetes unicast recibidos N mero total de paquetes no unicast recibidos N mero de paquetes recibidos descartados N mero de paquetes descartados por error N mero de paquetes con protocolo destino no soportado 2421416 ifOutOctets Counter RO Numero total de octetos transmitidos 7 ifOutUcastPkts Counter RO Mymp fatal aS paquetes
285. talla de informaci n de actualizaciones Si fuera necesario actualizar seguir las instrucciones de actualizaci n de cada rel ase Siempre es conveniente no instalar sobrescribiendo otra instalaci n de Nagios sino utilizar el comando make unistall o similar Si se actualiza desde una versi n m s antigua se recomienda revisar el manual de Nagios Corel Si se actualiza a la misma versi n base por ejemplo de la 3 3 a la 3 4 entonces los pasos son sencillos 13 http library nagios com library products nagioscore manuals P g 70 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS su l nagios rm usr local Nagios share main side index html wget http osdn dl sourceforge net sourceforge nagios nagios 3 4 1 tar gz tar xvzf Nagios 3 4 1 tar gz cd nagios configure sysconfigdir etc Nagios localstatedir var Nagios with command group nagcmd make all make install etc init d nagios restart 6 11 Env o de notificaciones por correo electr nico Nagios permite el env o de notificaciones por correo electr nico y SMS De esta forma es posible estar avisado de cualquier problema que surja con un host o un servicio de un host A continuaci n se describe el proceso para configurar las notificaciones v a email utilizando un servidor de correo con autentificaci n De esta forma se cubre el problema m s general ya que la mayor a de los servidores de correo actuales se configuran para autentifi
286. te events Enables packets to be captured after they flow through a channel Controls the generation and notification of events from this device 4 3 RMON2 ELEMENTS Packets dropped packets sent bytes sent octets broadcast packets multicast packets CRC errors runts giants fragments jabbers collisions and counters for packets ranging from 64 to 128 128 to 256 256 to 512 512 to 1024 and 1024 to 1518 bytes Sample period number of samples items sampled Includes the alarm table and requires the implementation of the event group Alarm type interval starting threshold stop threshold Host address packets and bytes received and transmitted as well as broadcast multicast and error packets Statistics host s sample start and stop periods rate base duration Source and destination address pairs and packets bytes and errors for each pair Bit filter type mask or not mask filter expression bit level conditional expression and or not to other filters Size of buffer for captured packets full status alarm number of captured packets Event type description last time event sent El est ndar de RMON2 se empez a desarrollar en 1994 como una extensi n de la MIB RMON para incluir monitorizaci n del tr fico sobre el nivel MAC El est ndar se defini en 1997 mediante dos RFCs RMON2 decodifica paquetes de los niveles 3 al 7 del modelo OSI red a aplicaci n Esta posibilidad
287. teway Interface CGI requests that have been made to this HTTP Server httpStatistics 35 totalBGIRequests OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of Binary Gateway Interface BGI requests that have been made to this HTTP Server httpStatistics 36 maxCGIRequests OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the maximum number of Common Gateway Interface CGI requests simultaneous processed by this HTTP Server httpStatistics 37 maxBGIRequests OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the maximum number of Binary Gateway Interface BGI requests simultaneous processed by this HTTP Server httpStatistics 38 currentBlockedRequests OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the current number of requests that have been temporarily blocked by this HTTP Server due to bandwidth throttling settings httpStatistics 39 totalBlockedRequests OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the total number of requests that have been temporarily blocked by this HTTP Server due to bandwidth throttling settings httpStatistics 40 totalAllowedRequests OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the total number of requests
288. ther condition is ok fan 1 1 4 is present location is 4 redundance is other condition is ok fan 1 1 5 is present location is 5 redundance is other condition is ok fan 1 1 6 is present location is 6 redundance is other condition is ok fan 1 1 7 is present location is 7 redundance is other condition is ok fan 1 1 8 is present location is 8 redundance is other condition is ok fan 1 1 9 is present location is 9 redundance is other condition is ok power enclosure 1 1 SDF BC3 condition is degraded power supply 1 1 1 is present condition is failed Ser 5AXXDOAHLY403L FW power supply 1 1 1 status is generalFailure inp line status is linePowerLoss power supply 1 1 2 is present condition is failed Ser 5AXXDOAHLY403Y FW power supply 1 1 2 status is generalFailure inp line status is linePowerLoss power supply 1 1 3 is present condition is failed Ser 5AXXDOAHLY403W FW power supply 1 1 3 status is generalFailure inp line status is linePowerLoss power supply 1 1 4 is present condition is ok Ser 5AXXDOAHLY403M FW power supply 1 1 5 is present condition is ok Ser 5AXXDOAHLY4040 FW power supply 1 1 6 is present condition is ok Ser 5AXXDOAHLY403N FW net connector 1 1 1 is present model is HP HP VC Flex 10 Enet Module Ser TW294123TF FW net connector 1 1 2 is present model is HP HP VC Flex 10 Enet Module Ser TW294123TL FW net connector 1 1 3 is present model is HP HP VC 8Gb 24 Port FC Module
289. tocols SNMP Administrative Model M St Johns M February Rose T Cox K Tesink F Baker J Watt January Eds 1993 D Throop Ed November 1992 D Throop F November Baker 1992 J Galvin McCloghrie J K McCloghrie J Davin J Galvin July 1992 K July 1992 J Davin J Galvin July 1992 K McClo ghrie A z C1303 RFC1298 RFC1289 RFC1285 a a A Convention for Describing SNMP based Agents SNMP over IPX DECnet Phase IV MIB Extensions Definitions of Managed Objects for Bridges FDDI Management Information Base K McClo Rose Bostock J Saperia R Wormley S E Decker P T o a ghrie M uary February 1992 December December Langille A 1991 Rijsinghani K McCloghrie J Case aS wo Pp NO NO 6 3 No Ne N E N po 4 Septiembre de 2012 Obsoletes RFC1233 Obsoleted by RFC2496 Obsoletes RFC1232 Obsoleted by RFC2495 Obsoleted by RFC1420 Obsoleted by RFC1559 Obsoleted by RFC1493 RFC1525 Updated by RFC1512 HISTORIC pub as PROPOSED STANDARD PROPOSED STANDARD PROPOSED STANDARD PROPOSED STANDARD PROPOSED STANDARD HISTORIC pub as PROPOSED STANDARD HISTORIC pub as PROPOSED STANDARD HISTORIC pub as PROPOSED STANDARD INFORMATIONAL INFORMATIONAL PROPOSED STANDARD PROPOSED STANDARD HISTORIC p
290. total 374912 KB Space used 317440 KB Space used 82 Name SYSTEM Files 1 Space total 350208 KB Space used 348160 KB Space used 99 Name UNDO Files 1 Space total 384384 KB Space used 215040 KB Space used 21 Name USERS Files 1 Space total 203136 KB Space used 102400 KB Space used 2 A O ees aoe tees import java sql ole ole ole class check_users_oracle static int usuarios warn 0 the commandline argument for warning threshold of KB used static int usuarios crit 0 the commandline argument for critical threshold of KB used static String output the plugin output string static String dbUrl the access URL for the database to query static String query the SQL query to execute static int usuarios_conectados 0 public static void main String args dbUrl jdbc oracle thin args 3 args 4 args 0 args 1 args 2 usuarios warn Integer parseInt args 5 usuarios crit Integer parselnt args 6 try use the Oracle JDBC driver Class forName oracle jdbc driver OracleDriver catch ClassNotFoundException e System err printin Error JDBC Driver Problem System err println e System exit 3 try open connection to database jdbc oracle thin destinationhost port dbname dbuser dbpassword Connection connection DriverManager getConnection dbUrl build query table dba
291. trado cv isisversisesttsraysrenssascevonseentoboasrenbvterervesndevinnes 74 Directorios de b squeda de MIBS iiiigsiicprninasiteianie na lap Ine 75 Directorios de b squeda de MIBS odian aos 75 Opciones para el host Re scheduling de un servicio s ssssesssisseeserisresesreseessess 75 Re scheduling de Un SELVICIO airis ico in 76 Especificaciones de un router residencial relacionadas con SNMP 0008 76 Estado del protocolo SNMP en router Alcatel Speedtouch 0 eect eee 77 Resultado configuraci n SNMP en router Alcatel Speedtouch 580 o 77 Configuraci n SNMP router Zyxel osc sass initia Gade a ena 78 Vista del SNMP Object Navigator de CISCO I coccicinicicnnononicncnacconinnnanncconicinanncnnno 78 Vista del SNMP Object Navigator de CISCO ID coconicicnnnconinnncnccconicncnnncconicinanncinno 79 Comprobaci n de objetos con el comando snmpwalk oocccionnicnininnicicnnaninncnnos 79 Vista de Nagios con varios servicios SNMP oocicnninonocinnnoninnoncnnaconnnncnconanicirarncnans 80 Configuraci n comunidad SNMP en Windows cocicicoccononininonanncnonnnonanccnnnnnonanccnnos 80 Configuraci n seguridad SNMP en WindoWS coccicinncnononinnnonannnnnannonanncncnnnonanncnnos 81 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Fig 68 Paso 1 configurar snmpd conf y Access Control Setup cocicicicncnoncnnnnnnnoninncnnncncns 81 Fig 69 Configurar opci n de acceso a la comunidad eric iii 82 Fig 70 Finaliza
292. ttpStatistics 23 totalMove OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the MOVE method that have been made to this HTTP Server Pag 177 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS httpStatistics 24 totalCopy OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the COPY method that have been made to this HTTP Server httpStatistics 25 totalMkcol OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the MKCOL method that have been made to this HTTP Server httpStatistics 26 totalPropfind OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the PROPFIND method that have been made to this HTTP Server httpStatistics 27 totalProppatch OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the PROPPATCH method that have been made to this HTTP Server httpStatistics 28 totalSearch OBJECT TYPE SYNTAX Counter ACCESS read only STATUS mandatory DESCRIPTION This is the number of requests using the MS SEARCH method that have been made to this HTTP Server httpStatistics 29 totalLock OBJECT TYPE SYNTAX Counter ACCESS read only
293. ub as PROPOSED STANDARD P g 162 MONITORIZACI N DE SERVICIOS Y SISTEMAS Definitions of Managed J Cook Ed December Objects for the Ethernet 1991 like Interface Types SNMP over OSI RFC1270 SNMP Communications F Kastenholz October Services RFC1284 ASCII Obsoleted by PROPOSED STANDARD i ASCII EXPERIMENTAL December Obsoleted by RFC1418 ASCII INFORMATIONAL Til ASCII SNMP DPI Simple G Carpenter B Network Management Wijnen Protocol Distributed Program Interface Obsoleted by EXPERIMENTAL RFC1592 RFC1227 SNMP MUX protocol and M T Rose May 1991 ASCII HISTORIC fk a Q fiat MIB RFC1215 Convention for defining M T Rose March 1991 ASCII INFORMATIONAL traps for use with the SNMP RFC1187 EXPERIMENTAL Bulk Table Retrieval October ASCII with the SNMP M T Rose K McCloghrie J R 7 SNMP over OSI une 1990 ASCII Obsoleted by EXPERIMENTAL RFC1418 ASCII Obsoletes HISTORIC REC1098 pub as STANDARD RFC1157 Simple Network Management Protocol SNMP RFC1098 Simple Network J D Case M April1989 ASCII Obsoletes UNKNOWN Management Protocol Fedor M L RFC1067 SNMP Obsoleted by REC1157 S S RFC1089 SNMP over Ethernet M Schoffstall C February ASCII UNKNOWN Davin M Fedor J 11989 Case Obsoleted by RFC4789 E al a s tf ai a ial
294. ueden consultar en la pagina web de Cisco 2 o en oidview com En el anexo VIII se incluye la lista con todos los OIDs de la MIB CISCO DOT11 ASSOCIATION MIB my Para descargar todas las MIBs disponibles se debe tener en cuenta la versi n de la 1053 Algunas como las anteriores est n disponibles para todas las versiones En el caso de necesitar monitorizar par metros de clientes concretos hay que averiguar primero su direcci n MAC para saber que OID consultar Los siguientes resultados muestran el nivel de se al en dBm y la relaci n se al ruido en dB de un cliente cuya direcci n MAC es 74 2F 68 9F D6 5D 116 47 104 159 214 93 Los OIDs a consultar son cDot11ClientSignalStrength EE VE OE Lo Oe O Sedo Be deck ot 32 ftp ftp cisco com pub mibs oid CISCO DOT11 ASSOCIATION MIB oid 33 ftp ftp cisco com pub mibs supportlists c1100 c1100 supportlist html P g 121 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS cDot11ClientSigQuality TL Ls Qi eI Soke Sede hol Los OIDs finales deben ser 3 1 5 85 80 83 65 49 116 47 104 159 214 93 4 1 5 OPETE PO OE PE EIFE TE SL 85 80 83 65 49 116 47 104 159 214 93 hh e D E TE E PE raa OL waa Los comandos a ejecutar son r ee alumno nagios Fig 122 Lectura SNMP del nivel de se al y relaci n se al ruido en AP Cisco Para comprobar los resultados se puede consultar la pagina web del dispositivo donde aparece esta informacion
295. uiente figura muestra la forma en que se aprovechan los recursos La falta de rendimiento y las indisponibilidades evitables son la causa de una parte considerable de la p rdida de eficiencia del sistema Indisponibilidad evitable CAPACIDAD TOTAL CAPACIDAD TIL Falta de rendimiento Fig 1 Capacidad total y capacidad til 3 4 reas de la Gesti n de Red definidas por la ISO La Organizaci n Internacional de est ndares ISO define una serie de reas en las que se debe aplicar la gesti n de red Este modelo se denomina por sus iniciales FCAPS Fault Configuration Accounting Performance Security e Gestion de fallos e Gesti n de la configuraci n y de nombres identificaci n e Accounting e Gestion de las prestaciones e Gestion de la seguridad P g 17 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 3 4 1 Gesti n de fallos Para mantener en funcionamiento una infraestructura de red compleja hay que supervisar cada uno de los elementos de forma individual y de manera conjunta como un todo Un fallo es un estado anormal que requiere la gesti n atenci n para que se solucione Se puede producir tanto porque el servicio o equipo deje de funcionar o porque se produzcan demasiados errores en su funcionamiento Hoy en d a se monitoriza el estado de un servicio o dispositivo estableciendo unos niveles y m rgenes de funcionamiento de tal forma que se pueda determinar con
296. unga transmitidos N mero total de paquetes no unicast transmitidos i ifInUcasPackts Counter RO ifInNUcastPkts Counter RO ifInDiscards Counter RO ifInErrors Counter RO ce 5 ifInUnknownProtos Counter RO ifOutNUcastPkts Counter RO P g 28 Septiembre de 2012 OIDs 2 2 1 19 2 62 120 2 2 1 21 2 2 1 22 MONITORIZACI N DE SERVICIOS Y SISTEMAS 01741 Sintaxis ifOutDiscards Counter ifOutErrors Counter ifOutQLen Gauge ifSpecific OBJECT IDENTIFIER 4 1 5 Especificaci n del protocolo Descripci n N mero de paquetes transmitidos descartados N mero de paquetes descartados por error Longitud de la cola de paquetes de salida Definiciones espec ficas en funci n del medio f sico El formato de la PDU Protocol Data Unit de SNMP es el siguiente Version Community SNMPvl PDU a SNMPvl Message PDU type request id 0 0 variable bindings b GetRequest PDU GetNextRequest PDU SetRequest PDU request id error status error index variable bindings c GetResponse PDU PDU type enterprise agent addr generic trap specific trap time stamp variable bindings d Trap PDU namel valuel name2 value2 See namen valuen e variable bindings Fig 6 Formato PDU SNMP PDU type request id 0 0 variable bindings a GetRequest PDU GetNextRequest PDU SetRequest PDU SNMPv2 Trap PDU InformRequest PDU
297. usage w 80 c 90 t 60 CHECK ESX OK cpu usage 3 56 cpu_usage 3 56 80 90 check_esx H 10 8 3 115 u xxx p xxx l vmfs CHECK_ESX OK storages r Storage1 2287 00 MB 3 36 Storage3 35440 00 MB 3 723 Storage2 40352 00 MB 14 49 Storagel 2287 00MB 7 Storage3 35440 00MB Storage2 40352 00MB check_esx H 10 8 3 115 u xxx p xxx 1 net CHECK ESX OK net receive 4 40 KBps send 0 30 KBps all 1 NICs are connected net_receive 4 40KBps net_send 0 30KBps OK_NICs 1 Bad_NICs 0 7 check_esx H 10 8 3 115 u xxx p xxx 1l io CHECK_ESX OK io commands aborted 0 io bus resets 0 io read latency 0 ms write latency 0 ms kernel latency 0 ms device latency 0 ms queue latency 0 ms io aborted 0 io busresets 0 io_read 0ms io_write 0ms io_kernel 0ms io_device 0ms io queue 0ms check_esx H 10 8 3 115 u xxx p xxx 1l runtime CHECK_ESX OK 3 4 VMs up overall status green connection state connected maintenance no All 175 health checks are Green no config issues vmcount 3units check_esx H 10 8 3 115 u xxx p xxx 1 service CHECK _ ESX OK services ntpd down sshd up vmware vpxa up vmware webAccess up VM checks from Base OS P g 168 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS check_esx H 10 8 3 115 N csl xxx p xxx 1 cpu CHECK ESX OK csl cpu usage 467 13 MHz 3 99 wait 19626 20 ms cpu_usagemhz 467 13Mhz cpu_usage 3 99 cpu wait 19626 20ms
298. vo Se pueden organizar en grupos para no tener que implementar todos los grupos de ese m dulo Los objetos se identifican mediante un identificador u OID Object Identifier que est n organizados de forma jer rquica en rbol ccitt 0 iso 1 joint iso ccitt 2 standard 0 registration member identified authority 1 body 2 organization 3 dod 5 A internet 1 directory 1 mgmt 2 experimental 3 private 4 security 5 snmpvw2 B mib 2 1 ANS ARA system 1 interface 2 ip 4 iemp 5 tcp E udp 7 egp 8 transmission 10 sample 11 Fig 5 rbol de OIDs De esta manera el acceso a un OID por ejemplo sysUpTime se realiza haciendo la consulta alumno nagios snmpget vl c public 172 25 80 207 sysUpTime 0 DISMAN EVENT MIB sysUpTimeInstance Timeticks 28367859 3 days 6 47 58 59 alumno nagios o mediante el OID correspondiente alumnofnagios snmpget vl c public 172 25 80 207 1 3 6 1 2 1 1 3 0 DISMAN EVENT MIB sysUpTimeInstance Timeticks 28386764 3 days 6 51 07 64 1 http www rfc editor org P g 24 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Los comandos que se pueden utilizar son sampget snmpgetnext y snmpwalk 4 1 3 SMI Structure of Management Information Definida por la RFC 1155 define el marco general por el que se definen y construyen las MIBs Especifica los tipos de datos que se pueden utilizar en una MIB as como la
299. vo Apache sudo etc init d apache2 reload 5 2 5 Arranque autom tico Para hacer que Nagios arranque autom ticamente ejecutar sudo update rc d nagios defaults 99 5 2 6 Instalaci n de plugins Las siguientes l neas sirve para instalar los plugins de Nagios una vez descargados de la p gina web de Nagios archivo tar gz sudo tar SVE cogl oS Piugins 4 Intar cd nagios plugins 1 4 15 configure with nagios user nagios with nagios group nagios sysconfdir etc nagios localstatedir var nagios sudo make sudo make install 5 2 7 Comprobaci n de la instalaci n de Nagios A continuaci n se muestra una lista de comprobaciones que se deben realizar para verificar que Nagios y los plugins est n correctamente instalados Se recomienda reiniciar apache y nagios si no aparece Apache https direccionIP oe Ge https 192 168 1 109 P Q Enord X E 1921681109 int we 93 Archivo Edici n Ver Favoritos Herramientas Ayuda dz El BEREC Body of Europes Sitios sugeridos M s complementos y 3 Traductor de Google Empleo P blico ECYL P E Portal de Salud dela Junta E Ministerio de Industria Tu X Revista Ciencia e Ingenieri It works This is the default web page for this server The web server software is running but no content has been added yet Fig 19 Pagina de inicio de Apache gt PHP https direccionIP
300. ware Workstation Users Manual Disponible en http www vmware com support pubs 14 VMware vCenter Converter Standalone User s Guide vCenter Converter Standalone 4 3 Disponible en http www vmware com support pubs P g 140 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 15 Guest Operating System Installation Guide Disponible en http www vmware com support pubs 16 VMware Compatibility Guide Disponible en http www vmware com support pubs 17 VMware Workstation 7 1 3 Release Notes http www vmware com support ws71 doc releasenotes_ws713 html 18 Nagios plug in development guidelines http nagiosplug sourceforge net developer guidelines html 19 Cisco Unified Serviceability Administration Guide http www cisco com en US docs voice_ip_comm cucm service 7_0_1 admin_master sadmn pdf 20 Cisco IOS Software Configuration Guide for Cisco Aironet Access Points http www cisco com en US docs wireless access_point 12 2_15_JA configuration guide s15pdf pdf Pag 141 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS 12 ANEXOS 12 1 ANEXO I Fichero de configuraci n switch HP Procurve Define the switch that we ll be monitoring define host use generic switch 7 Inherit default values from a template host_name swchcuv2176 7 The name we re giving to this switch alias swchcuv2176 hcuv sacyl es HP ProCurve 2650 f A longer name associated with the switch address 10 4
301. y A E ial bl 12 6 Anexo VI Fichero de configuraci n de gesti n de pacientes PARA ARA ARA RA AA RAR AAA RA RARA RARA RARA RARA RARA RARA DA RARA RADAR AD ARARARARARADA pacientes cfg Gesti n de Pacientes Desarrollo Last Modified 18 06 2012 Se le asignar n todos los servicios definidos para el grupo linux servers al que pertenece en el fichero service_Linux_HCUV cfg AAA AAA ARA A AA RARA AA RARA AA RARA MARA EEE a EEE EEE Ee EA EEE a ee EE EE A EE AALALA EALL RA AR AA EEE AAA EAE EEA EE A EEE Ee EE EE BP AMARARA AR RARA AAA AAA AAA ARA ARA ARMA RARA EE Ea aE a a ee a Ee EE RAR ANADA HOST DEFINITION P g 163 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS AMAAA RARA RA RA MARA DAA AAA AAA ARARARARARA RARA NARA RA AARARARAR ANA ELIET ETETETT ETET EEE AMARA RA ARA ARA AR AA AAA AAA ARA ARA ARMADA RARA RANA RAR AAARARARAR ANA RAR ANA RAR ANA RARANARA Define a host for the server define host use linux server 7 Name of host template to use This host definition will inherit all variables that are defined 7 in or inherited by the linux server host template definition host_name pacientes alias Servidor HP H I S Clinica address 10 xx yy Zz AMAAARA AA RA RAMA EEA EEA AEE AEA EEE AEA EE EA EEE EA EE EE EE EE AMALLA AA RARA AARA EEA AEA EEA RAR EH EEA EH EH EE Ee EP SERVICE DEFINITIONS AMAMARA RARA RAMA RARA MARA RA ARMAR AMARA RARA EH AEH Ea Ee EE EE EE E
302. y Statement for Reclassification of RFC 1643 to Historic Status Network Management Protocol SNMP Entity Sensor Management Information Base RFC3410 for Internet Standard Management Framework A MONITORIZACI N DE SERVICIOS Y SISTEMAS SMIng Objectives C Elliott D December ASCII INFORMATIONAL Harrington J 2001 Jason J Schoenwaelder F Strauss W Weiss RFC3159 Structure of Policy ASCII Provisioning Information SPPI Chan S Hahn R Sahita A Smith F Reichmeyer An SNMP Application D Raz J October ASCII INFORMATIONAL Level Gateway for Schoenwaelder B Payload Address Sugla Translation K McCloghrie M Fine J Seligson K August 2001 PROPOSED STANDARD RFC2962 O Capacity Data Types Presuhn L Heintz S January ASCII Gudur M Ellison 2000 RFC2856 Textual Conventions for A Bierman K June 2000 ASCII Additional High McCloghrie R RFC2742 DRAFT STANDARD pub as PROPOSED STANDARD Definitions of Managed Objects for Extensible SNMP Agents LEE MM RFC2741 Agent Extensibility M Daniele B January ASCII DRAFT STANDARD AgentX Protocol Wijnen M Ellison 2000 pub as PROPOSED Version 1 D Francisco STANDARD RFC2737 Obsoletes RFC2037 Obsoleted by RFC4133 Errata PROPOSED STANDARD
303. y WIR ean aoa ena ae 67 6 9 Aviso de PPP ao rales 68 6 10 AGA O A 69 6 11 Env o de notificaciones por correo electr nico 71 MONITORIZACI N V A SNMP i 73 7 1 Directorio de configuraci n de Nagios ss esseessesisessssisrerserrsrsstsrsstsesesresessesree 73 7 2 Activar SNMP en router tipo residencial Speedtouch Zyxel 0 ee 76 72A _ Alcatel Speedtouch 580 nininini aa EA E E S 76 722 Zyxel Prestige 690 AW iie en n aE E e EAR A E T s 78 P g 4 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Tide Object DO WS oa o an ps 78 7 4 Comprobaci n de objetos en un dispositivo ssss seesssisrieseresresesrsresesesrssrssesree 79 23 Instalaci n de agentes SNMP iio cdi de 80 7 5 1 Instalaci n y configuraci n del agente SNMP en Windows cciicicinonononos 80 7 5 2 Instalaci n y configuraci n de SNMP en Linux cccocicicnnnnnoninnnnnonanncnnanncnanccnnos 81 DEFINICI N DE SERVICIOS CON SNM Br ias 83 8 1 Primitivas y utilidades de SNMP oda epa isa 83 Sil SNMPGE T ir AA aaa Bihars 83 812i ENMEPGETNENT rita ici iso hist 83 841 3 SNMPWALK sia 83 8 2 Plugins SNMP de Nagios aia e a ATA E E EE 85 8 2 1 Plugin check AMP par aa ip AED ON 85 8 2 2 Plugin check_ifstatus y check_ifoperstatus sssseseesseissieserissesesresiesesess 86 8 3 Otros Plugins NM Pd AAA acen 87 BAL SNMP Traps virei ire iir aiii air 88 8 4 1 Env o y recepeiomide traps old li ii 88 8 4 2 NSCA configuraci n de traps
304. y check interval 1 Re check the service every minute until a hard state can be determined register 0 7 DONT REGISTER THIS DEFINITION ITS NOT A REAL SERVICE JUST A TEMPLATE Se puede especificar una lista de hosts o grupos en los par metros host_name y hostgroup_name 6 2 4 Contact y contactgroup Se puede definir el contacto de Nagios cuando hay errores contact cfg define contact contact_name nagiosadmin Short name of user use generic contact Inherit default values from generic contact template defined above alias Nagios Admin Fe Full name of user email nagios localhost 7 lt lt CHANGE THIS TO YOUR EMAIL ADDRESS El objeto gen rico est almacenado en el fichero de plantillas templates cfg P g 59 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS Generic contact definition template This is NOT a real contact just a template define contact name generic contact The name of this contact template service_notification period Zasa Service notifications can be sent anytime host_notification_period 24x7 Fs host notifications can be sent anytime service notification options W U C r f s seno notifications tor call service states flapping events and scheduled downtime events host_notification_options d u r f s send notifications for all host states flapping events and scheduled downtime events service notification commands notify service by email sen
305. ystem err printin lt db user gt lt db pwd gt d System exit 1 Check if we got a particular tablespace to check for java check tablespace oracle lt db ip gt lt db port gt lt db instance gt java check tablespace oracle lt db ip gt lt db port gt lt db instance gt java check tablespace oracle lt db ip gt lt db port gt lt db instance gt if args length 6 amp amp args 5 equals d debug 1 dbUrl jdbc oracle thin args 3 args 4 args 0 args 1 args 2 if debug 1 System out printin DB connect dbUrl Check if we just return the data without any values to compare to if args length 7 amp amp args 5 equals r tbspname args 6 Check if we got warn and crit values to check against if args length 8 tbspname args 5 kbytes_warn Integer parseInt args 6 kbytes_crit Integer parseInt args 7 try use the Oracle JDBC driver Class forName oracle jdbc driver OracleDriver catch ClassNotFoundException e System err printin Error JDBC Driver Problem System err printin e System exit 3 try open connection to database jdbc oracle thin destinationhost port dbname dbuser dbpassword Connection connection DriverManager getConnection dbUrl P g 181 Septiembre de 2012 MONITORIZACI N DE SERVICIOS Y SISTEMAS build query table dba_data files

Download Pdf Manuals

image

Related Search

Related Contents

Samsung Samsung SUR40 with Microsoft® PixelSense™ Käyttöopas  座安全に関するご支 意  USER`S MANUAL    Volkano 250  グリーン調達ガイドライン  Virtu USA MS-2048-WMSQ-ES Installation Guide  RX1E (h) - Aprimatic  

Copyright © All rights reserved.
Failed to retrieve file