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_*.
The type must be the same as the Kubernetes object kind in uppercase, e.g. K8S_MYTYPE for a Kubernetes object with kind: MyType.
The name field follows the same convention just in lowercase and with a dot separator, e.g. k8s.mytype.name for a Kubernetes object with kind: MyType.
You can get an overview of all K8S entities with the following DQL query:
smartscapeNodes "K8S_*"
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
| string | experimentalThe full JSON content of any Kubernetes object. |
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe type of the workload. The value is the Kubernetes object kind of the workload in lowercase. |
|
| string | resource stableThe name of the workload. |
|
The Smartscape ID for Kubernetes entities will be calculated based on the resource name or 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.
Kubernetes labels and annotations for a given resource are exposed via the tags:k8s.labels and tags:k8s.annotations fields, and can be accessed via tags[__key__]. For example, 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 Kubernetes entities support the following fields to set up permissions:
k8s.cluster.namek8s.namespace.namedt.security_contextSmartscape entities contain an id_classic field pointing to corresponding entities in the classic entity storage.
Smartscape node name: k8s.dynakube.name
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.dynakube.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the DynaKube. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
Smartscape node name: k8s.edgeconnect.name
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.edgeconnect.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the EdgeConnect. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalVersion of the Kubernetes cluster. |
|
| string | experimentalThe name of the Kubernetes distribution. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Smartscape node name: k8s.configmap.name
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.configmap.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the ConfigMap. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.workload.kind, k8s.workload.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe type of the workload. The value is the Kubernetes object kind of the workload in lowercase. |
|
| string | resource stableThe name of the workload. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the CronJob. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
Smartscape node name: k8s.customresourcedefinition.name
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.customresourcedefinition.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the CustomResourceDefinition. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.workload.kind, k8s.workload.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe type of the workload. The value is the Kubernetes object kind of the workload in lowercase. |
|
| string | resource stableThe name of the workload. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the DaemonSet. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.workload.kind, k8s.workload.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe type of the workload. The value is the Kubernetes object kind of the workload in lowercase. |
|
| string | resource stableThe name of the workload. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the Deployment. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.workload.kind, k8s.workload.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe type of the workload. The value is the Kubernetes object kind of the workload in lowercase. |
|
| string | resource stableThe name of the workload. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the DeploymentConfig. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
Smartscape node name: k8s.horizontalpodautoscaler.name
Smartscape node type: K8S_HORIZONTALPODAUTOSCALER
This entity represents a Kubernetes horizontal pod autoscaler object.
Fetch all Smartscape nodes from the smartscape.nodes table and filter for the entity type "K8S_HORIZONTALPODAUTOSCALER".
smartscapeNodes "K8S_HORIZONTALPODAUTOSCALER"
The ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.horizontalpodautoscaler.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the HorizontalPodAutoscaler. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
| record | stableSimilar to |
|
Smartscape node name: k8s.ingress.name
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.ingress.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the Ingress. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
| record | stableDefine network route to the instance Examples: EC2 route table routes to EC2 NAT Gateway EC2 VPC Peering Connection routes to VPCRelationships: |
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.workload.kind, k8s.workload.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe type of the workload. The value is the Kubernetes object kind of the workload in lowercase. |
|
| string | resource stableThe name of the workload. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the Job. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
| record | stableDefines if the instance is part of a cluster, similar to a composition in UML. The source (child) cannot exist without the destination (parent).Relationships: |
|
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
Smartscape node name: k8s.networkpolicy.name
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.networkpolicy.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the NetworkPolicy. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.node.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableName of the node. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
| record | stableDefines 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: |
Smartscape node name: k8s.persistentvolume.name
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.persistentvolume.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the PersistentVolume. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
| record | stableIs (typically) exclusively attached to the instance (1-many)Relationships: |
|
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.persistentvolumeclaim.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the PersistentVolumeClaim. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
| record | stableSimilar to |
|
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.pod.uid
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe type of the workload. The value is the Kubernetes object kind of the workload in lowercase. |
|
| string | resource stableThe name of the workload. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableName of the node. |
|
| string | resource stableThe name of the pod. |
|
| string | resource stableThe UID of the pod. |
|
| string | resource experimentalThe pod phase is a simple status showing where a Pod is in its lifecycle. |
|
| timestamp | resource experimentalThe RFC 3339 date and time at which the Pod will be deleted. |
|
k8s.pod.phase MUST be one of the following:
| Value | Description |
|---|---|
| At least one container terminated with an error (non-zero exit code). |
| Pod is created but not yet running. |
| Pod is scheduled on a node and at least one container is running. |
| All containers finished successfully (exit code 0) and won’t restart. |
| Pod state cannot be determined (usually communication issue with node). |
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
| record | stableDefines if the instance is part of a cluster, similar to a composition in UML. The source (child) cannot exist without the destination (parent).Relationships: |
|
| record | stableDefines 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: | |
| record | stableSimilar to |
|
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.workload.kind, k8s.workload.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe type of the workload. The value is the Kubernetes object kind of the workload in lowercase. |
|
| string | resource stableThe name of the workload. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the ReplicaSet. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
| record | stableDefines if the instance is part of a cluster, similar to a composition in UML. The source (child) cannot exist without the destination (parent).Relationships: |
|
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.workload.kind, k8s.workload.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe type of the workload. The value is the Kubernetes object kind of the workload in lowercase. |
|
| string | resource stableThe name of the workload. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the ReplicationController. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
| record | stableDefines if the instance is part of a cluster, similar to a composition in UML. The source (child) cannot exist without the destination (parent).Relationships: |
|
Smartscape node name: k8s.secret.name
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.secret.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the Secret. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.service.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the Kubernetes service. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|
| record | stableDefine network route to the instance Examples: EC2 route table routes to EC2 NAT Gateway EC2 VPC Peering Connection routes to VPCRelationships: |
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 ID is calculated based on the following fields in the defined order: k8s.cluster.uid, k8s.namespace.name, k8s.workload.kind, k8s.workload.name
The following base fields are used for all entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| smartscapeId | stableA Smartscape ID consists of two components: an UPPER_CASE entity type and a random 16-character hexadecimal unique identifier, separated by a dash. Use Smartscape conversion functions when working with strings that represent Smartscape IDs. |
|
| string | deprecatedThe entity ID that was used in the classic entity store. This ID is present in old monitoring data. Not all entities have this ID, and it is not generated for new entities. Use the |
|
| string | stableThe entity name. |
|
| string | stableThe entity type. UPPER_SNAKE_CASE string that represents the type of the entity. |
|
| record | stableA consolidated record that aggregates all tag values originating from different contexts. Each nested field within tags represents a specific key (for example, |
|
| timeframe | stableThe lifetime of the entity. This is a record with two nested fields: |
|
| record | stableProvides access to static edges pointing to other entities. In this record each nested field represents a relationship type and target type, and the value is an array of target smartscape IDs. This field is hidden by default but can be added using the fieldsAdd command. |
|
| string[] | resource stableThe security contexts associated with the entity. For Smartscape entities, this field is always an array.Tags: |
|
Fields that are provided by all Kubernetes entities.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | experimentalThe full JSON content of any Kubernetes object. | |
| string | resource stableThe user-defined name of the cluster in Dynatrace. Doesn't need to be unique or immutable.Tags: |
|
| string | resource stableA pseudo-ID for the cluster, by default set to the UID of the kube-system namespace. |
|
Fields that are provided by all Kubernetes entities that exist in a Kubernetes namespace.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe name of the namespace that the pod is running in.Tags: |
|
Fields that are provided by all Kubernetes workloads.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource stableThe type of the workload. The value is the Kubernetes object kind of the workload in lowercase. |
|
| string | resource stableThe name of the workload. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| string | resource experimentalName of the StatefulSet. |
|
| Attribute | Type | Description | Examples |
|---|---|---|---|
| record | stableThis 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: |
|