# Configuration in Pandora

<span style="text-decoration: underline;">CONFIGURATION</span>

The configuration file of the JMX monitoring plugin is divided into blocks:

**Connection data**

```
########################################################################
## Connection data
########################################################################
## URL endpoint of the target server
## Tomcat (example)
#server_url http://localhost:8080/jolokia
## Websphere (example)
#server_url http://localhost:49163/jolokia
## Weblogic (example)
#server_url http://192.168.70.237:7001/jolokia
## Product; product id of an specific technology
## (tomcat, jboss, weblogic, websphere, etc). By default the plugin uses autodetection
#product weblogic
## Timeout in seconds for an HTTP request (By default 180)
# timeout 180
```

server\_url

Indicates the url address where the Jolokia application is deployed.

product

It is recommended to define this field, as the autodetection process may take some time. Indicate the product to be monitored: tomcat, jboss, weblogic, websphere, etc.

**Debug**

```
########################################################################
## Others
########################################################################
## Plugin log output will be fully verbose (with debug information)
#debug 1
```

debug

Set the value of this field to 1 to see detailed information in the plugin execution log. Default in /tmp/pandora\_jmx\_plugin.log

**Scope of monitoring**

```
########################################################################
## Monitoring checks
########################################################################
## Server info checks
server_info
## OS info checks
os_info
## Monitor deployed web applications
webapp_info
## Include also monitoring for internal applications (console, consolehelp,...)
#include_internal_webapps 0
## This list will be used later by "servlets_list_info"
## check like a white list (only the following servlets will be checked)
## Tomcat monitoring
#use_only_servlets_begin
#WebModule=//localhost/examples,name=HelloWorldExample
#WebModule=//localhost/host-manager,name=HTMLHostManager
#WebModule=//localhost/examples,name=wsSnake
#use_only_servlets_end
## Websphere monitoring
#use_only_servlets_begin
#WebModule=DefaultCell01,name=jolokia_war
#WebModule=DefaultCell01,name=Helloworld_war
#use_only_servlets_end
## Weblogic monitoring
#use_only_servlets_begin
#WebModule=WL_PROXY,name=JspServlet
#use_only_servlets_end
# Servlets info
# (by default all Servlets deployed in the App server; will use use_only_servlets list
to restrict target Servlets checked)
#servlets_list_info
## Servlet monitoring, retrieve attributes from detected servlets
#servlet_attributes startTime loadTime,servletClass,requestCount,loadOnStartup
```

You can configure the plugin to report the information you need:

server\_info

Generate modules with JMX server information (1) or not (0).

os\_info

Add OS monitoring modules (1) or not (0).

webapp\_info

Monitor the applications deployed on the JMX server (1) or not (0). If you combine this parameter with agent\_per\_instance , as many agents will be created as applications you have deployed. This functionality has been tested with Weblogic only.  
may not behave as expected with other application servers.

include\_internal\_webapps

Include in the list of monitored web applications, the internal applications of the JMX server (1) or not (0).

servlets\_list\_info

Servlet-based monitoring allows us to receive information about servlet availability. You can configure specific servlets to monitor by specifying:

use\_only\_servlets\_begin

This will restrict servlet monitoring to the servlets specified line-by-line after this tag.

use\_only\_servlets\_end

Indicates the end of the servlet definition.

Note: If you use servlets\_list\_info and do not define the use\_only\_servlets block, all available servlets will be parsed.

**Inclusion of custom mbeans**

```
########################################################################
## Request of specifics attributes
########################################################################
# Example 1: Get an specific parameter ("used") from "HeapMemoryUsage" attribute from
the MBean "java.lang:type=Memory"
mbean_check_begin
mbean_check_name MemoryUsed
mbean_check_type generic_data
mbean_check_module_group Module group
mbean_check_description In Bytes
mbean java.lang:type=Memory
attribute HeapMemoryUsage
path used
mbean_check_end
# Tomcat server specific checks
#include jmx.tomcat.conf
# Websphere server specific checks
#include jmx.websphere.conf
# Weblogic server specific checks
#include jmx.weblogic.conf
# Kafka server specific checks
#include jmx.kafka.conf
```

You can define your own checks to retrieve specific information from mbeans. To do so, define as many check blocks as you need:

mbean\_check\_begin

Specifies the start of a specific mbean check definition block.

mbean\_check\_name

Is the module name as it will appear in Pandora FMS.

mbean\_check\_type

It indicates the type of data that will be assigned to the module in Pandora FMS.

mbean\_check\_module\_group

You can customize the module group that will be applied to the monitors generated by the mbean data extraction.

mbean\_check\_description

It is the module description as it will appear in Pandora FMS.

mbean

Configure here the mbean to query.

path

Indicate the path where the mbean you want to check is hosted.

mbean\_check\_wmin

Specify the lower limit of the Warning threshold for the module.

mbean\_check\_wmax

Specifies the upper limit of the Warning threshold for the module.

mbean\_check\_wstr

Specifies the text as the Warning threshold for modules of type string.

mbean\_check\_winv

Reverses the direction of the Warning thresholds for the module.

mbean\_check\_cmin

Specifies the lower limit of the Critical threshold for the module.

mbean\_check\_cmax

Indicates the upper limit of the Critical threshold for the module.

mbean\_check\_cstr

Specifies the text as the Critical threshold for modules of type string.

mbean\_check\_cinv

Reverses the direction of Critical thresholds for the module.

mbean\_check\_end

Specifies the end of a specific mbean check definition block.

https://pandorafms.com/guides/public/link/236#bkmrk-macro-de-detecci%C3%B3n-d  
  
**mbean \_jokeritem\_ dynamic detection macro**  
In order to monitor complex mbeans, you can use the \_jokeritem\_ macro in such a way that as many modules as there are mbeans are generated.  
macro in such a way that as many modules are generated as data the mbean provides:

Example configuration.

```
mbean_check_begin
mbean_check_name jms.messagescurrentcount._jokeritem_
mbean_check_module_group jvm.jms
mbean_check_type generic_data
mbean_check_description The current number of messages stored on this JMS server. This
number does not include the pending messages.
mbean com.bea:Name=_jokeritem_,ServerRuntime=_serverruntime_,Type=JMSServerRuntime
attribute MessagesCurrentCount
mbean_check_end
```

**Macro for server runtime selection**  
It is now possible to select the target runtime server dynamically using the \_serverruntime\_ macro.

Example configuration:

```
mbean
com.bea:Name=ThreadPoolRuntime,ServerRuntime=_serverruntime_,Type=ThreadPoolRuntime
```

include  
You can specify as many extra configuration files as you need.

**Data delivery configuration**

```
########################################################################
## Request of all list of JMX information
## (Warning!!! this output is very very verbose, so use this check carefully)
########################################################################
#list_all_mbeans
## Report style
as_agent_plugin 0
agent_per_instance 1
## Custom header
module_header jmx_check_
## agent configuration
#agent_name custom_agent_name
#agent_interval 300
#agent_group JMX
## Pandora Server configuration
transfer_mode tentacle
tentacle_ip your.pandora.server.ip
tentacle_port 41121
tentacle_opts
tentacle_client "tentacle_client"
temp /tmp
local_folder /var/spool/pandora/data_in
```

You can configure the data delivery in Pandora FMS in several ways:

list\_all\_mbeans

It will generate a module with a list in text with all the available mbeans.

as\_agent\_plugin

If it is active (1), it will dump all the module information by screen in XML format to be executed from an agent.  
XML format to be executed from an agent. If not active (0), it will deliver the information by  
transferring complete XML to the server configured as destination.

agent\_per\_instance

If it is active (1), it will send the information of instances as individual agents to  
Pandora FMS.

If the monitoring is based exclusively on mbeans, they will be grouped per  
servlet.

● If the monitoring is based on web applications (webapp\_info), as many agents will be created as many  
agents will be created as many as the number of web applications deployed.

● An agent representing the application server itself will always be created.  
If disabled (0), all module information will be sent in one single agent (application server name or  
agent (application server name or the one specified in agent\_name ).

module\_header

Specifies a custom header for the modules generated by the plugin.

mode

XML file transfer mode, it can be:

● local: copies files to local\_folder.

● tentacle: transfer files to tentacle\_ip via tentacle\_port

tentacle\_ip

IP address or FQDN where Pandora FMS is working.

tentacle\_port

Port where the Tentacle service associated to your Pandora FMS server is listening.  
listening.

tentacle\_opts

Extra options for the Tentacle client.

tentacle\_client

Path where to find the Tentacle client binary.

local\_folder

Location to move files to in local mode.

temp

Temporary location to store files before sending them.