An open API service indexing awesome lists of open source software.

https://github.com/subconsciousnetwork/nomad-otel-metrics-scraper


https://github.com/subconsciousnetwork/nomad-otel-metrics-scraper

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# Gather job metrics from nomad

Nomad does not yet expose job-specific metrics (see [this
issue](https://github.com/hashicorp/nomad/issues/16602)). This means it's not
possible to set alarms like "Hey, if my jobs have more than 2 replicas down,
alert."

This tool fixes that issue by querying the nomad API for job-specific metrics
and writing those to an [OTLP](https://opentelemetry.io/docs/specs/otel/protocol/) agent.

I got the idea from https://github.com/strigo/nomad-service-discovery-exporter,
but it uses prometheus rather than OTLP.

## Usage

```text
Usage: nomad-otel-metrics-scraper [OPTIONS]

Options:
-u, --nomad-url
URL of the nomad instance to contact [default: http://localhost:4646]
-n, --nomad-poll-interval
How often to query nomad [default: 60s]
--debug
Whether to print out the metrics we are publishing to stdout
-h, --help
Print help
-V, --version
Print version
```

The OTel portions conform to the [Environment Variable Specification](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/) and can be adjusted accordingly.