# Glusterfs

# Introducción

**Ver**. 01-03-2022  
  
Con este plug-in podremos ver datos y monitorear nuestros volúmenes y bricks de glusterfs.

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

# Matriz de compatibilidad

<table border="1" id="bkmrk-sistemas-donde-se-ha" style="width: 494px;"><tbody><tr><td style="width: 233.991px;">**Sistemas donde se ha probado**</td><td style="width: 260px;">CentOS 7

</td></tr><tr><td style="width: 233.991px;">**Sistemas donde debería funcionar**</td><td style="width: 260px;">Cualquier sistema linux

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

# Pre requisitos

**Se requiere:**

- **Tener instalado el EndPoint de Pandora FMS en una máquina en la que esté instalado Gluster FS.**
- **Tener volúmenes que monitorear en el entorno.**

# Parámetros

<table border="1" id="bkmrk-mode-dejar-en-tentac" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 50%;">mode</td><td style="width: 50%;">Dejar en tentacle por defecto.</td></tr><tr><td style="width: 50%;">tentacle\_ip</td><td style="width: 50%;">La ip de pandora fms a la que enviar los datos</td></tr><tr><td style="width: 50%;">tentacle\_port</td><td style="width: 50%;">El puerto de tentacle (41121 por defecto)</td></tr><tr><td style="width: 50%;">prefix</td><td style="width: 50%;">Prefijo personalizado para los agentes creados</td></tr><tr><td style="width: 50%;">all</td><td style="width: 50%;">Opción para monitorear todos los volúmenes, "on" para dejarlo activo, "off" para desactivarlo.</td></tr><tr><td style="width: 50%;">volume</td><td style="width: 50%;">Si dejas desactivado el modo "all", con este parámetro puedes meter el nombre de un volumen que monitorizar.</td></tr></tbody></table>

**Ejemplo pandora\_glusterfs.conf :**

```
# configuration
mode=tentacle
tentacle_ip=192.168.1.222
tentacle_port=41121
prefix=prueba
all=on
volume=gv0
```

**\* En este ejemplo el parámetro volume no es usado ya que esta activado el parámetro "all".**

# Ejecución manual

```
perl pandora_glusterfs pandora_glusterfs.conf
```

[![image-1646140606293.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-03/scaled-1680-/image-1646140606293.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-03/image-1646140606293.png)

# Configuración en PandoraFMS

**Como plugin de agente**

Para poder monitorizar desde Pandora FMS con el plugin, deberemos llamarlo desde el conf del EndPoint que esta en la siguiente ruta :

```
/etc/pandora/pandora_agent.conf
```

lo llamaremos en la última línea del conf con el comando module\_plugin , seguido de la ruta del plugin perl y de la ruta del archivo conf.

```
module_plugin perl <path .pl> <path .conf>
```

# Módulos generados por el plugin

Se creará un agente por cada volumen del entorno, si tenemos activado el parámetro "all", o un agente con el volumen elegido con el parámetro "volume" con los siguientes módulos por cada brick.

**Vista agentes**

[![image-1646140981400.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-03/scaled-1680-/image-1646140981400.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-03/image-1646140981400.png)

<table border="1" id="bkmrk-m%C3%B3dulos-number-clien" style="border-collapse: collapse; width: 100%; height: 522px;"><tbody><tr style="height: 29px;"><td style="width: 100%; height: 29px;">**Módulos**</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Number clients</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Pid</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Inode size</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Disk</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Disk\_total</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Inode\_count</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Free\_inodes</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Arena</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Ordblks</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Smblks</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;"><div><div>Hblkhd</div></div></td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;"><div><div>Hblks</div></div></td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;"><div><div>Uordblks</div></div></td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;"><div><div>Usmblks</div></div></td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;"><div><div>Fsmblks</div></div></td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;"><div><div>Fordblks</div></div></td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;"><div><div>Keepcost</div></div></td></tr></tbody></table>

**Vista módulos**

[![image-1646140958336.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-03/scaled-1680-/image-1646140958336.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-03/image-1646140958336.png)