Giter VIP home page Giter VIP logo

openweathermap_exporter's Introduction

This is an OpenWeatherMap exporter for Prometheus.

It exposes weather metrics to the pushgateway.

A minimal openweathermap_exporter.yml would look like:

api_key: <yourkey>
cities:
  - Munich
  - Ulaanbaatar
  - Isachsen
latlons:
  - [40.2010176,-72.6806685]
zips:
  - 90210
city_code: 
  - 4259418

Either cities, lathlons, zips, or city_code can be provided.

The city_codes that I added can be found here

The unit_format in the openweathermap_exporter can be changed to provide different output based on your region

# Options are: Default (kelvin), Metric (centegrade), or Imperial (farenheit)  
# This will update all readings to the unit format you select  
my $unit_format = "Imperial";

Requirements:

  • Prometheus' Pushgateway installed and running on localhost:9091
  • Perl with packages liblwp-useragent-determined-perl, libjson-perl and libconfig-yaml-perl

An example prometheus.yml configuration looks like:

  - job_name: 'pushgateway'
    scrape_interval: 60s # Note this is NOT the interval the scripts will run; this is just the collection interval from the Pushgateway to Prometheus
    honor_labels: true
    static_configs:
      - targets: ['localhost:9091']
        labels:
          alias: 'openweathermap'

openweathermap_exporter's People

Contributors

richih avatar dramaturg avatar k00p avatar edward3h avatar saex avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.