nexmo_exporter

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

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

Go to latest
Published: Apr 1, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

Nexmo Exporter for Prometheus

Fork from https://github.com/pzinovkin/nexmo_exporter optimized for deployment on Kubernetes.

Go Report Card

Simple server that scraps Nexmo balance and exports it as Prometheus metrics.

Changelog
  • exposed metrics HTTP endpoint URL and port as program arguments
  • read API authentication credentials from file. Allows mounting K8s secrets containing sensitive data
  • upgraded outdated dependencies
  • removed use of promu
  • Dockerfile to build and run exporter

Usage

Specify api key and secret:

nexmo_exporter --web.telemetry-port=":..." web.telemetry-path="https://..." --nexmo.url="https://..." --nexmo.timeout=5s --nexmo.namespace="/filepath"
Launch as Docker container
docker run --name nexmo-exporter -p 9100:9100 \
-v /hostpath/credentials:/app/credentials:ro \
-e "PROMETHEUS_METRICS_PORT=9100" \
-e "PROMETHEUS_METRICS_PATH=/metrics" \
-e "NEXMO_URL=https://rest.nexmo.com" \
-e "NEXMO_TIMEOUT=5s" \
-e "NEXMO_PROMETHEUS_NAMESPACE=nexmo" \
g30rg3-stoica/nexmo-exporter

Building the binary

make build
Building the Docker image
docker build -t nexmo-exporter:latest .

License

Apache License 2.0, see LICENSE.

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