项目作者: rwaweber

项目描述 :
National Weather Service Observation Exporter
高级语言: Go
项目地址: git://github.com/rwaweber/nws_exporter.git
创建时间: 2018-08-15T02:26:09Z
项目社区:https://github.com/rwaweber/nws_exporter

开源协议:Apache License 2.0

下载


nws_exporter

Prometheus exporter for the national weather service observation api

Documentation can be found
here.

The endpoints refresh around once every hour or two.
It doesn’t seem like the interval that it gets updated at is too consistent.

All we are doing here is making a GET request to this URL:

https://api.weather.gov/stations//observations/latest

A less than perfect way to find a station near you would be to go to
https://www.weather.gov and click through the map to find where you are,
and that should land you on a page leading with “Current conditions at

(Station Name)”

Once you’ve found the station name, thats all we need to get started. If we
found the station name to be KRKS an example run would look like:

  1. nws_exporter -station KRKS

Installation

  1. git clone https://github.com/rwaweber/nws_exporter
  2. cd nws_exporter
  3. go build

After building, the nws_exporter executable can be found in the current
directory.

Metrics supported

name unit type
nws_humidity percent guage
nws_barometric_pressure pascals guage
nws_dewpoint celsius guage
nws_humidity percent guage
nws_temperature celsius guage
nws_visibility meters guage
nws_wind_direction degrees (angle) guage
nws_wind_speed kilometers per hour guage

Usage

options:

  1. Usage of nws_exporter:
  2. -addr string
  3. nws address (default "api.weather.gov")
  4. -backofftime int
  5. backofftime in seconds (default 100)
  6. -help
  7. help info
  8. -localaddr string
  9. The address to listen on for HTTP requests (default ":8080")
  10. -station string
  11. nws address (default "KPHL")
  12. -timeout int
  13. timeout in seconds (default 10)
  14. -verbose
  15. verbose logging