Skip to content

Instantly share code, notes, and snippets.

@junaid-malik-confiz
Last active November 10, 2021 09:50
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save junaid-malik-confiz/541a3afdc9b395501daf828e299c2daf to your computer and use it in GitHub Desktop.
Save junaid-malik-confiz/541a3afdc9b395501daf828e299c2daf to your computer and use it in GitHub Desktop.
Haproxy configuration to handle email alerts in case servr go down / up
backend pakkey_ser_with_auth_junaid
email-alert mailers mta
email-alert level info
email-alert from noreply@example.com
email-alert to example@example.com
option httpchk HEAD / HTTP/1.1\r\nHost:\ www.pakkey.com\r\nAuthorization:\ Basic\ cGFrYm9hcmQ6cFlzWEtlR1R3Tm85Ng==
server server1 127.0.0.1:8080 check inter 5000 fastinter 2000 fall 1 observe layer7 on-error mark-down error-limit 10
server server2 127.0.0.1:9000 check inter 5000 fastinter 1000 fall 1 observe layer7 on-error mark-down error-limit 10
errorfile 503 /etc/haproxy/maintenance.http
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment