How to enable Log collection in Datadog?
To enable log collection with an Agent running on your host, change logs_enabled: false to logs_enabled: true in the Agent’s main configuration file (datadog.yaml).

Custom Log Collection in Datadog
Datadog Agent v6 can collect logs and forward them to Datadog from files, the network (TCP or UDP), journald, and Windows channels:
- Create a new
<CUSTOM_LOG_SOURCE>.d/
folder in theconf.d/
directory at the root of your Agent’s configuration directory. - Create a new
conf.yaml
file in this new folder. - Add a custom log collection configuration group with the parameters below.
- Restart your Agent to take into account this new configuration.
- Run the Agent’s status subcommand and look for
<CUSTOM_LOG_SOURCE>
under the Checks section.
Log Type in Datadog

Log Type: File

Log Type: TCP/UDP

Log Type: journald

Log Type: Windows Events


- Install the Datadog Agent
- Verify Datadog Agent Status and Look for "Logs Agent" which is not running.
$ sudo datadog-agent status
- Enable log collection
To enable log collection with the Agent, edit the datadog.yaml configuration file located at /etc/datadog-agent/datadog.yaml and set logs_enabled:true
- Monitor a custom file
$ sudo mkdir /etc/datadog-agent/conf.d/custom_log_collection.d/
$ sudo vi /etc/datadog-agent/conf.d/custom_log_collection.d/conf.yaml
logs:
- type: file
path: /var/log/syslog
source: syslog
service: syslog
$ sudo service datadog-agent restart
- Validation. Verify
$ sudo datadog-agent status
Datadog Agent Status and Look for "Logs Agent" which is running.
$ chmod -R 755 /var/log/
$ datadog-agent status


I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND