|
1 | 1 | # Jolokia input |
2 | 2 |
|
3 | | -This input package collects metrics from [Jolokia agents](https://jolokia.org/agent.html) running on a target JMX server or dedicated proxy server. |
| 3 | +The Jolokia input package collects metrics from [Jolokia agents](https://jolokia.org/agent.html) running on a target JMX server or dedicated proxy server. |
4 | 4 |
|
5 | 5 | The metrics are collected by communicating with a Jolokia HTTP/REST endpoint that exposes the JMX metrics over HTTP/REST/JSON. |
6 | 6 |
|
7 | | -The user can use this input for any service that collects metrics through Jolokia endpoint. User has the flexibility to provide custom mappings and custom ingets pipelines through the Kibana UI to get the tailored data. |
| 7 | +You can use this input for any service that collects metrics through Jolokia endpoint. You can provide custom mappings and custom ingets pipelines through the Kibana UI to get the tailored data. |
8 | 8 |
|
9 | 9 | ## Compatibility |
10 | 10 |
|
11 | | -The Jolokia module is tested with Jolokia 1.7.0. |
| 11 | +The Jolokia module is tested with Jolokia 2.2.9. |
| 12 | + |
| 13 | +## Configuration |
| 14 | + |
| 15 | +### Hosts |
| 16 | +To collect metrics from a Jolokia endpoint, configure the hosts setting to point to your Jolokia agent. |
| 17 | +For example: |
| 18 | +`http://host_address:jolokia_port` |
| 19 | + |
| 20 | +### Period |
| 21 | +Defines the interval at which metrics are fetched. |
| 22 | +For example, every `1s`, `1m`, `1h`. |
| 23 | + |
| 24 | +### Path |
| 25 | +Specifies the endpoint path of the Jolokia service, including any optional query parameters. |
| 26 | +- Default: `/jolokia` |
| 27 | +- Example with query parameters:: `/jolokia/?ignoreErrors=true&canonicalNaming=false` |
| 28 | + |
| 29 | +### HTTP Method |
| 30 | +Specifies the HTTP method used to communicate with the Jolokia endpoint. |
| 31 | +- Supported values: `GET`, `POST` |
| 32 | + |
| 33 | +### Authentication and SSL Configuration |
| 34 | +To securely communicate with HTTPS-enabled Jolokia endpoints, you can configure `SSL settings` to meet the necessary requirements. For example: |
| 35 | + |
| 36 | +```yaml |
| 37 | +ssl.verification_mode: full # Options: none, certificate, full |
| 38 | +ssl.certificate_authorities: |
| 39 | + - /etc/ssl/certs/ca.crt # Path to trusted CA file(s) |
| 40 | +ssl.certificate: /etc/ssl/certs/client.crt # Client certificate for mTLS |
| 41 | +ssl.key: /etc/ssl/private/client.key # Private key for the client certificate |
| 42 | +ssl.key_passphrase: your_key_passphrase # Optional: if the private key is encrypted |
| 43 | +ssl.ca_trusted_fingerprint: "AB:CD:EF:..." # Optional: pin to a trusted CA fingerprint |
| 44 | +bearer_token_file: /path/to/token.txt # Optional: for token-based auth |
| 45 | +username: your_username # Optional: for basic auth |
| 46 | +password: your_password # Optional: for basic auth |
| 47 | + |
| 48 | +``` |
| 49 | +- `username / password` used for Basic authentication (if required by Jolokia). |
| 50 | + |
| 51 | + |
| 52 | +### JMX Mappings and attributes |
| 53 | +The Jolokia input package can collect metrics from various JMX MBeans by configuring the `mbean` parameter. You can specify which MBeans and attributes to collect as show in below example: |
| 54 | + |
| 55 | +``` |
| 56 | +- mbean: 'java.lang:type=Runtime' |
| 57 | + attributes: |
| 58 | + - attr: Uptime |
| 59 | + field: uptime |
| 60 | +- mbean: 'java.lang:type=Memory' |
| 61 | + attributes: |
| 62 | + - attr: HeapMemoryUsage |
| 63 | + field: memory.heap_usage |
| 64 | + - attr: NonHeapMemoryUsage |
| 65 | + field: memory.non_heap_usage |
| 66 | +``` |
0 commit comments