Datadog is a powerful monitoring and analytics platform for modern cloud environments. It provides real-time visibility into your infrastructure, applications, and logs.
Overview of Datadog
- Datadog is a monitoring and analytical tool for Cloud-scale applications. It can be used by IT and DevOps team which provides real-time visibility into application, monitoring the performance and health of their applications, infrastructure and services in real-time.
- Datadog provides the metrics, logs and traces from various sources in a single unified view.
- Datadog easily connects with popular cloud service providers such as Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platform (GCP), and more. This means you can quickly start monitoring and managing your cloud infrastructure, applications, and services without hassle, regardless of which cloud provider you use.
- Datadog’s integration for Google Cloud Platform (GCP) is an efficient, agentless way to import data into Datadog by pulling metadata directly from Google Cloud APIs. Additionally, the new Datadog Cloud Run agent supports tracing and custom metrics for managed Cloud Run instances.
- Its integration is designed to be smooth and straightforward, making it simple to gather data, track performance, and keep an eye on your entire cloud environment.
- Datadog monitoring software can be deployed either on-premises or as a Software as a Service (SaaS). Datadog is compatible with Windows, Linux, and macOS operating systems.
In this article, you’ll learn how to connect Datadog to your Google Cloud project and use it to monitor a Cloud Run app. You’ll also check out the new tracing features available with the Datadog Cloud Run agent.
Setup and Requirements
Step 1. Set up a Datadog trail account
- Go to https://us5.datadoghq.com/ sign up and enter your name, email, company, and password.
- Then, choose your software stack. Select Google Cloud Platform and click Next.
- On the following page, you’ll see a list of Agent installation options. Click on Debian.
- In that page you will observe one command DD_API_KEY copy that command.
Step 2. Enable Google Cloud Services
- Open your Google Cloud console and enable the following
- Cloud Resource Manager API
- Google Cloud Billing API
- Cloud Monitoring API
- Compute Engine API
- Cloud Asset API
- IAM API
Step 3. Creating Virtual Machine Instance
In your Google Cloud Console,
- Search for Compute Engine and create one Instance.
- Give a proper name for your Instance and click on the create tab
- After the creation of your Instance, click on SSH and you will be redirected to that SSH shell.
In the shell you will run the following commands.
-
“sudo apt-get update”
Step 3. Installing Datadog
- While setting up the Datadog trial, you copied a command with API_KEY details. Paste this command into your shell to install the Datadog agent.
- To start the Datadog agent run the below command.
“sudo systemctl start datadog-agent"
- To check the status of Datadog Agent run the below command .
“sudo systemctl status datadog-agent"
- After installing the Datadog Agent, click on Next button.
Step 4. Create your Google Cloud Service account
- Open your Google Cloud console.
- Navigate to IAM & Admin > Service Accounts.
- Click on Create Service Account at the top.
- Give a unique name for it and then click Create and Continue.
- Add the following roles to the service account
1.Monitoring Viewer
2.Compute Viewer
3.Cloud Asset Viewer
4.Browser
- Click Continue, then Done to complete creating the Service Account.
Step 5. Adding Datadog Principal to your Service Account
In the Datadog console,
- Navigate to the Integrations > Google Cloud Platform.
- Click on “Add GCP Account.” If you don’t have any configured projects, you’ll be automatically redirected to this page
- Click on the Generate Principal button.
- Keep this window for further process.
In Google Cloud Console, under the Service Accounts menu, find your Service account which you have created earlier.
- Go to the permissions tab and click on Grant Access.
- Pate your Datadog Principal into your New Principals text box.
- Assign the role of Service Account Token Creator and click Save.
Step 6. Integration Setup in Datadog
In your Google Cloud Console,
- Navigate to the Service Account > Details tab. There, you can find your email associated with this Google Service Account.
- Copy that email.
- Come back to the integration configuration title in Datadog Console page.
- In the box under Add Service Account Email, paste the email which you have earlier copied.
- Click on Verify and save Account.
- The integration of GCP with this Service Account is successful.
- If you have any existing or running Cloud Run jobs and Cloud Functions in your account, they will appear here in the Dashboards.
- If you don’t run any Cloud Run jobs and Cloud Functions make sure, you must perform those jobs.
- Wait for about 15 minutes approximately for the metrics to appear in Datadog.
In conclusion Datadog seamlessly integrates with GCP Cloud Run, providing real-time monitoring and insights. This integration ensures optimal performance and reliability of your serverless applications. Simplify your cloud management with Datadog’s comprehensive observability tools.