Skip to content

blackrez/openweathermap_exporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

OpenWeatherMap current weather data exporter for Prometheus

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 83.5%
  • Dockerfile 8.3%
  • HCL 8.2%