oe
github.com/billykwooten/openweather-exporter
go get github.com/billykwooten/openweather-exporter
oe

github.com/billykwooten/openweather-exporter

Prometheus exporter utilizing Openweather API (https://openweathermap.org/api) to gather weather metrics.

by Kyle Wooten

v0.0.7 (see all)License:Apache-2.0
go get github.com/billykwooten/openweather-exporter
Readme

OpenWeather Exporter

Docker Pulls Docker Automated Docker Build

Prometheus exporter for openweather API

Requirements

Development

Configuration

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

EnvironmentCLI (--flag)DefaultDescription
OW_LISTEN_ADDRESSlisten-address:9091The port for /metrics to listen on
OW_APIKEYapikey<REQUIRED>Your Openweather API key
OW_CITYcityNew York, NYCity/Location in which to gather weather metrics. Separate multiple locations with | for example "New York, NY|Seattle, WA"
OW_DEGREES_UNITdegrees-unitFUnit in which to show metrics (Kelvin, Fahrenheit or Celsius)
OW_LANGUAGElanguageENLanguage in which to show metrics

Usage

Binary Usage

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

Docker Usage

# Export weather metrics from Seattle using docker
docker run -d --restart on-failure --name=openweather-exporter -p 9091:9091 billykwooten/openweather-exporter --city "Seattle, WA" --apikey mi4o2n54i0510n4510

Docker-compose Usage

  openweather-exporter:
    image: billykwooten/openweather-exporter
    container_name: openweather-exporter
    restart: always
    ports:
      - "9091:9091"
    environment:
      - OW_CITY=New York, NY
      - OW_APIKEY=mi4o2n54i0510n4510

Prometheus Scrape Usage

scrape_configs:
  - job_name: 'openweather-exporter'
    scrape_interval: 60s
    static_configs:
      - targets: ['openweather-exporter:9091']

Grafana

I have created a grafana dashboard for this exporter, feel free to use it. Link below.

Dashboard Link

Development

If you'd like to build this yourself you can clone this repo and run:

GitHub Stars

12

LAST COMMIT

1yr ago

MAINTAINERS

0

CONTRIBUTORS

3

OPEN ISSUES

1

OPEN PRs

0
VersionTagPublished
v0.0.7
1yr ago
v0.0.7-0.20210218215147-05062c498142
1yr ago
v0.0.6
1yr ago
v0.0.5
1yr ago
No alternatives found
No tutorials found
Add a tutorial