Skip to content

lzivadinovic/websocket-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prometheus websocket exporter

Websocket exporter that checks if ws is responding with specific message

Based on https://github.com/sahandhabibi/Websocket-exporter

Usage

To probe exporter send GET request with target, message and contains parameter, eg:

curl localhost:9143/probe?target=wss://endpoint&message=something&contains=test

# response should be something like

# HELP websocket_response_time ( Time until we get EOSE in ms; 0 for failed )
# TYPE websocket_response_time gauge
websocket_response_time 63
# HELP websocket_status_code ( 101 is normal status code for ws )
# TYPE websocket_status_code gauge
websocket_status_code 101
# HELP websocket_successful ( 0 = false , 1 = true )
# TYPE websocket_successful gauge
websocket_successful 1

TODO:

  • Docs
  • Test cases if there is no contains or message request (ping pong)

About

Prometheus exporter for checking wss responses

Resources

License

Stars

Watchers

Forks

Packages

No packages published