# Plugin weblogic

# Introducción

**Ver**. 07-09-2021  
  
Plugin que coge stats de cada server y app de la instalacion, también coge datos de los threadpools, jvm y agent snmp

<div id="bkmrk-tipo%3A-plug-in-de-ser"><div>**Tipo**: Plug-in de servidor </div></div>

# Matriz de compatibilidad

<table border="1" id="bkmrk-sistemas-donde-se-ha" style="border-collapse: collapse; width: 100%; height: 84px;"><tbody><tr style="height: 28px;"><td style="width: 50%; height: 28px;">**Sistemas donde se ha probado**</td><td style="width: 50%; height: 28px;">CentOS 7, Fedora

</td></tr><tr style="height: 28px;"><td style="width: 50%; height: 28px;">**Sistemas donde debería funcionar**</td><td style="width: 50%; height: 28px;">Cualquier sistema linux

</td></tr></tbody></table>

# Prerequisitos

Se requiere:

- Un servidor Weblogic
- Tener activado RESTful Management Services en weblogic
- Tener el **Data Server** de Pandora FMS habilitado
- Tener el **Plugin Server** de Pandora FMS habilitado

# Configuración

Para hacer uso del plugin tienes que tener activado RESTful Management Services en tu servidor de weblogic, para ello ve a :

Domain -&gt; Configuration -&gt; General -&gt; Advanced -&gt; Enable RESTful Management Services

Y reinicia el Admin Server.

[![image-1631097652682.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-09/scaled-1680-/image-1631097652682.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-09/image-1631097652682.png)

# Parámetros generales del plugin

```
python pandora_weblogic.py -u <ip-with-port> -us <user> -p <password>
```

Si la ejecución es correcta veremos un 1.

# Parámetros específicos del plugin

El plugin cuenta con los siguientes parámetros:

<table border="1" id="bkmrk-par%C3%A1metro-descripci%C3%B3" style="border-collapse: collapse; width: 100%; height: 174px;"><tbody><tr style="height: 29px;"><td style="width: 50%; height: 29px;">**Parámetro**</td><td style="width: 50%; height: 29px;">**Descripción**</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">-u &lt;url-with-port&gt; --ip &lt;url-with-port&gt;url</td><td style="width: 50%; height: 29px;">con el puerto, obligatorio.</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">-us &lt;user&gt; --user &lt;user&gt;</td><td style="width: 50%; height: 29px;">user de weblogic, obligatorio.</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">-p &lt;password&gt; --password &lt;password&gt;</td><td style="width: 50%; height: 29px;">password de weblogic, obligatorio.</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">-g GROUP, --group GROUP</td><td style="width: 50%; height: 29px;">Grupo de destino de Pandora FMS (opcional)</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--data\_dir DATA\_DIR</td><td style="width: 50%; height: 29px;">Directorio de datos de Pandora FMS. **Por defecto** es /var/spool/pandora/data\_in/ (opcional)</td></tr></tbody></table>

# Configuración en Pandora

**Instalación desde consola**

Para el registro del plugin, desde la consola, se debe ir al apartado "registrar plugin".

[![imagen.png](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/scaled-1680-/imagen.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/imagen.png)

Daremos a seleccionar archivo.

[![imagen.png](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/scaled-1680-/Rnvimagen.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/Rnvimagen.png)

Seleccionaremos el fichero pspz2 que contiene el plugin.

[![register1_weblogic.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register1-weblogic.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register1-weblogic.png)

Se nos mostrará un mensaje de que se ha instalado correctamente.

[![Captura desde 2025-07-21 17-34-48.png](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/scaled-1680-/G0Lcaptura-desde-2025-07-21-17-34-48.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/G0Lcaptura-desde-2025-07-21-17-34-48.png)

Una vez registrado el plugin, lo veremos en el apartado plugins.

[![servers_plugins.png](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/scaled-1680-/IAxservers-plugins.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/IAxservers-plugins.png)

En el apartado parámetros saldrán todos los que contiene el plugin y se podrá configurar, recordar que no todos son obligatorios, solo en los que se especifica.

[![register3_weblogic.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register3-weblogic.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register3-weblogic.png)

Abajo se le podrá asignar un valor a cada macro.

[![register4_weblogic.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register4-weblogic.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register4-weblogic.png)

**Instalación manual**

La mejor forma de manejar plugins de servidor en Pandora es desde "/usr/share/pandora\_server/util/plugin" asi que lo enviaremos esa ruta.

Después nos moveremos a la carpeta en la que lo hemos metido ( "/usr/share/pandora\_server/util/plugin" es la recomendada").

**Recuerda: Tienes que instalar las dependencias que necesita el módulo Requests en tu sistema, esta explicado en el apartado configuración.**

<div id="bkmrk-nos-movemos-desde-ho"><div>Nos movemos desde home con :</div></div><div id="bkmrk--10"></div>```
cd /usr/share/pandora_server/util/plugin/
```

Ejecutamos el plugin para ver que funciona :

```
python pandora_weblogic.py -u <ip-with-port> -us <user> -p <password>
```

**Como plugin de servidor**

Iremos a servidores &gt; plugins:

[![servers_plugins.png](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/scaled-1680-/k2Vservers-plugins.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/k2Vservers-plugins.png)

Pinchamos en añadir:

[![add_plugin.png](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/scaled-1680-/pnQadd-plugin.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/pnQadd-plugin.png)

Le ponemos en nombre y la descripción que se prefiera:

[![weblogic1.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-09/scaled-1680-/weblogic1.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-09/weblogic1.png)

Metemos como comando la ruta al plugin, y como parámetros los que hemos metido ejecutando el plugin, los campos "\_field\_" son macros definidas más abajo.

[![weblogic2.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-09/scaled-1680-/weblogic2.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-09/weblogic2.png)

Ponemos por cada macro la descripción que se prefiera y como valor los datos de tu url, user y pass.

[![weblogic3.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-09/scaled-1680-/weblogic3.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-09/weblogic3.png)

Hecho esto si ejecutamos el plugin desde el terminal se nos habrá creado el agente con los módulos.

# Módulos generados

Se nos creara un agente por cada server y aplicación de nuestro Weblogic, con módulos con sus stats, y un agente con datos de JVM, threadpools y agent snmp.

**Módulos Server**

<table border="1" id="bkmrk-cluster-name-current" style="border-collapse: collapse; width: 100%; height: 174px;"><tbody><tr style="height: 29px;"><td style="width: 100%; height: 29px;">cluster name</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">current machine</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">health</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">heapFreeCurrent</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">heapSizeCurrent</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">heapSizeMax</td></tr></tbody></table>

<table border="1" id="bkmrk-java-version-opensoc" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">java version</td></tr><tr><td style="width: 100%;">OpenSocketsCurrentCount</td></tr><tr><td style="width: 100%;">oSname</td></tr><tr><td style="width: 100%;">oSversion</td></tr><tr><td style="width: 100%;">state</td></tr><tr><td style="width: 100%;">weblogic version</td></tr></tbody></table>

**Módulos Aplicación**

<table border="1" id="bkmrk-completedrequest-pen" style="border-collapse: collapse; width: 100%; height: 145px;"><tbody><tr style="height: 29px;"><td style="width: 100%; height: 29px;">completedRequest</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">pendingRequest</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">health</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">state</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">type</td></tr></tbody></table>

**Módulos Snmp agent,jvm y threadpools**

<table border="1" id="bkmrk-jvmruntime.-jvmrunti" style="border-collapse: collapse; width: 100%; height: 290px;"><tbody><tr style="height: 29px;"><td style="width: 100%; height: 29px;">JVMRuntime.heapfreecurrent</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">JVMRuntime.heapfreepercent</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">JVMRuntime.heapsizecurrent</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">JVMRuntime.heapsizemax</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">JVMRuntime.javavendor</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">JVMRuntime.javaversion</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">JVMRuntime.javavmvendor</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">JVMRuntime.name</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">JVMRuntime.osname</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">JVMRuntime.osversion</td></tr></tbody></table>

<table border="1" id="bkmrk-jvmruntime.-jvmrunti-0" style="border-collapse: collapse; width: 100%; height: 290px;"><tbody><tr style="height: 29px;"><td style="width: 100%; height: 29px;">JVMRuntime.processcpuload</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">JVMRuntime.uptime</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">SNMPAgentRunTime.attributechangetrapcount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">SNMPAgentRunTime.countermonitortrapcount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">SNMPAgentRunTime.failedauthenticationcount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">SNMPAgentRunTime.failedauthorizacioncount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">SNMPAgentRunTime.failedencrytioncount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">SNMPAgentRunTime.gaugemonitortrapcount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">SNMPAgentRunTime.logmessagetrapcount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">SNMPAgentRunTime.masteragentxport</td></tr></tbody></table>

<table border="1" id="bkmrk-snmpagentruntime.-sn" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">SNMPAgentRunTime.monitortrapcount</td></tr><tr><td style="width: 100%;">SNMPAgentRunTime.serverstarttrapcount</td></tr><tr><td style="width: 100%;">SNMPAgentRunTime.serverstoptrapcount</td></tr><tr><td style="width: 100%;">SNMPAgentRunTime.stringmonitortrapcount</td></tr><tr><td style="width: 100%;">SNMPAgentRunTime.udplistenport</td></tr><tr><td style="width: 100%;">ThreadpoolRunTime.executecompletedrequestcount</td></tr><tr><td style="width: 100%;">ThreadpoolRunTime.executethreadidlecount</td></tr><tr><td style="width: 100%;">ThreadpoolRunTime.executetotalthreadcount</td></tr><tr><td style="width: 100%;">ThreadpoolRunTime.hoggingthreadcount</td></tr><tr><td style="width: 100%;">ThreadpoolRunTime.minthreadsconstraintcompleted</td></tr></tbody></table>

<table border="1" id="bkmrk-threadpoolruntime.-t" style="border-collapse: collapse; width: 100%; height: 227px;"><tbody><tr style="height: 24px;"><td style="width: 100%; height: 24px;">ThreadpoolRunTime.minthreadsconstraintpending</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">ThreadpoolRunTime.overloadrejectrequests</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">ThreadpoolRunTime.pendinguserrequestcount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">ThreadpoolRunTime.queuelenght</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">ThreadpoolRunTime.sharedcapacityforworkmanager</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">ThreadpoolRunTime.standbythreadcount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">ThreadpoolRunTime.stuckthreadcount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">ThreadpoolRunTime.throughtput</td></tr></tbody></table>

[![Captura desde 2025-07-21 17-52-24.png](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/scaled-1680-/captura-desde-2025-07-21-17-52-24.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/captura-desde-2025-07-21-17-52-24.png)

[![imagen.png](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/scaled-1680-/KcEimagen.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/KcEimagen.png)

[![Captura desde 2025-07-21 18-07-14.png](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/scaled-1680-/Fthcaptura-desde-2025-07-21-18-07-14.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/Fthcaptura-desde-2025-07-21-18-07-14.png)