This section documents the set of preconfigured Kubernetes entities. In addition to that, Dynatrace Extensions and other sources may add additional Entities based on Kubernetes objects, which are not described here.
In general each entity represents a single resource in the Kubernetes API. There are two exceptions of this rule: K8S_CLUSTER (which has no representation) and CONTAINER (which is modeled as part of a Pod within the Kubernetes API).
All Kubernetes entity types are prefixed with K8S_*. You can get an overview of all K8S entities with the following DQL query:
smartscapeNodes "K8S_*"
All K8S entities provide the following fields:
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
k8s.object | string | experimental The full JSON content of any Kubernetes object. |
All entities living inside a K8S namespace also have the following fields:
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
All entities representing a workload additionally have the following fields:
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.workload.kind | string | resource stable The type of the workload. The value is the Kubernetes object kind of the workload in lowercase. | deployment; statefulset; cronjob; job; daemonset; replicaset |
k8s.workload.name | string | resource stable The name of the workload. | checkoutservice |
The Smartscape ID for K8s entities will be calculated based on the resource uid.
The JSON payload of a Kubernetes resource is stored as string in the k8s.object field. The parse command can be used to efficiently filter for details within the JSON payload. As a best practice, to improve the query performance, you can exclude the field from your queries using the fieldsRemove command, if it is not needed.
Note: Some details will be filtered out in order to reduce the size of the field.
K8s labels and annotations for a given resource will be exposed via the tags:k8s.labels and tags:k8s.annotations fields and can be accessed via tags[__key__]. E.g. to access the my_label label you can use tags[my_label], the example.com/annotation annotation can be accessed via tags[``example.com/annotation``].
All K8S entities support the following fields to set up permissions:
k8s.cluster.namek8s.namespace.namedt.security_contextSmartscape entities will contain classic_id field pointing to corresponding entities in the classic entity storage.
Smartscape node type: K8S_DYNAKUBE
This entity represents a Kubernetes DynaKube object.
Fetch all Smartscape nodes from the smartscape.node table and filter for the entity type "K8S_DYNAKUBE".
smartscapeNodes "K8S_DYNAKUBE"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields specific for a Kubernetes DynaKube entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.dynakube.name | string | resource experimental Name of the DynaKube. | my-dynakube |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespacesmartscapeId dt.smartscape.k8s_customresourcedefinition | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
Smartscape node type: K8S_EDGECONNECT
This entity represents a Kubernetes EdgeConnect object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_EDGECONNECT".
smartscapeNodes "K8S_EDGECONNECT"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields specific for a Kubernetes EdgeConnect entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.edgeconnect.name | string | resource experimental Name of the EdgeConnect. | my-edgeconnect |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespacesmartscapeId dt.smartscape.k8s_customresourcedefinition | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
Smartscape node name: k8s.cluster.name
Smartscape node type: K8S_CLUSTER
This entity represents a Kubernetes cluster object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_CLUSTER".
smartscapeNodes "K8S_CLUSTER"
Fetch all Kubernetes Smartscape nodes and count them per cluster name and type
// query all entities where type starts with K8S_// this gives you a list of your different Kubernetes objects represented in DynatracesmartscapeNodes "K8S_*"// count entities per cluster and type| summarize count(), by: {k8s.cluster.name, type}
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.cluster.version | string | experimental Version of the Kubernetes cluster. | v1.29.1-eks-b9c9ed7 |
k8s.cluster.distribution | string | experimental The name of the Kubernetes distribution. | EKS; AKS; GKE; OpenShift |
Fields specific for a Kubernetes cluster entity.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Smartscape node type: K8S_CONFIGMAP
This entity represents a Kubernetes config map object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_CONFIGMAP".
smartscapeNodes "K8S_CONFIGMAP"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields specific for a Kubernetes config map entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.configmap.name | string | resource experimental Name of the ConfigMap. | my-configmap |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
Smartscape node name: k8s.workload.name
Smartscape node type: K8S_CRONJOB
This entity represents a Kubernetes cron job object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_CRONJOB".
smartscapeNodes "K8S_CRONJOB"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.workload.kind | string | resource stable The type of the workload. The value is the Kubernetes object kind of the workload in lowercase. | deployment; statefulset; cronjob; job; daemonset; replicaset |
k8s.workload.name | string | resource stable The name of the workload. | checkoutservice |
Fields specific for a Kubernetes cron job entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.cronjob.name | string | resource experimental Name of the CronJob. | my-cronjob |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
Smartscape node type: K8S_CUSTOMRESOURCEDEFINITION
This entity represents a Kubernetes custom resource definition object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_CUSTOMRESOURCEDEFINITION".
smartscapeNodes "K8S_CUSTOMRESOURCEDEFINITION"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields specific for a Kubernetes custom resource definition entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.customresourcedefinition.name | string | resource experimental Name of the CustomResourceDefinition. | dynakubes.dynatrace.com |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_cluster | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
Smartscape node name: k8s.workload.name
Smartscape node type: K8S_DAEMONSET
This entity represents a Kubernetes daemon set object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_DAEMONSET".
smartscapeNodes "K8S_DAEMONSET"
Find all workloads that are missing liveness/readiness probes.
// query all workloads across all Kubernetes clusterssmartscapeNodes K8S_DEPLOYMENT, K8S_DAEMONSET, K8S_STATEFULSET, K8S_REPLICASET, K8S_REPLICATION_CONTROLLER, K8S_JOB, K8S_DEPLOYMENTCONFIG// parse the configuration as json| parse k8s.object, "JSON:k8s.object"// expand containers into separate rows| expand container = k8s.object[spec][template][spec][containers]// create separate field for containername| fieldsAdd containername = container[name]// create separate field for livenessProbe| fieldsAdd liveness = container[livenessProbe]// create separate field for readinessProbe| fieldsAdd readiness = container[readinessProbe]// filter for all workloads having not set liveness or not set readiness probe.| filter isNull(liveness) or isNull(readiness)// reduce output to only most important fields| fields id, k8s.cluster.name, k8s.namespace.name, k8s.workload.name, liveness, readiness// only show 10 results| limit 10
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.workload.kind | string | resource stable The type of the workload. The value is the Kubernetes object kind of the workload in lowercase. | deployment; statefulset; cronjob; job; daemonset; replicaset |
k8s.workload.name | string | resource stable The name of the workload. | checkoutservice |
Fields specific for a Kubernetes daemon set entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.daemonset.name | string | resource experimental Name of the DaemonSet. | my-daemonset |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
Smartscape node name: k8s.workload.name
Smartscape node type: K8S_DEPLOYMENT
This entity represents a Kubernetes deployment object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_DEPLOYMENT".
smartscapeNodes "K8S_DEPLOYMENT"
Query and parse the YAML of a Kubernetes deployment object.
// query Kubernetes workloads of type deploymentsmartscapeNodes "K8S_DEPLOYMENT"// parse the yaml (json)| parse k8s.object, "JSON:k8s.object"// only show configuration of first deployment| limit 1
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.workload.kind | string | resource stable The type of the workload. The value is the Kubernetes object kind of the workload in lowercase. | deployment; statefulset; cronjob; job; daemonset; replicaset |
k8s.workload.name | string | resource stable The name of the workload. | checkoutservice |
Fields specific for a Kubernetes deployment entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.deployment.name | string | resource experimental Name of the Deployment. | my-deployment |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
Smartscape node name: k8s.workload.name
Smartscape node type: K8S_DEPLOYMENTCONFIG
This entity represents a Kubernetes (OpenShift) deployment config object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_DEPLOYMENTCONFIG".
smartscapeNodes "K8S_DEPLOYMENTCONFIG"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.workload.kind | string | resource stable The type of the workload. The value is the Kubernetes object kind of the workload in lowercase. | deployment; statefulset; cronjob; job; daemonset; replicaset |
k8s.workload.name | string | resource stable The name of the workload. | checkoutservice |
Fields specific for a Kubernetes deployment config entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.deploymentconfig.name | string | resource experimental Name of the DeploymentConfig. | my-deploymentconfig |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
Smartscape node type: K8S_INGRESS
This entity represents a Kubernetes ingress object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_INGRESS".
smartscapeNodes "K8S_INGRESS"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields specific for a Kubernetes ingress entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.ingress.name | string | resource experimental Name of the Ingress. | my-ingress |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
routes_to | record | stable Define network route to the instance Examples: EC2 route table routes to EC2 NAT Gateway EC2 VPC Peering Connection routes to VPC Relationships: smartscapeId dt.smartscape.k8s_service |
Smartscape node name: k8s.workload.name
Smartscape node type: K8S_JOB
This entity represents a Kubernetes job object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_JOB".
smartscapeNodes "K8S_JOB"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.workload.kind | string | resource stable The type of the workload. The value is the Kubernetes object kind of the workload in lowercase. | deployment; statefulset; cronjob; job; daemonset; replicaset |
k8s.workload.name | string | resource stable The name of the workload. | checkoutservice |
Fields specific for a Kubernetes job entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.job.name | string | resource experimental Name of the Job. | my-job |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
is_part_of | record | stable Defines if the instance is part of a cluster, similar to a composition in UML. The source (child) cannot exist without the destination (parent). Relationships: smartscapeId dt.smartscape.k8s_cronjob | AWS_EC2_INSTANCE is_part_of AWS_AUTOSCALING_GROUP; K8S_POD is_part_of K8S_DEPLOYMENT |
Smartscape node name: k8s.namespace.name
Smartscape node type: K8S_NAMESPACE
This entity represents a Kubernetes namespace object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_NAMESPACE".
smartscapeNodes "K8S_NAMESPACE"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_cluster | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
Smartscape node type: K8S_NETWORKPOLICY
This entity represents a Kubernetes network policy object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_NETWORKPOLICY".
smartscapeNodes "K8S_NETWORKPOLICY"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields specific for a Kubernetes network policy entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.networkpolicy.name | string | resource experimental Name of the NetworkPolicy. | my-networkpolicy |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
Smartscape node name: k8s.node.name
Smartscape node type: K8S_NODE
This entity represents a Kubernetes node object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_NODE.
smartscapeNodes "K8S_NODE"
Query all unschedulable Kubernetes nodes across all Kubernetes clusters.
// query all k8s nodessmartscapeNodes K8S_NODE// parse the yaml (json)| parse k8s.object, "JSON:object"// drop unused fields| fieldsKeep k8s.node.name, object// extract the json-path object.spec.taints into a separate column| fieldsAdd taints = object[spec][taints]// expand into separate entry (row) per taint; (3 taints on one node, results in 3 rows)| expand taints// filter for unschedulable nodes| filter taints[key] == "node.kubernetes.io/unschedulable"// cleanup output| fieldsRemove object
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields specific for a Kubernetes node entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.node.name | string | resource stable Name of the node. | cluster-pool-1-c3c7423d-azth |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_cluster | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
Smartscape node type: K8S_PERSISTENTVOLUME
This entity represents a Kubernetes persistent volume object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_PERSISTENTVOLUME".
smartscapeNodes "K8S_PERSISTENTVOLUME"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields specific for a Kubernetes persistent volume entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.persistentvolume.name | string | resource experimental Name of the PersistentVolume. | my-persistentvolume |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_cluster | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
is_attached_to | record | stable Is (typically) exclusively attached to the instance (1-many) Relationships: smartscapeId[] dt.smartscape.k8s_persistentvolumeclaim | AWS_EBS_VOLUME is_attached_to AWS_EC2_INSTANCE; AZURE_NETWORK_INTERFACE is_attached_to AZURE_VIRTUAL_SUBNETWORK |
Smartscape node name: k8s.persistentvolumeclaim.name
Smartscape node type: K8S_PERSISTENTVOLUMECLAIM
This entity represents a Kubernetes persistent volume claim object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_PERSISTENTVOLUMECLAIM".
smartscapeNodes "K8S_PERSISTENTVOLUMECLAIM"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields specific for a Kubernetes persistent volume claim entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.persistentvolumeclaim.name | string | resource experimental Name of the PersistentVolumeClaim. | my-persistentvolumeclaim |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
uses | record | stable Similar to is_attached_to but in the opposite direction. Examples: EC2 Instance uses DHCP options, Auto Scaling Group uses EC2 Launch TemplateRelationships: smartscapeId dt.smartscape.k8s_persistentvolume | K8S_POD uses K8S_CONFIGMAP |
Smartscape node name: k8s.pod.name
Smartscape node type: K8S_POD
This entity represents a Kubernetes pod object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_POD".
smartscapeNodes K8S_POD
Find container image versions that violate best practices. Display any application container image that does not pin the SHA digest of a specific container image version.
// query all Kubernetes podssmartscapeNodes K8S_POD// filter out certain namespaces| filterOut in(k8s.namespace.name, {"kube-system", "dynatrace", "dynatrace-fluent-bit", "kyverno"})// parse the configuration as json| parse k8s.object, "JSON:k8s.object"// expand into separate row per container; (1 pod with 3 containers, results in 3 rows; one per container)| expand images = k8s.object[spec][containers]// flatten images and add prefix| fieldsFlatten images, prefix: "container."// only keep required fields| fieldsKeep container.image, k8s.pod.name, k8s.namespace.name, k8s.cluster.name// filter out all containers that have a pinned SHA digest| filterOut matchesPhrase(container.image, "@sha256:")// count pods violating this best practices per namespace and container image| summarize podCount = count(), by: { container.image, k8s.namespace.name, k8s.cluster.name}// sort images with many containers running first| sort podCount desc
Find namespaces running outdated or "latest" container images. Display namespaces that run Alpine image <= v3 or MySQL <= 5.7, or use the :latest image-tag.
// query all Kubernetes podssmartscapeNodes K8S_POD// filter out certain namespaces| filterOut in(k8s.namespace.name, {"kube-system", "dynatrace", "dynatrace-fluent-bit", "kyverno"})// parse the configuration as json| parse k8s.object, "JSON:k8s.object"// expand into separate row per container; (1 pod with 3 containers, results in 3 rows; one per container)| expand images = k8s.object[spec][containers]// flatten images and add prefix| fieldsFlatten images, prefix: "container."// only keep required fields| fieldsKeep container.image, k8s.pod.name, k8s.namespace.name, k8s.cluster.name// parse container image into image and version| parse container.image, "LD:image ':' LD:versionstring"// drop "v" in version string| fieldsAdd versionstring = replaceString(versionstring, "v", "")// pares version further into major and minor version| parse versionstring, "INT:version_major '.' INT:version_minor"// filter all| filter// alpine images running version lower than 3(image == "alpine" and version_major <= 3)// mysql versions running lower than 5.7or (image == "mysql" and (version_major < 5 or (version_major == 5 and version_minor <= 7)))// images running latest tagor versionstring == "latest"// group output by namespace and collect all violating images| summarize {violated_images=collectDistinct(container.image)}, by: {k8s.cluster.name, k8s.namespace.name}// sort by namespaces with the top number of violating images| sort arraySize(violated_images) desc
Find all configured Prometheus configs.
// query all entitiessmartscapeNodes "*"// parse the configuration as json| parse k8s.object, "JSON:k8s.object"// expand annotations in separate rows| expand annotations = k8s.object[metadata][annotations]// flatten annotations| fieldsFlatten annotations// filter for all entities that have set the "metrics.dynatrace.com/scrape" annotation; we keep also those that have set it to false| filterOut isFalseOrNull(`annotations.metrics.dynatrace.com/scrape`)// reduce output to most important fields only| fields name, k8s.cluster.name, k8s.namespace.name, type, `annotations.metrics.dynatrace.com/scrape`,`annotations.metrics.dynatrace.com/port`, `annotations.metrics.dynatrace.com/path`,`annotations.metrics.dynatrace.com/secure`, `annotations.metrics.dynatrace.com/filter`,`annotations.metrics.dynatrace.com/tls.ca.crt`, `annotations.metrics.dynatrace.com/tls.crt`, `annotations.metrics.dynatrace.com/tls.key`,`annotations.metrics.dynatrace.com/http.auth.basic.username`, `annotations.metrics.dynatrace.com/http.auth.basic.password`
Summarize Pod Quality of Service classes per cluster
// query all Kubernetes podssmartscapeNodes K8S_POD| filter isNotNull(k8s.object)// parse json definition| parse k8s.object, "JSON:k8s.object"// extract Quality of Service class| fieldsAdd qosClass = k8s.object[status][qosClass]// summarize by cluster name and Pod Quality of Service class| summarize by:{k8s.cluster.name, qosClass}, count()// sort by cluster name and Quality of Service| sort k8s.cluster.name, qosClass
Search first 100 Pods that do not follow Quality of Service best practices
// query all Kubernetes podssmartscapeNodes K8S_POD| filter isNotNull(k8s.object)// parse json definition| parse k8s.object, "JSON:k8s.object"// extract Quality of Service class| fieldsAdd qosClass = k8s.object[status][qosClass]// find all Pods that have a Quality of Service class other than "Guaranteed", meaning they will get evicted earlier in case of resource pressure| filter qosClass != "Guaranteed"// only show important fields| fields k8s.cluster.name, k8s.namespace.name, k8s.pod.name, qosClass// sort by names| sort k8s.cluster.name, k8s.namespace.name, k8s.pod.name, qosClass// limit number of results| limit 100
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.workload.kind | string | resource stable The type of the workload. The value is the Kubernetes object kind of the workload in lowercase. | deployment; statefulset; cronjob; job; daemonset; replicaset |
k8s.workload.name | string | resource stable The name of the workload. | checkoutservice |
Fields specific for a Kubernetes pod entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.node.name | string | resource stable Name of the node. | cluster-pool-1-c3c7423d-azth |
k8s.pod.name | string | resource stable The name of the pod. | checkoutservice-7895755b94-mzs5m |
k8s.pod.uid | string | resource stable The UID of the pod. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
is_part_of | record | stable Defines if the instance is part of a cluster, similar to a composition in UML. The source (child) cannot exist without the destination (parent). Relationships: smartscapeId dt.smartscape.k8s_replicasetsmartscapeId dt.smartscape.k8s_deploymentsmartscapeId dt.smartscape.k8s_statefulsetsmartscapeId dt.smartscape.k8s_daemonsetsmartscapeId dt.smartscape.k8s_jobsmartscapeId dt.smartscape.k8s_cronjobsmartscapeId dt.smartscape.k8s_replicationcontrollersmartscapeId dt.smartscape.k8s_deploymentconfig | AWS_EC2_INSTANCE is_part_of AWS_AUTOSCALING_GROUP; K8S_POD is_part_of K8S_DEPLOYMENT |
runs_on | record | stable Defines a "vertical" relation of an entity running on some other entity. It does not imply any composition or aggregation but only a looser association between the entities. One entity can run on multiple other entities. Examples: Service running on a POD, a CONTAINER or a HOST. Relationships: smartscapeId dt.smartscape.k8s_node | |
uses | record | stable Similar to is_attached_to but in the opposite direction. Examples: EC2 Instance uses DHCP options, Auto Scaling Group uses EC2 Launch TemplateRelationships: smartscapeId[] dt.smartscape.k8s_persistentvolumeclaimsmartscapeId[] dt.smartscape.k8s_configmapsmartscapeId[] dt.smartscape.k8s_secret | K8S_POD uses K8S_CONFIGMAP |
Smartscape node name: k8s.workload.name
Smartscape node type: K8S_REPLICASET
This entity represents a Kubernetes replica set object.
Fetch all Smartscape nodes from the smartscape.nodessmartscape.nodes table and filter for the entity type "K8S_REPLICASET".
smartscapeNodes "K8S_REPLICASET"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.workload.kind | string | resource stable The type of the workload. The value is the Kubernetes object kind of the workload in lowercase. | deployment; statefulset; cronjob; job; daemonset; replicaset |
k8s.workload.name | string | resource stable The name of the workload. | checkoutservice |
Fields specific for a Kubernetes replica set entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.replicaset.name | string | resource experimental Name of the ReplicaSet. | my-replicaset |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
is_part_of | record | stable Defines if the instance is part of a cluster, similar to a composition in UML. The source (child) cannot exist without the destination (parent). Relationships: smartscapeId dt.smartscape.k8s_deployment | AWS_EC2_INSTANCE is_part_of AWS_AUTOSCALING_GROUP; K8S_POD is_part_of K8S_DEPLOYMENT |
Smartscape node name: k8s.workload.name
Smartscape node type: K8S_REPLICATIONCONTROLLER
This entity represents a Kubernetes replication controller object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_REPLICATIONCONTROLLER".
smartscapeNodes "K8S_REPLICATIONCONTROLLER"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.workload.kind | string | resource stable The type of the workload. The value is the Kubernetes object kind of the workload in lowercase. | deployment; statefulset; cronjob; job; daemonset; replicaset |
k8s.workload.name | string | resource stable The name of the workload. | checkoutservice |
Fields specific for a Kubernetes replication controller entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.replicationcontroller.name | string | resource experimental Name of the ReplicationController. | my-replicationcontroller |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
is_part_of | record | stable Defines if the instance is part of a cluster, similar to a composition in UML. The source (child) cannot exist without the destination (parent). Relationships: smartscapeId dt.smartscape.k8s_deploymentconfig | AWS_EC2_INSTANCE is_part_of AWS_AUTOSCALING_GROUP; K8S_POD is_part_of K8S_DEPLOYMENT |
Smartscape node type: K8S_SECRET
This entity represents a Kubernetes secret object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_SECRET".
smartscapeNodes "K8S_SECRET"
Query all Kubernetes secret objects of type TLS.
// query all SecretssmartscapeNodes "K8S_SECRET"// parse the configuration as json| parse k8s.object, "JSON:k8s.object"// extract secret type| fieldsAdd secretType = k8s.object[type]// filter for tls secrets| filter secretType == "kubernetes.io/tls"// keep only relevant fields| fields id, name, k8s.namespace.name, k8s.cluster.name, secretType
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields specific for a Kubernetes secret entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.secret.name | string | resource experimental Name of the Secret. | my-secret |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
Smartscape node name: k8s.service.name
Smartscape node type: K8S_SERVICE
This entity represents a Kubernetes service object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_SERVICE".
smartscapeNodes "K8S_SERVICE"
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields specific for a Kubernetes service entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.service.name | string | resource stable The name of the Kubernetes service. | my-service |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |
routes_to | record | stable Define network route to the instance Examples: EC2 route table routes to EC2 NAT Gateway EC2 VPC Peering Connection routes to VPC Relationships: smartscapeId[] dt.smartscape.k8s_pod |
Smartscape node name: k8s.workload.name
Smartscape node type: K8S_STATEFULSET
This entity represents a Kubernetes stateful set object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_STATEFULSET".
smartscapeNodes "K8S_STATEFULSET"
Find all deployments and statefulsets that do not have a certain annotation set.
// query all entitiessmartscapeNodes "*"// filter for only Kubernetes statefulsets and deployments| filter in(type, {"K8S_STATEFULSET", "K8S_DEPLOYMENT"})// parse configuration into json| parse k8s.object, "JSON:k8s.object"// expand into separate entries (rows) per annotation. (1 deployment with 10 annotations, results in 10 rows)| expand annotations = k8s.object[metadata][annotations]// flatten the annotations| fieldsFlatten annotations// filter for all where dt.owner is not set or empty| filter isNull(annotations.dt.owner) or annotations.dt.owner == ""// group by namespace, collect all violating workloads, and count them| summarize {workloads=collectDistinct(name), num_workloads=count()}, by:{k8s.cluster.name, k8s.namespace.name}// sort namespaces by top number of violating workloads| sort num_workloads desc// only show top 10| limit 10
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
id | smartscapeId | stable The entity ID. | HOST-1234; K8S_POD-1234; SERVICE-1234 |
id_classic | string | stable The entity ID that was used in the classic entity store. This ID is present in old monitoring data. | HOST-1234; CLOUD_APPLICATION-1234; SERVICE-1234 |
name | string | stable The entity name. | localhost; easyTravel; product-catalog |
type | string | stable The entity type. | HOST; K8S_POD; SERVICE |
tags | array | stable Contains a consolidated list of all entity tags. Tags provided by OneAgent can also be accessed via tags:agent_tags; custom tags can be accessed via tags:custom. Note that rule-based tags do not exist in the new model. | [] |
lifetime | timeframe | stable The lifetime of the entity. classicField: lifetime | { start: 2022-07-06T13:36:00.808Z, end: 2024-04-11T06:56:01.204Z } |
dt.security_context | string[] | resource stable The security context is used in access permissions to limit the visibility. Learn more about the Dynatrace permission model Tags: permission | [] |
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.object | string | experimental The full JSON content of any Kubernetes object. | |
k8s.cluster.name | string | resource stable The user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable. Tags: permission primary-field | unguard-dev; acme-prod10 |
k8s.cluster.uid | string | resource stable A pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. | 1c7a24c7-ff51-46e0-bcc9-c52637ceec57 |
Fields that are provided by all non-workload Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.namespace.name | string | resource stable The name of the namespace that the pod is running in. Tags: permission primary-field | default; kube-system |
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.workload.kind | string | resource stable The type of the workload. The value is the Kubernetes object kind of the workload in lowercase. | deployment; statefulset; cronjob; job; daemonset; replicaset |
k8s.workload.name | string | resource stable The name of the workload. | checkoutservice |
Fields specific for a Kubernetes stateful set entity
| Attribute | Type | Description | Examples |
|---|---|---|---|
k8s.statefulset.name | string | resource experimental Name of the StatefulSet. | my-statefulset |
| Attribute | Type | Description | Examples |
|---|---|---|---|
belongs_to | record | stable This is similar to an aggregation in UML. It is a many-to-many relationship without existential properties (the destination is not composed of the sources). Relationships: smartscapeId dt.smartscape.k8s_clustersmartscapeId dt.smartscape.k8s_namespace | SERVICE belongs_to K8S_CLUSTER; K8S_POD belongs_to K8S_NAMESPACE |