Datadog is a SaaS-based monitoring platform for cloud applications. In this guide, we’re going to detail how IT pros and DevOps teams can get started with Datadog and make the best use of this observability platform.
Datadog is a tool that allows you to monitor cloud infrastructure, Windows and Linux hosts, system processes, serverless functions, and cloud-based applications. It can be used to visualize data, explore metrics, manage logs, and perform various other tasks.
Datadog allows you to collect metrics and gather real-time in-depth insights about your IT infrastructure. Here are the main use cases for the app:
There are various technologies that Datadog supports such as Amazon Web Services (AWS), Azure, Google Cloud, Kubernetes, Red Hat OpenShift, and Pivotal Platform. Let’s quickly go through how these technologies integrate with Datadog:
Before you start using Datadog, it is essential to understand the three different price plans:
The app also offers 14-day free trials for its Pro and Enterprise plans, no credit card required.
The lightweight Datadog agent needs to be installed on multiple servers to manage your infrastructure’s logs and events. Before you get started installing the Datadog agent, you’ll need the following things:
The Datadog agent can be installed on various platforms including macOS, Windows, Debian, Ubuntu, Kubernetes, Openshift, etc. However, this tutorial will show you how to set up the agent on an Ubuntu machine.
sudo apt-get update
sudo apt-get install apt-transport-https curl gnupg
sudo sh -c "echo 'deb [signed-by=/usr/share/keyrings/datadog-archive-keyring.gpg] https://apt.datadoghq.com/ stable 7' > /etc/apt/sources.list.d/datadog.list" sudo touch /usr/share/keyrings/datadog-archive-keyring.gpg sudo chmod a+r /usr/share/keyrings/datadog-archive-keyring.gpg curl https://keys.datadoghq.com/DATADOG_APT_KEY_CURRENT.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch curl https://keys.datadoghq.com/DATADOG_APT_KEY_382E94DE.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import –batch curl https://keys.datadoghq.com/DATADOG_APT_KEY_F14F620E.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
sudo touch /usr/share/keyrings/datadog-archive-keyring.gpg sudo chmod a+r /usr/share/keyrings/datadog-archive-keyring.gpg
sudo apt-get update
sudo apt-get install datadog-agent datadog-signing-keys
Callout: The API keys are generated as soon as you register your account in Datadog and API keys are different for all users. You can find your API key in Datadog under Integrations > APIs.
sudo sh -c "sed 's/api_key:.*/api_key: <API-KEY>/' /etc/datadog-agent/datadog.yaml.example > /etc/datadog-agent/datadog.yaml" sudo sh -c "sed -i 's/# site:.*/site: datadoghq.com/' /etc/datadog-agent/datadog.yaml" sudo sh -c "chown dd-agent:dd-agent /etc/datadog-agent/datadog.yaml && chmod 640 /etc/datadog-agent/datadog.yaml"
sudo systemctl start datadog-agent.service
One of the best features of Datadog is Autodiscovery, which allows it to automatically identify various components in an environment or system such as services or containers.
To set up Autodiscovery, you need to edit the Datadog agent configuration file and restart the Datadog agent. For example, to monitor Docker container information such as start time, etc., you can add the text below to the configuration file.
Callout: Docker applications run inside lightweight environments known as containers that run Docker images.
– name: docker
– name: docker
Datadog provides more than 500 integrations with other apps and services. Integrations allow you to work with various tools such as Active Directory, AWS EC2, AWS Elastic Kubernetes Services (EKS), and Ansible to fetch application metrics and logs from an extended infrastructure.
The app provides three main types of integration:
Now, let’s quickly learn how to activate or configure an agent integration by performing the following steps below.
– apache_status_url: http://localhost/server-status?autologs:
– type: file
After setting up the Datadog agent and integrations, you’re now ready to use the platform’s various capabilities. We’ll guide you through some of the first tasks you can carry out.
It is crucial to monitor your cloud or data center infrastructure, which may contain hundreds of applications. If one of them stops working, other impacted applications may affect your business.
To monitor your infrastructure, you’ll need to have metric monitors in place. The Manage Monitors page is where you can manage all alerts, and the Triggered Monitors page allows you to trigger alerts and control downtime.
You can create various statuses in your infrastructures such as “OK”, “Warning”, and “No data”, and prioritize monitoring based on statuses like Critical, High, Medium, Low, and Info.
There are many things that you can monitor in your infrastructure such as events, processes, hosts, integrations, etc. Now, let’s quickly learn how you can monitor your infrastructure.
Datadog can collect logs from various sources such as servers, AWS EC2 instances, containers, and other cloud-based environments. Logging allows you to collect, process, and monitor various logs across the system.
Let’s quickly see how we can configure sources that fetch and forward logs from multiple sources to the app. To do that, we’ll need to edit the configuration file (conf.yml) stored inside our Datadog agent installation directory.
Below is an example of a configuration file that stores your machine’s HTTP web server logs and forwards them to Datadog.
– type: file
One of the best features of Datadog is its ability to create customizable dashboards for tracking, analyzing, and displaying various performance metrics. Dashboards allow you to monitor and visualize the health of your environment and infrastructure at a glance.
You can create a new dashboard by following these steps:
It is essential to understand how to make monitors receive alerts and notifications for various performance metrics. You can follow these steps to create a monitor.
Datadog is a free tool with a whole lot of features. With this guide, you should now understand what’s possible to do with Datadog, from managing configurations to monitoring and tracking metrics.
You also learned how to set up the Datadog agent on Ubuntu, although you can set it up on various operating systems. Now that you have a good idea about everything this app can do, what do you plan to monitor with it?