| 1 | plugin_name: go.d.plugin |
| 2 | modules: |
| 3 | - meta: |
| 4 | id: collector-go.d.plugin-haproxy |
| 5 | plugin_name: go.d.plugin |
| 6 | module_name: haproxy |
| 7 | monitored_instance: |
| 8 | name: HAProxy |
| 9 | link: https://www.haproxy.org/ |
| 10 | icon_filename: haproxy.svg |
| 11 | categories: |
| 12 | - data-collection.web-servers-and-proxies |
| 13 | keywords: |
| 14 | - haproxy |
| 15 | - web |
| 16 | - webserver |
| 17 | - http |
| 18 | - proxy |
| 19 | related_resources: |
| 20 | integrations: |
| 21 | list: [] |
| 22 | info_provided_to_referring_integrations: |
| 23 | description: "" |
| 24 | overview: |
| 25 | data_collection: |
| 26 | metrics_description: | |
| 27 | This collector monitors HAProxy servers. |
| 28 | method_description: "" |
| 29 | supported_platforms: |
| 30 | include: [] |
| 31 | exclude: [] |
| 32 | multi_instance: true |
| 33 | additional_permissions: |
| 34 | description: "" |
| 35 | default_behavior: |
| 36 | auto_detection: |
| 37 | description: "" |
| 38 | limits: |
| 39 | description: "" |
| 40 | performance_impact: |
| 41 | description: "" |
| 42 | setup: |
| 43 | prerequisites: |
| 44 | list: |
| 45 | - title: Enable PROMEX addon. |
| 46 | description: | |
| 47 | To enable PROMEX addon, follow the [official documentation](https://github.com/haproxy/haproxy/tree/master/addons/promex). |
| 48 | configuration: |
| 49 | file: |
| 50 | name: go.d/haproxy.conf |
| 51 | options: |
| 52 | description: | |
| 53 | The following options can be defined globally: update_every, autodetection_retry. |
| 54 | folding: |
| 55 | title: Config options |
| 56 | enabled: true |
| 57 | list: |
| 58 | - name: update_every |
| 59 | description: Data collection interval (seconds). |
| 60 | default_value: 1 |
| 61 | required: false |
| 62 | group: Collection |
| 63 | - name: autodetection_retry |
| 64 | description: Autodetection retry interval (seconds). Set 0 to disable. |
| 65 | default_value: 0 |
| 66 | required: false |
| 67 | group: Collection |
| 68 | |
| 69 | - name: url |
| 70 | description: Target endpoint URL. |
| 71 | default_value: http://127.0.0.1:8404/metrics |
| 72 | required: true |
| 73 | group: Target |
| 74 | - name: timeout |
| 75 | description: HTTP request timeout (seconds). |
| 76 | default_value: 1 |
| 77 | required: false |
| 78 | group: Target |
| 79 | |
| 80 | - name: username |
| 81 | description: Username for Basic HTTP authentication. |
| 82 | default_value: "" |
| 83 | required: false |
| 84 | group: HTTP Auth |
| 85 | - name: password |
| 86 | description: Password for Basic HTTP authentication. |
| 87 | default_value: "" |
| 88 | required: false |
| 89 | group: HTTP Auth |
| 90 | - name: bearer_token_file |
| 91 | description: "Path to a file containing a bearer token (used for `Authorization: Bearer`)." |
| 92 | default_value: "" |
| 93 | required: false |
| 94 | group: HTTP Auth |
| 95 | |
| 96 | - name: tls_skip_verify |
| 97 | description: Skip TLS certificate and hostname verification (insecure). |
| 98 | default_value: no |
| 99 | required: false |
| 100 | group: TLS |
| 101 | - name: tls_ca |
| 102 | description: Path to CA bundle used to validate the server certificate. |
| 103 | default_value: "" |
| 104 | required: false |
| 105 | group: TLS |
| 106 | - name: tls_cert |
| 107 | description: Path to client TLS certificate (for mTLS). |
| 108 | default_value: "" |
| 109 | required: false |
| 110 | group: TLS |
| 111 | - name: tls_key |
| 112 | description: Path to client TLS private key (for mTLS). |
| 113 | default_value: "" |
| 114 | required: false |
| 115 | group: TLS |
| 116 | |
| 117 | - name: proxy_url |
| 118 | description: HTTP proxy URL. |
| 119 | default_value: "" |
| 120 | required: false |
| 121 | group: Proxy |
| 122 | - name: proxy_username |
| 123 | description: Username for proxy Basic HTTP authentication. |
| 124 | default_value: "" |
| 125 | required: false |
| 126 | group: Proxy |
| 127 | - name: proxy_password |
| 128 | description: Password for proxy Basic HTTP authentication. |
| 129 | default_value: "" |
| 130 | required: false |
| 131 | group: Proxy |
| 132 | |
| 133 | - name: method |
| 134 | description: HTTP method to use. |
| 135 | default_value: "GET" |
| 136 | required: false |
| 137 | group: Request |
| 138 | - name: body |
| 139 | description: Request body (e.g., for POST/PUT). |
| 140 | default_value: "" |
| 141 | required: false |
| 142 | group: Request |
| 143 | - name: headers |
| 144 | description: "Additional HTTP headers (one per line as key: value)." |
| 145 | default_value: "" |
| 146 | required: false |
| 147 | group: Request |
| 148 | - name: not_follow_redirects |
| 149 | description: Do not follow HTTP redirects. |
| 150 | default_value: no |
| 151 | required: false |
| 152 | group: Request |
| 153 | - name: force_http2 |
| 154 | description: Force HTTP/2 (including h2c over TCP). |
| 155 | default_value: no |
| 156 | required: false |
| 157 | group: Request |
| 158 | examples: |
| 159 | folding: |
| 160 | title: Config |
| 161 | enabled: true |
| 162 | list: |
| 163 | - name: Basic |
| 164 | description: A basic example configuration. |
| 165 | config: | |
| 166 | jobs: |
| 167 | - name: local |
| 168 | url: http://127.0.0.1:8404/metrics |
| 169 | - name: HTTP authentication |
| 170 | description: Basic HTTP authentication. |
| 171 | config: | |
| 172 | jobs: |
| 173 | - name: local |
| 174 | url: http://127.0.0.1:8404/metrics |
| 175 | username: username |
| 176 | password: password |
| 177 | - name: HTTPS with self-signed certificate |
| 178 | description: NGINX Plus with enabled HTTPS and self-signed certificate. |
| 179 | config: | |
| 180 | jobs: |
| 181 | - name: local |
| 182 | url: https://127.0.0.1:8404/metrics |
| 183 | tls_skip_verify: yes |
| 184 | - name: Multi-instance |
| 185 | description: | |
| 186 | > **Note**: When you define multiple jobs, their names must be unique. |
| 187 | |
| 188 | Collecting metrics from local and remote instances. |
| 189 | config: | |
| 190 | jobs: |
| 191 | - name: local |
| 192 | url: http://127.0.0.1:8404/metrics |
| 193 | |
| 194 | - name: remote |
| 195 | url: http://192.0.2.1:8404/metrics |
| 196 | troubleshooting: |
| 197 | problems: |
| 198 | list: [] |
| 199 | alerts: [] |
| 200 | metrics: |
| 201 | folding: |
| 202 | title: Metrics |
| 203 | enabled: false |
| 204 | description: "" |
| 205 | availability: [] |
| 206 | scopes: |
| 207 | - name: global |
| 208 | description: These metrics refer to the entire monitored application. |
| 209 | labels: [] |
| 210 | metrics: |
| 211 | - name: haproxy.backend_current_sessions |
| 212 | description: Current number of active sessions |
| 213 | unit: sessions |
| 214 | chart_type: line |
| 215 | dimensions: |
| 216 | - name: a dimension per proxy |
| 217 | - name: haproxy.backend_sessions |
| 218 | description: Sessions rate |
| 219 | unit: sessions/s |
| 220 | chart_type: line |
| 221 | dimensions: |
| 222 | - name: a dimension per proxy |
| 223 | - name: haproxy.backend_response_time_average |
| 224 | description: Average response time for last 1024 successful connections |
| 225 | unit: milliseconds |
| 226 | chart_type: line |
| 227 | dimensions: |
| 228 | - name: a dimension per proxy |
| 229 | - name: haproxy.backend_queue_time_average |
| 230 | description: Average queue time for last 1024 successful connections |
| 231 | unit: milliseconds |
| 232 | chart_type: line |
| 233 | dimensions: |
| 234 | - name: a dimension per proxy |
| 235 | - name: haproxy.backend_current_queue |
| 236 | description: Current number of queued requests |
| 237 | unit: requests |
| 238 | chart_type: line |
| 239 | dimensions: |
| 240 | - name: a dimension per proxy |
| 241 | - name: proxy |
| 242 | description: These metrics refer to the Proxy. |
| 243 | labels: [] |
| 244 | metrics: |
| 245 | - name: haproxy.backend_http_responses |
| 246 | description: HTTP responses by code class |
| 247 | unit: responses/s |
| 248 | chart_type: stacked |
| 249 | dimensions: |
| 250 | - name: 1xx |
| 251 | - name: 2xx |
| 252 | - name: 3xx |
| 253 | - name: 4xx |
| 254 | - name: 5xx |
| 255 | - name: other |
| 256 | - name: haproxy.backend_network_io |
| 257 | description: Network traffic |
| 258 | unit: bytes/s |
| 259 | chart_type: area |
| 260 | dimensions: |
| 261 | - name: in |
| 262 | - name: out |