-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OSDOCS-6754: Network Observability easier configuration
- Loading branch information
Showing
8 changed files
with
99 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// network_observability/configuring-operator.adoc | ||
|
||
:_content-type: CONCEPT | ||
[id="network-observability-netobserv-dashboard-rate-limit-alerts_{context}"] | ||
= Creating Loki rate limit alerts for the NetObserv dashboard | ||
You can create custom rules for the *Netobserv* dashboard metrics to trigger alerts when Loki rate limits have been reached. | ||
|
||
An example of an alerting rule configuration YAML file is as follows: | ||
[source,yaml] | ||
---- | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
name: loki-alerts | ||
namespace: openshift-operators-redhat | ||
spec: | ||
groups: | ||
- name: LokiRateLimitAlerts | ||
rules: | ||
- alert: LokiTenantRateLimit | ||
annotations: | ||
message: |- | ||
{{ $labels.job }} {{ $labels.route }} is experiencing 429 errors. | ||
summary: "At any number of requests are responded with the rate limit error code." | ||
expr: sum(irate(loki_request_duration_seconds_count{status_code="429"}[1m])) by (job, namespace, route) / sum(irate(loki_request_duration_seconds_count[1m])) by (job, namespace, route) * 100 > 0 | ||
for: 10s | ||
labels: | ||
severity: warning | ||
---- |
40 changes: 40 additions & 0 deletions
40
modules/troubleshooting-network-observability-loki-tenant-rate-limit.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Module included in the following assemblies: | ||
|
||
// * networking/network_observability/troubleshooting-network-observability.adoc | ||
|
||
:_content-type: PROCEDURE | ||
[id="network-observability-troubleshooting-loki-tenant-rate-limit_{context}"] | ||
= LokiStack rate limit errors | ||
A rate-limit placed on the Loki tenant can result in potential temporary loss of data and a 429 error: `Per stream rate limit exceeded (limit:xMB/sec) while attempting to ingest for stream`. You might consider having an alert set to notify you of this error. For more information, see "Creating Loki rate limit alerts for the NetObserv dashboard" in the Additional resources of this section. | ||
|
||
You can update the LokiStack CRD with the `perStreamRateLimit` and `perStreamRateLimitBurst` specifications, as shown in the following procedure. | ||
|
||
.Procedure | ||
. Navigate to *Operators* -> *Installed Operators*, viewing *All projects* from the *Project* dropdown. | ||
. Look for *Loki Operator*, and select the *LokiStack* tab. | ||
. Create or edit an existing *LokiStack* instance using the *YAML view* to add the `perStreamRateLimit` and `perStreamRateLimitBurst` specifications: | ||
+ | ||
[source, yaml] | ||
---- | ||
apiVersion: loki.grafana.com/v1 | ||
kind: LokiStack | ||
metadata: | ||
name: loki | ||
namespace: netobserv | ||
spec: | ||
limits: | ||
global: | ||
ingestion: | ||
perStreamRateLimit: 6 <1> | ||
perStreamRateLimitBurst: 30 <2> | ||
tenants: | ||
mode: openshift-network | ||
managementState: Managed | ||
---- | ||
<1> The default value for `perStreamRateLimit` is `3`. | ||
<2> The default value for `perStreamRateLimitBurst` is `15`. | ||
|
||
. Click *Save*. | ||
|
||
.Verification | ||
Once you update the `perStreamRateLimit` and `perStreamRateLimitBurst` specifications, the pods in your cluster restart and the 429 rate-limit error no longer occurs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters