Important - A valid log config needs to be found in an integration yaml file before logs-agent will start.
Support training exercise:
ssh -i ~/.ssh/support-sandbox-demo.pem -l ubuntu hostname
ssh hostname
sudo apt-get update
sudo apt-get install nginx
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
sudo nginx -s reload
sudo DD_API_KEY=REDACTED bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
# The host of the Datadog intake server to send Agent data to
dd_url: https://app.datadoghq.com
api_key: <redacted>
hostname: fse-ldmx-f7-18
log_enabled: true
metadata_collectors:
- name: 'resources'
interval: 60
log_level: debug
log_file: /var/log/datadog/agent.log
sudo cp /etc/datadog-agent/conf.d/nginx.d/conf.yaml.example /etc/datadog-agent/conf.d/nginx.d/conf.yaml
init_config:
instances:
- nginx_status_url: http://localhost/nginx_status/
logs:
- type: file
path: /var/log/nginx/access.log
service: nginx
source: nginx
sourcecategory: http_web_access
- type: file
path: /var/log/nginx/error.log
service: nginx
source: nginx
sourcecategory: http_web_access
sudo systemctl datadog-agent restart
tail -f /var/log/datadog/agent.log | grep 'logs-agent\|Logs Agent'