| 1 | plugin_name: go.d.plugin |
| 2 | modules: |
| 3 | - meta: |
| 4 | id: collector-go.d.plugin-httpcheck |
| 5 | plugin_name: go.d.plugin |
| 6 | module_name: httpcheck |
| 7 | monitored_instance: |
| 8 | name: HTTP Endpoints |
| 9 | link: "" |
| 10 | icon_filename: globe.svg |
| 11 | categories: |
| 12 | - data-collection.synthetic-testing |
| 13 | keywords: |
| 14 | - webserver |
| 15 | related_resources: |
| 16 | integrations: |
| 17 | list: [] |
| 18 | info_provided_to_referring_integrations: |
| 19 | description: "" |
| 20 | overview: |
| 21 | data_collection: |
| 22 | metrics_description: | |
| 23 | This collector monitors HTTP servers availability status and response time. |
| 24 | |
| 25 | Possible statuses: |
| 26 | |
| 27 | | Status | Description | |
| 28 | |---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 29 | | success | HTTP request completed successfully with a status code matching the configured `status_accepted` range (default: 200), and the response body and headers (if configured) match expectations. | |
| 30 | | timeout | HTTP request timed out before receiving a response (default: 1 second). | |
| 31 | | no_connection | Failed to establish a connection to the target. | |
| 32 | | redirect | Received a redirect response (3xx status code) while `not_follow_redirects` is configured. | |
| 33 | | bad_status | HTTP request completed with a status code outside the configured `status_accepted` range (default: non-200). | |
| 34 | | bad_content | HTTP request completed successfully but the response body does not match the expected content (when using `response_match`). | |
| 35 | | bad_header | HTTP request completed successfully but response headers do not match the expected values (when using `header_match`). | |
| 36 | method_description: "" |
| 37 | supported_platforms: |
| 38 | include: [] |
| 39 | exclude: [] |
| 40 | multi_instance: true |
| 41 | additional_permissions: |
| 42 | description: "" |
| 43 | default_behavior: |
| 44 | auto_detection: |
| 45 | description: "" |
| 46 | limits: |
| 47 | description: "" |
| 48 | performance_impact: |
| 49 | description: "" |
| 50 | setup: |
| 51 | prerequisites: |
| 52 | list: [] |
| 53 | configuration: |
| 54 | file: |
| 55 | name: go.d/httpcheck.conf |
| 56 | options: |
| 57 | description: | |
| 58 | The following options can be defined globally: update_every, autodetection_retry. |
| 59 | folding: |
| 60 | title: Config options |
| 61 | enabled: true |
| 62 | list: |
| 63 | - name: update_every |
| 64 | description: Data collection interval (seconds). |
| 65 | default_value: 5 |
| 66 | required: false |
| 67 | group: Collection |
| 68 | - name: autodetection_retry |
| 69 | description: Autodetection retry interval (seconds). Set 0 to disable. |
| 70 | default_value: 0 |
| 71 | required: false |
| 72 | group: Collection |
| 73 | |
| 74 | - name: url |
| 75 | description: Target endpoint URL. |
| 76 | default_value: "" |
| 77 | required: true |
| 78 | group: Target |
| 79 | - name: timeout |
| 80 | description: HTTP request timeout (seconds). |
| 81 | default_value: 1 |
| 82 | required: false |
| 83 | group: Target |
| 84 | |
| 85 | - name: status_accepted |
| 86 | description: "HTTP accepted response statuses. Anything else results in 'bad status' in the status chart." |
| 87 | default_value: "[200]" |
| 88 | required: false |
| 89 | group: Validation |
| 90 | - name: response_match |
| 91 | description: If the status code is accepted, match the response body against this regular expression. |
| 92 | default_value: "" |
| 93 | required: false |
| 94 | group: Validation |
| 95 | - name: header_match |
| 96 | description: "A set of rules to check for specific key-value pairs in response headers." |
| 97 | default_value: "[]" |
| 98 | required: false |
| 99 | group: Validation |
| 100 | - name: header_match.exclude |
| 101 | description: "When yes, the rule asserts the key-value pair must be absent." |
| 102 | default_value: no |
| 103 | required: false |
| 104 | group: Validation |
| 105 | - name: header_match.key |
| 106 | description: "Exact HTTP header name to check." |
| 107 | default_value: "" |
| 108 | required: true |
| 109 | group: Validation |
| 110 | - name: header_match.value |
| 111 | description: "The [pattern](https://github.com/netdata/netdata/tree/master/src/go/pkg/matcher#supported-format) to match against the header's value." |
| 112 | default_value: "" |
| 113 | required: false |
| 114 | group: Validation |
| 115 | |
| 116 | - name: username |
| 117 | description: Username for Basic HTTP authentication. |
| 118 | default_value: "" |
| 119 | required: false |
| 120 | group: HTTP Auth |
| 121 | - name: password |
| 122 | description: Password for Basic HTTP authentication. |
| 123 | default_value: "" |
| 124 | required: false |
| 125 | group: HTTP Auth |
| 126 | - name: bearer_token_file |
| 127 | description: "Path to a file containing a bearer token (used for `Authorization: Bearer`)." |
| 128 | default_value: "" |
| 129 | required: false |
| 130 | group: HTTP Auth |
| 131 | |
| 132 | - name: tls_skip_verify |
| 133 | description: Skip TLS certificate and hostname verification (insecure). |
| 134 | default_value: no |
| 135 | required: false |
| 136 | group: TLS |
| 137 | - name: tls_ca |
| 138 | description: Path to CA bundle used to validate the server certificate. |
| 139 | default_value: "" |
| 140 | required: false |
| 141 | group: TLS |
| 142 | - name: tls_cert |
| 143 | description: Path to client TLS certificate (for mTLS). |
| 144 | default_value: "" |
| 145 | required: false |
| 146 | group: TLS |
| 147 | - name: tls_key |
| 148 | description: Path to client TLS private key (for mTLS). |
| 149 | default_value: "" |
| 150 | required: false |
| 151 | group: TLS |
| 152 | |
| 153 | - name: proxy_url |
| 154 | description: HTTP proxy URL. |
| 155 | default_value: "" |
| 156 | required: false |
| 157 | group: Proxy |
| 158 | - name: proxy_username |
| 159 | description: Username for proxy Basic HTTP authentication. |
| 160 | default_value: "" |
| 161 | required: false |
| 162 | group: Proxy |
| 163 | - name: proxy_password |
| 164 | description: Password for proxy Basic HTTP authentication. |
| 165 | default_value: "" |
| 166 | required: false |
| 167 | group: Proxy |
| 168 | |
| 169 | - name: method |
| 170 | description: HTTP method to use. |
| 171 | default_value: GET |
| 172 | required: false |
| 173 | group: Request |
| 174 | - name: body |
| 175 | description: Request body (e.g., for POST/PUT). |
| 176 | default_value: "" |
| 177 | required: false |
| 178 | group: Request |
| 179 | - name: headers |
| 180 | description: "Additional HTTP headers (one per line as key: value)." |
| 181 | default_value: "" |
| 182 | required: false |
| 183 | group: Request |
| 184 | - name: cookie_file |
| 185 | description: Path to cookie file. See [cookie file format](https://everything.curl.dev/http/cookies/fileformat). |
| 186 | default_value: "" |
| 187 | required: false |
| 188 | group: Request |
| 189 | - name: not_follow_redirects |
| 190 | description: Do not follow HTTP redirects. |
| 191 | default_value: no |
| 192 | required: false |
| 193 | group: Request |
| 194 | - name: force_http2 |
| 195 | description: Force HTTP/2 (including h2c over TCP). |
| 196 | default_value: no |
| 197 | required: false |
| 198 | group: Request |
| 199 | |
| 200 | - name: vnode |
| 201 | description: Associates this data collection job with a [Virtual Node](https://learn.netdata.cloud/docs/netdata-agent/configuration/organize-systems-metrics-and-alerts#virtual-nodes). |
| 202 | default_value: "" |
| 203 | required: false |
| 204 | group: Virtual Node |
| 205 | examples: |
| 206 | folding: |
| 207 | title: Config |
| 208 | enabled: true |
| 209 | list: |
| 210 | - name: Basic |
| 211 | description: A basic example configuration. |
| 212 | config: | |
| 213 | jobs: |
| 214 | - name: local |
| 215 | url: http://127.0.0.1:8080 |
| 216 | - name: With HTTP request headers |
| 217 | description: Configuration with HTTP request headers that will be sent by the client. |
| 218 | config: | |
| 219 | jobs: |
| 220 | - name: local |
| 221 | url: http://127.0.0.1:8080 |
| 222 | headers: |
| 223 | Host: localhost:8080 |
| 224 | User-Agent: netdata/go.d.plugin |
| 225 | Accept: */* |
| 226 | - name: With `status_accepted` |
| 227 | description: A basic example configuration with non-default status_accepted. |
| 228 | config: | |
| 229 | jobs: |
| 230 | - name: local |
| 231 | url: http://127.0.0.1:8080 |
| 232 | status_accepted: |
| 233 | - 200 |
| 234 | - 204 |
| 235 | - name: With `header_match` |
| 236 | description: Example configurations with `header_match`. See the value [pattern](https://github.com/netdata/netdata/tree/master/src/go/pkg/matcher#supported-format) syntax. |
| 237 | config: | |
| 238 | jobs: |
| 239 | # The "X-Robots-Tag" header must be present in the HTTP response header, |
| 240 | # but the value of the header does not matter. |
| 241 | # This config checks for the presence of the header regardless of its value. |
| 242 | - name: local |
| 243 | url: http://127.0.0.1:8080 |
| 244 | header_match: |
| 245 | - key: X-Robots-Tag |
| 246 | |
| 247 | # The "X-Robots-Tag" header must be present in the HTTP response header |
| 248 | # only if its value is equal to "noindex, nofollow". |
| 249 | # This config checks both the presence of the header and its value. |
| 250 | - name: local |
| 251 | url: http://127.0.0.1:8080 |
| 252 | header_match: |
| 253 | - key: X-Robots-Tag |
| 254 | value: '= noindex,nofollow' |
| 255 | |
| 256 | # The "X-Robots-Tag" header must not be present in the HTTP response header |
| 257 | # but the value of the header does not matter. |
| 258 | # This config checks for the presence of the header regardless of its value. |
| 259 | - name: local |
| 260 | url: http://127.0.0.1:8080 |
| 261 | header_match: |
| 262 | - key: X-Robots-Tag |
| 263 | exclude: yes |
| 264 | |
| 265 | # The "X-Robots-Tag" header must not be present in the HTTP response header |
| 266 | # only if its value is equal to "noindex, nofollow". |
| 267 | # This config checks both the presence of the header and its value. |
| 268 | - name: local |
| 269 | url: http://127.0.0.1:8080 |
| 270 | header_match: |
| 271 | - key: X-Robots-Tag |
| 272 | exclude: yes |
| 273 | value: '= noindex,nofollow' |
| 274 | - name: HTTP authentication |
| 275 | description: Basic HTTP authentication. |
| 276 | config: | |
| 277 | jobs: |
| 278 | - name: local |
| 279 | url: http://127.0.0.1:8080 |
| 280 | username: username |
| 281 | password: password |
| 282 | - name: HTTPS with self-signed certificate |
| 283 | description: | |
| 284 | Do not validate server certificate chain and hostname. |
| 285 | config: | |
| 286 | jobs: |
| 287 | - name: local |
| 288 | url: https://127.0.0.1:8080 |
| 289 | tls_skip_verify: yes |
| 290 | - name: Multi-instance |
| 291 | description: | |
| 292 | > **Note**: When you define multiple jobs, their names must be unique. |
| 293 | |
| 294 | Collecting metrics from local and remote instances. |
| 295 | config: | |
| 296 | jobs: |
| 297 | - name: local |
| 298 | url: http://127.0.0.1:8080 |
| 299 | |
| 300 | - name: remote |
| 301 | url: http://192.0.2.1:8080 |
| 302 | troubleshooting: |
| 303 | problems: |
| 304 | list: [] |
| 305 | alerts: |
| 306 | - name: httpcheck_web_service_up |
| 307 | metric: httpcheck.status |
| 308 | info: "HTTP check endpoint ${label:url} liveness status" |
| 309 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/httpcheck.conf |
| 310 | - name: httpcheck_web_service_bad_content |
| 311 | metric: httpcheck.status |
| 312 | info: "Percentage of HTTP responses from ${label:url} with unexpected content in the last 5 minutes" |
| 313 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/httpcheck.conf |
| 314 | - name: httpcheck_web_service_bad_status |
| 315 | metric: httpcheck.status |
| 316 | info: "Percentage of HTTP responses from ${label:url} with unexpected status in the last 5 minutes" |
| 317 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/httpcheck.conf |
| 318 | - name: httpcheck_web_service_bad_header |
| 319 | metric: httpcheck.status |
| 320 | info: "Percentage of HTTP responses from ${label:url} with unexpected header in the last 5 minutes" |
| 321 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/httpcheck.conf |
| 322 | - name: httpcheck_web_service_timeouts |
| 323 | metric: httpcheck.status |
| 324 | info: "Percentage of timed-out HTTP requests to ${label:url} in the last 5 minutes" |
| 325 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/httpcheck.conf |
| 326 | - name: httpcheck_web_service_no_connection |
| 327 | metric: httpcheck.status |
| 328 | info: "Percentage of failed HTTP requests to ${label:url} in the last 5 minutes" |
| 329 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/httpcheck.conf |
| 330 | metrics: |
| 331 | folding: |
| 332 | title: Metrics |
| 333 | enabled: false |
| 334 | description: "" |
| 335 | availability: [] |
| 336 | scopes: |
| 337 | - name: target |
| 338 | description: The metrics refer to the monitored target. |
| 339 | labels: |
| 340 | - name: url |
| 341 | description: url value that is set in the configuration file. |
| 342 | metrics: |
| 343 | - name: httpcheck.response_time |
| 344 | description: HTTP Response Time |
| 345 | unit: ms |
| 346 | chart_type: line |
| 347 | dimensions: |
| 348 | - name: time |
| 349 | - name: httpcheck.response_length |
| 350 | description: HTTP Response Body Length |
| 351 | unit: characters |
| 352 | chart_type: line |
| 353 | dimensions: |
| 354 | - name: length |
| 355 | - name: httpcheck.status |
| 356 | description: HTTP Check Status |
| 357 | unit: boolean |
| 358 | chart_type: line |
| 359 | dimensions: |
| 360 | - name: success |
| 361 | - name: timeout |
| 362 | - name: redirect |
| 363 | - name: no_connection |
| 364 | - name: bad_content |
| 365 | - name: bad_header |
| 366 | - name: bad_status |
| 367 | - name: httpcheck.in_state |
| 368 | description: HTTP Current State Duration |
| 369 | unit: boolean |
| 370 | chart_type: line |
| 371 | dimensions: |
| 372 | - name: time |