cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configuring Infrastructure-Only Monitoring for Database Nodes in Kubernetes Cluster Using Dynatrace

agylpradipta
Helper

I have a use case where in a Kubernetes cluster, there are both application services and a PostgreSQL 16-based database.

However, the nodes are split as follows:

  • Application nodes: 10.31.18.3-14
  • Database nodes (including master and backup): 10.31.18.29-31

Now, in a regular Linux VM environment, it’s easy to choose the mode—whether full-stack or infrastructure-only.

But in Kubernetes, when using cloud-native full-stack, is there a way to set the database-specific nodes as infrastructure-only?

Is there any configuration either in the Dynatrace operator or in the dynakube.yaml file that can be adjusted to fit this scenario?

Thanks in advance.

4 REPLIES 4

Peter_Youssef
Champion

Hi @agylpradipta 

If you're seek adjusting the Dynakube.yaml, here is the attached portion where you can specify it with K8s team, would be much better to tailor the Dynakube as per the actual k8s setup.

2024-10-09_11h34_14.png BR,

Peter.

Esam_Eid
Pro

Dear @agylpradipta ,

if you go to the deployment status, you will find the master, worker nodes there. you can edit the hosts and switch to infra mode only. similar to any VM or normal host.

RB 

Dynatrace Certified Professional

Peter_Youssef
Champion

Hi @agylpradipta 

  • After successful deployment of K8s entities, the monitored servers can be accessed and customized under Manage > Deployment Status > Oneagents.
  • So you can change the monitoring mode from full-stack to infra-only mode in case of DB servers.

 

2024-10-09_13h48_41.png

2024-10-09_13h53_50.png

BR,

Peter.

Peter_Youssef
Champion

Hello @agylpradipta 

As simple as possible, Open 2024-10-09_14h00_11.png under Dynatrace operator 

As per the hostmonitoring.yaml you can customize the monitoring configurations for the K8s entities.

apiVersion: dynatrace.com/v1beta2
kind: DynaKube
metadata:
name: dynakube
namespace: dynatrace
spec:
# Dynatrace apiUrl including the `/api` path at the end.
# For SaaS, set `ENVIRONMENTID` to your environment ID.
# For Managed, change the apiUrl address.
# For instructions on how to determine the environment ID and how to configure the apiUrl address, see https://{environmentid}.live.dynatrace.com/api

# Optional: Name of the secret holding the credentials required to connect to the Dynatrace tenant
# If unset, the name of this custom resource is used
#
# tokens: ""

# Optional: Disable certificate validation checks for installer download and API communication
# skipCertCheck: true

# Optional: Set custom proxy settings either directly or from a secret with the field 'proxy'
# proxy:
# value: my-proxy-url.com
# valueFrom: name-of-my-proxy-secret

# Optional: Adds custom RootCAs from a configmap.
# Put the certificate under "certs" key within your configmap.
# Applies to Dynatrace Operator, OneAgent and ActiveGate.

# trustedCAs: name-of-my-ca-configmap

# Optional: Sets Network Zone for OneAgent and ActiveGate pods
# Make sure networkZones are enabled on your cluster before (see https://www.dynatrace.com/support/help/setup-and-configuration/network-zones/network-zones-basic-inf...)
#
# networkZone: name-of-my-network-zone

# Optional: Defines a custom pull secret in case you use a private registry when pulling images from the Dynatrace environment
# The secret has to be of type 'kubernetes.io/dockerconfigjson' (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/)
#
# customPullSecret: "custom-pull-secret"

# Optional: If enabled, and if Istio is installed on the Kubernetes environment, the
# Operator will create the corresponding VirtualService and ServiceEntry objects to allow access
# to the Dynatrace cluster from agents or activeGates. Disabled by default.
#
# enableIstio: false

# Optional: Configuration for thresholding Dynatrace API requests in minutes. Default is 15 minutes.
#
# dynatraceApiRequestThreshold: 15

# Configuration for Metadata Enrichment.
#
metadataEnrichment:
# Optional: Enables or disables metadata enrichment
# Defaults to "true"
#
enabled: true

# The namespaces in which metadata enrichment should be injected into
# If unset, all namespace will be injected into
# For examples regarding namespaceSelectors, see https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set...
#
# namespaceSelector:
# matchLabels:
# app: my-app
# matchExpressions:
# - key: app
# operator: In
# values: [my-frontend, my-backend, my-database]

# Configuration for OneAgent instances
#
oneAgent:
# Optional: Sets a host group for OneAgent.
#
# hostGroup: ""

# Enables host monitoring and changes its settings
# Cannot be used in conjunction with cloud-native fullstack monitoring, classic fullstack monitoring or application-only monitoring
#
hostMonitoring:
# Optional: If specified, indicates the OneAgent version to use
# Defaults to the configured version on your Dynatrace environment
# Available versions can be found using the UI or the Dynatrace API
# The version is expected to be provided in the semver format
# Example: <major>.<minor>.<release>.<timestamp>, e.g. 1.200.0.20240501-085142
#
# version: ""

# Optional: Sets the URI for the image containing the OneAgent installer used by the DaemonSet
# Defaults to the latest OneAgent image on the tenant's registry
#
# image: ""

# Optional: Sets a node selector to control on which nodes the OneAgent will be deployed.
# For more information on node selectors, see https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/
#
# nodeSelector: {}

# Optional: Sets the priority class assigned to the OneAgent Pods. No class is set by default.
# For more information on priority classes, see https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
#
# priorityClassName: priority-class

# Optional: Specifies tolerations to include with the OneAgent DaemonSet.
# For more information on tolerations, see https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
#
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
operator: Exists

# Optional: Adds resource settings for OneAgent container
# Consumption of the OneAgent heavily depends on the workload to monitor
# The values should be adjusted according to the workload
#
# oneAgentResources:
# requests:
# cpu: 100m
# memory: 512Mi
# limits:
# cpu: 300m
# memory: 1.5Gi

# Optional: Enables or disables automatic updates of OneAgent pods
# By default, if a new version is available, the OneAgent pods are restarted to apply the update
# If set to "false", this behavior is disabled
# Defaults to "true"
#
# autoUpdate: true

# Optional: Sets the DNS Policy for OneAgent pods
# Defaults to "ClusterFirstWithHostNet"
# For more information on DNS policies, see https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy
#
# dnsPolicy: "ClusterFirstWithHostNet"

# Optional: Adds custom labels to OneAgent pods
# Can be used to structure workloads
#
# labels:
# custom: label

# Optional: Adds custom annotations to OneAgent pods
#
# annotations:
# custom: annotations

# Optional: Adds custom environment variables to OneAgent pods
#
# env: []

# Optional: Adds custom arguments to the OneAgent installer
# For a list of available options, see https://www.dynatrace.com/support/help/shortlink/linux-custom-installation
# For a list of the limitations for OneAgents in Docker, see https://www.dynatrace.com/support/help/shortlink/oneagent-docker#limitations
#
args:
- --set-monitoring-mode=infra-only

# Optional: The SecComp Profile that will be used by the OneAgent in
# order to run in secure computing mode.
#
# secCompProfile: ""

Featured Posts