Skip to content

Instantly share code, notes, and snippets.

@mshutt
Created March 2, 2018 18:45
Show Gist options
  • Save mshutt/b20b296018665b818e677ebfdd4eb558 to your computer and use it in GitHub Desktop.
Save mshutt/b20b296018665b818e677ebfdd4eb558 to your computer and use it in GitHub Desktop.
kubernetes.yaml: |
init_config:
# init_retry_interval: 20
# init_retries: 5
instances:
# cAdvisor port, set it to 0 if cAdvisor is unavailable
- port: 4194
# cAdvisor host
# host: localhost
# kubelet port. It needs to be set if you are not using a
# default one (10250 or 10255)
kubelet_port: 10250
# apiserver url for cluster-level queries.
api_server_url: https://osmaster.${MYFQDN}:443
# Client Authentication against the apiserver and kubelet
bearer_token_path: /var/run/secrets/kubernetes.io/serviceaccount/token
# apiserver_client_crt: /path/to/client.crt
# apiserver_client_key: /path/to/client.key
#
# kubelet_client_crt: /path/to/client.crt
# kubelet_client_key: /path/to/client.key
# Server Authentication for apiserver and kubelet
apiserver_ca_cert: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
kubelet_cert: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
# kubelet_tls_verify: True
# collect_events controls whether the agent should fetch events from
# the kubernetes API and ingest them in Datadog.
collect_events: false
# Leader election
#
# Agents can perform leader election among themselves.
# The leader agent will collect events from the apiserver
# even if collect_events is false.
leader_candidate: true
# lease duration is the duration for which a leader is elected.
# It should be at least twice the check run period (15s by default)
leader_lease_duration: 600
# Matching the pods to Kubernetes services requires to retrieve events regularly.
collect_service_tags: true
service_tag_update_freq: 300
# The namespaces for which events should be collected.
# If not modified, the 'default' namespace will be used.
namespaces:
- default
# The regexp used to select namespaces for which events should be collected.
# The matched namespaces will be added to the "namespaces" list.
namespace_name_regexp: .*
# Node labels that should be collected and their name in host tags.
# Off by default.
# node_labels_to_host_tags:
# kubernetes.io/hostname: nodename
# beta.kubernetes.io/os: os
node_labels_to_host_tags:
role: role
# use_histogram controls whether we send detailed metrics,
# i.e. one per container.
use_histogram: false
# We can define a whitelist of patterns that permit publishing raw metrics.
# enabled_rates:
# - cpu.*
# - network.*
#
# enabled_gauges:
# - filesystem.*
# Prefix to use when converting pod labels to metric tags,
# can be made empty with ""
# label_to_tag_prefix: "kube_"
# Custom tags that should be applied to kubernetes metrics
# tags:
# - optional_tag1
# - optional_tag2
#tags:
# - "application:OpenShift"
# - "region:${MYREGION}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment