# How to ingest additional Kubernetes Custom Resources (CRs) from a monitored cluster as a metric to be able to configure alerting based on that metric

**URL:** <https://community.dynatrace.com/t/how-to-ingest-additional-kubernetes-custom-resources-crs-from-a-monitored-cluster-as-a-metric-to-be-able-to-configure-alerting-based-on-that-metric/56025>\
**Category:** Troubleshooting\
**Tags:** smartscape, openshift, dynatrace-operator, workflows, kubernetes, dynakube\
**Created:** [June 4, 2026, 5:53pm UTC](https://community.dynatrace.com/t/how-to-ingest-additional-kubernetes-custom-resources-crs-from-a-monitored-cluster-as-a-metric-to-be-able-to-configure-alerting-based-on-that-metric/56025 "2026-06-04T17:53:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheriflashin](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@sheriflashin](https://community.dynatrace.com/u/sheriflashin)\
**Post date:** [June 4, 2026, 5:53pm UTC](https://community.dynatrace.com/t/how-to-ingest-additional-kubernetes-custom-resources-crs-from-a-monitored-cluster-as-a-metric-to-be-able-to-configure-alerting-based-on-that-metric/56025/1 "2026-06-04T17:53:28Z")

</div>

**Table of Contents**

# Summary

_Kubernetes Platform Monitoring is ingesting a set of Kubernetes resources from the Kube-APIserver on the monitored Kubernetes cluster and present those resources as metrics in Dynatrace, e.g(workload metrics (CPU, Memory), namespace resource quotas,…,etc)_

In some scenarios, those&nbsp;_Kubernetes resources are not enough and customers might need to ingest additional Kubernetes resources from a monitored cluster, and setup an alert based on the ingested resources metric value._

# Problem

_Ingesting additional Kubernetes Custom Resources (CRs) from a monitored Kubernetes cluster that is not ingested into Dynatrace out of the box and present this Custom Resources as a metric in Dynatrace to be able to setup an alerting if the value of this metric breached a configured threshold value._

# Workaround

Ingesting additional Custom Resources from Kubernetes cluster as Smartscape nodes:

### Prerequisites

- Dynatrace SaaS environment powered by Grail and AppEngine
- [DPS license](https://docs.dynatrace.com/docs/license)&nbsp;that includes the&nbsp;[**Kubernetes Platform Monitoring** &nbsp;capability](https://docs.dynatrace.com/docs/license/capabilities/container-monitoring/kubernetes-platform-monitoring)
- [Sufficient permissions](https://docs.dynatrace.com/docs/observe/infrastructure-observability/kubernetes-app/reference/permissions)&nbsp;to use the New&nbsp; **Kubernetes** &nbsp;app within your Dynatrace environment
- ActiveGate version 1.335+
- **Enabling this feature&nbsp;will increase the ActiveGate’s resource consumption, so make sure to watch for this and adapt resource’s requests/limits accordingly.**

For the below steps, we will&nbsp;Ingest additional Custom Resource ( **ClusterResourceQuota** ) from a monitored&nbsp; **OpenShift** &nbsp;Cluster as an example:

**Step 1** : Add the new permissions to the ClusterRole:

Please refer to [this link](https://docs.dynatrace.com/docs/shortlink/enable-k8s-clusters#add-permissions-clusterroles) to&nbsp;extend the permissions for Kubernetes Platform monitoring, by creating a ClusterRole with the required permissions and bind it to the&nbsp;`dynatrace-activegate`&nbsp;service account using a ClusterRoleBinding, below are the needed permissions to ingest&nbsp; **ClusterResourceQuota** CR&nbsp;from a monitored&nbsp; **OpenShift** &nbsp;Cluster:

```auto
- verbs:
  - list
  - watch
  - get
  apiGroups:
  - <a href="https://quota.openshift.io/" target="_blank" rel="noopener nofollow noreferrer">quota.openshift.io</a>
  resources:
  - clusterresourcequotas

```

**Step 2** :&nbsp;Modify the ActiveGate’s customProperties to&nbsp;include&nbsp;_kubernetes\_smartscape\_monitored\_custom\_resources_&nbsp;parameter for Kubernetes monitoring in the DynaKube YAML file:

Please refer to [this link](https://docs.dynatrace.com/docs/observe/infrastructure-observability/kubernetes-app/enable-k8s-experience#add-permissions-clusterroles:~:text=Extend%20monitoring%20of%20custom%20resources%20(CRs))&nbsp;to extend monitoring of custom resources (CRs) using&nbsp;_kubernetes\_smartscape\_monitored\_custom\_resources_&nbsp;parameter on&nbsp;the ActiveGate’s customProperties,&nbsp;below are the parameter’s values needed to ingest&nbsp; **ClusterResourceQuota** CR&nbsp;from a monitored&nbsp; **OpenShift** &nbsp;Cluster:

```auto
spec:
  activeGate:
    capabilities:
    - kubernetes-monitoring
    customProperties:
      value: |
        [kubernetes_monitoring]
        kubernetes_smartscape_monitored_custom_resources = [{ "resource": "clusterresourcequotas"\, "kind": "ClusterResourceQuota"\, "apiGroup": "<a href="https://quota.openshift.io/" target="_blank" rel="noopener nofollow noreferrer">quota.openshift.io</a>"\, "version": "v1"\, "namespaced": false\, "usePreferredApiVersion": false }]

```

**Note:** &nbsp;The&nbsp;`resource`&nbsp;value must be the lowercase plural name of the resource, and&nbsp;`kind`&nbsp;must match the Kubernetes kind exactly (PascalCase). Optionally, set&nbsp;`usePreferredApiVersion`&nbsp;for ActiveGate to use the preferred API version (if the preferred version can’t be determined, the version specified in&nbsp;`version`&nbsp;is used as a fallback).

Once the new permissions has been added to the ClusterRole and the ActiveGate’s customProperties modified to include the kubernetes\_smartscape\_monitored\_custom\_resources parameter successfully, you can query the data via the below DQL query:

```auto
smartscapeNodes K8S_CLUSTERRESOURCEQUOTA

```

**Step 3** :&nbsp; After successfully querying the&nbsp;K8S\_CLUSTERRESOURCEQUOTA via the provided DQL query, you can create a workflow to read the smartscapeNode ‘K8S\_CLUSTERRESOURCEQUOTA’ every 1 minute or so, extract the data and ingest it as custom metric:

Please refer to [this link](https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/default-workflow-actions) to create a Workflow with DQL query and HTTP request actions, attached to the article an example Workflow JSON file ‘clusterresourcequota-pods-used-metric.workflow.json’&nbsp;that can be uploaded to a Dynatrace environment on the Workflow app to perform the below:

1) The Workflow gets triggered every 1 minute.  
2) Reads ClusterResourceQuota Smartscape nodes and calculates used pods in percent.  
3) Ingest the result as metric via REST API.

**Notes:**

- Please replace the below placeholders with the actual values on the Workflow:
  1. **`<DT-SaaS-FQDN>`** &nbsp;with the FQDN of your SaaS environment.
  2. **`<OCP-CLUSTER-NAME>`** &nbsp;with the name of the OpenShift cluster where you modified the ActiveGate’s customProperties for Kubernetes monitoring in the DynaKube YAML to include&nbsp;kubernetes\_smartscape\_monitored\_custom\_resources parameter and added the new permissions to the ClusterRole,
  3. **`<token-value>`** &nbsp;with an access token with metrics.ingest scope

- This Workflow is just a starting point and must be adapted based on your desired outcome.
- The Workflow can only handle one ClusterResourceQuota object.
- You might need to adjust the max result limits, and other parameters on the Workflow.

# What’s next

- Up to 5 extra Custom Resources types can be ingested as Smartscape nodes.
- We are working on a more easier way to extend monitoring of custom resources (CRs) that can be done via the Dynatrace UI, However, there is still no ETA yet on when this feature will be available.
- References:

> **[Dynatrace Operator security](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/reference/security)**
>
> This page provides an overview of the Dynatrace components, their default configurations, and the permissions they require

> **[Customize ActiveGate for Kubernetes](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/guides/deployment-and-configuration/custom-properties-file)**
>
> Add a custom properties file to ActiveGate running in Kubernetes to define configuration settings for your cluster monitoring setup.

> **[Smartscape - Kubernetes](https://docs.dynatrace.com/docs/semantic-dictionary/model/smartscape/k8s)**
>
> Documents preconfigured Kubernetes entities in Dynatrace Smartscape. Extensions and other sources may add additional entities based on Kubernetes objects.

> **[Workflows](https://docs.dynatrace.com/docs/analyze-explore-automate/workflows)**
>
> Automate IT processes with Dynatrace Workflows—react to events, schedule tasks, and connect services.

> **[Access tokens (Dynatrace Classic)](https://docs.dynatrace.com/docs/manage/identity-access-management-classic/access-tokens-and-oauth-clients/access-tokens)**
>
> Learn the concept of an access token and its scopes.

[Getting started with Kubernetes experience — Dynatrace Docs](https://docs.dynatrace.com/docs/observe/infrastructure-observability/kubernetes-app/enable-k8s-experience#add-permissions-clusterroles:~:text=Extend%20monitoring%20of%20custom%20resources%20(CRs))&nbsp;  
[clusterresourcequota-pods-used-metric.workflow.json](https://community.dynatrace.com/uploads/short-url/dRhoBNq2ynwarSctdiAx7c7QZ1v.json) (2.92 KB)

---

<div class="post-metadata">

**Author:** ![panumjp](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@panumjp](https://community.dynatrace.com/u/panumjp)\
**Post date:** [August 6, 2026, 11:43am UTC](https://community.dynatrace.com/t/how-to-ingest-additional-kubernetes-custom-resources-crs-from-a-monitored-cluster-as-a-metric-to-be-able-to-configure-alerting-based-on-that-metric/56025/2 "2026-08-06T11:43:20Z")

</div>

Hi,

It’s great to see that Kubernetes custom resource support in Dynatrace is progressing.

I have a couple of questions:

1) Can metrics collected through this integration (or any other mechanism) be displayed in the custom resource’s Additional Telemetry tab in the Kubernetes application?

2) Can alerts be configured so that resulting problems are associated with the affected custom resource, or at least with the namespace of a namespaced custom resource, in the Problems application?

---

<div class="post-metadata">

**Author:** ![sheriflashin](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@sheriflashin](https://community.dynatrace.com/u/sheriflashin)\
**Post date:** [August 12, 2026, 6:16pm UTC](https://community.dynatrace.com/t/how-to-ingest-additional-kubernetes-custom-resources-crs-from-a-monitored-cluster-as-a-metric-to-be-able-to-configure-alerting-based-on-that-metric/56025/3 "2026-08-12T18:16:06Z")

</div>

Hello [@panumjp](https://community.dynatrace.com/user/71434),

_**1) Can metrics collected through this integration (or any other mechanism) be displayed in the custom resource’s Additional Telemetry tab in the Kubernetes application?**_

_Yes, The ingested CR can be displayed on the CustomResources tab on the new Kubernetes App:_

 ![image (2).png](https://global.discourse-cdn.com/dynatrace/original/3X/f/4/f4cd8d3b7a65850ec40675bac63237bd9d337abd.png)

_**2) Can alerts be configured so that resulting problems are associated with the affected custom resource, or at least with the namespace of a namespaced custom resource, in the Problems application?**_

Associating the problem with the custom resource entity or namespace depends on whether the dimension identifying the entity (or namespace) is carried through into the ingested custom metric.

When you set up the metric ingestion step in the workflow using smartscapeNodes command, make sure you include the relevant dimension (e.g. the namespace, or an identifier tied to the Smartscape node) as a metric dimension (fieldsAdd command), Then, on the metric event that triggers the alert, use dt.source\_entity and source.name in the event properties, mapped to that dimension — this is what tells Davis which entity to attach the resulting problem to.

Reference:

> **[Metric key events](https://docs.dynatrace.com/docs/dynatrace-intelligence/anomaly-detection-classic/metric-events/metric-key-events)**
>
> Learn about metric events based on a metric key.

> **[DQL selection and modification commands](https://docs.dynatrace.com/docs/platform/grail/dynatrace-query-language/commands/selection-and-modification-commands)**
>
> DQL selection and modification commands

> **[DQL Smartscape commands](https://docs.dynatrace.com/docs/platform/grail/dynatrace-query-language/commands/smartscape-commands)**
>
> DQL Smartscape commands
