darksky-exporter

command module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

README

Dark Sky Prometheus Exporter

Dark Sky Exporter is a prometheus exporter for weather metrics consumed from the Dark Sky API.

Requirements

  • Linux / MacOS / Windows
  • docker

Development

Configuration

Dark sky exporter can be controlled by both ENV or CLI flags as described below.

Environment CLI (--flag) Default Description
LISTEN_ADDRESS listen-address :9091 The port to listen on
APIKEY apikey <REQUIRED> Your dark sky API key
CITY city New York, NY City/Location in which to gather weather metrics
INTERVAL interval 2m Interval to poll the dark sky API

Usage

# Export weather metrics from Seattle using binary
./darksky-exporter --city "Seattle, WA" --apikey mi4o2n54i0510n4510

# Export weather metrics from Seattle using docker
docker run -d --restart on-failure --name=darksky-exporter -p 9091:9091 darksky-exporter:<TAG> --city "Seattle, WA" --apikey mi4o2n54i0510n4510

Building from Source

Prerequisites:

To build from source run make build, other options are below.

# make help

 Choose a command run in darksky-exporter:

  build                       Build local binaries and docker image. Requires `go` to be installed.
  build-image                 Build just docker image.
  install-goreleaser-linux    Install goreleaser on your system for Linux systems.
  install-goreleaser-darwin   Install goreleaser on your system for macOS (Darwin).
  github-release              Publish a release to github.
  clean                       Clean directory.

Deploying to github

Github deployment utilized goreleaser to push to github.

First change the version in version/version.go to the correct tag release. Then run the following:

export GITHUB_TOKEN="<YOUR_TOKEN>"
make github-release

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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