Skip to content

AccuWeather API Prometheus exporter to gather weather metrics (Current Conditions API) β˜€οΈπŸŒ₯πŸŒ¦β˜οΈπŸŒ§β›ˆ

License

Notifications You must be signed in to change notification settings

trampfox/accuweather-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

accuweather-exporter

Prometheus exporter for AccuWeather Current Conditions API to gather weather metrics for a specific location.

Requirements

You have to signup here for an AccuWeather APIs account and then create a new App to get the API key needed by this exporter.

Accuweather exporter uses the following APIs

Configuration

Accuweather exporter is setup to take run configuration from environment variables or CLI flags, which are listed in the table below.

Environment variable Flag Description Default
AE_LISTEN_ADDRESS --listen-address The address to listen on for HTTP requests :9095
AE_API_KEY --api-key The API key for Accuweather API requests -
AE_LOCATION --location The location for which you want to retrieve current conditions data (e.g. Turin, IT) -
AE_LOCATION_KEY --location-key The location key of the city for which you want to retrieve current conditions data 214753

Location configuration

The location can be specified in two ways:

  • providing a location key using the location-key flag or the AE_LOCATION_KEY environment variable

  • providing a location string, using the location or the AE_LOCATION environment variable

In the latter way the exporter calls the City search API and it retrieves the location key from the first result.

Usage

Binary usage

Export the weather metrics for the city of Turin (Italy) using the binary and location-key flag.

./accuweather-exporter --api-key <apikey> --location-key 214753

Export the weather metrics for the city of Turin (Italy) using the binary and location flags (the exporter will call the City search API to retrieve the Turin's key).

./accuweather-exporter --api-key <apikey> --location "Turin, IT"

About

AccuWeather API Prometheus exporter to gather weather metrics (Current Conditions API) β˜€οΈπŸŒ₯πŸŒ¦β˜οΈπŸŒ§β›ˆ

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •