Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/hashicorp/nomad-open-telemetry-getting-started

OpenTelemetry getting started guides on Nomad
https://github.com/hashicorp/nomad-open-telemetry-getting-started

Last synced: about 1 month ago
JSON representation

OpenTelemetry getting started guides on Nomad

Awesome Lists containing this project

README

        

# Getting Started with OpenTelemetry on HashiCorp Nomad

This repository contains reference job files to run the [OpenTelemetry collector](https://opentelemetry.io/docs/collector/)
in different deployment scenarios, as described in the [Getting Started](https://opentelemetry.io/docs/collector/getting-started/)
guide.

_These job files are provided as reference only, and are not designed for
production use._

## Deployment

From the official documentation:

> The OpenTelemetry Collector consists of a single binary and two primary deployment methods:
>
> - **Agent**: A Collector instance running with the application or on the same host as the application (e.g. binary, sidecar, or daemonset).
> - **Gateway**: One or more Collector instances running as a standalone service (e.g. container or deployment) typically per cluster, datacenter or region.

To run the job files you will need access to a Nomad cluster running version
1.3.0+. You can start a local dev agent for Nomad by downloading the
[`nomad`](https://www.nomadproject.io/downloads) binary and running the
following command:

```shell-session
sudo nomad agent -dev -bind=0.0.0.0 -network-interface='{{ GetPrivateInterfaces | attr "name" }}'
```

### Gateway

The OpenTelemetry Collector can run as a gateway by registering a
[service](https://www.nomadproject.io/docs/schedulers#service) job.

```shell-session
nomad run https://raw.githubusercontent.com/hashicorp/nomad-open-telemetry-getting-started/main/examples/nomad/otel-collector.nomad
```

### Agent

The OpenTelemetry Collector can run as an agent by registering a
[system](https://www.nomadproject.io/docs/schedulers#system) job.

It connects to the gateway deployed in the previous section as an OTLP
exporter, so make sure the gateway job is running as well.

```shell-session
nomad run https://raw.githubusercontent.com/hashicorp/nomad-open-telemetry-getting-started/main/examples/nomad/otel-agent.nomad
```

### Demo

The demo job deploys the OpenTelemetry Collector as agent and gateway, load
generators, and the Jaeger, Zipkin and Prometheus back-ends.

```shell-session
nomad run https://raw.githubusercontent.com/hashicorp/nomad-open-telemetry-getting-started/main/examples/nomad/otel-demo.nomad
```

The following services are available:

* Jaeger: http://:16686
* Zipkin: http://:9411
* Prometheus: http://:9090

## Community Resources

- [Just-in-Time Nomad: Running the OpenTelemetry Collector on Hashicorp Nomad with HashiQube][adri_v_nomad_otel] by [Adri V](https://adri-v.medium.com/)
- Deploy the OpenTelemetry Collector using the [Nomad Pack][otel_pack] by @jharley

[adri_v_nomad_otel]: https://adri-v.medium.com/just-in-time-nomad-running-the-opentelemetry-collector-on-hashicorp-nomad-with-hashiqube-4eaf009b8382
[otel_pack]: https://github.com/hashicorp/nomad-pack-community-registry/tree/main/packs/opentelemetry_collector