# Configuration

<span style="font-weight: 400;">The following elements are necessary to configure the plugin:</span>

<span style="font-weight: 600;">MarkLogic API Rest access configuration</span>

<span style="font-weight: 400;">Configure the necessary parameters to guarantee that the plugin can connect with the API; this configuration section is imperative.</span>

*<span style="font-weight: 400;">Example</span>*<span style="font-weight: 400;">:</span>

```
# MarkLogic NoSQL Server access configuration
ml_server = your.marklogic.server
ml_port = 8002
ml_user = admin
ml_pass = admin
ml_realm = public
use_ssl = 0
```

##  

<span style="font-weight: 600;">Information directory configuration</span>

<span style="font-weight: 400;">The plugin has two work modes:</span>

<span style="font-weight: 400;">As an agent plugin, it sends messages of completed operations to the standard output as modules. The data extracted from the API is sent to the Pandora FMS server using the method configured in the configuration file.</span>

*<span style="font-weight: 400;">Example of a transfer method configuration</span>*<span style="font-weight: 400;">:</span>

```
# Pandora Server configuration
mode = tentacle
tentacle_ip = your.pandora.server
tentacle_port = 41121
tentacle_opts =
tentacle_client = /usr/bin/tentacle_client
local_folder = /var/spool/pandora/data_in
#tentacle_client = "C:\Program Files\pandora_agent\util\tentacle_client.exe"
temp = /tmp
```

<span style="font-weight: 400;">Currently, the following transfer methods are accepted:</span>

- <span style="font-weight: 400;">Tentacle (remote).</span>
- <span style="font-weight: 400;">Local copy (running in server plugin mode).</span>

<span style="font-weight: 400;">As a server plugin, the data extracted is sent as an XML, as in agent plugin mode, but in this case the operation messages are displayed in the standard error output (STDERR) and they will return a numeric value referencing the status of the execution. This kind of execution may be launched from the Pandora FMS server or the system CRON.</span>

**Generated agent configuration**

<span style="font-weight: 600;">Agent name setup</span>

<span style="font-weight: 400;">The data extracted from the MarkLogic NoSQL installation is sent to Pandora FMS, classified as agents for each significant element found on the system.</span>

- <span style="font-weight: 400;">Forests</span>
- <span style="font-weight: 400;">Databases</span>
- <span style="font-weight: 400;">Servers (services)</span>
- <span style="font-weight: 400;">Hosts</span>

<span style="font-weight: 400;">To control, and be able to find these agents in your system, it’s possible to configure a common name as </span>**header**<span style="font-weight: 400;">.</span>

```
# Agent name personalization
agent_name_header = ML_
```

<span style="font-weight: 400;">Following this example, all agents generated by the plugin will have the name (agent\_name) formatted as: </span>*<span style="font-weight: 400;">ML\_&lt;object type&gt;\_&lt;Name&gt;</span>*

<span style="font-weight: 400;">Where the object type follows the following code:</span>

- **F**<span style="font-weight: 400;">:</span> <span style="font-weight: 400;">forest </span>
- **DB**<span style="font-weight: 400;">:</span> <span style="font-weight: 400;">database </span>
- **S**<span style="font-weight: 400;">:</span> <span style="font-weight: 400;">App servers (server)</span>
- **H**<span style="font-weight: 400;">:</span> <span style="font-weight: 400;">host </span>

<span style="font-weight: 400;">Server-type (S) agents can also be configured so the generated agents include the server type in its agent\_name (HTTP, Task, webDAV, XDBC or ODBC):</span>

```
# Show server type (http, task, webDAV, xdbc, or odbc) in the agent name.
show_server_type_in_agentname = 1
```

<span style="font-weight: 400;">The resulting agent name would be: </span>*<span style="font-weight: 400;">ML\_S\_&lt;Name&gt; \[&lt;type&gt;\]</span>*

**Please note:**<span style="font-weight: 400;"> If this option is enabled, all pre-existing Server-type agents will stop receiving data from the plugin, and new agents will be generated, their server type being part of their agent\_name.</span>

**Group setup**

<span style="font-weight: 400;">The agent interval and the group to which the agent belongs can both be customized with this configuration:</span>

```
# Agent configuration
agent_interval = 300
agent_group = MarkLogic
```

<span style="font-weight: 400;">You can also configure the plugin to create a group for the agents in case it doesn’t already exist. </span>

**Please note:**<span style="font-weight: 400;"> do not use group auto-creation if your Pandora FMS belongs to an environment with metaconsole. Editing or creating groups in nodes with metaconsole enabled can corrupt the integrity of the synchronization of groups of the combined set of nodes and metaconsole.</span>

<span style="font-weight: 400;">If your installation doesn’t have metaconsole, groups can be auto-configured with these elements:</span>

```
# Create Group ~ Pandora FMS Console API
#  DO NOT ENABLE IT IF THERE IS AN ACTIVE METACONSOLE IN YOUR ENVIRONMENT
autocreate_group = 1
# Pandora API configuration
api_url = http://your.pandora.server/pandora_console/include/api.php
api_user = admin
api_user_pass = pandora
api_pass = 1234
# Group definition (global name: agent_group)
group_icon = Servers
```

##  

<span style="font-weight: 600;">Modules configuration</span>

<span style="font-weight: 400;">The following module parameters for the modules generated by the plugin can be configured using the configuration file:</span>

- <span style="font-weight: 400;">Set module intervals</span>
- <span style="font-weight: 400;">List of tags to add to the modules </span>
- <span style="font-weight: 400;">Set the module group (classifier)</span>
- <span style="font-weight: 400;">Instructions for Critical situations</span>
- <span style="font-weight: 400;">Instructions for Warning Situations</span>
- <span style="font-weight: 400;">Assigned Alert Templates</span>

```
# Module configuration
# Module interval
module_interval = 1
# Tags (comma separated)
# Ensure tags exists in your environment
module_tags  = NoSQL
# Module group (default)
module_group =
# Warning instructions
#warning_instructions = Some text to guide team to solve a warning condition
# Critical instructions
#critical_instructions = Some text to guide team to solve a critical condition
# Define as many tokens as templates are needed to be applied
# global_alerts = critical condition
# global_alerts = warning condition
```

##  

<span style="font-weight: 600;">Monitoring customization</span>

<span style="font-weight: 400;">You can control the elements of your infrastructure to be monitored:</span>

```
# Information filter
check_hosts = 1
check_databases = 1
check_forests = 1
check_servers = 1
And choose whether you want to monitor the App servers’ ports:
check_server_ports = 1
```

<span style="font-weight: 400;">This option allows to monitor the connectivity of the App servers by creating a remote TCP module which checks the status of the ports.</span>

<span style="font-weight: 400;">You can also customize the level of detail (number of modules) generated by the plugin by enabling or disabling the detailed mode:</span>

```
# Detailed information (generate extra modules)
show_detailed_hosts = 0
show_detailed_databases = 0
show_detailed_forests = 0
show_detailed_servers = 1
```

**Note**<span style="font-weight: 400;">: It is recommended to enable the detailed information in the service entity modules.</span>

<span style="font-weight: 400;">You can configure item exceptions to avoid monitoring unwanted entities:</span>

```
# Databases
# System databases: triggers, modules, security, schema
exlude_databases =
# Forests
# System forests: triggers, modules, security, schema
exlude_forests =
# Servers
exlude_servers =
```