Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chkal/prometheus-tomcat
Prometheus Java collector for Apache Tomcat
https://github.com/chkal/prometheus-tomcat
java monitoring prometheus
Last synced: about 6 hours ago
JSON representation
Prometheus Java collector for Apache Tomcat
- Host: GitHub
- URL: https://github.com/chkal/prometheus-tomcat
- Owner: chkal
- Created: 2018-10-07T10:52:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-07T11:24:39.000Z (about 6 years ago)
- Last Synced: 2024-05-01T19:34:05.717Z (7 months ago)
- Topics: java, monitoring, prometheus
- Language: Java
- Homepage: https://github.com/chkal/prometheus-tomcat
- Size: 3.91 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prometheus Tomcat
This project builds on top of [Prometheus JVM Client](https://github.com/prometheus/client_java) and
provides collectors for Apache Tomcat.Currently it supports collectors for:
* The GlobalRequestProcessor
* Tomcat's session manager
## Installation
Add the following dependency to your `pom.xml`:
```xml
de.chkal.prometheus.tomcat
prometheus-tomcat
1.0.0```
## Configuration
Please note that you have to first set up the [Prometheus JVM Client](https://github.com/prometheus/client_java)
as described in the corresponding documentation.Then register the Tomcat collectors just like other collectors.
```java
new TomcatRequestMetricsCollector().register();
new TomcatSessionMetricsCollector().register();
```If you want to register the collectors to a specific `CollectorRegistry`, just pass it to the `register()` method:
```java
new TomcatRequestMetricsCollector().register(registry);
new TomcatSessionMetricsCollector().register(registry);
```And that's it. :-)