otelcol-custom

command module
v0.0.0-...-b2a0f4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2021 License: MIT Imports: 6 Imported by: 0

README

README

This repo creates a custom OpenTelemetry Collector with Stackdriver Exporter.

It followed the tutorial here.

To build and run this project:

  1. Ensure you have a GCP project, create a service account, and grant it sufficient permissions to write to Cloud monitoring.

  2. Download a service account key and set your environment variable:

export GOOGLE_SERVICE_CREDENTIALS=<path-to-your-sa>
  1. Change the exporters.stackdriver.project field to your GCP project id in config.yaml

  2. Start node-exporter locally so we can have some metrics avaiable:

docker run -p 9100:9100 --name node-exporter-${RANDOM} bitnami/node-exporter:latest
# you can test the metrics endpoint as well
curl -s http://localhost:9100/metrics | head
  1. Start the collector
go run . --config config.yaml
  1. Go to the Metrics explorer and search for some metrics from node-Exporter, e.g. node_cpu_seconds_total.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL