Giter Site home page Giter Site logo

smartcontractkit / blackbox-websocket-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from smohsensh/blackbox-websocket-exporter

0.0 1.0 1.0 14 KB

A Blackbox Websocket Uptime Exporter for Prometheus

License: MIT License

Python 98.92% Dockerfile 1.08%

blackbox-websocket-exporter's Introduction

Blackbox Websocket Uptime Prometheus Exporter

A blackbox exporter to check health of websocket connection.

Usage

install with python setup.py install

configuration are done with environment variables. Run with websocket_exporter

Configuration

Env Var Description
WEBSOCKET_EXPORTER_URI URI of websoccket connection to check, starts with ws(s)://
WEBSOCKET_EXPORTER_MESSAGE Optional message to send after connection established
WEBSOCKET_EXPORTER_EXPECTED_MESSAGE Optional message to expect to be received from server after connection
WEBSOCKET_EXPORTER_MATCH_TYPE How to match expected message (either contains or exact)
WEBSOCKET_EXPORTER_TIMEOUT How long to wait for the connection to be established in seconds (default: 10)
WEBSOCKET_EXPORTER_LISTEN_ADDR What address to listen (defaults 0.0.0.0)
WEBSOCKET_EXPORTER_LISTEN_PORT What port to listen (defaults 9802)

Metrics

  • websocket_probe_success: if the connection established successfully (0/1)
  • websocket_probe_latency_milliseconds: Connection Latency
  • websocket_probe_received_expected_response: if expected message was received through the websocket connection

Run in Docker

docker build : docker build . -t blackbox-websocket-exporter:latest

docker run : docker run -it -e WEBSOCKET_EXPORTER_URI=ws(s)://example.com blackbox-websocket-exporter:latest

docker compose : docker compose up -d

also, this image is available on the docker hub : docker pull foxmanx2000/blackbox-websocket-exporter:latest

Future Development

This exporter is still quite young and there are a handful of features that can be added soon:

  • Deployment via Docker
  • Command line arguments config to override env vars
  • Probe multiple targets
  • A static intro and doc in the base url of the exporter
  • Richer Readme with Grafana examples

blackbox-websocket-exporter's People

Contributors

sahandhabibi avatar smohsensh avatar

Watchers

 avatar

Forkers

isabella232

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.