Skip to content

Commit

Permalink
Add JmxOpenMetricsModule
Browse files Browse the repository at this point in the history
  • Loading branch information
oneonestar committed Aug 5, 2024
1 parent 6011726 commit 2b81d49
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
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

0 comments on commit 2b81d49

Please sign in to comment.