Please enable JavaScript.
Coggle requires JavaScript to display documents.
DataDog (Setup (Install (SSH into server and run the command, Once Agent…
DataDog
Setup
Install
-
-
Go to Agent setting up page here
Configure the Agent
Nginx
- Find the conf.d folder on the server. On Ubuntu its usually at
/etc/datadog-agent/conf.d
- In the
conf.d
folder find the nginx.d
folder
- In the
nginx.d
folder there will be an example conf.yaml.example
file.
- Copy this file under the name
conf.yaml
in the same directory
- Use the bash command
cp filetocopy1.js newfile.js
- Make sure the
conf.yaml
file has at least this
init_config
:
instances:
- nginx_status_url: http://localhost/nginx_status/
tags:
`- instance:foo`
- Restart the Agent:
sudo service datadog-agent restart
- Check that Datadog and Nginx are properly integrated with the status commands
-
sudo datadog-agent status
-
sudo service datadog-agent status
- Click integration button on the installation tab
List of Commands and which directories the files are put is here
Express
-
npm install --save connect-datadog
- Add the following middleware before the router
var dd_options = {
response_code: true
,
tags: ["app:my_app"]
}
var connect_datadog = require("connect-datadog")(dd_options);
app.use(connect_datadog);
Logging
Nginx
- Logging is disabled by default - to enable it go to the datadog config file in
/etc/datadog-agent
directory
- Uncomment the relevant line and set
logs_enabled
to true
- Modify the configuration of the Nginx Integration.
- Go to the
logs
items within the Agent's config file for the integration e.g. conf.d/nginx.d/conf.yaml
- This tells the Agent where to find the Nginx logs and specifies some metadata to be applied
- Just uncomment the logs part - alter the service name to e.g. api
- Restart the Agent -
sudo service datadog-agent restart
- View the log info in Datadog - Go to Log Explorer page
-
-
-