# Datadog Setup

# What is Datadog?

The crucial security and monitoring platform for cloud applications is Datadog. To completely observable your apps, infrastructure, and third-party services, we combine end-to-end traces, metrics, and logs. These tools aid companies in maintaining system uptime, securing their systems, and guaranteeing the optimum user experience for their clients.

# Architecture

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689245805070/56163e37-eb3b-48b5-a97e-d2ef9d053342.png align="center")

# Features

* See across systems, apps, and services
    
* Get full visibility into modern applications
    
* Analyze and explore log data in context
    
* Proactively monitor your user experience
    
* Correlate frontend performance with business impact
    
* Visualize traffic flow in cloud-native environments
    
* Get alerted on critical issues
    
* Share what you saw, write what you did
    

# Installing Datadog

* Firstly start a EC2 Instance.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689738830904/35c9ce9c-3893-4ad5-83c8-a798800cdf8d.png align="center")
    
* Connect to your EC2 Instance.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689739092190/0b98bf78-b878-48f9-bbc4-bdf2bc525199.png align="center")
    
* Now, Login to your Datadog i am using us5 region.
    
* After that go to the Integrations -&gt; Agents -&gt; Ubuntu.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689739220456/2c182c2e-b7a8-40f9-803b-8b4c4a6357f1.png align="center")
    
* Run the Command of DD key which is available on datadog.
    
* ```plaintext
        DD_API_KEY=04b7c020784902332026a37c6a565e31 DD_SITE="us5.datadoghq.com" bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)"
    ```
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689739344664/c5a8bc09-8e54-495a-9a62-1d88fb451513.png align="center")
    
* Now run this command to check the status.
    
    ```plaintext
    sudo systemctl status datadog-agent
    ```
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689739470261/d56f2888-ac1c-409a-a9f2-defdcb0bf821.png align="center")
    
* Now Install Helm and Kubectl and aws cli.
    
    ```plaintext
    sudo snap install kubectl --classic
    sudo snap install helm --classic
    sudo snap install aws-cli   --classic
    ```
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689739645813/8b1a4138-2441-48fc-bfb5-97c321ed1f79.png align="center")
    
* Now configure your Aws using the Access key.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689739777956/f778dc59-481b-4992-b7b4-e48cafd1ea4a.png align="center")
    
* Now, Create a EKS Cluster. Here's the link to How to create a EKS Cluster. [CLICK HERE](https://hashnode.com/post/cljsvos4d00070al1amztalpz) . (Let all settings be on default).
    
    ![]( align="center")
    
* After the cluster is created add node group to it. [CLICK HERE](https://hashnode.com/post/cljsvos4d00070al1amztalpz)
    
* <mark>Just follow some Network configuration while creating a node group.</mark>
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689740571669/777377c0-2e8a-42e7-baa0-12ccfbdaf8e9.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689740603395/693e4f44-e3bd-457b-bb59-c22bd2370b9e.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689740746247/bd78b579-6d24-49ec-bd90-9da8c12adf73.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689740888367/4bb25204-3214-4d58-93ee-22e486b91092.png align="center")
    
* Now run this command to update your file. At the end use your cluster name.
    
    ```plaintext
    aws eks update-kubeconfig --region ap-south-1 --name demo
    kubectl get nodes
    ```
    
* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689741279891/05a45eac-3d01-4c41-93ad-9d90922d91ba.png align="center")
    
* Create an empty `datadog-values.yaml` file.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689741359928/fc90057e-4003-4ad3-b27b-98f4977ac942.png align="center")
    
* <mark>Put the data in the datadog-values.yaml file from </mark> [<mark>Click here</mark>](https://github.com/DataDog/helm-charts/blob/main/charts/datadog/values.yaml)<mark>.</mark>
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689741575862/f223fbe8-a97c-4066-8379-61afbadfa24b.png align="center")
    
* DO SOME UPDATES IN THE YAML FILE.
    
* <mark>apiKey: # &lt;DATADOG_API_KEY&gt;</mark>
    
    <mark>appKey: # &lt;DATADOG_APP_KEY&gt;</mark>
    
    <mark>clusterName: # &lt;CLUSTER_NAME&gt;</mark>
    
    <mark>dd_url: </mark> [**app.datadoghq.com**](http://app.datadoghq.com)
    
* You can find all these things by doing go to search.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689741806725/eed7f816-fce6-4fa7-9936-c8c63d909f7f.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689741939279/b4c71468-911b-41d6-b0bd-9c8856c03f8b.png align="center")
    
* Now run these commands.
    
    ```plaintext
    sudo snap install helm --classic
    helm repo add datadog https://helm.datadoghq.com
    helm repo update
    ```
    
* You have to insert the API key.
    
* So to get the API key you have to login to Datadog.
    
* Go in integration and integrate the the kubernetes
    
* Go to the Integration and then into the agent after this select the Kubernetes service.
    
* Click on the select API key and use it.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689742166130/3c4b721b-2d08-4594-9855-e665dbc2a727.png align="center")
    
* Must change the site in the command and release name.
    
    ```plaintext
    helm install datadog-deploy -f datadog-values.yaml --set datadog.site='us5.datadoghq.com' --set datadog.apiKey=----- datadog/datadog 
    ```
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689742425002/0513ffe7-0651-4748-a2df-30823e4c103f.png align="center")
    
* The setup is completed.
