How to Deploy Datadog Monitoring on Rancher


Kubernetes和Rancher培训
Join our free online training sessions to learn more about Kubernetes, containers, and Rancher.

Datadog is a popular hosted monitoring solution for aggregating and analyzing metrics and events for distributed systems. From infrastructure integrations to collaborative dashboards, Datadog gives you a clean single pane view into the information that is most important to you. Leveraging Datadog with Rancher can then give you a full stack view of all of your applications running on Kubernetes clusters, wherever they are hosted. To make Datadog easy to use with Rancher 2.0, we have modified the Datadog Helm chart to make it a simple deployment through Rancher’s catalog feature that will function across Rancher projects within a cluster.

Prerequisites

  1. Datadog API Key (you can use an existing secret with your API key, or let the chart make one for you).

  2. By default Rancher Kubernetes Engine (RKE) does not allow unauthenticated access to the kubelet API which Datadog relies on for many of its metrics. When installing the cluster with RKE we need to provide extra arguments to the kubelet service.

    services:
    kubelet:
      extra_args:
        read-only-port: 10255

    NOTE: You should make sure this port is properly firewalled

  3. A Kubernetes 1.8 cluster attached to a Rancher installation.

Setup & Configuration

  1. The Datadog Rancher Chart is available by default in the Rancher library; there is also a Datadog chart in Helm stable, but we suggest using the Rancher library chart for ease of use. The Rancher library is enabled by default; if disabled this setting can be modified under Global->Catalogs.
Datadog in the Rancher Catalog
  1. The charts configuration options have been made available through the UI in Rancher by adding a questions.yaml file. To learn more about them, please refer to the values.yaml file, which has additional information and links describing the variables.
Catalog

Dashboards

If you plan to send mutliple clusters of data to the same Datadog endpoint, it’s useful to add the cluster name as a host tag (e.g. kube-cluster-name:CLUSTERNAME) when configuring the Helm chart. This will allow you to sort data by scope to a specific cluster, as well as group data by cluster within a dashboard. In the below dashboard we have grouped node data by cluster in a few of the default widgets for the clusters ‘dash-1’ and dash-2’.

Dashboard

Conclusion

Using Helm to deploy applications provides a tested, standardized deployment method. With the Rancher Catalog UI, Helm charts are even easier to use and configure. With the addition of the Datadog chart to the Rancher library, users can now leverage this workflow for one of the top enterprise ready solutions for monitoring and alerting with Kubernetes.

Kubernetes和Rancher培训
Join our free online training sessions to learn more about Kubernetes, containers, and Rancher.
Kyle Rome
Kyle Rome
Field Engineer
Since graduating from university, Kyle has worked to deliver stable enterprise applications, first as a developer and later as a system administrator and integrator. He has always worked to deliver polished solutions, and when training others, he makes sure that the information is accessible and easily understood. He has been using Kubernetes since 2016 and joined Rancher in 2018.
快速开启您的Rancher之旅