Missing unit character in duration

  • What Grafana version and what operating system are you using?
    Version 8.4.5 running in Kubernetes from Docker image by helm chart:
resource "helm_release" "this" {
  name = "kube-prometheus-stack"
  repository = "https://prometheus-community.github.io/helm-charts"
  chart = "kube-prometheus-stack"
  version = var.kube_prometheus_stack_chart_version
  namespace = kubernetes_namespace.this.metadata.0.name
.
.
.
  • What are you trying to achieve?
    Display top 5 max values for Sonarqube projects metrics (task duration)
  • How are you trying to achieve it?
    Using query editor, got an expression:
"max_over_time((rate(sonarqube_compute_engine_tasks_running_duration_seconds_sum{project_key=~\".*\"}[2h]) * 1 / rate(sonarqube_compute_engine_tasks_running_duration_seconds_count{project_key=~\".*\"}[2h])[{$__range}s]))"
  • What happened?
    "bad_data: 1:202: parse error: missing unit character in duration" resulted

  • What did you expect to happen?
    Expected to see values displayed

  • Can you copy/paste the configuration(s) that you are having problems with?
    See above

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?
    No

This appears to be similar to this issue, which was closed.