# Citrix NetScaler monitoring

# Introducción

<span style="font-weight: 400;">Este plugin permite monitorizar equipos de balanceo Citrix NetScaler a través de la API REST basada en JSON que provee el dispositivo.</span>

<span style="font-weight: 400;">Este plugin recolectará la lista de todos los servicios configurados en el dispositivo, así como la información de los mismos, creando un agente por servicio configurado.</span>

# Matriz de compatibilidad

<span style="font-weight: 400;">Sistemas donde se ha probado: NSMPX-10500.</span>

<span style="font-weight: 400;">Sistemas donde debería funcionar: API compatible.</span>

# Prerequisitos

<span style="font-weight: 400;">Los parámetros necesarios para la monitorización son:</span>

- <span style="font-weight: 400;">Nombre de usuario para autenticarse en el la API REST del dispositivo (solo lectura).</span>
- <span style="font-weight: 400;">Contraseña de dicho usuario.</span>
- <span style="font-weight: 400;">Url completa (FQDN/IP) y ruta de la API del dispositivo (por ejemplo: https://myns.mydomain/nitro/v1/stat/).</span>

# Configuración

<span style="font-weight: 400;">El fichero de configuración del plugin Pandora para Citrix NetScaler permite especificar los siguientes parámetros:</span>

```
#================================================================
# Citrix NetScaler Plugin conf file
#================================================================

# Citrix NetScaler API configuration
ns_url = http://mycitrixns/nitro/v1/stat/
ns_user = username
ns_pass = password
 
# Services to be analized
# ns_services=service_name;value
#	value = 0 -> main information
#	value = 1 -> child information
ns_services=lbvserver;1
ns_services=system;0
 
# modules to be gathered
#  comment to disable filter
modules_list = state,status,vbshealth,primaryaddress,cpuusage,disk1avail,memusagepcnt,powersupply2status
#,cursrvrconnections,establishedconn,totalrequests,totalrequestbytes,responsesrate,totalresponses,totalresponsebytes,vslbhealth
 
# NetScaler Agent configuration
agent_name = ns1.gslbi.dexmedia.com
 
# Agent configuration
agent_interval = 300
agent_group = Load Balancer
 
# Module interval
module_interval = 1
module_tags = Networking
module_group =
 
 
# Pandora API configuration
api_url = http://inna.lab.artica.lan/pandora_console/include/api.php
api_user = admin
api_user_pass = pandora
api_pass = 1234
 
 
# Pandora Server configuration
mode = tentacle
tentacle_ip = inna.lab.artica.lan
tentacle_port = 41121
tentacle_opts =
tentacle_client = "C:\Program Files\pandora_agent\util\tentacle_client.exe"
temp = .

```

<span style="font-weight: 400;">Grupo de los módulos (clasificación).</span>**ns\_url, ns\_user, ns\_pass**

<span style="font-weight: 400;"> </span> <span style="font-weight: 400;">Información básica (</span><span style="font-weight: 400;">necesaria</span><span style="font-weight: 400;">) para conectar con el NetScaler.</span>

**ns\_services**

<span style="font-weight: 400;"> </span> <span style="font-weight: 400;">Servicios que se van a analizar (0→pertenecerán al agente principal – netscaler, 1→pertenecerán a los agentes de servicio).</span>

**modules\_list**

<span style="font-weight: 400;"> </span> <span style="font-weight: 400;">Lista de módulos que se generarán.</span>

**agent\_interval**

<span style="font-weight: 400;"> </span> <span style="font-weight: 400;">Intervalo de los agentes creados.</span>

**agent\_group**

<span style="font-weight: 400;"> </span> <span style="font-weight: 400;">Grupo de los agentes creados.</span>

**module\_interval**

<span style="font-weight: 400;"> </span> <span style="font-weight: 400;">Intervalo de los módulos.</span>

**module\_tags**

<span style="font-weight: 400;"> </span> <span style="font-weight: 400;">Tags de seguridad para los módulos creados (separado por coma).</span>

**module\_group**

**mode**

<span style="font-weight: 400;"> </span> <span style="font-weight: 400;">Puede ser tentacle o local. Si establecemos local, deberemos especificar una carpeta destino donde se entregarán los ficheros </span>*<span style="font-weight: 400;">.data</span>*<span style="font-weight: 400;"> que contienen la información de los agentes extraída del NetScaler.</span>

# Ejecución Manual

<span style="font-weight: 400;">El plugin de Pandora FMS para la monitorización del sistema balanceador Citrix Netscaler se despliega de la siguiente manera:</span><span style="font-weight: 400;"> </span>

<span style="font-weight: 400;">Ejecución como plugin de servidor/ integración con crontab:</span>

```
# /etc/crontab
 
# Netscaler Plugin
*/5 * * * * root /usr/bin/perl citrix_netscaler.pl citrix_netscaler.conf

```

<p class="callout warning">Si falla la verificación de certificado, puedes usar PERL\_LWP\_SSL\_VERIFY\_HOSTNAME=0 al ejecutar el plugin, lo que se saltará ese paso.</p>

# Módulos generados por el plugin

<span style="font-weight: 400;">Los parámetros que monitoriza el plugin son:</span>

**A nivel de NetScaler**<span style="font-weight: 400;">:</span>

- <span style="font-weight: 400;">Información general de sistema (temperatura, uso de discos, uso de CPU, uso de RAM, voltajes, velocidad de los ventiladores, estado de la alimentación, etc.).</span>

**A nivel de servicio**<span style="font-weight: 400;">:</span>

- <span style="font-weight: 400;">Estado del servicio.</span>
- <span style="font-weight: 400;">Servidores que lo prestan (IP) y estado en cada uno de ellos.</span>
- <span style="font-weight: 400;">Conexiones (activas/totales/establecidas, etc.).</span>
- <span style="font-weight: 400;">Paquetes (recibidos/enviados/con fallos).</span>
- <span style="font-weight: 400;">Tasas de respuesta.</span>
- <span style="font-weight: 400;">Salud del servicio.</span>