Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JmxOpenMetricsModule #429

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,15 @@ modules:
monitor:
taskDelaySeconds: 10
```

## Monitoring

Prometheus can be configured to hit the OpenMetrics endpoint using:

```
scrape_configs:
- job_name: trino_gateway
static_configs:
- targets:
- localhost:8080
```
5 changes: 5 additions & 0 deletions gateway-ha/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@
<artifactId>node</artifactId>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>openmetrics</artifactId>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>stats</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import io.airlift.log.LogJmxModule;
import io.airlift.log.Logger;
import io.airlift.node.NodeModule;
import io.airlift.openmetrics.JmxOpenMetricsModule;
import io.airlift.units.Duration;
import io.trino.gateway.baseapp.BaseApp;
import io.trino.gateway.ha.config.HaGatewayConfiguration;
Expand All @@ -54,6 +55,7 @@ private void start(List<Module> additionalModules, HaGatewayConfiguration config
new HttpServerModule(),
new JmxModule(),
new JmxHttpModule(),
new JmxOpenMetricsModule(),
new LogJmxModule(),
new MBeanModule(),
new JsonModule(),
Expand Down
Loading