You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/content/guides/security/access_logging/_index.md
+4-3
Original file line number
Diff line number
Diff line change
@@ -411,14 +411,14 @@ You can apply different filters on your access logs to reduce and optimize the n
411
411
412
412
### Using status code filters
413
413
414
-
You can apply access log filters to requests that match a specific HTTP status code by using the `defaultValue`or`runtimeKey` option.
414
+
You can apply access log filters to requests that match a specific HTTP status code by using the `defaultValue`and`runtimeKey` option.
415
415
416
416
**Option 1: Use `defaultValue`** </br>
417
417
418
418
Use the `defaultValue` option in the Gateway resource to specify the HTTP status code for which you want to apply the access log filter. Note that the `defaultValue` is set for a specific Gateway only. To apply the same HTTP status code to multiple Gateway resources, see `Option 2: Override the default value with a runtime key-value pair`.
419
419
420
420
1. Follow the steps in [File-based](#file-based-access-logging) or [gRPC](#grpc-access-logging) access logging to enable access logging for your gateway.
421
-
2. To apply additional filters to your access logs, you create or edit your gateway resource and add the access log filters to the `spec.options.accessLoggingService.accessLog` section. The following example uses file-based access logging and captures access logs only for requests with an HTTP response code that is greater than or equal to 400.
421
+
2. To apply additional filters to your access logs, you create or edit your gateway resource and add the access log filters to the `spec.options.accessLoggingService.accessLog` section. The following example uses file-based access logging and captures access logs only for requests with an HTTP response code that is greater than or equal to 400. Note that the `runtimeKey` overrides any settings in `defaultValue`, so in this example, the `runtimeKey` is also set to 400.
422
422
```yaml
423
423
apiVersion: gateway.solo.io/v1
424
424
kind: Gateway
@@ -445,6 +445,7 @@ Use the `defaultValue` option in the Gateway resource to specify the HTTP status
445
445
op: GE
446
446
value:
447
447
defaultValue: 400
448
+
runtimeKey: "400"
448
449
proxyNames:
449
450
- gateway-proxy
450
451
ssl: false
@@ -467,7 +468,7 @@ Note that the `runtimeKey` is enforced only if it matches a key that is defined
467
468
3. Create or edit your gateway resource and add the access log filters to the `spec.options.accessLoggingService.accessLog` section. The following example uses file-based access logging and captures access logs only for requests with an HTTP response code that is greater than or equal to what is defined in the `access_log_status_filter` runtime value.
468
469
469
470
{{% notice note %}}
470
-
Note that the `runtimeKey` overrides any settings in `defaultValue`
471
+
Note that the `runtimeKey` overrides any settings in `defaultValue`.
Copy file name to clipboardexpand all lines: docs/content/guides/traffic_management/request_processing/upstream_health_checks/_index.md
+14-7
Original file line number
Diff line number
Diff line change
@@ -4,20 +4,21 @@ weight: 50
4
4
description: Automatically monitor the status of Upstreams by configuring health checks for them
5
5
---
6
6
7
-
As part of configuring an Upstream, Gloo Gateway provides the option of adding *health checks* that periodically assess the readiness of the Upstream to receive requests. See the [Envoy documentation](https://www.envoyproxy.io/docs/envoy/v1.14.1/intro/arch_overview/upstream/health_checking#arch-overview-health-checking) for more information.
7
+
As part of configuring an Upstream, Gloo Gateway provides the option of adding *health checks* that periodically assess the readiness of the Upstream to receive requests. For more information, see the [Envoy documentation](https://www.envoyproxy.io/docs/envoy/v1.14.1/intro/arch_overview/upstream/health_checking#arch-overview-health-checking).
8
8
9
9
{{% notice note %}}
10
-
Upstreams with working health checks will not be removed from Envoy's service directory, even due to configuration changes. To allow them to be removed, set `ignoreHealthOnHostRemoval` in the Upstream's configuration.
10
+
Upstreams with working health checks are not removed from Envoy's service directory, even due to configuration changes. To allow removal in such cases, set `ignoreHealthOnHostRemoval` in the Upstream's configuration.
11
11
{{% /notice %}}
12
+
12
13
## Configuration
13
14
14
-
Descriptions of the options available for configuring health checks can be found {{< protobuf name="solo.io.envoy.api.v2.core.HealthCheck" display="here" >}}.
15
+
Review the following sections for example configuration settings of common use cases. For descriptions of each field, refer to the [API documentation]({{% versioned_link_path fromRoot="/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/options/healthcheck/healthcheck.proto.sk/" %}}).
15
16
16
17
### Custom paths for HttpHealthChecks
17
18
18
-
There is a way to add custom paths to health check requests shown in the example below.
19
+
To add custom paths to health check requests, review the following example.
19
20
20
-
{{< highlight yaml >}}
21
+
```yaml
21
22
spec:
22
23
healthChecks:
23
24
- healthyThreshold: 1
@@ -26,6 +27,12 @@ spec:
26
27
interval: 30s
27
28
timeout: 10s
28
29
unhealthyThreshold: 1
29
-
{{< /highlight >}}
30
+
```
30
31
31
-
A `path` represents an explicitly-specified path to check the health of the upstream. The `timeout` declares how much time between checks there should be. An `unhealthyThreshold` is the limit of checks that are allowed to fail before declaring the upstream unhealthy. A `healthyThreshold` is the limit of checks that are allowed to pass before declaring an upstream healthy. The `interval` is the interval of time that you send `healthchecks` as to not overload your upstream service.
32
+
| Setting | Description |
33
+
| --- | --- |
34
+
| `path` | The specific path to send the health check request to the upstream. Make sure that the backing destination handles health checks along this path. |
35
+
| `timeout` | The amount of time that the health check waits for a response before considering the request unsuccessful and timing out. |
36
+
| `unhealthyThreshold` | The number of checks that can fail before the upstream is considered unhealthy. The example allows only one failed health check. |
37
+
| `healthyThreshold` | The number of checks that must succeed before an upstream is considered healthy. The example requires only one successful health check.
38
+
| `interval` | How often the health check sends requests. Set a value that will not overload your upstream service. |
0 commit comments