# Setting up Jolokia for metrics collection

Set up Jolokia to enable the engine to access the Jolokia endpoint for metrics collection.

## Before you begin

* You have renamed and saved it in a directory accessible to Talend Remote Engine.

## Procedure

On the machine running your engine, set the following environment variables:

```
MS_SECURITY_USER_NAME
MS_SECURITY_USER_PASSWORD
SPRING_BOOT_SECURITY_USER_NAME
SPRING_BOOT_SECURITY_USER_PASSWORD
```

## Results

Information noteTip: For engines earlier than v2.12.4 (no longer supported), the engine is not pre-configured for Jolokia. In addition to setting the environment variables, you need to open &lt;RemoteEngineInstallationDirectory&gt;/etc/org.talend.ipaas.rt.dsrunner.metrics.collector.cfg, add the following lines, and save the file:

```
# Jolokia URL for TLS enabled microservices. Must contain string {ms.port}
ms.metric.collection.jolokia.url=https://localhost:{ms.port}/jolokia
# Jolokia configuration for basic authentication
ms.metric.collection.jolokia.username=${MS_SECURITY_USER_NAME:#{null}}
ms.metric.collection.jolokia.password=${MS_SECURITY_USER_PASSWORD:#{null}}
```

## What to do next

Deploy your custom application.properties file.