Skip to content

Simple shell script to add "pong" feature to services such as SMTP

License

Notifications You must be signed in to change notification settings

faktiva/sidecar-echo-responder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

sidecar-echo-responder

Simple shell script to add "pong" feature to services not having it, such as SMTP


Requirements:

  • netcat (nc)
  • socket statistics (ss)

Both should be already be installed on the majority of Linux distributions.

How it works

  • it spans a nc process, in listening and keep-alive mode, on a configurable port (defaults 6666)
  • it loops forever and checks for a live socket on the given port/protocol
  • you (your Load Balancer) can ping it to check the monitored service health
  • since the main loop is executed with set -e -o pipefail bash options it will exit if the socket is not found
  • your LB will receive no more pongs :)

Execution

nohup sidecar-echo-responder.sh > /dev/null &

Enjoy

Releases

No releases published

Packages

No packages published

Languages