# InfluxDB # Introduction **Ver**. 08-12-2021 With this plug-in can see InfluxDB stats
**Tipo**: Server plugin
# Compatibility matrix
**Systems where it has been tested**CentOS 7, Fedora, Debian
**Systems where it should work**Any linux system
# Pre requisites Required: - Python3 installed - The influx db module installed. - Have Pandora FMS Data Server enabled. - Have Pandora FMS Plugin Server enabled. # Configuration Python 3. **CentOS o fedora** ``` yum install python3 ``` **Debian** ``` apt-get install python3 ``` PIP **CentOS o fedora** ``` yum install python3-pip ``` **Debian** ``` apt install python3-pip ``` Influxdb library ``` pip3 install influxdb ``` The plugin will take the stats that can be viewed by executing the query: "show stats". : [![image-1639070190355.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-12/scaled-1680-/image-1639070190355.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-12/image-1639070190355.png) According to InfluxDB documentation: [https://docs.influxdata.com/platform/monitoring/influxdata-platform/tools/show-stats/](https://docs.influxdata.com/platform/monitoring/influxdata-platform/tools/show-stats/) # General parameters ``` python3 pandora_influxdb.py --host --port --user [ -g ] [ --data_dir ] [ --as_agent_plugin 1] ``` If the execution is correct we will see a 1. [![image-1639070588781.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-12/scaled-1680-/image-1639070588781.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-12/image-1639070588781.png) # Specific parameters The plugin have this parameters:
**Parameter****Description**
--host <host>hostname (required)
--port <puerto>Port number (8086 default)
--user <user>Username (if needed)
--password <password>Password (if needed)
-g GROUP, --group GROUPPandora FMS target group (optional)
--data\_dir DATA\_DIRPandora FMS data directory. By default it is /var/spool/pandora/data\_in/ (optional)
--as\_agent\_pluginIt's optional, if you want the plugin to be an agent plugin and put the modules in the pandora agent, execute this with a 1 (optional)
# Manual execution If executed correctly we will see a 1 . [![image-1639070927355.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-12/scaled-1680-/image-1639070927355.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-12/image-1639070927355.png) With as\_agent\_plugin set to 1 we will see the xml via terminal. [![image-1639070977296.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-12/scaled-1680-/image-1639070977296.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-12/image-1639070977296.png) # Modules generated by the plugin The following agents will be created with the following modules : **INFLUXDB\_Runtime**
Alloc
Frees
HeapAlloc
HeapIdle
HeapInUse
HeapObjects
HeapReleased
HeapSys
Lookups
Mallocs
NumGC
NumGOroutine
PauseTotalNS
Sys
TotalAlloc
**INFLUXDB\_queryExecutor**
queriesActive
queriesExecuted
queriesFInished
queryDurationNs
recoveredPanics
**INFLUXDB\_Httpd**
authFail
clientError
fluxQueryReq
fluxQueryReqDurationNS
pingReq
PointWrittenDropped
PointWrittenFail
PointWrittenOK
PromReadReq
PromWriteReq
queryReq
queryReqDurationNS
queryRespBytes
recoveredPanics
req
reqActive
reqDurationNS
serverError
statusReq
ValuesWrittenOK
writeReq
writeReqActive
writeReqBytes
writeReqDurationNS
**INFLUXDB\_Write**
pointReq
poinReqLocalr
req
subWriteDrop
subWriteOk
WriteDrop
WriteError
WriteOk
WriteTimeout
**INFLUXDB\_Subscriber\_cq**
createFailures
pointsWritten
queryFail
queryOk
writeFailures
[![módulos influxdb.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-12/scaled-1680-/modulos-influxdb.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-12/modulos-influxdb.png) # Configuration in Pandora **Installation from the console** To register the plugin, from the console, go to the "register plugin" section. **[![register_plugin.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register-plugin.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register-plugin.png)** Click on select file. **[![register_plugin2.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register-plugin2.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register-plugin2.png)** Select the pspz2 file that contains the plugin [![register1_influxdb.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register1-influxdb.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register1-influxdb.png) Se nos mostrará un mensaje indicando que se ha registrado correctamente. [![register2_influxdb.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register2-influxdb.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register2-influxdb.png) Once the plugin is registered, we will see it in the plugins section. [![serversingles.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/serversingles.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/serversingles.png) Clicking on the plugin title will take you to the plugin menu. [![register3_influxdb.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register3-influxdb.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register3-influxdb.png) In macros will appear all those that have the plugin, remember that not all are obligatory, only those that are specified. [![register4_influxdb.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register4-influxdb.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register4-influxdb.png) Below you can assign the required value to each variable. [![register5_influxdb.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register5-influxdb.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register5-influxdb.png)