{"id":19136533,"url":"https://github.com/dsmith73/openweathermap_exporter","last_synced_at":"2025-09-25T14:21:36.983Z","repository":{"id":215628554,"uuid":"263446655","full_name":"dsmith73/openweathermap_exporter","owner":"dsmith73","description":null,"archived":false,"fork":false,"pushed_at":"2020-05-12T21:28:46.000Z","size":11,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-03T12:45:20.944Z","etag":null,"topics":["go","openweathermap","prometheus-exporter"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsmith73.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-05-12T20:37:11.000Z","updated_at":"2020-05-12T21:28:48.000Z","dependencies_parsed_at":"2024-01-05T14:57:30.692Z","dependency_job_id":null,"html_url":"https://github.com/dsmith73/openweathermap_exporter","commit_stats":null,"previous_names":["dsmith73/openweathermap_exporter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsmith73%2Fopenweathermap_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsmith73%2Fopenweathermap_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsmith73%2Fopenweathermap_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsmith73%2Fopenweathermap_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsmith73","download_url":"https://codeload.github.com/dsmith73/openweathermap_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240215232,"owners_count":19766382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","openweathermap","prometheus-exporter"],"created_at":"2024-11-09T06:34:38.504Z","updated_at":"2025-09-25T14:21:36.884Z","avatar_url":"https://github.com/dsmith73.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Openweather exporter for prometheus  \n_docker image_  \n\n\nExporter for openweather API  \n_modified the `.go` from: [blackrez/openweathermap_exporter](https://github.com/blackrez/openweathermap_exporter) to provide additional options and information_  \n\nThis leverages the code from [Brian Downs](https://github.com/briandowns/openweathermap)  \n\n---\n\n## Quickstart  \n\n**Create an API key from https://openweathermap.org/.**  \n\nThis exporter leverages city_id from openweathermap.org for better accuracy -  \nThe IDs can be found **[here](http://bulk.openweathermap.org/sample/)**  \n\n`.env`\n```sh\n\nOWM_PORT=:2112\nOWM_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nOWM_LOCATION=4259418\n\n```\n\n**Clone this repo**  \n\n**Add the scraper in prometheus**  \n\n```yml\n\nscrape_configs:\n  - job_name: 'weather'\n    scrape_interval: 60s\n    # Port is configurable\n    static_configs:\n      - targets: ['openweathermap:2112']\n      \n```\n\n**Spin up the docker image**  \n`docker build . -t openweathermap_exporter --force-rm`  \n  * `--force-rm` tells docker to get rid of intermediate builds in the multi-stage build process  \n\n---\n\n## or - Spin up with Docker-Compose\n\n```yml\n\n  openweathermap:\n    build:\n      context: https://github.com/dsmith73/openweathermap_exporter.git\n      dockerfile: ./Dockerfile\n    container_name: openweathermap\n    hostname: openweathermap\n    environment:   \n      - OWM_PORT=${OWM_PORT}\n      - OWM_API_KEY=${OWM_API_KEY}\n      - OWM_LOCATION=${OWM_LOCATION}\n    expose:\n      - 2112\n    restart: always\n    labels:\n      description: \"container to pull weather info for specified locations\"\n      \n```\n\n---\n\n| Contact: |\n| :---------: |\n| **[Slack](https://101101workspace.slack.com/archives/D012ESWSXHQ \"dsmith73 on 101101 workspace\")** |\n| ![github.com/dsmith73](https://avatars1.githubusercontent.com/u/44279121?s=60\u0026u=7a933a33b51505f9d6435eeffae1c8156a47dc77\u0026v=4 \"github.com/dsmith73\") |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsmith73%2Fopenweathermap_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsmith73%2Fopenweathermap_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsmith73%2Fopenweathermap_exporter/lists"}