Collecting Data Using Datadog Agent

Assumptions

 

  • If using an existing dd-agent version (and just pointing it to KloudFuse instead of DD HQ)

    • dd agent version needs to be 7.41 or higher.

    • validate using following steps:

      • check the chart version with helm list - should be 3.1.10 or higher

        helm list -n <namespace-where-agent-is-installed>
      • check the image version of the agent with describe pod on dd-agent pod.

        k describe pod -n <namespace-where-agent-is-installed> | grep Image Image: gcr.io/datadoghq/agent:7.36.0

Install DataDog Agent

Agent install Setup Scenario

Steps

Agent install Setup Scenario

Steps

Kloudfuse stack & target both in same VPC and in same K8S cluster (Default)

This is the default scenario. Just use the provided values file for the agent and install.

Kloudfuse stack & target both in same VPC, but in different K8S cluster

Search for _url in the provided file. Wherever found, comment the Default Scenario and uncomment Scenario 1. For the IP address values needed, please see the following steps.

  • Get ingress internal IP

    kubectl get svc -n kfuse | grep kfuse-ingress-nginx-controller-internal kfuse-ingress-nginx-controller-internal LoadBalancer 10.53.250.80 10.53.232.3 80:32716/TCP,443:30767/TCP 125m
  • replace all settings with _url suffix, for example:

Kloudfuse stack hosted in a different VPC (hosted at “customer.kloudfuse.io”)

Search for _url in the provided file. Wherever found, comment the Default Scenario and uncomment Scenario 2. Replace the customer.klodufuse.io with your custom DNS name entry.

  • replace all settings with _url suffix, for example:

 

 

Required Datadog configurations

The yaml files described above already contains the required Datadog configurations for Kloudfuse to ingest the data properly. These required changes are listed below:

 

Collect high cardinality tags

The Datadog Agent is installed with cardinality set to ‘orchestrator’ level - allowing granular (pod and container level) tagging of metrics.. The default setting in the Datadog Agent is set to ‘low’ - allowing tagging only at host level.

Install command

If you haven’t before, add datadog helm repo:

Install the datadog agent with updated values (cmd below assumes the file is called dd-values-kfuse.yaml. Replace that argument with the filename that’s relevant to your scenario).

Adding custom tags

Custom tags can be added to the agent such that all metrics collected by the agent will have the tag added. To add custom tags, please follow these steps.

  1. Update dd-values-kfuse.yaml file to include following for the custom tags:

  1. kfuse helmcustom-values.yaml file needs to be updated to whitelist the new custom tag (note that the following entry needs to be “appended” to the existing list, without which some default values will get overwritten which is not the desired behavior. Please contact the Kloudfuse team for assistance):

Metadata for metrics collected using the openmetrics check

If using the above configuration, then the openmetrics check is enabled in the agent. See here for more details on what openmetrics check does. Kloudfuse agent (installed using the provided values file) employs a custom check (kf_openmetrics) to collect metadata (the “Description” and “Type” of metrics) for metrics collected using the openmetrics check, which. by default, doesn’t collect any metatada. To enable collection of metadata for these metrics, the sources are required to be annotated which will enable the agent auto-discovery for these pods and execute the custom check.

Kubernetes environment

To enable metrics metadata to be collected from a Kubernetes pod (as shown in an example here) follow these steps (Note that this can be done in helm as well for each of the deployment/sts):

Advance monitoring: Enable kubernetes_state_metrics

Advance monitoring (Kfuse 1.3 or higher) currently has dependency on kubernetes_state_metrics (KSM) check which is not enabled in the newer version of the agent (2.0) by default. Please ensure that the agent continues to capture these metrics through KSM. To do that, please add/update the dd-agent values file as follows: