Giter Club home page Giter Club logo

sla_exporter's Introduction

sla_exporter

Prometheus exporter for SLA-like metrics. Currently supported are: cURL (http/https), DNS, Ping (ICMP) and TCPing.

Similar in a lot of way to Blackbox Exporter, and honestly most people will probably be better served by this. This exporter was desgined to be a bit more basic as it was intended to be run on tele-operated forklifts and the operator stations for them.

Flags

Name Description Default
version Print version information.
web.listen-address Address on which to expose metrics and web interface. :9909
web.telemetry-path Path under which to expose metrics. /metrics
level Set logging verbose level. info
timeout Global default test timeout. 5
config.file Path to config file (required). ./config.yaml

Install

go get -u github.com/slashdoom/sla_exporter

Usage

Binary

./sla_exporter -config.file=config.yml

Docker

An example Docker compose file is included. It includes services for production, with 2 step build/deploy and Promethus container and one for a dev environment with hot reload. These examples use the golang:alpine image.

Production

docker compose up prometheus sla_exporter

Development

docker compose up prometheus-dev sla_exporter-dev

Config file

The exporter can be configured with a YAML based config file:

---
level: debug
timeout: 5s

web:
  listen_address: 9909
  metrics_path: "/metrics"

curl_tests:
  - url: "http://example.com"
    timeout: 5s
  - url: "https://example.com"
    timeout: 5s
  - url: "https://slashdoom.com"
    timeout: 5s

dns_tests:
  - host: "example.com"
    timeout: 5s
  - host: "example.com"
    server: "9.9.9.9"
    timeout: 5s
  - host: "example.com"
    server: "8.8.8.8"
    timeout: 5s
  - host: "slashdoom.com"
    timeout: 5s

ping_tests:
  - host: "example.com"
    count: 3
    timeout: 5s
  - host: "slashdoom.com"
    count: 3
    timeout: 5s

tcping_tests:
  - host: "example.com"
    port: 80
    timeout: 5s
  - host: "example.com"
    port: 443
    timeout: 5s
  - host: "slashdoom.com"
    port: 443
    timeout: 5s

Third Party Components

This software uses components of the following projects

License

(c) slashdoom (Patrick Ryon), 2024. Licensed under MIT license.

Prometheus

See https://prometheus.io/

sla_exporter's People

Contributors

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