Datadog
Overview
Datadog is a robust and comprehensive monitoring service for cloud-scale applications, providing full visibility into IT infrastructure. The service combines metrics and events from servers, databases, applications, tools, and services to present a unified view of an entire stack.
Datadog is capable of ingesting, analyzing, and visualizing logs from a variety of sources, including servers. This feature is a part of Datadog’s Log Management solution, which provides essential capabilities such as real-time log tailing and filtering, log analytics, and detailed visualizations. It can handle a wide range of log formats, including but not limited to, JSON, syslog, and common application logs.
Datadog offers capabilities for log retention and archiving, enabling compliance with various regulatory standards. It also supports role-based access controls to secure your logs and control who can access what information.
Follow the steps below to configure log shipping to Datadog.
Step 1 - Credential Procurement
An API key is required to ship logs to Datadog.
Follow these steps to obtain the API key, store it as an Opaque Secret, and configure external logging.
- From the Datadog dashboard, hover over your username at the bottom of the left menu and click
Organization Settings
. - In the middle menu, click
API Keys
. - Click the
New Key
button in the upper right corner, enter a key name, and clickCreate Key
. - Click the
Copy Key
button. This will copy the key to your clipboard. Click theX
to close the modal. - From the Control Plane Console UI, click
Secrets
from the left menu. - Click the
New
button. - Enter a
Name
for the secret, and selectOpaque
from theSecret Type
list. - Paste the string from step #4 into the content text box and click
Create
. - This secret will be used when configuring logging using the UI Console or CLI.
Step 2 - Configure External Logging
External logging can be configured by using either the UI Console or CLI.
Enable Logging using the UI Console
- From the Control Plane Console UI, click on
Org
in the left menu. - Click
External Logs
in the middle context menu. - Select
Datadog
and fill out the required fields. - Select the Opaque secret created to authenticate to Datadog. Refer to the credential procurement section to obtain and configure the necessary credentials.
- Click
Save
. - After the configuration is complete, log entries will be available at Datadog within a few minutes.
The hostname will be similar to the domain name that resolves when using the Datadog dashboard. (i.e., The host http-intake.logs.us3.datadoghq.com
maps to the dashboard domain us3.datadoghq.com
)
Enable Logging using the CLI
The external logging configuration can be created / updated using the CLI’s cpln org patch ORG_NAME -f FILE.yaml
command.
Below is an example Org manifests (in YAML). Edit and save the YAML as a file and use it as an input to the CLI’s cpln org patch ORG_NAME -f FILE.yaml
command.
Refer to the credential procurement section to obtain and configure the necessary credentials.
- Substitute:
ORG_NAME
,OPAQUE_SECRET
, and possibly the host.