Skip to content

Commit 063ebc2

Browse files
authored
Formatting fixes (#32419)
1 parent 523c670 commit 063ebc2

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

content/en/logs/guide/best-practices-for-log-management.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ If you want to transform your logs or redact sensitive data in your logs before
4242

4343
### Set up multiple indexes for log segmentation
4444

45-
Set up multiple indexes if you want to segment your logs for different retention periods or daily quotas, usage monitoring, and billing.
45+
Set up multiple indexes if you want to segment your logs for different retention periods or daily quotas, usage monitoring, and billing.
4646

4747
For example, if you have logs that only need to be retained for 7 days, while other logs need to be retained for 30 days, use multiple indexes to separate out the logs by the two retention periods.
4848

@@ -66,7 +66,7 @@ If you want to retain logs for an extended time while maintaining querying speed
6666

6767
If you want to store your logs for longer periods of time, set up [Log Archives][2] to send your logs to a storage-optimized system, such as Amazon S3, Azure Storage, or Google Cloud Storage. When you want to use Datadog to analyze those logs, use [Log Rehydration][3]™ to capture those logs back in Datadog. With multiple archives, you can both segment logs for compliance reasons and keep rehydration costs under control.
6868

69-
#### Set up max scan size to manage expensive rehydrations
69+
#### Set up max scan size to manage expensive rehydrations
7070

7171
Set a limit on the volume of logs that can be rehydrated at one time. When setting up an archive, you can define the maximum volume of log data that can be scanned for Rehydration. See [Define maximum scan size][4] for more information.
7272

@@ -123,7 +123,7 @@ Create an anomaly detection monitor to alert on any unexpected log indexing spik
123123
124124
1. [Check Log patterns for this service](https://app.datadoghq.com/logs/patterns?from_ts=1582549794112&live=true&to_ts=1582550694112&query=service%3A{{service.name}})
125125
2. [Add an exclusion filter on the noisy pattern](https://app.datadoghq.com/logs/pipelines/indexes)
126-
```
126+
```
127127
7. Click **Create**.
128128
129129
### Alert when an indexed log volume passes a specified threshold
@@ -135,7 +135,7 @@ Set up a monitor to alert if an indexed log volume in any scope of your infrastr
135135
3. Click **More...** and select **Create monitor**.
136136
4. Add tags (for example, `host, `services, and so on) to the **group by** field.
137137
5. Enter the **Alert threshold** for your use case. Optionally, enter a **Warning threshold**.
138-
6. Add a notification title, for example:
138+
6. Add a notification title, for example:
139139
```
140140
Unexpected spike on indexed logs for service {{service.name}}
141141
```
@@ -147,27 +147,23 @@ Set up a monitor to alert if an indexed log volume in any scope of your infrastr
147147
148148
#### Alert on indexed logs volume since the beginning of the month
149149
150-
Leverage the `datadog.estimated_usage.logs.ingested_events` metric filtered on `datadog_is_excluded:false` to only count indexed logs and the [metric monitor cumulative window][28] to monitor the count since the beginning of the month.
150+
Leverage the `datadog.estimated_usage.logs.ingested_events` metric filtered on `datadog_is_excluded:false` to only count indexed logs and the [metric monitor cumulative window][28] to monitor the count since the beginning of the month.
151151
152152
{{< img src="logs/guide/monthly_usage_monitor.png" alt="Setup a monitor to alert for the count of indexed logs since the beginning of the month" style="width:70%;">}}
153153
154154
#### Alert on indexes reaching their daily quota
155155
156156
[Set up a daily quota][16] on indexes to prevent indexing more than a given number of logs per day. If an index has a daily quota, Datadog recommends that you set the [monitor that notifies on that index's volume](#alert-when-an-indexed-log-volume-passes-a-specified-threshold) to alert when 80% of this quota is reached within the past 24 hours.
157157
158-
An event is generated when the daily quota is reached. These events have the `datadog_index` tag which includes the index name. Therefore, when this event has been generated, you can [create a facet][17] on the `datadog_index` tag, so that you can use `datadog_index` in the `group by` step for setting up a multi-alert monitor.
158+
An event is generated when the daily quota is reached. These events have the `datadog_index` tag which includes the index name. Therefore, when this event has been generated, you can [create a facet][17] on the `datadog_index` tag, so that you can use `datadog_index` in the `group by` step for setting up a multi-alert monitor.
159159
160160
To set up a monitor to alert when the daily quota is reached for an index:
161161
162162
1. Navigate to [Monitors > New Monitor][13] and click **Event**.
163163
2. Enter: `source:datadog datadog_index:* "daily quota reached"` in the **Define the search query** section. Include `datadog_index:*` to ensure only index related events are selected.
164164
3. In the **Count of** field, add `datadog_index` to group by index. This updates the query to read `Show Count of * by datadog_index (datadog_index)`.
165-
4. For **Evaluate the query over**, select **current day**. For **Starting at**, select the time when indexes reset. This keeps the monitor in alert status until quota reset.
166-
167-
This is an example of what the search query looks like when defined in Datadog:
168-
169-
{{< img src="logs/guide/daily_quota_notification_search_query.png" alt="The Datadog Alert on Index Quota Reached Search Query configuration" style="width:70%;">}}
170-
165+
4. For **Evaluate the query over**, select **current day**. For **Starting at**, select the time when indexes reset. This keeps the monitor in alert status until quota reset. This is an example of what the search query looks like when defined in Datadog:
166+
{{< img src="logs/guide/daily_quota_notification_search_query.png" alt="The Datadog Alert on Index Quota Reached Search Query configuration" style="width:100%;">}}
171167
5. In the **Set alert conditions** section, select `above or equal to` and enter `1` for the **Alert threshold**.
172168
6. Add a notification title and message in the **Configure notifications and automations** section. The **Multi Alert** button is automatically selected because the monitor is grouped by `datadog_index(datadog_index)`.
173169
7. Click **Save**.
@@ -198,7 +194,7 @@ Even if you use exclusion filters, you can still visualize trends and anomalies
198194
199195
### Enable Sensitive Data Scanner for Personally Identifiable Information (PII) detection
200196
201-
If you want to prevent data leaks and limit non-compliance risks, use Sensitive Data Scanner to identify, tag, and optionally redact or hash sensitive data. For example, you can scan for credit card numbers, bank routing numbers, and API keys in your logs, APM spans, and RUM events, See [Sensitive Data Scanner][23] on how to set up scanning rules to determine what data to scan.
197+
If you want to prevent data leaks and limit non-compliance risks, use Sensitive Data Scanner to identify, tag, and optionally redact or hash sensitive data. For example, you can scan for credit card numbers, bank routing numbers, and API keys in your logs, APM spans, and RUM events, See [Sensitive Data Scanner][23] on how to set up scanning rules to determine what data to scan.
202198
203199
**Note**: [Sensitive Data Scanner][24] is a separate billable product.
204200

0 commit comments

Comments
 (0)