Skip to content

Simple healthcheck service for checking stunservers.

License

Notifications You must be signed in to change notification settings

ReadyTalk/stuncheck

Repository files navigation

Build Status

StunCheck

StunCheck is a simple healthcheck for stun servers. It monitors that stun servers are up and working and reports the stats for them in a simple HTTP request. The goal of this project is to have a service that makes it easy/simple to know when stun servers are having issues and allow action to be taken. Whether its pulling the bad server out of DNS or triggering a restart or alert around it.

Most heath check systems use simple rest/http endpoints to figure out if something is healthy this just enables the ability to do that for older legacy STUN service that dont have an http healthcheck.

Config

Each config paramiter can be used on the command line (first option) or as an environment variable. Anything passed in as part of the command will override environment variables for that same option.

  • --stun_servers:STUN_SERVERS: This is required, it allows you to specify the servers to connect to. It takes a comma seperated list of servers, they can use either domain or IP and can also be given a port, if no port is provided the default (3478) will be used.
    • Example: --stun_servers 192.168.1.1:8899,stun.test.com:2233
    • Default: None, this is a required field.
  • --listen_address:STUN_LISTEN_ADDRESS: This is the IP and port to have the HTTP server listen on. This will also be the IP address to send stun requests from. Currently there is no way to sperate these 2 things.
    • __Example: --listen_address 0.0.0.0:8080
    • Default: None, this is a required field.
  • --delay:STUN_DELAY: The delay in seconds between checks. This can be anywhere between 120 and 1 seconds.
    • Example: --delay 15
    • Default: 5
  • --max_latency:STUN_MAX_LATENCY: The maxium the average latency can be before falling the healthcheck.
    • Example: --max_latency 50
    • Default: 100
  • __--maxFailurePCT:STUN_FAILPCT: The highest the failure percentage can get to before the healthcheck is considered failed. This is expressed as a percentage, so .10 is 10% 1.0 would be 100%.
    • Example: --maxFailurePCT = .3
    • Default: .10
  • __--cachedResults:STUN_CACHED_RESULTS: The number of results to use for the current stats. We only use these for the health check. Total stats are kept, but not used to determine failure stats. This can be anywhere between 10-10000.
    • Example: --cachedResults = .3
    • Default: .10

About

Simple healthcheck service for checking stunservers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published