Giter Site home page Giter Site logo

fossabot / uptimerobot_exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paolobasso99/uptimerobot_exporter

0.0 0.0 0.0 177 KB

A Prometheus exporter for uptimerobot.com

License: GNU Affero General Public License v3.0

Shell 0.53% Python 97.19% Dockerfile 2.29%

uptimerobot_exporter's Introduction

uptimerobot_exporter

Maintainability Test Coverage CodeFactor FOSSA Status Known Vulnerabilities

uptimerobot_exporter is a Prometheus exporter for Uptimerobot.

Setup

Exporter

The easier way to setup this exporter is to use the Docker image on Docker Hub. Using a docker-compose.yaml:

version: "3"

services:
uptimerobot_exporter:
    image: paolobasso/uptimerobot_exporter
    container_name: uptimerobot_exporter
    environment:
    - UPTIMEROBOT_READ_API_KEY=your-api-key
    - INTERVAL_SECONDS=300
    - LOG_LEVEL=INFO
    - PORT=8000
    ports:
    - 8000:8000
    restart: unless-stopped

If Prometheus is in the same server an internal Docker network without exposing the metrics to the internet would be preferred.

Envirorment variables

Variable Required Default Description
UPTIMEROBOT_READ_API_KEY YES Your Uptimerobot read API key. Found on the Uptimerobot's My Settings page -> API Settings.
INTERVAL_SECONDS NO 300 How many seconds to wait between a scrape end and the next scrape.
You should use the Uptimerobot monitor's shortest interval.
LOG_LEVEL NO INFO The log level.
PORT NO 8000 The port where metrics will be exposed

Prometheus

Add a job to your Prometheus configs:

- job_name: 'uptimerobot'
   scrape_interval: 5m
   scrape_timeout: 300s # Same as INTERVAL_SECONDS env vars
   static_configs:
     - targets: 
        - 'localhost:8000' # Use the PORT env var (Default is 8000)

Grafana Dashboard

You can find the Grafana dashboard to visualize the metrics exposed by this exporter here and it looks like this:

Dashboard

Why

I needed a Prometheus exporter for Uptimerobot and the existing ones that I found are either old, not updated, poorly documented or they expose not enough metrics. It was also an opportunity to learn more about Prometheus and Python.

Technologies

  1. Prometheus
  2. Uptimerobot
  3. Grafana
  4. Python
  5. Docker
  6. GitHub Actions

Things I learnt

  1. Using Uptimerobot to monitor websites uptime
  2. Creating a basic Prometheus Exporter with Python
  3. Creating a Grafana Dashboard from scratch
  4. Dockerizing a simple Python application
  5. Auto publishing Docker images to Docker Hub with GitHub actions
  6. Tesing a simple python application
  7. Self Hosting Prometheus
  8. Self Hosting Grafana
  9. Python Docstrings

License

GNU AFFERO GENERAL PUBLIC LICENSE Version 3

uptimerobot_exporter's People

Contributors

paolobasso99 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.