Skip to content


An AnalysisValueTemplate resource defines a Service Level Indicator (SLI), which identifies the data to be analyzed by a data source to use and the query to issue. One Analysis can use data from multiple AnalysisValueTemplates.


kind: AnalysisValueTemplate
  name: response-time-p95
  namespace: <namespace-where-this-resource-resides>
    name: cortex | datadog | dql | dynatrace | prometheus | thanos
  query: <query>


  • apiVersion -- API version being used
  • kind -- Resource type. Must be set to AnalysisValueTemplate
  • metadata

    • name -- Unique name of this template. Names must comply with the Kubernetes Object Names and IDs specification.
    • namespace (optional) -- Namespace where this template lives. Analysis resources must specify this namespace when referencing this definition, unless it resides in the same namespace as the Analysis resource.
  • spec

    • provider (required) -- the KeptnMetricProvider
      • name -- The value of the KeptnMetricsProvider resource to use. Note that each AnalysisValueTemplate resource can use only one data source. However, an Analysis resource can use multiple AnalysisValueTemplate resources, each of which uses a different data source.
    • query (required) -- query to be made. This is done in the data provider's query language. It can include variables that use the go templating syntax to insert a placeholder in the query. For example, the query might include {{.nodename}}'}; the value to substitute for that variable for this Analysis is defined in the spec.args section of the AnalysisTemplate resource, which might be set to nodename: test.


You must define a KeptnMetricsProvider for each instance of each data provider you are using. The AnalysisValueTemplate refers to that provider and queries it.

One Analysis can use data from multiple instances of multiple types of data provider; you must define a KeptnMetricsProvider resource for each instance of each data provider you are using. The template refers to that provider and queries it.


kind: AnalysisValueTemplate
  labels: analysisvaluetemplate analysisvaluetemplate-sample metrics-operator kustomize metrics-operator
  name: response-time-p95
  namespace: keptn-system
    name: prometheus
  query: "sum(kube_pod_container_resource_limits{node='{{.nodename}}'}) - sum(kube_node_status_capacity{node='{{.nodename}}'})"

For a full example of how the AnalysisValueTemplate is used to implement the Keptn Analysis feature, see the Analysis guide page.


API reference: AnalysisValueTemplate

Differences between versions

The Keptn Analysis feature is an official part of Keptn v0.10.0 and later. Keptn v0.8.3 included a preliminary release of this feature but it was hidden behind a feature flag. The behavior of this feature is unchanged since v0.8.3.

See also