Git Product home page Git Product logo

datadog-prometheus-k8s's Introduction

Collecting application custom metrics using Datadog

This demo will walk you through:

  1. Installing Datadog into Kubernetes
  2. Collecting default metrics
  3. Collecting application specific metrics
  4. Collecting custom Prometheus metrics

Install Datadog into Kubernetes using Helm chart

API_KEY="<YOUR DATADOG API KEY>"

helm repo add datadog https://helm.datadoghq.com

helm install datadog `
             --set datadog.site='datadoghq.com' `
             --set datadog.apiKey=$API_KEY `
             --set datadog.apm.enabled=true `
             datadog/datadog

View metrics on Datadog dashboard Deploy sample app expposing prometheus metrics on /metrics

kubectl apply -f app-deployment.yaml

Show Prometheus Nuget package config in dotnetcore-app/Startup.cs
View the metrics on /metrics
Now we want to collect these application metrics using Datadog

Configure Datadog to collect application metrics using datadog-values.yaml file

helm upgrade datadog -f datadog-values.yaml `
             --set datadog.site='datadoghq.com' `
             --set datadog.apiKey=$API_KEY `
             --set datadog.apm.enabled=true `
             datadog/datadog

View application specific metrics on Datadog dashboard -> Metrics -> Explorer
Creating custom metrics like page views counter in app code, in dotnetcore-app/Controllers/HomeController.cs
Viewing the custom metric in Datadog dashboard

References:
Datadog Helm chart: https://github.com/DataDog/helm-charts/tree/master/charts/datadog
Autodiscovery in Datadog: https://docs.datadoghq.com/agent/kubernetes/integrations/?tab=kubernetes
Prometheus libraries: https://prometheus.io/docs/instrumenting/clientlibs/

datadog-prometheus-k8s's People

Contributors

houssemdellai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

datadog-prometheus-k8s's Issues

ImagePullBackOff

Hi

Can you confirm if the image: aaacr.azurecr.io/web-app:1.0 is actually working?
It gives us error

frontend-deployment-6b8898779c-vznkm 0/1 ImagePullBackOff 0 7m28s
frontend-deployment-75c849db8-rscvh 0/1 ImagePullBackOff 0 23s
frontend-deployment-7d7bc8dcf-2td8b 0/1 ImagePullBackOff 0 11m
frontend-deployment-7d7bc8dcf-vkjc4 0/1 ImagePullBackOff 0 11m

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.