openweathermap_exporter

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

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

Go to latest
Published: Feb 26, 2019 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Openweather exporter for prometheus

Exporter for openweather API

Quickstart

Create an API key from https://openweathermap.org/.

Install dependancies with go get and then build the binary.

go get -d -v
go build
OWM_LOCATION=LONDON,UK  OWM_API_KEY=apikey ./openweathermap_exporter

Then add the scraper in prometheus

scrape_configs:
  - job_name: 'weather'

    # Scrape is configured for free usage.
    scrape_interval: 60s

    # Port is not yet configurable
    static_configs:
      - targets: ['localhost:2112']

With Docker

The image is a multistage image, just launch as usual :

docker build -t ows .
docker run --rm -e OWM_LOCATION=LONDON,UK  -e OWM_API_KEY=apikey -p 2112:2112 ows

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
⌂ 换网址