Giter Site home page Giter Site logo

codebude / hetzner-load-balancer-prometheus-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wacken89/hetzner-load-balancer-prometheus-exporter

0.0 1.0 0.0 1.3 MB

Exports metrics from Hetzner Load Balancer for consumption by Prometheus

Python 80.73% Smarty 17.43% Dockerfile 1.85%

hetzner-load-balancer-prometheus-exporter's Introduction

Hetzner Load Balancer Prometheus Exporter

Exports metrics from Hetzner Load Balancer for consumption by Prometheus

Preparing

API TOKEN

Go to Hetzner Console. Open project where you have running Load Balancer and create API TOKEN in Security section

api token

Load Balancer ID

Next we sholud get ID of our Load Balancer. This information we will get from Hetzner API, everything about API you find in official API documentation

Example curl

curl \
    -H "Authorization: Bearer $API_TOKEN" \
	'https://api.hetzner.cloud/v1/load_balancers'

Response sample

{
  "load_balancers": [
    {
      "id": 4711,
      "name": "Web Frontend",
      "public_net": {
        "enabled": false,
        "ipv4": {
          "ip": "1.2.3.4"
        },
...
    }
}

Configuring

In deploy/kubernetes.yaml add in env section id which we got from API and API TOKEN

env:
  - name: LOAD_BALANCER_IDS
    value: "11,22,33,44"
  - name: ACCESS_TOKEN
    value: "ewsfds43r*****132"
  ## Optional
  - name: SCRAPE_INTERVAL
    value: '60'
Enviroment Description
LOAD_BALANCER_IDS Supported string with specific id 11,22,33 or all for scraping metrics from all load balancers in the project
ACCESS_TOKEN Hetzner API token
Optional SCRAPE_INTERVAL value in seconds, default value is 30 seconds

Deploy it to Kubernetes cluster

kubectl apply -f deploy/kubernetes.yaml

Check metrics page

kubectl port-forward <pod> 8000:8000

Open in your browser localhost:8000:

exporter metrics

Grafana

Grafana Dashboard you can find here

Metrics in Hetzner console Hetzner console

Metrics in Grafana exporter metrics

hetzner-load-balancer-prometheus-exporter's People

Contributors

codebude avatar kbitsakos avatar kscarlett avatar wacken89 avatar

Watchers

 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.