-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.yml
84 lines (74 loc) · 3.59 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
haproxy_use_ppa: False
haproxy_ppa_repo: ppa:vbernat/haproxy-1.8
haproxy_stats_socket: "/run/haproxy/admin.sock"
haproxy_stats_enabled: True
haproxy_ssl_enabled: False
haproxy_stats_port: 1936
haproxy_stats_address: "localhost"
haproxy_stats_uri: "/"
haproxy_stats_user: "admin"
haproxy_stats_pass: "password"
haproxy_install_hatop: True
haproxy_errors:
- { code: 400, short: "Bad request", long: "Loadbalancer says: Bad request (400)" }
- { code: 403, short: "Forbidden", long: "Loadbalancer says: Forbidden. You may not have necessary permissions (403)" }
- { code: 405, short: "Method Not Allowed", long: "Loadbalancer says: Requested method is not supported for this resource (405)" }
- { code: 408, short: "Request timeout", long: "Loadbalancer says: Server timed out waiting for the request (408)" }
- { code: 429, short: "Too many requests", long: "Loadbalancer says: You may have sent too many requests (429)" }
- { code: 500, short: "Internal Server Error", long: "Loadbalancer says: Server has experienced an internal error (500)" }
- { code: 502, short: "Bad Gateway", long: "Loadbalancer says: Bad Gateway (502)" }
- { code: 503, short: "Service Unavailable", long: "Loadbalancer says: Service you are trying to reach is unavailable (503)" }
- { code: 504, short: "Gateway Timeout", long: "Loadbalancer says: Gateway Timeout (504)" }
haproxy_timeouts:
- { type: "connect", value: 5000 }
- { type: "client", value: 50000 }
- { type: "server", value: 50000 }
haproxy_additional_defaults: []
haproxy_forwardfor: False
haproxy_bind_on_non_local: True
haproxy_hatop_download_url: "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hatop/hatop-0.7.7.tar.gz"
haproxy_vip_address: "localhost"
haproxy_metrics: true
haproxy_exporter_version: 0.7.1
haproxy_exporter_download_url: "https://github.com/prometheus/haproxy_exporter/releases/download/v{{ haproxy_exporter_version }}/haproxy_exporter-{{ haproxy_exporter_version }}.linux-amd64.tar.gz"
haproxy_scrape_uri: "unix:{{ haproxy_stats_socket }}"
#haproxy_scrape_uri: "http://{{ haproxy_stats_user }}:{{ haproxy_stats_pass }}@{{ haproxy_stats_address }}:{{ haproxy_stats_port }}{{ haproxy_stats_uri }};csv"
haproxy_exporter_config_flags:
'haproxy.scrape-uri': '{{ haproxy_scrape_uri }}'
# This is just an example, which should be overridden!
haproxy_services: []
#haproxy_services:
# - name: "api"
# bind_port: 8080
# acls:
# - name: "get_method"
# expression: "method GET"
# backends:
# - name: "get_backend"
# acl: "get_method"
# - name: "default_backend"
# default: True
# - name: "get_backend"
# servers:
# - { name: "api-get-1", address: "localhost:8080", options: "check inter 10s" }
# - { name: "api-get-2", address: "localhost:8080", options: "check inter 10s backup" }
# - name: "default_backend"
# options:
# - "option http-server-close"
# - 'option httpchk GET /heartbeat HTTP/1.1\r\nHost:\ localhost'
# - "http-check expect rstring master"
# servers:
# - { name: "api-other-1", address: "localhost:8080", options: "check inter 15s" }
# - { name: "api-other-2", address: "localhost:8080", options: "check inter 15s backup" }
# - name: "rabbit"
# mode: "tcp"
# bind_port: 5672
# options:
# - "option tcpka"
# - "timeout client 3h"
# - "timeout server 3h"
# servers:
# - { name: "rabbit-1", address: "localhost:5672", options: "check inter 30s" }
# - { name: "rabbit-2", address: "localhost:5672", options: "check inter 30s" }
# - { name: "rabbit-3", address: "localhost:5672", options: "check inter 30s" }