Service-level objective templates

  • Latest Dynatrace
  • Reference
  • 4-min read

SLOs Service-Level Objectives offers a set of pre-configured service-level objective (SLO) templates for some of the primary monitoring domains, which you can use to create your own SLOs.

We also offer a list of SLO examples. For more information on SLO examples, see Service-level objective examples.

See the SLO configuration templates to understand better the service-level indicators (SLIs).

CPU utilization

This SLI measures the CPU usage of selected hosts over time.

Details of the template

  • Data source: metrics (timeseries)

  • Entity scope: hosts

  • SLI DQL query:

    timeseries sli = avg(dt.host.cpu.usage),
    by: { dt.smartscape.host },
    filter: in(dt.smartscape.host, { HOST-IDs })
    | fieldsAdd getNodeName(dt.smartscape.host)

Service availability

This SLI measures the proportion of successful service requests over time.

Details of the template

  • Data source: metrics (timeseries)

  • Entity scope: services

  • SLI DQL query:

    timeseries {
    total = sum(dt.service.request.count),
    failures = sum(dt.service.request.failure_count)
    },
    by: { dt.smartscape.service },
    filter: { in(dt.smartscape.service, { SERVICE-IDs }) }
    | fieldsAdd sli = (((total[] - failures[]) / total[]) * 100)
    | fieldsAdd getNodeName(dt.smartscape.service)
    | fieldsRemove total, failures

Service performance

This SLI measures the proportion of service requests that are served faster than a defined response time.

Details of the template

  • Data source: metrics (timeseries)

  • Entity scope: services

  • Interval: defines the duration of each time slot in the timeseries that is aggregated to an average value

  • Threshold: latency threshold to seperate high from low time slots

  • SLI DQL query:

    timeseries total = avg(dt.service.request.response_time),
    default: 0,
    by: { dt.smartscape.service },
    filter: { in(dt.smartscape.service, { SERVICE-IDs }) }
    | fieldsAdd high = iCollectArray(if(total[] > (1000 * { $responseTimeInMilliSeconds }), total[]))
    | fieldsAdd low = iCollectArray(if(total[] <= (1000 * { $responseTimeInMilliSeconds }), total[]))
    | fieldsAdd highRespTimes = iCollectArray(if(isNull(high[]), 0, else: 1))
    | fieldsAdd lowRespTimes = iCollectArray(if(isNull(low[]), 0, else: 1))
    | fieldsAdd sli = 100 * (lowRespTimes[] / (lowRespTimes[] + highRespTimes[]))
    | fieldsAdd getNodeName(dt.smartscape.service)
    | fieldsRemove total, high, low, highRespTimes, lowRespTimes

Kubernetes cluster CPU usage efficiency

This SLI measures the ratio of requested CPU relative to allocatable CPU per Kubernetes cluster. 100% means that the allocatable CPU meets the requested demand.

Details of the template

  • Data source: metrics (timeseries)

  • Entity scope: Kubernetes cluster

  • SLI DQL query:

    timeseries {
    requests_cpu = sum(dt.kubernetes.container.requests_cpu, rollup: avg),
    cpu_allocatable = sum(dt.kubernetes.node.cpu_allocatable, rollup: avg)
    },
    by: { dt.smartscape.k8s_cluster },
    filter: { in(dt.smartscape.k8s_cluster, { K8S_CLUSTER-IDs }) }
    | fieldsAdd sli = (requests_cpu[] / cpu_allocatable[]) * 100
    | fieldsAdd getNodeName(dt.smartscape.k8s_cluster)
    | fieldsRemove requests_cpu, cpu_allocatable

Kubernetes cluster memory usage efficiency

This SLI measures the ratio of requested memory relative to allocatable memory per Kubernetes cluster. 100% means that the allocatable memory meets the requested demand.

Details of the template

  • Data source: metrics (timeseries)

  • Entity scope: Kubernetes cluster

  • SLI DQL query:

    timeseries {
    requests_memory = sum(dt.kubernetes.container.requests_memory, rollup: avg),
    memory_allocatable = sum(dt.kubernetes.node.memory_allocatable, rollup: avg)
    },
    by: { dt.smartscape.k8s_cluster },
    filter: { in(dt.smartscape.k8s_cluster, { K8S_CLUSTER-IDs }) }
    | fieldsAdd sli = (requests_memory[] / memory_allocatable[]) * 100
    | fieldsAdd getNodeName(dt.smartscape.k8s_cluster)
    | fieldsRemove requests_memory, memory_allocatable

Kubernetes namespace CPU usage efficiency

This SLI measures the ratio of used CPU resources relative to requested CPU resources per Kubernetes namespace. 100% means that all requested CPU resources are used.

Details of the template

  • Data source: metrics (timeseries)

  • Entity scope: Kubernetes namespace

  • SLI DQL query:

    timeseries {
    cpuUsage = sum(dt.kubernetes.container.cpu_usage, default: 0, rollup: avg),
    cpuRequest = sum(dt.kubernetes.container.requests_cpu, rollup: avg)
    },
    nonempty: true,
    by: { dt.smartscape.k8s_namespace },
    filter: { in(dt.smartscape.k8s_namespace, { K8S_NAMESPACE-IDs }) }
    | fieldsAdd sli = cpuUsage[] / cpuRequest[] * 100
    | fieldsAdd getNodeName(dt.smartscape.k8s_namespace)
    | fieldsRemove cpuUsage, cpuRequest

Kubernetes namespace memory usage efficiency

This SLI measures the ratio of used memory relative to allocatable memory per Kubernetes namespace. 100% means that all requested memory resources are used.

Details of the template

  • Data source: metrics (timeseries)

  • Entity scope: Kubernetes namespace

  • SLI DQL query:

    timeseries {
    memWorkSet = sum(dt.kubernetes.container.memory_working_set, default: 0, rollup: avg),
    memRequest = sum(dt.kubernetes.container.requests_memory, rollup: avg)
    },
    nonempty: true,
    by: { dt.smartscape.k8s_namespace },
    filter: { in(dt.smartscape.k8s_namespace, { K8S_NAMESPACE-IDs }) }
    | fieldsAdd sli = memWorkSet[] / memRequest[] * 100
    | fieldsAdd getNodeName(dt.smartscape.k8s_namespace)
    | fieldsRemove memWorkSet, memRequest
Related tags
Application ObservabilityService-Level ObjectivesService-Level Objectives