Skip to content
This repository was archived by the owner on Mar 6, 2025. It is now read-only.
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
*.tfstate
*.tfstate.backup
.terraform.lock.hcl
logs.txt
logs.txt
.idea
.DS_Store
56 changes: 56 additions & 0 deletions collector/arangodb/examples/compose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Arangodb metrics using the OpenTelemetry Collector

## Overview

Name: natively exposes a Prometheus endpoint and the OpenTelemetry Collector has a [Prometheus receiver][otel-prom-receiver] that can be used to scrape its Prometheus endpoint. This directory contains an example showing how to configure Name: and the Collector to send metrics to Lightstep Observability.

## Prerequisites

* Docker
* Docker Compose
* A Lightstep Observability [access token][ls-docs-access-token]

## How to run the example

* Export your Lightstep access token

```sh
export LS_ACCESS_TOKEN=<YOUR_TOKEN>
```

* Run the docker compose example

```sh
docker-compose up -d
```

### Explore Metrics in Lightstep

See the [Name: Telemetry Docs][arangodb-docs-telemetry] for comprehensive documentation on metrics emitted and the [dashboard documentation][ls-docs-dashboards] for more details.

## Configure the Collector

Below is a snippet showing how to configure the Prometheus Receiver to scrape the Prometheus endpoint exposed by the Name: Server.

```yaml
receivers:
prometheus:
config:
scrape_configs:
- job_name: 'arangodb'
scrape_interval: 10s
static_configs:
- targets: ['localhost:8529']
metrics_path: '/_admin/metrics/v2'
```


## Additional information

- [OpenTelemetry Collector Prometheus Receiver][otel-prom-receiver]
- [Name: Telemetry Reference][arangodb-docs-telemetry]

[ls-docs-access-token]: https://docs.lightstep.com/docs/create-and-manage-access-tokens
[ls-docs-dashboards]: https://docs.lightstep.com/docs/create-and-manage-dashboards
[otel-prom-receiver]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/prometheusreceiver
[arangodb-docs-telemetry]: https://www.arangodb.com/2020/03/monitoring-arangodb-prometheus-grafana/
27 changes: 27 additions & 0 deletions collector/arangodb/examples/compose/collector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
receivers:
prometheus:
config:
scrape_configs:
- job_name: 'arangodb'
scrape_interval: 10s
static_configs:
- targets: ['arangodb:8529']
metrics_path: '/_admin/metrics/v2'

processors:
batch:

exporters:
logging:
loglevel: debug
otlp:
endpoint: ingest.lightstep.com:443
headers:
- lightstep-access-token: ${LS_ACCESS_TOKEN}

service:
pipelines:
metrics:
receivers: [prometheus]
processors: [batch]
exporters: [logging,otlp]
27 changes: 27 additions & 0 deletions collector/arangodb/examples/compose/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: '3.7'
services:
arangodb:
container_name: arangodb
image: arangodb/arangodb:latest
environment:
- ARANGO_NO_AUTH=1
ports:
- 8529:8529
volumes:
- ./arangodb_data_container:/var/lib/arangodb3
- ./arangodb_apps_data_container:/var/lib/arangodb3-apps

otel-collector:
container_name: otel-collector
image: otel/opentelemetry-collector-contrib:0.81.0
hostname: otel-collector
restart: always
command: [ "--config=/conf/collector.yaml" ]
volumes:
- ./collector.yaml:/conf/collector.yaml:rw
environment:
LS_ACCESS_TOKEN: "${LS_ACCESS_TOKEN}"

volumes:
arangodb_data_container:
arangodb_apps_data_container:
Loading