Skip to content

Commit b5e14b6

Browse files
DDuongNguyenestherk15
authored andcommitted
[AGNTLOG-155] Add tag list for the agent (#30375)
* add agent pre-ingestion tag list * add conditions for tags * Add a new page for Agent Tags (#30747) * Add a new page for Agent Tags * Apply suggestions from code review * Add to Agent logs further reading * Update config/_default/menus/main.en.yaml * Update content/en/agent/logs/agent_tags.md --------- Co-authored-by: Esther Kim <[email protected]>
1 parent 4a0babb commit b5e14b6

File tree

3 files changed

+64
-4
lines changed

3 files changed

+64
-4
lines changed

config/_default/menus/main.en.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,26 +424,31 @@ menu:
424424
identifier: agent_logs
425425
parent: agent
426426
weight: 5
427+
- name: Log Agent tags
428+
url: agent/logs/agent_tags/
429+
parent: agent
430+
identifier: agent_tags
431+
weight: 501
427432
- name: Advanced Configurations
428433
identifier: agent_logs_advanced_log_collection
429434
url: agent/logs/advanced_log_collection
430435
parent: agent_logs
431-
weight: 501
436+
weight: 502
432437
- name: Proxy
433438
identifier: agent_logs_proxy
434439
url: agent/logs/proxy
435440
parent: agent_logs
436-
weight: 502
441+
weight: 503
437442
- name: Transport
438443
identifier: agent_logs_transport
439444
url: agent/logs/log_transport
440445
parent: agent_logs
441-
weight: 503
446+
weight: 504
442447
- name: Multi-Line Detection
443448
identifier: multi_line_detection
444449
url: agent/logs/auto_multiline_detection
445450
parent: agent_logs
446-
weight: 505
451+
weight: 506
447452
- name: Configuration
448453
url: agent/configuration
449454
parent: agent

content/en/agent/logs/_index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: Host Agent Log collection
33
description: Use the Datadog Agent to collect your logs and send them to Datadog
44
further_reading:
5+
- link: "agent/logs/agent_tags/"
6+
tag: "Documentation"
7+
text: "Agent tags automatically added to logs"
58
- link: "agent/logs/advanced_log_collection/#filter-logs"
69
tag: "Documentation"
710
text: "Filter logs sent to Datadog"

content/en/agent/logs/agent_tags.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Log Agent tags
3+
further_reading:
4+
- link: "/getting_started/tagging/"
5+
tag: "Documentation"
6+
text: "Tagging Best Practices"
7+
- link: "/agent/configuration/agent-configuration-files/"
8+
tag: "Documentation"
9+
text: "Agent Configuration Files"
10+
- link: "/agent/docker/tag/"
11+
tag: "Documentation"
12+
text: "Container Tagging"
13+
---
14+
15+
## Overview
16+
17+
The Datadog Agent automatically adds certain tags to all logs it collects before sending them to Datadog. These tags are added **pre-ingestion**, and are included in the payload that gets delivered to Datadog.
18+
19+
## Pre-ingestion processing
20+
21+
Since these tags are added pre-ingestion, they:
22+
23+
* Are included in all log data delivered to Datadog
24+
* Increase the overall size of your log data
25+
* Are available for filtering, searching, and aggregation in the Log Explorer
26+
* Can be used in log-based metrics and queries
27+
28+
## Agent tags automatically added to logs
29+
30+
The following tags are automatically added to logs by the Datadog Agent:
31+
32+
| Tag | Description | Conditions |
33+
|-----|-------------|-------------|
34+
| `source` | The source of the log (file path, integration name, etc.) | Always when available |
35+
| `service` | The service name if configured in the log collection | Always when available |
36+
| `env` | The environment tag if configured globally | Always when available |
37+
| `version` | The Agent version | Always when available |
38+
| `filename` | Base name of the tailed file | File-based sources only |
39+
| `dirname` | Directory containing the tailed file | File-based sources only |
40+
| `source_host` | IP address of the socket source host | Socket sources (TCP/UDP) only |
41+
| `event_type` | Type of the Windows event | Windows events only |
42+
| `event_source` | Source of the Windows event | Windows events only |
43+
| `event_id` | Windows Event ID | Windows events only, if `tag_event_id: true` |
44+
| `sid` | Windows Security identifier | Windows events only, if `tag_sid: true` |
45+
| `truncated` | Source of truncation | If `logs_config.tag_truncated_logs: true` |
46+
| `multiline` | Source of multi-line aggregation | If `logs_config.tag_multi_line_logs: true` |
47+
| `aggregated_json` | Indicates that the log was aggregated from multiple JSON log entries | If `logs_config.auto_multi_line.tag_aggregated_json: true` |
48+
49+
## Further reading
50+
51+
{{< partial name="whats-next/whats-next.html" >}}
52+

0 commit comments

Comments
 (0)