Edit me

Installing the Datadog Agent for Enhanced Rightsizing Recommendation on the nOps Platform

When aiming to install the Datadog agent, it’s important to note two scenarios: if a new Auto Scaling Group (ASG) template is required, begin from Step 1. If an ASG template already exists, directly proceed by copying the User Data Script for Datadog from Step 2, replacing DD_API_KEY with your actual key, and pasting it into your template.

Step 1: Create or Update an EC2 Launch Template for Datadog Agent

  1. EC2 Dashboard: Go to “Services” and click on “EC2”.

  2. Launch Templates: Under “Instances”, click “Create launch template”.\
  3. Update Launch Template: Select “Launch Template” and from the action menu click “Modify template (Create new version)” 

  1. Template Details: Provide a name and description, select an AMI if needed, and choose an instance type.

  2. IAM Role: Choose the created IAM role in “IAM instance profile”.
    Step 2: In “Advanced details”, add the script to install the Datadog Agent agent:

  • User Data For Datadog Agent Installation:

#!/bin/bash

# Install the Datadog Agent

DD_API_KEY=xxxxxxxxxxxxxxxxxxxx353792 DD_SITE=”datadoghq.com” DD_APM_INSTRUMENTATION_ENABLED=host bash -c “$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)”

# Configure Datadog to prefer IMDSv2

sudo sed -i ‘/site: datadoghq.com/a ec2_prefer_imdsv2: true’ /etc/datadog-agent/datadog.yaml

# Restart the Datadog Agent service to apply changes

sudo systemctl restart datadog-agent

Save Launch Template: Review settings and “Create launch template”.

Final Steps:

After updating the ASG with the new launch template, any new instances launched by the ASG will have the chosen agent installed and configured. This setup enhances monitoring capabilities for these instances, allowing for better insights and optimization recommendations through nOps Rightsizing.



Datadog Agent in ASG for Enhanced Rightsizing
Maximizing Cost Efficiency with nOps Essentials Idle Instance Feature
Snapshot Migration from Standard to Archive in nOps Essentials
Cloudwatch Agent Configuration On your Linux based EC2
Idle EBS Volume Cleanup
EC2 and ASG Rightsizing with nOps with DataDog integration
Introduction to nOps Essentials
KMS Key Permissions
Essentials Stack
Essentials for Storage
Essentials Summary Page
IAM permissions for Essentials
nOps Scheduler with Terraform
Back to top       Home
Tags: essentials