A VMware team with Tintri storage usually has two good tools that never meet. vCenter knows which host a VM runs on, how busy that host is and how long the virtual disk waited. The VMstore knows, per VM, how much of that wait was the host, the network, the flash or a QoS ceiling someone set two years ago. During an incident somebody opens both UIs side by side and lines up the clocks by hand. This guide removes that step. It builds one pipeline on OpenTelemetry, Prometheus, Loki and Grafana that collects vCenter metrics, ESXi events and Tintri per-VM statistics, and three dashboards that let you click from a cluster to a VM to the VMstore without retyping a name. Everything is provisioned from files: the collector config, a small Tintri exporter, the dashboards and the alert rules.

Level: intermediate to advanced  ·  Stack: vSphere 8 / VCF 9 vCenter, Tintri VMstore (TxOS 6.0.x, REST API v310), OpenTelemetry Collector contrib 0.166.0, Prometheus 3.16, Loki 3.7, Grafana 13.3, Python 3.14, Docker Compose  ·  Build time: about 90 minutes to the first full dashboard


Contents

  1. What you will build
  2. Prerequisites, accounts and sizing
  3. How the data flows
  4. Deploy the stack, step by step
  5. The collector configuration
  6. The Tintri VMstore exporter
  7. Prometheus, Loki and Grafana provisioning
  8. Dashboard 1: vSphere cluster overview
  9. Dashboard 2: Tintri VMstore
  10. Dashboard 3: one VM end to end
  11. Alert rules: latency, space and APD
  12. Running it on Kubernetes
  13. Troubleshooting
  14. Downloads
  15. What’s next

01. What you will build

What you’ll build

  • One OpenTelemetry Collector that reads vCenter (vcenter receiver), receives ESXi syslog, receives the NFS datastore latency bridge over OTLP and scrapes a Tintri exporter.
  • A 330-line Python exporter that logs in to each VMstore REST API v310 once, polls appliance, datastore and per-VM statistics every 60 seconds and publishes them as tintri_* metrics.
  • Prometheus for metrics, Loki for ESXi events, Grafana for the view, all started by one compose.yaml.
  • Three provisioned dashboards: vSphere cluster overview, Tintri VMstore, and one VM end to end with data links between them.
  • Six Grafana-managed alert rules: VM disk latency, Tintri QoS contention and throttling, VMstore space, exporter down, and ESXi APD or NFS disconnect.

The dashboards are opinionated. Each one answers one question: is the cluster healthy (dashboard 1), is the VMstore healthy and who is using it (dashboard 2), and where in the stack does this one VM lose its time (dashboard 3). The third is the reason to build any of this. It puts the vSphere virtual disk latency, the ESXi NFS client latency, the VMstore appliance latency and the VMstore’s own measurement for that VM on one chart with one clock, so the layer that adds the time is the line that moves first.

SOURCES (management network) COLLECT (monitoring VM) STORE AND SHOW vCenter Server vSphere Web Services API (/sdk) read-only service account ESXi hosts vmsyslogd, Syslog.global.logHost vmkernel, vobd, hostd, fdm PowerCLI datastore bridge per-host, per-NFS-datastore latency VMDK to datastore map (NFS post) Tintri VMstore (one or more) REST API v310 on the admin port Read Only role, JSESSIONID cookie never on the NFS data interface tintri_exporter Python, polls every 60 s serves /metrics on 9717 tintri_* gauges OpenTelemetry Collector (contrib) one gateway for every signal receivers vcenter (every 2 min) syslog/esx_3164, syslog/esx_5424 otlp (bridge) prometheus/tintri (scrape 60 s) processors memory_limiter, transform join keys, ESXi event parsing exporters prometheus_remote_write otlp_http/loki Prometheus 3.16 or Mimir for scale-out remote write receiver on Loki 3.7 native OTLP ingest ESXi events, 90 days Grafana 13.3 a. vSphere cluster overview b. Tintri VMstore c. VM end to end alert rules: latency, space, APD all provisioned from files Admins: HTTPS via reverse proxy HTTPS 443 TCP 1514/5514 OTLP 4318 HTTPS 443 GET /metrics 9717 remote write 9090 OTLP 3100 PromQL LogQL push (data flows along the arrow) pull (arrow points at the system being polled) query path (Grafana reads) Ports are the defaults used in the compose bundle.
Figure 1. Architecture. Solid arrows push data, dashed blue arrows poll a source, dashed green arrows are Grafana queries. The exporter talks only to the VMstore admin interface; nothing touches the NFS data path.

This post builds on earlier parts of the series and does not repeat them. The vcenter receiver itself is covered in part 2, the ESXi syslog parser in part 3, the Prometheus and Loki back ends in part 4, the per-host NFS latency bridge in the NFS datastore latency post and the VMstore REST API in the Tintri VMstore REST API guide. Screenshots show the dashboards with simulated load.

02. Prerequisites, accounts and sizing

What you need

ItemVersion used hereNotes
vCenter ServervSphere 8.0 U3 / VCF 9The vcenter receiver README lists 7.0 and 8 as tested. Every vcenter receiver metric is marked development (the receiver is alpha), so pin the collector version.
Tintri VMstoreTxOS 6.0.x, REST API v310.207One Read Only REST user per VMstore. The exporter works on any v310 API; set fullApiVersion to what your TxOS reports.
Monitoring VMLinux with Docker Engine and the compose plugin (or Podman with podman compose)Reachable from the ESXi management network (syslog) and able to reach vCenter and each VMstore admin interface on TCP 443.
OpenTelemetry Collectorotel/opentelemetry-collector-contrib:0.166.0The contrib distribution: it has the vcenter, syslog and prometheus receivers.
Prometheusprom/prometheus:v3.16.0Remote write receiver on. Mimir works the same way if you already run it.
Lokigrafana/loki:3.7.11Native OTLP ingest; no Promtail or Alloy needed.
Grafanagrafana/grafana:13.3.2Dashboards use schemaVersion 42. Alerting is Grafana-managed.
Python (exporter image)python:3.14-slim, requests 2.34.2, prometheus-client 0.26.0Built by compose from the bundle.
PowerCLI bridge (optional)From the NFS datastore latency postNeeded for the ESXi NFS client latency panels; the vcenter receiver does not collect NFS datastore latency.

The vCenter account

Use the read-only role from part 2: a custom role that holds only System.Anonymous, System.View and System.Read, granted to a dedicated service account on the vCenter root folder with Propagate to children ticked. The receiver only reads inventory, properties and performance counters, so it needs nothing more. Part 2 has the PowerCLI script that creates the role and checks it. Use a local SSO account (<SVC_ACCOUNT>@<SSO_DOMAIN>) rather than an AD account whose password policy will expire it in the middle of a quarter.

The VMstore account

On each VMstore create a local user with the Read Only role (Settings, then Roles and users, in the VMstore UI). The Tintri REST reference lists Read Only as allowed to call every GET and nothing else, which is exactly what the exporter does. If several VMstores are managed by Tintri Global Center, still point the exporter at each VMstore: the per-VM real-time statistics come from the VMstore API. The VMstore REST API guide walks through roles, sessions and fullApiVersion in detail.

Network

MANAGEMENT NETWORK MONITORING VM (container network) ADMINS vCenter Server TCP 443, /sdk, read-only account ESXi hosts (vmk0) outbound syslog, TCP VMstore admin interface TCP 443, REST API v310, TLS 1.2 VMstore data interface NFS only, storage VLAN PowerCLI bridge host outbound OTLP/HTTP otelcol listens 1514, 5514 (syslog TCP) listens 4318 (OTLP HTTP) 13133 health, 8888 self-metrics TLS to vCenter: ca_file secrets from .env only tintri-exporter 9717, internal only prometheus 9090 loki 3100 grafana 3000 Browser HTTPS via proxy 1 2 3 4 5 6 7 8 X UDP 514 X 1 collector to vCenter: HTTPS 443, TLS verified, read-only user · 2 ESXi to collector: syslog TCP 1514 (RFC 3164) or 5514 (RFC 5424) 3 exporter to VMstore admin IP: HTTPS 443, JSESSIONID cookie, Read Only role · 4 collector scrapes exporter: HTTP 9717 /metrics (container network) 5 PowerCLI bridge to collector: OTLP/HTTP 4318 · 6 remote write to Prometheus 9090 · 7 OTLP logs to Loki 3100 · 8 browsers to Grafana via HTTPS proxy Amber X: the two flows people get wrong. ESXi defaults to UDP 514 if you only type a host name; the API is not served on the NFS data interface.
Figure 2. Every network flow with its port, protocol and credential. The two amber flows are the mistakes seen most often: ESXi left on UDP 514, and an exporter pointed at the VMstore data interface, where the REST API is not served.

Sizing

Series counts drive everything else. The vSphere numbers below come from the worksheet in the collector sizing post (about 34 series per VM and 73 per host with the default metrics). The Tintri exporter adds 19 series per VM (7 latency components, 3 IOPS, normalized IOPS, 3 throughput, flash hit, 2 space, 2 QoS) and 27 per VMstore.

SmallMediumLarge
Powered-on VMs / hosts / VMstores100 / 4 / 11,000 / 40 / 25,000 / 200 / 6
vSphere series (vcenter receiver)3,80037,000186,000
Tintri series (exporter)1,93019,05095,160
Total active seriesabout 5,700about 56,000about 281,000
Collector2 vCPU, 2 GB2 vCPU, 4 GBone collector per vCenter, 4 vCPU, 8 GB each
Prometheus memory (about 3 kB per series)under 100 MBabout 200 MBabout 1 GB, consider Mimir
Prometheus disk, 30 daysabout 0.5 GBabout 5 GBabout 25 GB
VMstore API calls per 60 s cycle, per VMstore6 + 1 VM page + 10 real-time6 + 3 pages + 106 + 5 pages + 10
Monitoring VM4 vCPU, 8 GB, 50 GB disk4 vCPU, 16 GB, 100 GBsplit by role

The VMstore load is small by design. The exporter reads the whole VM list in pages of 200 (each VM carries its latest statistics slice), then asks for real-time statistics only for the ten VMs with the highest latency. Raise TINTRI_REALTIME_TOP_N if you want more detail and can afford one extra call per VM per minute.

03. How the data flows

There are four inputs and they run on different clocks, which matters when you read the charts.

SignalSourcePathIntervalLands as
vSphere metricsvCenter performance manager and inventoryvcenter receiver, transform, remote write2 minutes (receiver default; vCenter’s real-time counters are 20 s samples)vcenter_* in Prometheus
NFS client latencyPowerCLI bridge, per host and datastoreOTLP HTTP 4318, remote writeas the bridge is scheduled (60 s in its post)vsphere_host_datastore_*, vsphere_vm_disk_info
Tintri statisticsVMstore REST API v310exporter, collector prometheus receiver, remote write60 s poll, 60 s scrapetintri_* in Prometheus
ESXi eventsvmkernel, vobd, hostd, fdmsyslog TCP, transform (part 3 parser), OTLP to Lokias loggedLoki streams with service_name="esxi", host_name and the esx_event attribute

The sequence for the Tintri side is the one most people have not seen before, so here it is end to end. The exporter keeps one session per VMstore, polls in a background thread and swaps in a complete snapshot when a cycle finishes. A Prometheus scrape never waits on the VMstore, and a VMstore that stops answering turns into tintri_up 0 instead of a scrape timeout.

tintri_exporter VMstore API (443) OTel Collector Prometheus Grafana 1 POST /api/v310/session/login typeId, username, password, fullApiVersion (once) 200 “role”, Set-Cookie: JSESSIONID (sent on every later call) loop every 60 s 2 GET /api/v310/appliance/default/info, /operationalStatus 3 GET /api/v310/datastore/default/statsRealtime, /statsSummary 4 GET /api/v310/vm?live=TRUE&offset=N&limit=200 repeat until offset reaches filteredTotal 5 GET /api/v310/vm/{uuid}/statsRealtime only for the top N VMs by latencyTotalMs 6 build snapshot: newest slice of sortedStats swap it in atomically; scrapes never wait on the API alt: HTTP 401 session expired or VMstore restarted: log in once, retry the call; still failing sets tintri_up = 0 7 GET /metrics (prometheus/tintri receiver, every 60 s) tintri_vm_latency_ms{vmstore, vm, component}, tintri_datastore_* … 8 POST /api/v1/write job, instance added 9 PromQL 10 POST /api/v310/session/logout on SIGTERM; returns 204. The GET form is deprecated request response error branch dashboard query Paths are relative to https://<VMSTORE_FQDN&gt;
Figure 3. One Tintri poll and scrape cycle. Login happens once and sends fullApiVersion; the session cookie is reused until the VMstore answers 401, when the exporter logs in again and retries once. Logout is a POST on shutdown.

Two join keys make the dashboards work. On the vSphere side every series carries vcenter_vm_name, vcenter_host_name and vcenter_cluster_name (receiver resource attributes copied to labels by resource_constant_labels), plus vcenter_server, which the transform processor sets to a short name. On the Tintri side the exporter labels every series with vmstore, vm and vcenter_datastore_name. The VM name and the vSphere datastore name are what the correlation dashboard joins on. The bridge’s vsphere_vm_disk_info series maps each VM to the datastores its disks live on, which is how dashboard 3 finds the right VMstore for a VM.

04. Deploy the stack, step by step

The bundle has this layout. Every file is printed in full in the following sections and in Downloads.

Show code: bundle folder layout (21 lines)
vsphere-tintri-grafana/
├── compose.yaml
├── .env.example                      copy to .env, chmod 600
├── otelcol/
│   ├── config.yaml
│   └── certs/vcenter-ca.pem          you add this
├── tintri-exporter/
│   ├── Dockerfile
│   ├── requirements.txt
│   ├── tintri_exporter.py
│   └── certs/vmstore-ca.pem          you add this
├── prometheus/prometheus.yml
├── loki/loki.yaml
└── grafana/
    ├── provisioning/datasources/datasources.yaml
    ├── provisioning/dashboards/dashboards.yaml
    ├── provisioning/alerting/vsphere-tintri-rules.yaml
    └── dashboards/
        ├── vsphere-cluster-overview.json
        ├── tintri-vmstore.json
        └── vm-end-to-end.json

Step 1. Prepare the secrets file

Copy the example and fill it in. Nothing secret goes into any other file; compose passes these to the collector and the exporter as environment variables, and the collector config reads them with ${env:...}.

Show code: .env (12 lines)
# vsphere-tintri-grafana/.env  (copy from .env.example, then: chmod 600 .env; never commit it)
VCENTER_FQDN=<VCENTER_FQDN>
VCENTER_NAME=<VCENTER_SHORT_NAME>
VCENTER_USERNAME=<SVC_ACCOUNT>@<SSO_DOMAIN>
VCENTER_PASSWORD=<VCENTER_PASSWORD>
# name|base_url|vSphere datastore name, comma-separated, one entry per VMstore
TINTRI_TARGETS=vmstore-01|https://<VMSTORE_FQDN>|<DATASTORE_NAME>
TINTRI_USERNAME=<TINTRI_READONLY_USER>
TINTRI_PASSWORD=<TINTRI_PASSWORD>
# match your TxOS (v310.207 = TxOS 6.0.3); leave empty to use the VMstore's preferredVersion
TINTRI_FULL_API_VERSION=v310.207
GRAFANA_ADMIN_PASSWORD=<GRAFANA_ADMIN_PASSWORD>

Verify:

cp .env.example .env && chmod 600 .env && ${EDITOR:-vi} .env
stat -c '%a %n' .env
grep -c '<' .env

Expected: 600 .env, then 0: no placeholder left.

Step 2. Trust the vCenter and VMstore certificates

Do not use insecure_skip_verify. vCenter publishes its CA chain at https://<VCENTER_FQDN>/certs/download.zip (Broadcom KB 330833); the Linux PEM files are under certs/lin/. For the VMstore, export the CA that signed its certificate from your PKI, or for a self-signed VMstore save the presented certificate after checking its fingerprint on the console.

Show code: certificate download commands (8 lines)
curl -sSfk -o /tmp/vc-certs.zip "https://<VCENTER_FQDN>/certs/download.zip"
unzip -o -j /tmp/vc-certs.zip 'certs/lin/*.0' -d /tmp/vc-certs
cat /tmp/vc-certs/*.0 > otelcol/certs/vcenter-ca.pem

# VMstore: your PKI CA, or (self-signed) the leaf certificate after checking the fingerprint
openssl s_client -connect <VMSTORE_FQDN>:443 -servername <VMSTORE_FQDN> </dev/null 2>/dev/null \
  | openssl x509 -outform PEM > tintri-exporter/certs/vmstore-ca.pem
openssl x509 -in tintri-exporter/certs/vmstore-ca.pem -noout -fingerprint -sha256

Verify:

curl -sS --cacert otelcol/certs/vcenter-ca.pem -o /dev/null -w '%{http_code}\n' https://<VCENTER_FQDN>/sdk/vimServiceVersions.xml
curl -sS --cacert tintri-exporter/certs/vmstore-ca.pem https://<VMSTORE_FQDN>/api/info

Expected: 200 from vCenter, then a JSON object from the VMstore with productName, preferredVersion and supportedVersionSet. A certificate error here will be the same error in the collector log later.

Step 3. Check both accounts before the collector does

Show code: account checks for vCenter and VMstore (10 lines)
# vCenter: read-only login works (vSphere Automation API session)
curl -sS --cacert otelcol/certs/vcenter-ca.pem -X POST -u "$VCENTER_USERNAME:$VCENTER_PASSWORD" \
  https://<VCENTER_FQDN>/api/session

# VMstore: login with fullApiVersion, then POST logout
curl -sS --cacert tintri-exporter/certs/vmstore-ca.pem -c /tmp/ts.jar -H 'Content-Type: application/json' \
  -d "{\"typeId\":\"com.tintri.api.rest.vcommon.dto.rbac.RestApiCredentials\",\"username\":\"$TINTRI_USERNAME\",\"password\":\"$TINTRI_PASSWORD\",\"fullApiVersion\":\"$TINTRI_FULL_API_VERSION\"}" \
  https://<VMSTORE_FQDN>/api/v310/session/login; echo
curl -sS --cacert tintri-exporter/certs/vmstore-ca.pem -b /tmp/ts.jar -X POST -o /dev/null -w '%{http_code}\n' \
  https://<VMSTORE_FQDN>/api/v310/session/logout; rm -f /tmp/ts.jar

Expected: a quoted session token from vCenter; the role name in quotes from the VMstore login (the read-only role), then 204 from logout. Run the commands after set -a; . ./.env; set +a so the variables are set, and clear your shell history afterwards if your policy requires it.

Step 4. Start the stack

Show code: compose.yaml (82 lines)
# vsphere-tintri-grafana/compose.yaml
# docker compose up -d      (or: podman compose up -d)
# Secrets come from ./.env (copy .env.example, chmod 600, keep it out of git).
name: vsphere-tintri
services:
  otelcol:
    image: otel/opentelemetry-collector-contrib:0.166.0
    command: ["--config=/etc/otelcol-contrib/config.yaml"]
    restart: unless-stopped
    env_file: .env
    mem_limit: 2g
    volumes:
      - ./otelcol/config.yaml:/etc/otelcol-contrib/config.yaml:ro
      - ./otelcol/certs:/etc/otelcol-contrib/certs:ro      # vcenter-ca.pem
    ports:
      - "1514:1514"     # ESXi syslog, TCP, RFC 3164
      - "5514:5514"     # ESXi syslog, TCP, RFC 5424 + octet counting
      - "4318:4318"     # OTLP HTTP (PowerCLI datastore bridge)
      - "13133:13133"   # health_check
    depends_on: [prometheus, loki, tintri-exporter]

  tintri-exporter:
    build: ./tintri-exporter
    image: local/tintri-exporter:1.0
    restart: unless-stopped
    environment:
      - TINTRI_TARGETS=${TINTRI_TARGETS}
      - TINTRI_USERNAME=${TINTRI_USERNAME}
      - TINTRI_PASSWORD=${TINTRI_PASSWORD}
      - TINTRI_FULL_API_VERSION=${TINTRI_FULL_API_VERSION}
      - TINTRI_CA_FILE=/certs/vmstore-ca.pem
      - TINTRI_POLL_SECONDS=60
      - TINTRI_REALTIME_TOP_N=10
    volumes:
      - ./tintri-exporter/certs:/certs:ro                  # vmstore-ca.pem
    expose:
      - "9717"          # reachable by the collector only; no host port

  prometheus:
    image: prom/prometheus:v3.16.0
    restart: unless-stopped
    command:
      - --config.file=/etc/prometheus/prometheus.yml
      - --storage.tsdb.path=/prometheus
      - --storage.tsdb.retention.time=30d
      - --storage.tsdb.retention.size=40GB
      - --web.enable-remote-write-receiver
    volumes:
      - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
      - prometheus-data:/prometheus
    ports:
      - "9090:9090"

  loki:
    image: grafana/loki:3.7.11
    restart: unless-stopped
    command: ["-config.file=/etc/loki/loki.yaml"]
    volumes:
      - ./loki/loki.yaml:/etc/loki/loki.yaml:ro
      - loki-data:/loki
    ports:
      - "3100:3100"

  grafana:
    image: grafana/grafana:13.3.2
    restart: unless-stopped
    environment:
      - GF_SECURITY_ADMIN_USER=admin
      - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
      - GF_USERS_ALLOW_SIGN_UP=false
    volumes:
      - ./grafana/provisioning:/etc/grafana/provisioning:ro
      - ./grafana/dashboards:/var/lib/grafana/dashboards:ro
      - grafana-data:/var/lib/grafana
    ports:
      - "3000:3000"
    depends_on: [prometheus, loki]

volumes:
  prometheus-data:
  loki-data:
  grafana-data:

Verify:

docker compose up -d --build
docker compose ps --format 'table {{.Service}}\t{{.State}}'

Expected: five services, all running: grafana, loki, otelcol, prometheus, tintri-exporter.

Step 5. Check each hop

Show code: health checks for each hop (7 lines)
# collector health
docker compose exec prometheus wget -qO- http://otelcol:13133/ ; echo
# exporter: one tintri_up line per VMstore, value 1
docker compose exec prometheus wget -qO- http://tintri-exporter:9717/metrics | grep '^tintri_up'
# vCenter and Tintri series have arrived in Prometheus (wait 2 to 3 minutes after start)
docker compose exec prometheus wget -qO- 'http://prometheus:9090/api/v1/query?query=count(vcenter_host_cpu_utilization_percent)'
docker compose exec prometheus wget -qO- 'http://prometheus:9090/api/v1/query?query=count(tintri_vm_latency_ms)'

Expected: a JSON health document with "status":"Server available"; tintri_up{vmstore="vmstore-01"} 1.0; then two query results whose value is your host count and your VM count times seven (one series per latency component). An empty result for the vCenter query after five minutes means the receiver could not log in: docker compose logs otelcol | grep -i vcenter.

Step 6. Point ESXi at the collector

Part 3 explains the parser and the formats. The short version: TCP, never the UDP default, and one port per format.

# on each host (or with PowerCLI Set-VMHostSysLogServer across the cluster)
esxcli system syslog config set --loghost='tcp://<COLLECTOR_FQDN>:1514'
esxcli network firewall ruleset set --ruleset-id=syslog --enabled=true
esxcli system syslog reload
esxcli system syslog mark --message="otel-test-$(hostname)"

Verify:

curl -sS -G -u admin:"$GRAFANA_ADMIN_PASSWORD" "<GRAFANA_URL>/api/datasources/proxy/uid/loki/loki/api/v1/query" \
  --data-urlencode 'query=sum by (host_name) (count_over_time({service_name="esxi"}[5m]))'

Expected: one result per ESXi host with a non-zero count. If a host is missing, check its firewall ruleset and that the log host string starts with tcp://.

Step 7. Open Grafana

Browse to <GRAFANA_URL> (put a TLS reverse proxy in front of port 3000; do not publish plain HTTP), sign in as admin and open the folder vSphere and Tintri. The three dashboards and the alert rules are already there. Because the provisioning provider sets allowUiUpdates: false, changes belong in the JSON files, not the UI: save a copy under another name to experiment.

Verify:

curl -sS -u admin:"$GRAFANA_ADMIN_PASSWORD" "<GRAFANA_URL>/api/search?query=&type=dash-db" | jq -r '.[].title'
curl -sS -u admin:"$GRAFANA_ADMIN_PASSWORD" "<GRAFANA_URL>/api/v1/provisioning/alert-rules" | jq -r '.[].title'

Expected: the three dashboard titles, then the six alert rule titles.

05. The collector configuration

One gateway collector handles all four inputs. It is the part 4 configuration narrowed to what these dashboards need, plus the Tintri scrape. Read it top to bottom once; the notes after it explain the decisions that are easy to get wrong.

Show code: otelcol/config.yaml (177 lines)
# vsphere-tintri-grafana/otelcol/config.yaml
# Gateway collector, otelcol-contrib 0.166.0 (checked with: otelcol-contrib validate --config=...)
#   vCenter metrics (vcenter receiver)          -> Prometheus (remote write)
#   Tintri exporter /metrics (prometheus recv.)  -> Prometheus (remote write)
#   ESXi syslog (syslog receivers, parsed)       -> Loki (OTLP)
#   OTLP from the PowerCLI datastore bridge      -> Prometheus (remote write)
# Env (from ../.env): VCENTER_FQDN, VCENTER_NAME, VCENTER_USERNAME, VCENTER_PASSWORD
# VCENTER_NAME is the short display name that ends up in the vcenter_server label (for example vcenter-01).
extensions:
  health_check:
    endpoint: ":13133"

receivers:
  vcenter:
    endpoint: https://${env:VCENTER_FQDN}
    username: ${env:VCENTER_USERNAME}
    password: ${env:VCENTER_PASSWORD}
    collection_interval: 2m
    initial_delay: 10s
    tls:
      insecure_skip_verify: false
      ca_file: /etc/otelcol-contrib/certs/vcenter-ca.pem

  # Scrapes the Tintri exporter. job/instance become the job and instance labels in Prometheus.
  prometheus/tintri:
    config:
      scrape_configs:
        - job_name: tintri-vmstore
          scrape_interval: 60s
          scrape_timeout: 20s
          static_configs:
            - targets: ["tintri-exporter:9717"]
          relabel_configs:
            # a stable, readable instance label instead of host:port
            - target_label: instance
              replacement: tintri-exporter

  # ESXi syslog, as built in part 3 of the series (RFC 3164 on 1514, RFC 5424 on 5514).
  syslog/esx_3164:
    tcp:
      listen_address: ":1514"
      max_log_size: 64KiB
    protocol: rfc3164
    location: UTC
    on_error: send_quiet
    operators: &esx_operators
      - type: add
        id: set_host_name
        field: resource["host.name"]
        value: EXPR(lower(attributes.hostname))
        on_error: send_quiet
      - type: remove
        id: drop_hostname_attr
        field: attributes.hostname
        on_error: send_quiet
      - type: add
        id: set_service_name
        field: resource["service.name"]
        value: esxi
      - type: add
        id: set_service_namespace
        field: resource["service.namespace"]
        value: vsphere
  syslog/esx_5424:
    tcp:
      listen_address: ":5514"
      max_log_size: 64KiB
    protocol: rfc5424
    enable_octet_counting: true
    on_error: send_quiet
    operators: *esx_operators

  # OTLP in: the PowerCLI per-datastore latency bridge from the NFS latency post, and apps.
  otlp:
    protocols:
      grpc:
        endpoint: ":4317"
      http:
        endpoint: ":4318"

processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 25

  # Same join keys as part 4: vcenter.server on everything from vCenter, host.name on host resources.
  transform/vsphere_metrics:
    error_mode: ignore
    metric_statements:
      - context: resource
        statements:
          - 'set(resource.attributes["vcenter.server"], "${env:VCENTER_NAME}") where resource.attributes["vcenter.server"] == nil'
          - 'set(resource.attributes["host.name"], ConvertCase(resource.attributes["vcenter.host.name"], "lower")) where resource.attributes["vcenter.host.name"] != nil and resource.attributes["vcenter.vm.name"] == nil and resource.attributes["vcenter.resource_pool.name"] == nil'

  # The ESXi events the dashboards and the APD alert use (groups B, C, D and G of part 3).
  # Paste the remaining groups from part 3 (SCSI sense, PDL, crashes) if you want them too.
  transform/esx_events:
    error_mode: ignore
    log_statements:
      - context: log
        conditions:
          - 'IsMatch(log.attributes["message"], "\\[(vob|esx)\\.[A-Za-z0-9_.]+\\]")'
        statements:
          - 'merge_maps(log.cache, ExtractPatterns(log.attributes["message"], "\\[(?P<vob_id>(?:vob|esx)\\.[A-Za-z0-9_.]+)\\]"), "upsert")'
          - 'set(log.attributes["esx.vob.id"], log.cache["vob_id"]) where log.cache["vob_id"] != nil'
          - 'set(log.attributes["esx.event"], "vob")'
          - 'set(log.attributes["esx.event"], "nfs_disconnect") where log.cache["vob_id"] == "esx.problem.vmfs.nfs.server.disconnect"'
          - 'set(log.attributes["esx.event"], "nfs_restore") where log.cache["vob_id"] == "esx.problem.vmfs.nfs.server.restored"'
      - context: log
        conditions:
          - 'IsMatch(log.attributes["message"], "onnection to (the )?server .* mount point")'
        statements:
          - 'merge_maps(log.cache, ExtractPatterns(log.attributes["message"], "(?P<state>Lost connection to|Restored connection to|Connection to) (?:the )?server (?P<server>[^ ]+) mount point (?P<export>[^ ,]+),? mounted as (?P<uuid>[0-9a-fA-F-]+) \\(\"?(?P<ds>[^\")]+)\"?\\)"), "upsert")'
          - 'set(log.attributes["esx.event"], "nfs_disconnect") where log.cache["state"] == "Lost connection to"'
          - 'set(log.attributes["esx.event"], "nfs_restore") where log.cache["state"] != nil and log.cache["state"] != "Lost connection to"'
          - 'set(log.attributes["nfs.server"], log.cache["server"]) where log.cache["server"] != nil'
          - 'set(log.attributes["vcenter.datastore.name"], log.cache["ds"]) where log.cache["ds"] != nil'
      - context: log
        conditions:
          - 'IsMatch(log.attributes["message"], "All Paths Down|APD (start|[Ee]xit|[Tt]imeout)")'
        statements:
          - 'set(log.attributes["esx.event"], "apd_start") where IsMatch(log.attributes["message"], "has entered the All Paths Down state|APD start for")'
          - 'set(log.attributes["esx.event"], "apd_timeout") where IsMatch(log.attributes["message"], "All Paths Down Timeout state|APD [Tt]imeout event")'
          - 'set(log.attributes["esx.event"], "apd_exit") where IsMatch(log.attributes["message"], "exited the All Paths Down state|APD [Ee]xit for")'
          - 'merge_maps(log.cache, ExtractPatterns(log.attributes["message"], "(?:identifier|for(?: ident)?(?: 0x[0-9a-fA-F]+)?) \\[(?P<dev>[^\\] ]+)\\]"), "upsert")'
          - 'set(log.attributes["storage.device"], log.cache["dev"]) where log.cache["dev"] != nil'
      - context: log
        conditions:
          - 'IsMatch(log.attributes["message"], "(?i)vmotion|migrat")'
        statements:
          - 'set(log.attributes["esx.event"], "vmotion_failure") where IsMatch(log.attributes["message"], "(?i)fail|timed? ?out|exceeded|abort")'
      - context: log
        statements:
          - 'set(log.body, log.attributes["message"]) where log.attributes["message"] != nil'
          - 'delete_key(log.attributes, "message")'
          - 'delete_key(log.attributes, "priority")'
          - 'delete_key(log.attributes, "facility")'

exporters:
  prometheus_remote_write:
    http:
      endpoint: http://prometheus:9090/api/v1/write
    resource_constant_labels:
      included: ["vcenter.*", "host.name"]
    target_info:
      enabled: false
  otlp_http/loki:
    endpoint: http://loki:3100/otlp
    sending_queue:
      batch:
        flush_timeout: 2s

service:
  extensions: [health_check]
  telemetry:
    metrics:
      level: normal
      readers:
        - pull:
            exporter:
              prometheus:
                host: ""   # empty = all interfaces, so Prometheus can scrape otelcol:8888
                port: 8888
  pipelines:
    metrics/vsphere:
      receivers: [vcenter, otlp]
      processors: [memory_limiter, transform/vsphere_metrics]
      exporters: [prometheus_remote_write]
    metrics/tintri:
      receivers: [prometheus/tintri]
      processors: [memory_limiter]
      exporters: [prometheus_remote_write]
    logs/esx:
      receivers: [syslog/esx_3164, syslog/esx_5424]
      processors: [memory_limiter, transform/esx_events]
      exporters: [otlp_http/loki]
  • vcenter receiver. collection_interval: 2m is the receiver default and the right starting point: on a large vCenter a shorter interval only queues QueryPerf calls behind each other. The metric names it produces are in the table below; every one was checked against receiver/vcenterreceiver/metadata.yaml at v0.166.0.
  • prometheus/tintri. A scrape job inside the collector, so Tintri metrics take the same remote-write path as everything else. The relabel rule replaces the instance label (normally the container address and port) with a fixed name, so no address ends up in a legend or alert.
  • transform/vsphere_metrics. Sets vcenter.server to the short name from VCENTER_NAME. The receiver does not add the vCenter name to its resources, and with two vCenters you need it to tell identical cluster names apart. The second statement sets host.name on host resources only, the join key part 4 uses between metrics and ESXi logs.
  • prometheus_remote_write. resource_constant_labels turns the resource attributes that matter (all vcenter.* and host.name) into labels on every series. target_info is off because nothing here joins on it.
  • No batch processor. It is deprecated in 0.166.0. Batching moved into the exporters’ sending_queue.batch, used here for the Loki exporter. The remote write exporter has its own queue.

vSphere metrics the dashboards use

OpenTelemetry metricPrometheus nameUnitUsed in
vcenter.host.cpu.utilizationvcenter_host_cpu_utilization_percent%Host CPU, VM end to end
vcenter.host.cpu.usage, vcenter.host.cpu.capacityvcenter_host_cpu_usage_MHz, vcenter_host_cpu_capacity_MHzMHzCluster CPU used
vcenter.host.memory.utilizationvcenter_host_memory_utilization_percent%Host memory, cluster memory
vcenter.cluster.host.count (attribute effective)vcenter_cluster_host_counthostsESXi hosts in service
vcenter.cluster.vm.count (attribute power_state)vcenter_cluster_vm_countVMsVMs powered on
vcenter.datastore.disk.utilizationvcenter_datastore_disk_utilization_percent%Datastore capacity, fullest datastore
vcenter.vm.disk.latency.avg (attributes direction, disk_type)vcenter_vm_disk_latency_avg_millisecondsmsTop 10 VMs, VM end to end, latency alert
vcenter.vm.disk.throughputvcenter_vm_disk_throughputKiBy/sThroughput vSphere vs VMstore
vcenter.vm.cpu.readinessvcenter_vm_cpu_readiness_percent%CPU ready, VM end to end
vcenter.vm.cpu.utilizationvcenter_vm_cpu_utilization_percent%Variables (cluster, vm, host)
Bridge: vsphere.host.datastore.latencyvsphere_host_datastore_latency_millisecondsmsNFS client latency, VM end to end
Bridge: vsphere.vm.disk.infovsphere_vm_disk_info1VM to datastore mapping variable

The Prometheus names follow the remote write exporter’s default translation: unit suffixes are appended (ms becomes _milliseconds, % becomes _percent), units in braces are dropped, and dots become underscores. If you change the translation strategy the queries change with it.

06. The Tintri VMstore exporter

The VMstore does not speak OTLP or Prometheus, so a small bridge reads its REST API. Every endpoint and field it uses was checked against the public reference at tintri.github.io/tintri-rest-api and the public Tintri GitHub repositories, and nothing else. Five decisions shape it:

  • One session per VMstore, kept. POST /api/v310/session/login with the RestApiCredentials typeId, username, password and fullApiVersion. The VMstore answers with the role name and a JSESSIONID cookie, which requests.Session sends on every later call. Logging in every cycle would leave hundreds of sessions behind.
  • fullApiVersion always sent. It selects the behaviour of the API family. Set it to your TxOS (v310.207 for TxOS 6.0.3) or leave it empty and the exporter uses preferredVersion from GET /api/info.
  • 401 means log in again, once. A VMstore controller failover or restart drops sessions. The exporter logs in again and retries the call; if that fails too, the VMstore is marked tintri_up 0 and the other VMstores carry on.
  • POST logout. On SIGTERM (which docker compose down sends) the exporter calls POST /api/v310/session/logout. The GET form is deprecated in v310.
  • The newest slice, explicitly. Tintri statistics come as a Stats object whose sortedStats list runs from oldest to newest, so the exporter takes the last element.

API calls and fields

CallFields readBecomes
GET /api/info (no auth)preferredVersiondefault fullApiVersion
GET /api/v310/appliance/default/infomodelName, osVersiontintri_appliance_version{model, txos_version} 1
GET /api/v310/appliance/default/operationalStatusisFilesystemUp, alertsUnreadCounttintri_appliance_filesystem_up, tintri_appliance_alerts_unread
GET /api/v310/datastore/default/statsRealtimelatency*Ms, operations*Iops, throughput*MBps, flashHitPercenttintri_datastore_latency_ms{component}, tintri_datastore_iops{op}, tintri_datastore_throughput_mbps{op}, tintri_datastore_flash_hit_percent
GET /api/v310/datastore/default/statsSummaryspaceTotalGiB, spaceUsedGiB, spaceUsedPhysicalGiB, spaceProvisionedGiB, spaceRemainingPhysicalGiB, spaceRemainingDays, performanceReserveUsed, vmsCounttintri_datastore_space_gib{kind}, tintri_datastore_space_remaining_days, tintri_datastore_performance_reserve_used_percent, tintri_datastore_vms
GET /api/v310/vm?live=TRUE&offset=&limit=vmware.name, vmware.instanceUuids, uuid.uuid, stat.sortedStats, qosConfig.maxNormalizedIops, qosConfig.minNormalizedIops; paging by filteredTotaltintri_vm_*
GET /api/v310/vm/{uuid}/statsRealtimesame stat fields, for the top N VMs by latencyTotalMsreplaces those VMs’ values

The latency components deserve one sentence each, because they are the reason to bring Tintri data into Grafana at all. latencyHostMs is time spent in the ESXi host and guest before the request reached the VMstore; latencyNetworkMs is the NFS network; latencyStorageMs is inside the VMstore (it includes latencyDiskMs, the part spent on disk); latencyContentionMs is queueing behind other VMs; latencyThrottleMs is time added on purpose by a per-VM QoS maximum. Tintri documents latencyTotalMs as “the maximum host and network latency”, so do not expect the stacked components to add up to it exactly. The dashboards draw the components stacked and the total as a separate line.

Show code: tintri-exporter/tintri_exporter.py (334 lines)
#!/usr/bin/env python3
"""
tintri_exporter.py: Tintri VMstore REST API (v310) -> Prometheus metrics.

Read-only. Logs in once per VMstore (POST /api/v310/session/login with fullApiVersion),
reuses the JSESSIONID cookie, re-logs in once on HTTP 401, and logs out with
POST /api/v310/session/logout on shutdown.

Every poll cycle (TINTRI_POLL_SECONDS, default 60) and per VMstore it reads:
  GET /api/v310/appliance/default/info                appliance model and TxOS version
  GET /api/v310/appliance/default/operationalStatus   file system state, unread alerts
  GET /api/v310/datastore/default/statsRealtime       newest real-time performance slice
  GET /api/v310/datastore/default/statsSummary        capacity, days remaining, reserves
  GET /api/v310/vm?live=TRUE&offset=..&limit=..       every live VM with its latest stat slice and QoS
  GET /api/v310/vm/{uuid}/statsRealtime               real-time slice for the TINTRI_REALTIME_TOP_N
                                                      VMs with the highest latency (0 disables)
and serves the last good snapshot on all interfaces at :<EXPORTER_PORT>/metrics.

Environment (secrets only from the environment, never in files):
  TINTRI_TARGETS           comma-separated name|base_url|vcenter_datastore_name, e.g.
                           vmstore-01|https://<VMSTORE_FQDN>|<DATASTORE_NAME>
  TINTRI_USERNAME          VMstore user with the Read Only role
  TINTRI_PASSWORD          its password
  TINTRI_FULL_API_VERSION  e.g. v310.207 (TxOS 6.0.3). If empty, preferredVersion from GET /api/info is used.
  TINTRI_CA_FILE           PEM bundle that signed the VMstore certificates (recommended)
  TINTRI_INSECURE          "true" disables certificate verification (testing only, never in production)
  TINTRI_POLL_SECONDS      default 60
  TINTRI_REALTIME_TOP_N    default 10
  TINTRI_PAGE_SIZE         default 200
  EXPORTER_PORT            default 9717
"""
import logging
import os
import signal
import sys
import threading
import time

import requests
from prometheus_client import start_http_server
from prometheus_client.core import REGISTRY, GaugeMetricFamily
from prometheus_client.registry import Collector

LOG = logging.getLogger("tintri_exporter")
CRED_TYPE = "com.tintri.api.rest.vcommon.dto.rbac.RestApiCredentials"

# Stat field -> label value. Field names are from the public v310 DTO reference
# (VirtualMachineStat / DatastoreStat). Tintri documents latencyTotalMs as
# "the maximum host and network latency"; do not assume it is the sum of the parts.
LATENCY_FIELDS = {
    "latencyHostMs": "host",
    "latencyNetworkMs": "network",
    "latencyStorageMs": "storage",
    "latencyDiskMs": "disk",
    "latencyContentionMs": "contention",
    "latencyThrottleMs": "throttle",
    "latencyTotalMs": "total",
}
IOPS_FIELDS = {"operationsReadIops": "read", "operationsWriteIops": "write", "operationsTotalIops": "total"}
MBPS_FIELDS = {"throughputReadMBps": "read", "throughputWriteMBps": "write", "throughputTotalMBps": "total"}


def env(name, default=None, required=False):
    value = os.environ.get(name, default)
    if required and not value:
        sys.exit(f"missing required environment variable {name}")
    return value


class VmstoreClient:
    """One authenticated session against one VMstore."""

    def __init__(self, name, base_url, datastore, username, password, api_version, verify):
        self.name, self.datastore = name, datastore
        self.base = base_url.rstrip("/") + "/api"
        self.username, self.password = username, password
        self.api_version = api_version
        self.http = requests.Session()
        self.http.verify = verify
        self.http.headers.update({"Accept": "application/json", "Content-Type": "application/json"})
        self.logged_in = False

    def login(self):
        version = self.api_version
        if not version:
            info = self.http.get(f"{self.base}/info", timeout=30)
            info.raise_for_status()
            version = info.json().get("preferredVersion", "")
        body = {"typeId": CRED_TYPE, "username": self.username, "password": self.password}
        if version:
            body["fullApiVersion"] = version
        r = self.http.post(f"{self.base}/v310/session/login", json=body, timeout=30)
        if r.status_code != 200:
            raise RuntimeError(f"{self.name}: login failed with HTTP {r.status_code}: {r.text[:200]}")
        self.logged_in = True          # JSESSIONID now lives in self.http.cookies
        LOG.info("%s: logged in as %s (role %s, fullApiVersion %s)", self.name, self.username, r.text.strip('"'), version or "default")

    def logout(self):
        if self.logged_in:
            try:
                self.http.post(f"{self.base}/v310/session/logout", timeout=10)
                LOG.info("%s: logged out", self.name)
            except requests.RequestException as exc:
                LOG.warning("%s: logout failed: %s", self.name, exc)
            self.logged_in = False

    def get(self, path, params=None):
        if not self.logged_in:
            self.login()
        r = self.http.get(f"{self.base}{path}", params=params, timeout=60)
        if r.status_code == 401:       # session expired or VMstore restarted: log in once and retry
            LOG.info("%s: HTTP 401 on %s, logging in again", self.name, path)
            self.logged_in = False
            self.login()
            r = self.http.get(f"{self.base}{path}", params=params, timeout=60)
        r.raise_for_status()
        return r.json()

    def vms(self, page_size):
        """All live VMs, following the Page object's offset/limit paging."""
        offset, out = 0, []
        while True:
            page = self.get("/v310/vm", {"live": "TRUE", "offset": offset, "limit": page_size})
            items = page.get("items") or []
            out.extend(items)
            offset += len(items)
            if not items or offset >= int(page.get("filteredTotal") or 0):
                return out


def newest_slice(payload):
    """statsRealtime returns a Page whose items carry sortedStats (oldest first).
    Accept a bare stat object too, so the code survives either shape."""
    if isinstance(payload, dict) and "items" in payload:
        items = payload.get("items") or []
        payload = items[-1] if items else {}
    if isinstance(payload, dict) and "sortedStats" in payload:
        stats = payload.get("sortedStats") or []
        return stats[-1] if stats else {}
    return payload if isinstance(payload, dict) else {}


def vm_name(vm):
    return (vm.get("vmware") or {}).get("name") or vm.get("name") or "unknown"


def vm_uuid(vm):
    return (vm.get("uuid") or {}).get("uuid", "")


def vcenter_vm_id(vm):
    ids = (vm.get("vmware") or {}).get("instanceUuids") or []
    return ids[0].lower() if ids else ""


class Snapshot:
    def __init__(self):
        self.appliances, self.datastores, self.vms, self.health = [], [], [], {}


class TintriCollector(Collector):
    """Serves the last completed poll. Polling happens in a background thread so a slow
    VMstore never makes a Prometheus scrape time out."""

    def __init__(self, clients, poll_seconds, top_n, page_size):
        self.clients, self.poll_seconds, self.top_n, self.page_size = clients, poll_seconds, top_n, page_size
        self.snapshot = Snapshot()
        self.lock = threading.Lock()
        self.stop = threading.Event()

    # ---------------------------------------------------------------- polling
    def poll_once(self):
        snap = Snapshot()
        for c in self.clients:
            started = time.time()
            try:
                info = c.get("/v310/appliance/default/info")
                ops = c.get("/v310/appliance/default/operationalStatus")
                ds_rt = newest_slice(c.get("/v310/datastore/default/statsRealtime"))
                ds_sum = c.get("/v310/datastore/default/statsSummary")
                vms = c.vms(self.page_size)
                rows = []
                for vm in vms:
                    stat = newest_slice(vm.get("stat") or {})
                    rows.append({"vm": vm_name(vm), "uuid": vm_uuid(vm), "vcid": vcenter_vm_id(vm),
                                 "stat": stat, "qos": vm.get("qosConfig") or {}})
                # Real-time detail for the worst VMs only: one extra call per VM per cycle.
                worst = sorted(rows, key=lambda r: r["stat"].get("latencyTotalMs") or 0, reverse=True)[: self.top_n]
                for r in worst:
                    if r["uuid"]:
                        rt = newest_slice(c.get(f"/v310/vm/{r['uuid']}/statsRealtime"))
                        if rt:
                            r["stat"] = rt
                snap.appliances.append((c, info, ops))
                snap.datastores.append((c, ds_rt, ds_sum))
                snap.vms.append((c, rows))
                snap.health[c.name] = (1, time.time() - started)
            except Exception as exc:  # keep serving the other VMstores
                LOG.error("%s: poll failed: %s", c.name, exc)
                snap.health[c.name] = (0, time.time() - started)
        with self.lock:
            self.snapshot = snap

    def run(self):
        while not self.stop.is_set():
            self.poll_once()
            self.stop.wait(self.poll_seconds)

    # ------------------------------------------------------------- exposition
    def collect(self):
        with self.lock:
            snap = self.snapshot
        up = GaugeMetricFamily("tintri_up", "1 if the last poll of this VMstore succeeded", labels=["vmstore"])
        dur = GaugeMetricFamily("tintri_poll_duration_seconds", "Duration of the last poll", labels=["vmstore"])
        for name, (ok, seconds) in snap.health.items():
            up.add_metric([name], ok)
            dur.add_metric([name], seconds)
        yield up
        yield dur

        # Value is always 1; the labels carry the data. Deliberately not named *_info: the
        # collector's Prometheus receiver strips that suffix on the way through.
        ainfo = GaugeMetricFamily("tintri_appliance_version", "VMstore model and TxOS version (always 1)",
                                  labels=["vmstore", "vcenter_datastore_name", "model", "txos_version"])
        fs = GaugeMetricFamily("tintri_appliance_filesystem_up", "isFilesystemUp from operationalStatus", labels=["vmstore"])
        unread = GaugeMetricFamily("tintri_appliance_alerts_unread", "alertsUnreadCount", labels=["vmstore"])
        for c, info, ops in snap.appliances:
            ainfo.add_metric([c.name, c.datastore, str(info.get("modelName", "")), str(info.get("osVersion", ""))], 1)
            fs.add_metric([c.name], 1 if ops.get("isFilesystemUp") else 0)
            unread.add_metric([c.name], float(ops.get("alertsUnreadCount") or 0))
        yield ainfo
        yield fs
        yield unread

        dl = ["vmstore", "vcenter_datastore_name"]
        ds_lat = GaugeMetricFamily("tintri_datastore_latency_ms", "VMstore latency by component (ms)", labels=dl + ["component"])
        ds_iops = GaugeMetricFamily("tintri_datastore_iops", "VMstore operations per second", labels=dl + ["op"])
        ds_mbps = GaugeMetricFamily("tintri_datastore_throughput_mbps", "VMstore throughput (MB/s)", labels=dl + ["op"])
        ds_flash = GaugeMetricFamily("tintri_datastore_flash_hit_percent", "Reads and writes served from flash (%)", labels=dl)
        ds_space = GaugeMetricFamily("tintri_datastore_space_gib", "VMstore space (GiB)", labels=dl + ["kind"])
        ds_days = GaugeMetricFamily("tintri_datastore_space_remaining_days", "Estimated days until full", labels=dl)
        ds_res = GaugeMetricFamily("tintri_datastore_performance_reserve_used_percent", "Performance reserves used (%)", labels=dl)
        ds_vms = GaugeMetricFamily("tintri_datastore_vms", "VMs provisioned on the VMstore", labels=dl)
        for c, rt, summ in snap.datastores:
            base = [c.name, c.datastore]
            for field, comp in LATENCY_FIELDS.items():
                if rt.get(field) is not None:
                    ds_lat.add_metric(base + [comp], float(rt[field]))
            for field, op in IOPS_FIELDS.items():
                if rt.get(field) is not None:
                    ds_iops.add_metric(base + [op], float(rt[field]))
            for field, op in MBPS_FIELDS.items():
                if rt.get(field) is not None:
                    ds_mbps.add_metric(base + [op], float(rt[field]))
            if rt.get("flashHitPercent") is not None:
                ds_flash.add_metric(base, float(rt["flashHitPercent"]))
            for field, kind in (("spaceTotalGiB", "total"), ("spaceUsedGiB", "used"),
                                ("spaceUsedPhysicalGiB", "used_physical"), ("spaceProvisionedGiB", "provisioned"),
                                ("spaceRemainingPhysicalGiB", "remaining_physical")):
                if summ.get(field) is not None:
                    ds_space.add_metric(base + [kind], float(summ[field]))
            if summ.get("spaceRemainingDays") is not None:
                ds_days.add_metric(base, float(summ["spaceRemainingDays"]))
            if summ.get("performanceReserveUsed") is not None:
                ds_res.add_metric(base, float(summ["performanceReserveUsed"]))
            if summ.get("vmsCount") is not None:
                ds_vms.add_metric(base, float(summ["vmsCount"]))
        yield from (ds_lat, ds_iops, ds_mbps, ds_flash, ds_space, ds_days, ds_res, ds_vms)

        vl = ["vmstore", "vcenter_datastore_name", "vm", "vcenter_vm_id"]
        v_lat = GaugeMetricFamily("tintri_vm_latency_ms", "Per-VM latency by component (ms)", labels=vl + ["component"])
        v_iops = GaugeMetricFamily("tintri_vm_iops", "Per-VM operations per second", labels=vl + ["op"])
        v_norm = GaugeMetricFamily("tintri_vm_normalized_iops", "Per-VM normalized IOPS (the unit QoS uses)", labels=vl)
        v_mbps = GaugeMetricFamily("tintri_vm_throughput_mbps", "Per-VM throughput (MB/s)", labels=vl + ["op"])
        v_flash = GaugeMetricFamily("tintri_vm_flash_hit_percent", "Per-VM flash hit (%)", labels=vl)
        v_space = GaugeMetricFamily("tintri_vm_space_gib", "Per-VM space (GiB)", labels=vl + ["kind"])
        v_qmax = GaugeMetricFamily("tintri_vm_qos_max_normalized_iops", "Configured QoS maximum (0 = none)", labels=vl)
        v_qmin = GaugeMetricFamily("tintri_vm_qos_min_normalized_iops", "Configured QoS minimum (0 = none)", labels=vl)
        for c, rows in snap.vms:
            for r in rows:
                base, s, q = [c.name, c.datastore, r["vm"], r["vcid"]], r["stat"], r["qos"]
                for field, comp in LATENCY_FIELDS.items():
                    if s.get(field) is not None:
                        v_lat.add_metric(base + [comp], float(s[field]))
                for field, op in IOPS_FIELDS.items():
                    if s.get(field) is not None:
                        v_iops.add_metric(base + [op], float(s[field]))
                if s.get("normalizedTotalIops") is not None:
                    v_norm.add_metric(base, float(s["normalizedTotalIops"]))
                for field, op in MBPS_FIELDS.items():
                    if s.get(field) is not None:
                        v_mbps.add_metric(base + [op], float(s[field]))
                if s.get("flashHitPercent") is not None:
                    v_flash.add_metric(base, float(s["flashHitPercent"]))
                for field, kind in (("spaceUsedGiB", "used"), ("spaceProvisionedGiB", "provisioned")):
                    if s.get(field) is not None:
                        v_space.add_metric(base + [kind], float(s[field]))
                v_qmax.add_metric(base, float(q.get("maxNormalizedIops") or 0))
                v_qmin.add_metric(base, float(q.get("minNormalizedIops") or 0))
        yield from (v_lat, v_iops, v_norm, v_mbps, v_flash, v_space, v_qmax, v_qmin)


def main():
    logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
    verify = env("TINTRI_CA_FILE") or True
    if env("TINTRI_INSECURE", "false").lower() == "true":
        verify = False
        requests.packages.urllib3.disable_warnings()
        LOG.warning("certificate verification is OFF (TINTRI_INSECURE=true): testing only")
    user, password = env("TINTRI_USERNAME", required=True), env("TINTRI_PASSWORD", required=True)
    clients = []
    for entry in env("TINTRI_TARGETS", required=True).split(","):
        parts = [p.strip() for p in entry.split("|")]
        if len(parts) != 3:
            sys.exit(f"bad TINTRI_TARGETS entry {entry!r}: expected name|base_url|vcenter_datastore_name")
        clients.append(VmstoreClient(*parts, user, password, env("TINTRI_FULL_API_VERSION", ""), verify))

    collector = TintriCollector(clients, int(env("TINTRI_POLL_SECONDS", "60")),
                                int(env("TINTRI_REALTIME_TOP_N", "10")), int(env("TINTRI_PAGE_SIZE", "200")))
    REGISTRY.register(collector)
    start_http_server(int(env("EXPORTER_PORT", "9717")))
    LOG.info("serving /metrics on :%s for %d VMstore(s)", env("EXPORTER_PORT", "9717"), len(clients))

    def shutdown(*_):
        collector.stop.set()
    signal.signal(signal.SIGTERM, shutdown)
    signal.signal(signal.SIGINT, shutdown)
    collector.run()                    # returns after SIGTERM/SIGINT
    for c in clients:
        c.logout()


if __name__ == "__main__":
    main()
# tintri-exporter/requirements.txt
requests==2.34.2
prometheus-client==0.26.0
Show code: tintri-exporter/Dockerfile (8 lines)
FROM python:3.14-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY tintri_exporter.py .
USER nobody
EXPOSE 9717
ENTRYPOINT ["python", "/app/tintri_exporter.py"]

Verify:

docker compose logs tintri-exporter | head -5

Expected: one logged in as <TINTRI_READONLY_USER> (role ..., fullApiVersion v310.207) line per VMstore and serving /metrics on :9717 for N VMstore(s). After docker compose stop tintri-exporter the log ends with logged out for each VMstore.

Why not name the appliance metric tintri_appliance_info, as Prometheus convention suggests? The collector’s prometheus receiver removes a trailing _info on the way through, so the series would arrive in Prometheus as tintri_appliance. tintri_appliance_version survives unchanged.

07. Prometheus, Loki and Grafana provisioning

Prometheus receives everything by remote write and scrapes only the pipeline’s own health. The out-of-order window lets the collector deliver a queued backlog after a restart without Prometheus rejecting it.

Show code: prometheus/prometheus.yml (16 lines)
# vsphere-tintri-grafana/prometheus/prometheus.yml  (Prometheus 3.16)
# Metrics arrive by remote write from the collector; Prometheus only scrapes the pipeline itself.
global:
  scrape_interval: 30s
  evaluation_interval: 30s
storage:
  tsdb:
    # Remote write can deliver late samples after a collector restart or queue drain.
    out_of_order_time_window: 30m
scrape_configs:
  - job_name: otelcol
    static_configs:
      - targets: ["otelcol:8888"]
  - job_name: loki
    static_configs:
      - targets: ["loki:3100"]

Loki takes OTLP directly. host.name is promoted to an index label so the APD alert can group by host; the event type stays structured metadata, which LogQL filters on with | esx_event=~"...". Part 4 explains the label choices.

Show code: loki/loki.yaml (43 lines)
# vsphere-tintri-grafana/loki/loki.yaml  (Loki 3.7, single binary, filesystem storage)
auth_enabled: false
server:
  http_listen_port: 3100
  grpc_listen_port: 9096
  log_level: info
common:
  instance_interface_names: [eth0]
  path_prefix: /loki
  storage:
    filesystem:
      chunks_directory: /loki/chunks
      rules_directory: /loki/rules
  replication_factor: 1
  ring:
    kvstore:
      store: inmemory
schema_config:
  configs:
    - from: 2026-01-01
      store: tsdb
      object_store: filesystem
      schema: v13
      index:
        prefix: index_
        period: 24h
limits_config:
  allow_structured_metadata: true
  retention_period: 2160h          # 90 days of ESXi events
  otlp_config:
    resource_attributes:
      attributes_config:
        - action: index_label
          attributes:
            - host.name
compactor:
  working_directory: /loki/compactor
  compaction_interval: 10m
  retention_enabled: true
  retention_delete_delay: 2h
  delete_request_store: filesystem
analytics:
  reporting_enabled: false

Grafana gets fixed datasource UIDs, because the dashboard JSON and the alert rules reference prometheus and loki by UID. Import the dashboards into an existing Grafana and you will be asked to map these two.

Show code: grafana/provisioning/datasources/datasources.yaml (20 lines)
# vsphere-tintri-grafana/grafana/provisioning/datasources/datasources.yaml
# Fixed UIDs: the dashboards and alert rules reference "prometheus" and "loki".
apiVersion: 1
datasources:
  - name: Prometheus
    type: prometheus
    uid: prometheus
    access: proxy
    url: http://prometheus:9090
    isDefault: true
    jsonData:
      httpMethod: POST
      timeInterval: 60s          # Tintri exporter is scraped every 60 s; vCenter samples every 2 m
  - name: Loki
    type: loki
    uid: loki
    access: proxy
    url: http://loki:3100
    jsonData:
      maxLines: 1000
Show code: grafana/provisioning/dashboards/dashboards.yaml (11 lines)
# vsphere-tintri-grafana/grafana/provisioning/dashboards/dashboards.yaml
apiVersion: 1
providers:
  - name: vsphere-tintri
    folder: vSphere and Tintri
    type: file
    disableDeletion: true
    allowUiUpdates: false        # change the JSON in git, not in the UI
    updateIntervalSeconds: 60
    options:
      path: /var/lib/grafana/dashboards

08. Dashboard 1: vSphere cluster overview

The first dashboard is the one that stays on a wall screen. It answers “is anything in this cluster unhealthy, and where do I look next” in one screen, top to bottom: summary numbers, hosts, datastores, VMs, then the ESXi events that explain the rest.

Grafana dashboard 'vSphere cluster overview' in dark theme: six summary stats (4 ESXi hosts, 21 VMs on, cluster CPU 15 percent, memory 30 percent, fullest datastore 87.5 percent in red, 5 storage events), host CPU and memory time series for esx-01 to esx-04, datastore capacity bars for ds-vmstore-01 and ds-vmstore-02, NFS client latency per host with a spike on ds-vmstore-01, a top 10 VM latency table led by etl-batch-07, CPU ready by VM and ESXi storage events from Loki.
Dashboard 1, vSphere cluster overview, over 24 hours. The NFS latency spike on ds-vmstore-01 and etl-batch-07 at the top of the VM table are the same incident that dashboards 2 and 3 take apart.

Variables: vCenter (vcenter_server), Cluster, ESXi host and Datastore, each a label_values() query filtered by the ones before it. All default to All. The annotation toggle overlays APD, NFS and vMotion events from Loki on every time series.

PanelQuery (PromQL or LogQL)Unit and thresholdsWhy it matters / what bad looks like
ESXi hosts in servicesum(vcenter_cluster_host_count{effective="true", ...})countHosts that can run VMs (not in maintenance or disconnected). Bad: lower than your N+1 design.
VMs powered onsum(vcenter_cluster_vm_count{power_state="on", ...})countA sudden drop with no change ticket is an HA event; look at the events panel.
Cluster CPU usedsum(vcenter_host_cpu_usage_MHz) / sum(vcenter_host_cpu_capacity_MHz) * 100%, amber 70, red 85Capacity, not performance. Above 85 % a host failure will not fit.
Cluster memory usedavg(vcenter_host_memory_utilization_percent)%, amber 80, red 90Sustained above 90 % means ballooning and swapping on the next host failure.
Fullest datastoremax(vcenter_datastore_disk_utilization_percent)%, amber 75, red 85The datastore that fills first stops every VM on it with thin disks. Red at 85 % matches the space alert.
Storage events (24h)sum(count_over_time({service_name="esxi"} | esx_event=~"apd_start|apd_timeout|nfs_disconnect|vmotion_failure" [24h]))count, orange from 1Should be zero. Any APD or NFS disconnect is worth a ticket even if it recovered.
Host CPU / memory utilizationvcenter_host_cpu_utilization_percent, vcenter_host_memory_utilization_percent%, dashed red at 85 / 90Hosts should move together under DRS. One host far above the others is an affinity rule or a DRS setting, not a capacity problem.
Datastore capacity usedmax by (vcenter_datastore_name) (vcenter_datastore_disk_utilization_percent)%, amber 75, red 85Data link opens the Tintri dashboard. On NFS this is the VMstore’s logical capacity as ESXi sees it.
NFS client latency per host and datastoreavg_over_time(vsphere_host_datastore_latency_milliseconds{direction="write"}[5m])ms, dashed orange at 10One line per host and datastore from the bridge. One host high means its path (vmk, uplink, switch port); every host high on one datastore means the VMstore or the shared network. 10 ms is where ESXi itself starts logging NFS performance warnings.
Top 10 VMs by virtual disk latencytopk(10, max by (vcenter_vm_name, vcenter_host_name, vcenter_cluster_name) (avg_over_time(vcenter_vm_disk_latency_avg_milliseconds[10m])))ms, amber 10, red 20The entry point for VM complaints. Click a VM name to open it in dashboard 3. Bad: the same VM always at the top, or every VM on one host.
CPU ready by VM (top 8)vcenter_vm_cpu_readiness_percent and on (vcenter_vm_name) topk(8, max by (vcenter_vm_name) (avg_over_time(vcenter_vm_cpu_readiness_percent[$__range] @ end())))%, dashed orange at 5Time a VM was ready to run but waited for a CPU. The @ end() picks one fixed top 8 for the whole range instead of a different set per step. Above 5 % users notice; disk latency complaints sometimes turn out to be this.
Storage and vMotion events by typesum by (esx_event) (count_over_time({service_name="esxi"} | esx_event=~"apd_.*|nfs_.*|vmotion_failure" [$__auto]))count, barsWhen APD started and ended, and whether vMotions failed while it lasted.
ESXi events: APD, NFS, vMotion, HA{service_name="esxi", host_name=~"(?i)$host"} | esx_event=~"apd_.*|nfs_.*|vmotion_failure" or appname=~"(?i)fdm" or detected_level=~"warn|error" | keep host_name, esx_event, detected_levellog linesThe raw lines behind the chart. keep trims the labels so the line stays readable.

09. Dashboard 2: Tintri VMstore

The second dashboard is the storage team’s. The top row answers “is the VMstore healthy”; the per-VM rows answer “who is using it and is anyone being held back”.

Grafana dashboard 'Tintri VMstore: performance and capacity' in dark theme: summary stats for exporter up, total IOPS, throughput, latency, flash hit, space used and days to full; a stacked latency-by-component chart with a dashed total line; IOPS and throughput by read and write; flash hit ratio; capacity used versus total; a top 10 VM latency table with host, network, storage, contention and throttle columns; QoS throttle and contention latency by VM; top VMs by normalized IOPS; a table of VMs with a QoS maximum; and an appliance table.
Dashboard 2, Tintri VMstore, over 6 hours. Contention rises across the VMstore while etl-batch-07 floods it; after a QoS maximum is applied to that VM, contention for everyone else drops and the throttle panel shows the cost moving to the one VM that caused it.

Variable: VMstore (label_values(tintri_up, vmstore)), multi-select, default All.

PanelQueryUnit and thresholdsWhy it matters / what bad looks like
Exporter upmin(tintri_up)red 0, green 1Every other Tintri panel is stale when this is red. The exporter-down alert fires after 10 minutes.
Total IOPS / Throughputsum(tintri_datastore_iops{op="total"}), sum(tintri_datastore_throughput_mbps{op="total"})IOPS, MB/sContext for latency. High latency at low IOPS is a fault; high latency at record IOPS is load.
Latency (VMstore total)max(tintri_datastore_latency_ms{component="total"})ms, amber 5, red 10The VMstore’s own view. All-flash VMstores normally sit around 1 ms.
Flash hitmin(tintri_datastore_flash_hit_percent)%, red below 90, amber below 95On hybrid models a falling flash hit ratio means the working set outgrew flash. On all-flash models it stays at 100.
Space used / Days to fullmax(tintri_datastore_space_gib{kind="used"} / ignoring(kind) tintri_datastore_space_gib{kind="total"} * 100), min(tintri_datastore_space_remaining_days)%, amber 75, red 85; days, red below 30The VMstore’s own forecast. Compare days to full with your purchase lead time, not with zero.
Latency by componentsum by (component) (avg_over_time(tintri_datastore_latency_ms{component=~"host|network|storage|contention|throttle"}[$__interval])) stacked, plus component="total" as a dashed linemsThe single most useful Tintri chart. Host or network growing means the problem is outside the VMstore; contention growing means one VM is hurting the others; throttle growing means a QoS maximum is in effect.
IOPS / Throughput read and writesum by (op) (tintri_datastore_iops{op=~"read|write"}), same for MB/sIOPS, MB/sBackup windows show as read throughput; database loads as write IOPS. Know your normal shape.
Flash hit ratiotintri_datastore_flash_hit_percent%Trend view of the stat above.
Capacity: used vs totalsum by (kind) (tintri_datastore_space_gib{kind=~"used|total"})GiBGrowth rate is what predicts the next purchase.
Top 10 VMs by VMstore latency, with the breakdownmax by (vm, component) (tintri_vm_latency_ms) and on (vm) group_left topk(10, max by (vm) (tintri_vm_latency_ms{component="total"})), pivoted with the grouping-to-matrix transformationms per cell, amber 5, red 10Shows, per VM, which component is large. A VM whose time is all host has a guest or ESXi problem, not a storage one.
QoS throttle latency by VMmax by (vm) (tintri_vm_latency_ms{component="throttle"}) > 0ms, red 5Only VMs that are being throttled appear. Intended on a noisy VM; a forgotten ceiling on anything else. Click a line to open that VM end to end.
Contention latency by VM (top 6)topk(6, max by (vm) (tintri_vm_latency_ms{component="contention"}))msWho is waiting for whom. Many VMs rising together means one neighbour; check the next panel.
Top 6 VMs by normalized IOPStopk(6, max by (vm) (tintri_vm_normalized_iops))IOPS (8 KiB normalized)Normalized IOPS is the unit Tintri QoS uses, so this is the panel to read before setting a maximum.
VMs with a QoS maximum settintri_vm_qos_max_normalized_iops > 0 with current normalized IOPS and throttle latencytableThe audit list. The QoS audit post explains why every row here needs an owner.
Appliancestintri_appliance_version, tintri_appliance_filesystem_up, tintri_appliance_alerts_unread, tintri_datastore_performance_reserve_used_percent, tintri_datastore_vmstableModel, TxOS version and health per VMstore. A file system that is not up is an outage, whatever the latency says.

10. Dashboard 3: one VM end to end

The third dashboard takes one VM name and follows it down the stack. Open it from a data link in the other two dashboards, or pick the VM from the variable.

Grafana dashboard 'VM end to end: guest to VMstore' for VM etl-batch-07: six stats for vSphere disk latency, ESXi NFS client latency, VMstore appliance latency, VMstore latency for this VM, QoS throttle and CPU ready; a 'latency at every layer' chart with four lines on one clock; the VMstore latency breakdown for the VM; IOPS with the QoS maximum line; neighbours on the same VMstore; throughput as seen by vSphere and by the VMstore; host CPU and memory; and ESXi log lines from the host.
Dashboard 3 for etl-batch-07, opened from the top 10 table. The ladder chart shows all four layers rising together during the burst; after the QoS maximum is applied the VM’s own latency stays high while the appliance returns to normal, and the breakdown shows that remaining time is throttle.

Variables and how they chain

VariableQueryWhy
clusterlabel_values(vcenter_vm_cpu_utilization_percent, vcenter_cluster_name)Narrows the VM list.
vmlabel_values(vcenter_vm_cpu_utilization_percent{vcenter_cluster_name=~"$cluster"}, vcenter_vm_name)The VM. Data links set it with var-vm=.
hostlabel_values(vcenter_vm_cpu_utilization_percent{vcenter_vm_name="$vm"}, vcenter_host_name)The host the VM runs on now. After a vMotion it follows the VM; for an incident in the past, pick the host from the list.
datastorelabel_values(vsphere_vm_disk_info{vcenter_vm_name="$vm"}, vcenter_datastore_name)The datastore the VM’s disks are on, from the bridge’s VM to datastore map. The vcenter receiver does not put a datastore on VM metrics.
vmstore (hidden)label_values(tintri_datastore_iops{vcenter_datastore_name="$datastore"}, vmstore)The VMstore behind that datastore, from the exporter’s vcenter_datastore_name label.

Panels

PanelQueryUnit and thresholdsWhy it matters / what bad looks like
vSphere: VM disk latencymax(avg_over_time(vcenter_vm_disk_latency_avg_milliseconds{vcenter_vm_name="$vm"}[10m]))ms, amber 10, red 20What the guest feels, as vSphere measures it.
ESXi NFS client: host to datastoremax(avg_over_time(vsphere_host_datastore_latency_milliseconds{vcenter_host_name="$host", vcenter_datastore_name="$datastore"}[10m]))ms, amber 10, red 20The same I/O measured one layer lower, for every VM on that host and datastore.
VMstore: appliance latencymax(avg_over_time(tintri_datastore_latency_ms{vcenter_datastore_name="$datastore", component="total"}[10m]))ms, amber 5, red 10The VMstore as a whole. Low here while the VM is high means the problem is this VM or the path to it.
VMstore: this VMmax(avg_over_time(tintri_vm_latency_ms{vm="$vm", component="total"}[10m]))ms, amber 5, red 10Tintri’s per-VM measurement, the one that can be split into components.
QoS throttle on this VMmax(avg_over_time(tintri_vm_latency_ms{vm="$vm", component="throttle"}[10m]))ms, orange 0.5, red 5Any value above zero means a QoS maximum is slowing this VM on purpose.
CPU readymax(avg_over_time(vcenter_vm_cpu_readiness_percent{vcenter_vm_name="$vm"}[10m]))%, amber 5, red 10Rules out the CPU before anyone blames storage.
Latency at every layer, same clockfour queries: VM disk (write), ESXi NFS client (write), VMstore appliance total, VMstore this VMmsRead it bottom up. The lowest layer that rises first is where the time is added. If only line 1 rises, look inside the guest or at the virtual disk; if lines 1 and 2 rise but 3 does not, look at the network between host and VMstore.
VMstore latency breakdown for $vmsum by (component) (tintri_vm_latency_ms{vm="$vm", component=~"host|network|storage|contention|throttle"})ms, stackedWhich component is large for this VM.
IOPS and the QoS ceilingtintri_vm_iops{op="total"}, tintri_vm_normalized_iops, tintri_vm_qos_max_normalized_iops > 0IOPSA VM pinned flat against the QoS line is being throttled; a VM well below it while throttle is high deserves a closer look.
Neighbours on the same VMstoretopk(5, max by (vm) (tintri_vm_normalized_iops{vcenter_datastore_name="$datastore"}))IOPSIf this VM shows contention, the cause is usually one of these. Each line links to that VM’s own end-to-end view.
Throughput: vSphere vs VMstoresum(vcenter_vm_disk_throughput{vcenter_vm_name="$vm"}) / 1024 and sum(tintri_vm_throughput_mbps{vm="$vm", op="total"})MiB/s and MB/sThe two should track. A persistent gap means I/O one side attributes elsewhere (snapshots, a disk on another datastore).
$host CPU and memoryvcenter_host_cpu_utilization_percent, vcenter_host_memory_utilization_percent%The host context.
ESXi log lines from $host{service_name="esxi", host_name=~"(?i)$host"} | detected_level=~"warn|error" or esx_event=~".+" | keep host_name, esx_event, detected_levellog linesESXi’s own NFS performance warnings appear here during a latency incident.

Data links between the dashboards

All navigation uses the dashboard UIDs, so links survive renaming. Each link carries the time range with ${__url_time_range}, so a drilldown shows the same minutes you were looking at.

FromLinkURL
Dashboard 1, top 10 table, VM cellOpen VM end to end/d/vst-vm-e2e/vm-end-to-end-guest-to-vmstore?var-vm=${__value.raw}&${__url_time_range}
Dashboard 1, CPU ready seriesOpen VM end to end...?var-vm=${__field.labels.vcenter_vm_name}&${__url_time_range}
Dashboard 1, datastore capacity barsOpen the Tintri VMstore dashboard/d/vst-tintri-vmstore/...?${__url_time_range}
Dashboard 2, throttle, contention and IOPS seriesOpen VM end to end...?var-vm=${__field.labels.vm}&${__url_time_range}
Dashboard 3, appliance latency statOpen the Tintri VMstore dashboard...?var-vmstore=$vmstore&${__url_time_range}
All dashboards, top barDashboard linksthe three dashboards, keeping time and variables
Grafana Tintri VMstore dashboard, per-VM row: the top 10 VMs by VMstore latency table led by etl-batch-07 at 12.28 ms with 11.08 ms of throttle, and the QoS throttle latency by VM panel with a pinned tooltip for etl-batch-07 at 10.7 ms showing the data link 'Open etl-batch-07 end to end'.
The drilldown: click a point on any per-VM series and the pinned tooltip offers that VM’s end-to-end view, already filtered to the VM and to the same time range.

To see the PromQL behind any panel, press e over it or choose Edit from the panel menu. The query editor shows the expression, the legend format and the min interval; the provisioned dashboard cannot be saved from the UI, which keeps the files as the source of truth.

Grafana panel editor for the 'Latency by component (stacked) and total' panel of the Tintri dashboard, showing query A summing tintri_datastore_latency_ms by component and query B with the latencyTotalMs total, plus the visualization options pane.
The panel editor for the Tintri latency chart: query A stacks the components, query B draws latencyTotalMs on its own.

11. Alert rules: latency, space and APD

The rules are Grafana-managed and provisioned from a file. Each one has the same three steps: query A, reduce B (last value), threshold C. Labels team and severity are there for your notification policy; routing and contact points are yours to add. Each rule is linked to the panel that explains it, so the alert opens on the right chart.

RuleConditionForSeverityNo data
vSphere VM disk latency high10-minute average of vcenter_vm_disk_latency_avg_milliseconds above 20 ms, per VM10 mwarningOK
Tintri VM QoS contention latency high10-minute average contention above 5 ms, per VM10 mwarningOK
Tintri VM held back by a QoS maximum10-minute average throttle above 5 ms, per VM10 minfoOK
Tintri VMstore space above 85 %used / total above 85 %, per VMstore30 mwarningNo data
Tintri exporter cannot read a VMstoremin_over_time(tintri_up[10m]) below 110 mcriticalAlerting
ESXi host reports All Paths Down or an NFS disconnectany apd_start, apd_timeout or nfs_disconnect event in 5 minutes, per host (Loki)0 scriticalOK

The thresholds are starting points. 20 ms of VM disk latency for 10 minutes is a sensible page on an all-flash VMstore; raise it for hybrid models. The APD rule fires on the first event with no pending period, because by the time a second APD line arrives the VMs may already be hung. The APD post explains why this log-based alert reaches you before vCenter does.

Show code: grafana/provisioning/alerting/vsphere-tintri-rules.yaml (215 lines)
# vsphere-tintri-grafana/grafana/provisioning/alerting/vsphere-tintri-rules.yaml
# Grafana-managed alert rules (file provisioning, apiVersion 1). Each rule: query A, reduce B, threshold C.
# Notifications follow your default notification policy; route on the labels below (team, severity).
apiVersion: 1
groups:
  - orgId: 1
    name: vsphere-tintri-latency
    folder: vSphere and Tintri
    interval: 1m
    rules:
      - uid: vst-vm-disk-latency
        title: vSphere VM disk latency high
        condition: C
        data:
          - refId: A
            relativeTimeRange: { from: 600, to: 0 }
            datasourceUid: prometheus
            model:
              refId: A
              instant: true
              expr: max by (vcenter_vm_name, vcenter_host_name) (avg_over_time(vcenter_vm_disk_latency_avg_milliseconds[10m]))
          - refId: B
            datasourceUid: __expr__
            model: { refId: B, type: reduce, expression: A, reducer: last }
          - refId: C
            datasourceUid: __expr__
            model:
              refId: C
              type: threshold
              expression: B
              conditions:
                - evaluator: { type: gt, params: [20] }
        noDataState: OK
        execErrState: Error
        for: 10m
        annotations:
          summary: '{{ $labels.vcenter_vm_name }} on {{ $labels.vcenter_host_name }}: virtual disk latency {{ humanize $values.B.Value }} ms (10 min average)'
          description: Open the VM end-to-end dashboard and find the layer where the latency first appears.
          __dashboardUid__: vst-vm-e2e
          __panelId__: "8"
        labels: { team: virtualization, severity: warning }
        isPaused: false

      - uid: vst-tintri-contention
        title: Tintri VM QoS contention latency high
        condition: C
        data:
          - refId: A
            relativeTimeRange: { from: 600, to: 0 }
            datasourceUid: prometheus
            model:
              refId: A
              instant: true
              expr: max by (vmstore, vm) (avg_over_time(tintri_vm_latency_ms{component="contention"}[10m]))
          - refId: B
            datasourceUid: __expr__
            model: { refId: B, type: reduce, expression: A, reducer: last }
          - refId: C
            datasourceUid: __expr__
            model:
              refId: C
              type: threshold
              expression: B
              conditions:
                - evaluator: { type: gt, params: [5] }
        noDataState: OK
        execErrState: Error
        for: 10m
        annotations:
          summary: '{{ $labels.vm }} on {{ $labels.vmstore }} is queued behind other work: contention {{ humanize $values.B.Value }} ms'
          description: Look at the top VMs by normalized IOPS on the same VMstore. Tintri's QoS guidance is to confirm contention before raising a VM's minimum.
          __dashboardUid__: vst-tintri-vmstore
          __panelId__: "16"
        labels: { team: storage, severity: warning }
        isPaused: false

      - uid: vst-tintri-throttle
        title: Tintri VM held back by a QoS maximum
        condition: C
        data:
          - refId: A
            relativeTimeRange: { from: 600, to: 0 }
            datasourceUid: prometheus
            model:
              refId: A
              instant: true
              expr: max by (vmstore, vm) (avg_over_time(tintri_vm_latency_ms{component="throttle"}[10m]))
          - refId: B
            datasourceUid: __expr__
            model: { refId: B, type: reduce, expression: A, reducer: last }
          - refId: C
            datasourceUid: __expr__
            model:
              refId: C
              type: threshold
              expression: B
              conditions:
                - evaluator: { type: gt, params: [5] }
        noDataState: OK
        execErrState: Error
        for: 10m
        annotations:
          summary: '{{ $labels.vm }} on {{ $labels.vmstore }}: QoS throttle latency {{ humanize $values.B.Value }} ms'
          description: A per-VM QoS maximum is in effect. Intended on a noisy VM; a forgotten ceiling anywhere else.
          __dashboardUid__: vst-tintri-vmstore
          __panelId__: "15"
        labels: { team: storage, severity: info }
        isPaused: false

  - orgId: 1
    name: vsphere-tintri-capacity
    folder: vSphere and Tintri
    interval: 5m
    rules:
      - uid: vst-tintri-space
        title: Tintri VMstore space above 85 %
        condition: C
        data:
          - refId: A
            relativeTimeRange: { from: 600, to: 0 }
            datasourceUid: prometheus
            model:
              refId: A
              instant: true
              expr: max by (vmstore, vcenter_datastore_name) (tintri_datastore_space_gib{kind="used"} / ignoring(kind) tintri_datastore_space_gib{kind="total"} * 100)
          - refId: B
            datasourceUid: __expr__
            model: { refId: B, type: reduce, expression: A, reducer: last }
          - refId: C
            datasourceUid: __expr__
            model:
              refId: C
              type: threshold
              expression: B
              conditions:
                - evaluator: { type: gt, params: [85] }
        noDataState: NoData
        execErrState: Error
        for: 30m
        annotations:
          summary: '{{ $labels.vmstore }} ({{ $labels.vcenter_datastore_name }}) is {{ humanize $values.B.Value }} % full'
          description: Check spaceRemainingDays on the Tintri dashboard against your procurement lead time.
          __dashboardUid__: vst-tintri-vmstore
          __panelId__: "6"
        labels: { team: storage, severity: warning }
        isPaused: false

      - uid: vst-tintri-exporter-down
        title: Tintri exporter cannot read a VMstore
        condition: C
        data:
          - refId: A
            relativeTimeRange: { from: 600, to: 0 }
            datasourceUid: prometheus
            model:
              refId: A
              instant: true
              expr: min by (vmstore) (min_over_time(tintri_up[10m]))
          - refId: B
            datasourceUid: __expr__
            model: { refId: B, type: reduce, expression: A, reducer: last }
          - refId: C
            datasourceUid: __expr__
            model:
              refId: C
              type: threshold
              expression: B
              conditions:
                - evaluator: { type: lt, params: [1] }
        noDataState: Alerting
        execErrState: Error
        for: 10m
        annotations:
          summary: 'The exporter has failed to poll {{ $labels.vmstore }} for 10 minutes'
          description: Check the exporter log for HTTP 401 (credentials or role), TLS errors or timeouts. Every Tintri panel is stale while this fires.
        labels: { team: storage, severity: critical }
        isPaused: false

  - orgId: 1
    name: vsphere-tintri-apd
    folder: vSphere and Tintri
    interval: 1m
    rules:
      - uid: vst-esxi-apd
        title: ESXi host reports All Paths Down or an NFS disconnect
        condition: C
        data:
          - refId: A
            relativeTimeRange: { from: 300, to: 0 }
            datasourceUid: loki
            model:
              refId: A
              queryType: instant
              expr: sum by (host_name) (count_over_time({service_name="esxi"} | esx_event=~"apd_start|apd_timeout|nfs_disconnect" [5m]))
          - refId: B
            datasourceUid: __expr__
            model: { refId: B, type: reduce, expression: A, reducer: last }
          - refId: C
            datasourceUid: __expr__
            model:
              refId: C
              type: threshold
              expression: B
              conditions:
                - evaluator: { type: gt, params: [0] }
        noDataState: OK
        execErrState: Error
        for: 0s
        annotations:
          summary: '{{ $labels.host_name }} logged {{ $values.B.Value }} APD or NFS disconnect events in 5 minutes'
          description: One host means a path problem (its vmk, uplink or fabric); every host at once means something they share. See the APD post for the runbook.
          __dashboardUid__: vst-vsphere-cluster
          __panelId__: "16"
        labels: { team: virtualization, severity: critical }
        isPaused: false
Grafana alert rules list filtered to the folder 'vSphere and Tintri': six provisioned rules from the latency, capacity and APD groups, with the Tintri space and QoS throttle rules firing and the other four normal.
The provisioned rules in Grafana’s alert list. The throttle rule fires for the VM that has a QoS maximum and the space rule fires for the VMstore that is 87.5 % full.

Verify:

curl -sS -u admin:"$GRAFANA_ADMIN_PASSWORD" "<GRAFANA_URL>/api/prometheus/grafana/api/v1/rules" \
  | jq -r '.data.groups[].rules[] | "\(.state)\t\(.name)"'

Expected: six lines, each inactive, pending or firing followed by the rule title. A rule in error state usually means a datasource UID mismatch.

12. Running it on Kubernetes

The same files work on Kubernetes with three substitutions. Run the collector with the OpenTelemetry Collector Helm chart (open-telemetry/opentelemetry-collector) in deployment mode with one replica per vCenter, the contrib image, and config.yaml as the chart’s config value; put the vCenter credentials in a Secret and expose them as environment variables, and mount the CA bundle from a ConfigMap. Run the exporter as a one-replica Deployment with its own Secret and a ClusterIP Service on 9717, and change the scrape target in prometheus/tintri to that Service name. For Grafana, the Grafana chart’s dashboard sidecar loads any ConfigMap labelled grafana_dashboard, so put each dashboard JSON in one. Expose syslog with a LoadBalancer Service on TCP 1514 and 5514 so ESXi has a stable address. Part 5 and the OpenShift post cover the collector side in detail.

13. Troubleshooting

SymptomLikely causeCheckFix
No vcenter_* series at allLogin failed or TLS not trusteddocker compose logs otelcol | grep -i -E 'vcenter|x509|login'Fix the CA bundle (step 2) or the account (step 3). An x509: certificate signed by unknown authority means the PEM is not the vCenter root CA.
vCenter series arrive, some panels say No dataMetric disabled or renamed in your collector versionPrometheus /api/v1/label/__name__/values, filter for vcenter_Compare with the table in section 05; the receiver is alpha and names can change between releases. Pin the image.
NFS latency panels empty, everything else fineThe PowerCLI bridge is not running or sends another metric namecount(vsphere_host_datastore_latency_milliseconds)Schedule the bridge from the NFS latency post; check it points at the collector’s OTLP port 4318.
tintri_up 0, log shows HTTP 401 on every cycleWrong password, or the user was removedRepeat step 3 by handFix the user; the exporter recovers on the next cycle without a restart.
tintri_up 0 after a VMstore failover, then 1 againSessions were dropped by the controller switchExporter log: HTTP 401 ..., logging in againExpected behaviour. Only act if it persists past one cycle.
Tintri login returns 403 or a version errorRead Only role missing, or fullApiVersion newer than the TxOSGET /api/info: supportedVersionSetSet TINTRI_FULL_API_VERSION to a version the VMstore lists, or leave it empty.
Exporter scrape slow or timing outVery large VM count, or the exporter polling inlinetintri_poll_duration_secondsThe scrape serves the last snapshot, so a timeout means the container is starved. Raise TINTRI_PAGE_SIZE or TINTRI_POLL_SECONDS; lower TINTRI_REALTIME_TOP_N.
Series count far higher than the sizing tableHigh-cardinality labels: VM churn, per-disk series, vcenter_vm_idtopk(10, count by (__name__) ({__name__=~"vcenter_.*|tintri_.*"}))Disable unused receiver metrics (metrics: <name>: enabled: false); drop vcenter_vm_id in the exporter if you never join on it.
Prometheus log: out of order or too old samplesClock skew between the collector host and Prometheus, or a long queue drainchronyc tracking on the monitoring VM; prometheus_tsdb_out_of_order_samples_totalFix NTP on the monitoring VM and the ESXi hosts. The 30 m out-of-order window covers normal restarts.
ESXi events missing from LokiHosts still on UDP 514, firewall ruleset off, or Loki rejecting old linesStep 6 verify query; docker compose logs loki | grep -i rejectUse tcp:// in Syslog.global.logHost; check ESXi NTP (old timestamps are rejected).
Grafana panel says No data, Explore shows the seriesVariable empty or not matching (for example the VM name differs in case)Dashboard settings, Variables, preview of valuesCorrelation joins on names: the VMstore’s vmware.name must equal the vCenter VM name.
Alert rule in Error stateDatasource UID differs from prometheus / lokiAlert rule, query previewKeep the UIDs from datasources.yaml, or edit the UIDs in the rules file.
Appliance table empty but other Tintri panels fineMetric renamed to *_info and stripped by the receivercount by (__name__) ({__name__=~"tintri_appliance.*"})Keep the name tintri_appliance_version (see section 06).

14. Downloads

Every file of the bundle is printed above in full. The three dashboards follow; save each one as the file name in its first line and place it in grafana/dashboards/, or import it in Grafana under Dashboards, New, Import and map the prometheus and loki datasources when asked. The coordinator may also attach the bundle as an archive.

FileWhat it is
compose.yaml, .env.exampleThe stack (section 04)
otelcol/config.yamlCollector configuration (section 05)
tintri-exporter/Exporter, Dockerfile and requirements (section 06)
prometheus/prometheus.yml, loki/loki.yaml, grafana/provisioning/Back ends and provisioning (sections 07 and 11)
grafana/dashboards/*.jsonThe three dashboards (below), Grafana 13.3, schemaVersion 42

vsphere-cluster-overview.json

Show code: vsphere-cluster-overview.json (1453 lines)
{
  "uid": "vst-vsphere-cluster",
  "title": "vSphere cluster overview",
  "description": "vCenter receiver metrics, the NFS datastore bridge and parsed ESXi events. vmwareblogs.co.in post 29.",
  "tags": [
    "vsphere",
    "opentelemetry",
    "tintri"
  ],
  "editable": true,
  "graphTooltip": 1,
  "timezone": "browser",
  "schemaVersion": 42,
  "version": 1,
  "refresh": "1m",
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "fiscalYearStartMonth": 0,
  "liveNow": false,
  "timepicker": {
    "refresh_intervals": [
      "30s",
      "1m",
      "5m",
      "15m"
    ]
  },
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      },
      {
        "datasource": {
          "type": "loki",
          "uid": "loki"
        },
        "enable": true,
        "hide": false,
        "iconColor": "#F2495C",
        "name": "ESXi storage and vMotion events",
        "target": {
          "refId": "Anno",
          "queryType": "range",
          "editorMode": "code",
          "expr": "{service_name=\"esxi\"} | esx_event=~\"apd_start|apd_timeout|nfs_disconnect|vmotion_failure\""
        },
        "titleFormat": "{{esx_event}} on {{host_name}}",
        "textFormat": "",
        "instant": false
      }
    ]
  },
  "templating": {
    "list": [
      {
        "name": "vcenter",
        "label": "vCenter",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "query": {
          "query": "label_values(vcenter_host_cpu_utilization_percent, vcenter_server)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery",
          "qryType": 1
        },
        "definition": "label_values(vcenter_host_cpu_utilization_percent, vcenter_server)",
        "refresh": 2,
        "multi": false,
        "includeAll": true,
        "hide": 0,
        "regex": "",
        "sort": 1,
        "options": [],
        "current": {
          "text": "All",
          "value": "$__all"
        }
      },
      {
        "name": "cluster",
        "label": "Cluster",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "query": {
          "query": "label_values(vcenter_host_cpu_utilization_percent{vcenter_server=~\"$vcenter\"}, vcenter_cluster_name)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery",
          "qryType": 1
        },
        "definition": "label_values(vcenter_host_cpu_utilization_percent{vcenter_server=~\"$vcenter\"}, vcenter_cluster_name)",
        "refresh": 2,
        "multi": true,
        "includeAll": true,
        "hide": 0,
        "regex": "",
        "sort": 1,
        "options": [],
        "current": {
          "text": "All",
          "value": "$__all"
        }
      },
      {
        "name": "host",
        "label": "ESXi host",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "query": {
          "query": "label_values(vcenter_host_cpu_utilization_percent{vcenter_server=~\"$vcenter\", vcenter_cluster_name=~\"$cluster\"}, vcenter_host_name)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery",
          "qryType": 1
        },
        "definition": "label_values(vcenter_host_cpu_utilization_percent{vcenter_server=~\"$vcenter\", vcenter_cluster_name=~\"$cluster\"}, vcenter_host_name)",
        "refresh": 2,
        "multi": true,
        "includeAll": true,
        "hide": 0,
        "regex": "",
        "sort": 1,
        "options": [],
        "current": {
          "text": "All",
          "value": "$__all"
        }
      },
      {
        "name": "datastore",
        "label": "Datastore",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "query": {
          "query": "label_values(vcenter_datastore_disk_utilization_percent{vcenter_server=~\"$vcenter\"}, vcenter_datastore_name)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery",
          "qryType": 1
        },
        "definition": "label_values(vcenter_datastore_disk_utilization_percent{vcenter_server=~\"$vcenter\"}, vcenter_datastore_name)",
        "refresh": 2,
        "multi": true,
        "includeAll": true,
        "hide": 0,
        "regex": "",
        "sort": 1,
        "options": [],
        "current": {
          "text": "All",
          "value": "$__all"
        }
      }
    ]
  },
  "links": [
    {
      "title": "vSphere cluster overview",
      "type": "link",
      "url": "/d/vst-vsphere-cluster/vsphere-cluster-overview",
      "icon": "dashboard",
      "keepTime": true,
      "includeVars": false,
      "targetBlank": false,
      "asDropdown": false,
      "tags": []
    },
    {
      "title": "Tintri VMstore",
      "type": "link",
      "url": "/d/vst-tintri-vmstore/tintri-vmstore-performance-and-capacity",
      "icon": "dashboard",
      "keepTime": true,
      "includeVars": false,
      "targetBlank": false,
      "asDropdown": false,
      "tags": []
    },
    {
      "title": "VM end to end",
      "type": "link",
      "url": "/d/vst-vm-e2e/vm-end-to-end-guest-to-vmstore",
      "icon": "dashboard",
      "keepTime": true,
      "includeVars": false,
      "targetBlank": false,
      "asDropdown": false,
      "tags": []
    }
  ],
  "panels": [
    {
      "id": 1,
      "type": "stat",
      "title": "ESXi hosts in service",
      "description": "vcenter.cluster.host.count with effective=true: hosts HA/DRS can place VMs on. A drop without a maintenance window is the first thing to explain.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 0,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(vcenter_cluster_host_count{vcenter_server=~\"$vcenter\", vcenter_cluster_name=~\"$cluster\", effective=\"true\"})",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 2,
      "type": "stat",
      "title": "VMs powered on",
      "description": "vcenter.cluster.vm.count, power_state=on.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 4,
        "y": 0,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(vcenter_cluster_vm_count{vcenter_server=~\"$vcenter\", vcenter_cluster_name=~\"$cluster\", power_state=\"on\"})",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 3,
      "type": "stat",
      "title": "Cluster CPU used",
      "description": "Sum of host CPU usage over sum of host capacity (MHz). Sustained above 70 % leaves no room for an HA failover in a small cluster.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 8,
        "y": 0,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(vcenter_host_cpu_usage_MHz{vcenter_server=~\"$vcenter\", vcenter_cluster_name=~\"$cluster\", vcenter_host_name=~\"$host\"}) / sum(vcenter_host_cpu_capacity_MHz{vcenter_server=~\"$vcenter\", vcenter_cluster_name=~\"$cluster\", vcenter_host_name=~\"$host\"}) * 100",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 70
              },
              {
                "color": "red",
                "value": 85
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 1
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 4,
      "type": "stat",
      "title": "Cluster memory used",
      "description": "Average host memory utilization. Watch it together with ballooning and swapping on the VM side.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 0,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "avg(vcenter_host_memory_utilization_percent{vcenter_server=~\"$vcenter\", vcenter_cluster_name=~\"$cluster\", vcenter_host_name=~\"$host\"})",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 80
              },
              {
                "color": "red",
                "value": 90
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 1
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 5,
      "type": "stat",
      "title": "Fullest datastore",
      "description": "Highest vcenter.datastore.disk.utilization among the selected datastores. On Tintri NFS this is the VMstore's logical capacity as vCenter sees it.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 16,
        "y": 0,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(vcenter_datastore_disk_utilization_percent{vcenter_datastore_name=~\"$datastore\"})",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 75
              },
              {
                "color": "red",
                "value": 85
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 1
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 6,
      "type": "stat",
      "title": "Storage events (24h)",
      "description": "Count of parsed ESXi events from Loki (part 3 parser): APD, NFS disconnects and failed vMotions in the last 24 hours.",
      "datasource": {
        "type": "loki",
        "uid": "loki"
      },
      "gridPos": {
        "x": 20,
        "y": 0,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "loki"
          },
          "expr": "sum(count_over_time({service_name=\"esxi\"} | esx_event=~\"apd_start|apd_timeout|nfs_disconnect|vmotion_failure\" [24h]))",
          "refId": "A",
          "legendFormat": "__auto",
          "range": false,
          "instant": true,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#FF9830",
                "value": 1
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          }
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 7,
      "type": "timeseries",
      "title": "Host CPU utilization",
      "description": "vcenter.host.cpu.utilization per host. A single host far above its peers is a DRS or affinity-rule problem, not a capacity problem.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 4,
        "w": 12,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "vcenter_host_cpu_utilization_percent{vcenter_server=~\"$vcenter\", vcenter_cluster_name=~\"$cluster\", vcenter_host_name=~\"$host\"}",
          "refId": "A",
          "legendFormat": "{{vcenter_host_name}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 0,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "dashed"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "transparent",
                "value": null
              },
              {
                "color": "red",
                "value": 85
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "calcs": [
            "mean",
            "max"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 8,
      "type": "timeseries",
      "title": "Host memory utilization",
      "description": "vcenter.host.memory.utilization per host.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 4,
        "w": 12,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "vcenter_host_memory_utilization_percent{vcenter_server=~\"$vcenter\", vcenter_cluster_name=~\"$cluster\", vcenter_host_name=~\"$host\"}",
          "refId": "A",
          "legendFormat": "{{vcenter_host_name}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 0,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "dashed"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "transparent",
                "value": null
              },
              {
                "color": "red",
                "value": 90
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "calcs": [
            "mean",
            "max"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 9,
      "type": "row",
      "title": "Storage: datastores as vSphere sees them",
      "collapsed": false,
      "gridPos": {
        "x": 0,
        "y": 12,
        "w": 24,
        "h": 1
      },
      "panels": []
    },
    {
      "id": 10,
      "type": "bargauge",
      "title": "Datastore capacity used",
      "description": "vcenter.datastore.disk.utilization. 75 % amber, 85 % red; the space alert fires at 85 % for 30 minutes.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 13,
        "w": 8,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vcenter_datastore_name) (vcenter_datastore_disk_utilization_percent{vcenter_datastore_name=~\"$datastore\"})",
          "refId": "A",
          "legendFormat": "{{vcenter_datastore_name}}",
          "range": false,
          "instant": true,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "min": 0,
          "max": 100,
          "decimals": 1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 75
              },
              {
                "color": "red",
                "value": 85
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "links": [
            {
              "title": "Open the Tintri VMstore dashboard",
              "url": "/d/vst-tintri-vmstore/tintri-vmstore-performance-and-capacity?${__url_time_range}"
            }
          ]
        },
        "overrides": []
      },
      "options": {
        "orientation": "horizontal",
        "displayMode": "gradient",
        "showUnfilled": true,
        "valueMode": "color",
        "namePlacement": "top",
        "sizing": "auto",
        "minVizHeight": 16,
        "maxVizHeight": 40,
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        }
      }
    },
    {
      "id": 11,
      "type": "timeseries",
      "title": "NFS client latency per host and datastore (write)",
      "description": "datastore.totalWriteLatency.average per host and NFS datastore, from the PowerCLI bridge in the NFS latency post (the vcenter receiver does not collect it). One host above the rest means its path; all hosts together means the array or the shared network. The dashed line is ESXi's own 10 ms NFS deterioration threshold.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 8,
        "y": 13,
        "w": 16,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "avg_over_time(vsphere_host_datastore_latency_milliseconds{vcenter_cluster_name=~\"$cluster\", vcenter_host_name=~\"$host\", vcenter_datastore_name=~\"$datastore\", direction=\"write\"}[5m])",
          "refId": "A",
          "legendFormat": "{{vcenter_host_name}} / {{vcenter_datastore_name}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 0,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "dashed"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "transparent",
                "value": null
              },
              {
                "color": "#FF9830",
                "value": 10
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "calcs": [
            "mean",
            "max",
            "lastNotNull"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 12,
      "type": "row",
      "title": "Virtual machines",
      "collapsed": false,
      "gridPos": {
        "x": 0,
        "y": 21,
        "w": 24,
        "h": 1
      },
      "panels": []
    },
    {
      "id": 13,
      "type": "table",
      "title": "Top 10 VMs by virtual disk latency (10 min average)",
      "description": "vcenter.vm.disk.latency.avg, worst disk and direction per VM, averaged over 10 minutes. Click a VM to open it end to end.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 22,
        "w": 12,
        "h": 12
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "topk(10, max by (vcenter_vm_name, vcenter_host_name, vcenter_cluster_name) (avg_over_time(vcenter_vm_disk_latency_avg_milliseconds{vcenter_server=~\"$vcenter\", vcenter_cluster_name=~\"$cluster\", vcenter_host_name=~\"$host\"}[10m])))",
          "refId": "A",
          "legendFormat": "__auto",
          "range": false,
          "instant": true,
          "editorMode": "code",
          "format": "table"
        }
      ],
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true
            },
            "renameByName": {
              "vcenter_vm_name": "VM",
              "vcenter_host_name": "Host",
              "vcenter_cluster_name": "Cluster",
              "Value": "Latency"
            },
            "indexByName": {
              "vcenter_vm_name": 0,
              "vcenter_host_name": 1,
              "vcenter_cluster_name": 2,
              "Value": 3
            }
          }
        },
        {
          "id": "sortBy",
          "options": {
            "sort": [
              {
                "field": "Latency",
                "desc": true
              }
            ]
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": false
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 10
              },
              {
                "color": "red",
                "value": 20
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Latency"
            },
            "properties": [
              {
                "id": "unit",
                "value": "ms"
              },
              {
                "id": "decimals",
                "value": 1
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-background",
                  "mode": "gradient"
                }
              },
              {
                "id": "custom.width",
                "value": 110
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "VM"
            },
            "properties": [
              {
                "id": "links",
                "value": [
                  {
                    "title": "Open ${__value.text} end to end",
                    "url": "/d/vst-vm-e2e/vm-end-to-end-guest-to-vmstore?var-vm=${__value.raw}&${__url_time_range}"
                  }
                ]
              }
            ]
          }
        ]
      },
      "options": {
        "showHeader": true,
        "cellHeight": "sm",
        "footer": {
          "show": false
        }
      }
    },
    {
      "id": 14,
      "type": "timeseries",
      "title": "CPU ready by VM (top 8)",
      "description": "vcenter.vm.cpu.readiness: time the VM was ready to run but waited for a physical CPU. Above 5 % per vCPU is felt by users.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 22,
        "w": 12,
        "h": 12
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "vcenter_vm_cpu_readiness_percent{vcenter_server=~\"$vcenter\", vcenter_cluster_name=~\"$cluster\", vcenter_host_name=~\"$host\"} and on (vcenter_vm_name) topk(8, max by (vcenter_vm_name) (avg_over_time(vcenter_vm_cpu_readiness_percent{vcenter_server=~\"$vcenter\", vcenter_cluster_name=~\"$cluster\", vcenter_host_name=~\"$host\"}[$__range] @ end())))",
          "refId": "A",
          "legendFormat": "{{vcenter_vm_name}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 0,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "dashed"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "transparent",
                "value": null
              },
              {
                "color": "#FF9830",
                "value": 5
              }
            ]
          },
          "links": [
            {
              "title": "Open ${__field.labels.vcenter_vm_name} end to end",
              "url": "/d/vst-vm-e2e/vm-end-to-end-guest-to-vmstore?var-vm=${__field.labels.vcenter_vm_name}&${__url_time_range}"
            }
          ]
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "calcs": [
            "mean",
            "max"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 15,
      "type": "row",
      "title": "ESXi events from syslog (Loki)",
      "collapsed": false,
      "gridPos": {
        "x": 0,
        "y": 34,
        "w": 24,
        "h": 1
      },
      "panels": []
    },
    {
      "id": 16,
      "type": "timeseries",
      "title": "Storage and vMotion events by type",
      "description": "Parsed ESXi events per interval. APD and NFS disconnects should be zero; a vMotion failure during a storage incident usually means the switchover could not finish in time.",
      "datasource": {
        "type": "loki",
        "uid": "loki"
      },
      "gridPos": {
        "x": 0,
        "y": 35,
        "w": 10,
        "h": 9
      },
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "loki"
          },
          "expr": "sum by (esx_event) (count_over_time({service_name=\"esxi\"} | esx_event=~\"apd_start|apd_exit|apd_timeout|nfs_disconnect|nfs_restore|vmotion_failure\" [$__auto]))",
          "refId": "A",
          "legendFormat": "{{esx_event}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "bars",
            "lineWidth": 1,
            "fillOpacity": 80,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "normal",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "apd_start"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#F2495C"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "apd_timeout"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#C4162A"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "nfs_disconnect"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#FF9830"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "nfs_restore"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#73BF69"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "apd_exit"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#56A64B"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "vmotion_failure"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#B877D9"
                }
              }
            ]
          }
        ]
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "calcs": [
            "sum"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 17,
      "type": "logs",
      "title": "ESXi events: APD, NFS, vMotion, HA (fdm)",
      "datasource": {
        "type": "loki",
        "uid": "loki"
      },
      "description": "Raw lines behind the chart. HA agent (fdm) lines are matched by app name; the rest by the esx_event attribute set by the part 3 parser.",
      "gridPos": {
        "x": 10,
        "y": 35,
        "w": 14,
        "h": 9
      },
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "loki"
          },
          "refId": "A",
          "editorMode": "code",
          "queryType": "range",
          "expr": "{service_name=\"esxi\", host_name=~\"(?i)$host\"} | esx_event=~\"apd_.*|nfs_.*|vmotion_failure\" or appname=~\"(?i)fdm\" or detected_level=~\"warn|error\" | keep host_name, esx_event, detected_level"
        }
      ],
      "options": {
        "showTime": true,
        "showLabels": false,
        "showCommonLabels": false,
        "wrapLogMessage": true,
        "prettifyLogMessage": false,
        "enableLogDetails": true,
        "dedupStrategy": "none",
        "sortOrder": "Descending",
        "enableInfiniteScrolling": false
      }
    }
  ]
}

tintri-vmstore.json

Show code: tintri-vmstore.json (2141 lines)
{
  "uid": "vst-tintri-vmstore",
  "title": "Tintri VMstore: performance and capacity",
  "description": "Tintri VMstore REST API v310 through tintri_exporter and the OpenTelemetry Collector. vmwareblogs.co.in post 29.",
  "tags": [
    "tintri",
    "vmstore",
    "opentelemetry"
  ],
  "editable": true,
  "graphTooltip": 1,
  "timezone": "browser",
  "schemaVersion": 42,
  "version": 1,
  "refresh": "1m",
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "fiscalYearStartMonth": 0,
  "liveNow": false,
  "timepicker": {
    "refresh_intervals": [
      "30s",
      "1m",
      "5m",
      "15m"
    ]
  },
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      },
      {
        "datasource": {
          "type": "loki",
          "uid": "loki"
        },
        "enable": true,
        "hide": false,
        "iconColor": "#F2495C",
        "name": "ESXi storage and vMotion events",
        "target": {
          "refId": "Anno",
          "queryType": "range",
          "editorMode": "code",
          "expr": "{service_name=\"esxi\"} | esx_event=~\"apd_start|apd_timeout|nfs_disconnect|vmotion_failure\""
        },
        "titleFormat": "{{esx_event}} on {{host_name}}",
        "textFormat": "",
        "instant": false
      }
    ]
  },
  "templating": {
    "list": [
      {
        "name": "vmstore",
        "label": "VMstore",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "query": {
          "query": "label_values(tintri_up, vmstore)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery",
          "qryType": 1
        },
        "definition": "label_values(tintri_up, vmstore)",
        "refresh": 2,
        "multi": true,
        "includeAll": true,
        "hide": 0,
        "regex": "",
        "sort": 1,
        "options": [],
        "current": {
          "text": "All",
          "value": "$__all"
        }
      }
    ]
  },
  "links": [
    {
      "title": "vSphere cluster overview",
      "type": "link",
      "url": "/d/vst-vsphere-cluster/vsphere-cluster-overview",
      "icon": "dashboard",
      "keepTime": true,
      "includeVars": false,
      "targetBlank": false,
      "asDropdown": false,
      "tags": []
    },
    {
      "title": "Tintri VMstore",
      "type": "link",
      "url": "/d/vst-tintri-vmstore/tintri-vmstore-performance-and-capacity",
      "icon": "dashboard",
      "keepTime": true,
      "includeVars": false,
      "targetBlank": false,
      "asDropdown": false,
      "tags": []
    },
    {
      "title": "VM end to end",
      "type": "link",
      "url": "/d/vst-vm-e2e/vm-end-to-end-guest-to-vmstore",
      "icon": "dashboard",
      "keepTime": true,
      "includeVars": false,
      "targetBlank": false,
      "asDropdown": false,
      "tags": []
    }
  ],
  "panels": [
    {
      "id": 1,
      "type": "stat",
      "title": "Exporter up",
      "description": "tintri_up: 1 when the last poll of every selected VMstore succeeded. 0 means login, network or API errors; check the exporter log.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 0,
        "w": 3,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "min(tintri_up{vmstore=~\"$vmstore\"})",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "green",
                "value": 1
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "type": "value",
              "options": {
                "0": {
                  "text": "DOWN"
                },
                "1": {
                  "text": "UP"
                }
              }
            }
          ]
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 2,
      "type": "stat",
      "title": "Total IOPS",
      "description": "operationsTotalIops from the newest real-time datastore slice.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 3,
        "y": 0,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(tintri_datastore_iops{vmstore=~\"$vmstore\", op=\"total\"})",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "short",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 3,
      "type": "stat",
      "title": "Throughput",
      "description": "throughputTotalMBps (decimal MB/s, as the VMstore reports it).",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 7,
        "y": 0,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(tintri_datastore_throughput_mbps{vmstore=~\"$vmstore\", op=\"total\"})",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "MBs",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 4,
      "type": "stat",
      "title": "Latency (VMstore total)",
      "description": "latencyTotalMs for the whole VMstore, IOPS-weighted by the array. Read it with the component breakdown below.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 11,
        "y": 0,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(tintri_datastore_latency_ms{vmstore=~\"$vmstore\", component=\"total\"})",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 5
              },
              {
                "color": "red",
                "value": 10
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 5,
      "type": "stat",
      "title": "Flash hit",
      "description": "flashHitPercent: reads and writes served from flash. A falling ratio with rising disk latency means the working set outgrew flash.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 15,
        "y": 0,
        "w": 3,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "min(tintri_datastore_flash_hit_percent{vmstore=~\"$vmstore\"})",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 90
              },
              {
                "color": "green",
                "value": 95
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 1
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 6,
      "type": "stat",
      "title": "Space used",
      "description": "spaceUsedGiB / spaceTotalGiB (logical) for the fullest selected VMstore.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 18,
        "y": 0,
        "w": 3,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(tintri_datastore_space_gib{vmstore=~\"$vmstore\", kind=\"used\"} / ignoring(kind) tintri_datastore_space_gib{vmstore=~\"$vmstore\", kind=\"total\"} * 100)",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 75
              },
              {
                "color": "red",
                "value": 85
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 1
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 7,
      "type": "stat",
      "title": "Days to full",
      "description": "spaceRemainingDays: the VMstore's own estimate from recent growth. Compare with your procurement lead time.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 21,
        "y": 0,
        "w": 3,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "min(tintri_datastore_space_remaining_days{vmstore=~\"$vmstore\"})",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "d",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 30
              },
              {
                "color": "green",
                "value": 90
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 8,
      "type": "timeseries",
      "title": "Latency by component (stacked) and total",
      "description": "The VMstore splits latency into host, network, storage (which includes disk), QoS contention and QoS throttle. Stacked so the dominant component is obvious; the white line is latencyTotalMs, plotted separately because Tintri documents it as the maximum host and network latency, not as a sum. Check that they agree on your TxOS before you alert on the parts.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 4,
        "w": 14,
        "h": 9
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (component) (avg_over_time(tintri_datastore_latency_ms{vmstore=~\"$vmstore\", component=~\"host|network|storage|contention|throttle\"}[$__interval]))",
          "refId": "A",
          "legendFormat": "{{component}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(avg_over_time(tintri_datastore_latency_ms{vmstore=~\"$vmstore\", component=\"total\"}[$__interval]))",
          "refId": "B",
          "legendFormat": "total (latencyTotalMs)",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 35,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "normal",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "host"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#5794F2"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "network"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#B877D9"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "storage"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#73BF69"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "contention"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#FF9830"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "throttle"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#F2495C"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "total (latencyTotalMs)"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#E0E0E0"
                }
              },
              {
                "id": "custom.stacking",
                "value": {
                  "mode": "none",
                  "group": "B"
                }
              },
              {
                "id": "custom.fillOpacity",
                "value": 0
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "fill": "dash",
                  "dash": [
                    10,
                    6
                  ]
                }
              }
            ]
          }
        ]
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "calcs": [
            "mean",
            "max",
            "lastNotNull"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 9,
      "type": "timeseries",
      "title": "IOPS read / write",
      "description": "operationsReadIops and operationsWriteIops. A write-heavy step change with a matching contention rise is the classic noisy neighbour.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 14,
        "y": 4,
        "w": 10,
        "h": 9
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (op) (tintri_datastore_iops{vmstore=~\"$vmstore\", op=~\"read|write\"})",
          "refId": "A",
          "legendFormat": "{{op}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "short",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 30,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "normal",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "read"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#5794F2"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "write"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#FF9830"
                }
              }
            ]
          }
        ]
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true,
          "calcs": [
            "mean",
            "max"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 10,
      "type": "timeseries",
      "title": "Throughput read / write",
      "description": "throughputReadMBps / throughputWriteMBps. Large-block jobs (backup, ETL) show here long before they show in IOPS.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 13,
        "w": 8,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (op) (tintri_datastore_throughput_mbps{vmstore=~\"$vmstore\", op=~\"read|write\"})",
          "refId": "A",
          "legendFormat": "{{op}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "MBs",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 30,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "normal",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "read"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#5794F2"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "write"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#FF9830"
                }
              }
            ]
          }
        ]
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true,
          "calcs": [
            "mean",
            "max"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 11,
      "type": "timeseries",
      "title": "Flash hit ratio",
      "description": "flashHitPercent. On an all-flash model it stays near 100; on hybrid models a drop below the mid-90s usually comes with rising disk latency.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 8,
        "y": 13,
        "w": 8,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "tintri_datastore_flash_hit_percent{vmstore=~\"$vmstore\"}",
          "refId": "A",
          "legendFormat": "{{vmstore}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": null,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "transparent",
                "value": null
              },
              {
                "color": "transparent",
                "value": 95
              }
            ]
          },
          "decimals": 1
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true,
          "calcs": [
            "mean",
            "min"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 12,
      "type": "timeseries",
      "title": "Capacity: used vs total (logical)",
      "description": "spaceUsedGiB against spaceTotalGiB, in GiB.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 16,
        "y": 13,
        "w": 8,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (kind) (tintri_datastore_space_gib{vmstore=~\"$vmstore\", kind=~\"used|total\"})",
          "refId": "A",
          "legendFormat": "{{kind}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "gbytes",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "total"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#8E8E8E"
                }
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "fill": "dash",
                  "dash": [
                    10,
                    6
                  ]
                }
              },
              {
                "id": "custom.fillOpacity",
                "value": 0
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "used"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#5794F2"
                }
              }
            ]
          }
        ]
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true,
          "calcs": [
            "lastNotNull"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 13,
      "type": "row",
      "title": "Per-VM view",
      "collapsed": false,
      "gridPos": {
        "x": 0,
        "y": 21,
        "w": 24,
        "h": 1
      },
      "panels": []
    },
    {
      "id": 14,
      "type": "table",
      "title": "Top 10 VMs by VMstore latency, with the breakdown",
      "description": "tintri_vm_latency_ms per component for the ten VMs with the highest latencyTotalMs. Click a VM to see it end to end.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 22,
        "w": 14,
        "h": 13
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vm, component) (tintri_vm_latency_ms{vmstore=~\"$vmstore\", component=~\"host|network|storage|contention|throttle|total\"}) and on (vm) topk(10, max by (vm) (tintri_vm_latency_ms{vmstore=~\"$vmstore\", component=\"total\"}))",
          "refId": "A",
          "legendFormat": "__auto",
          "range": false,
          "instant": true,
          "editorMode": "code",
          "format": "table"
        }
      ],
      "transformations": [
        {
          "id": "groupingToMatrix",
          "options": {
            "columnField": "component",
            "rowField": "vm",
            "valueField": "Value",
            "emptyValue": "zero"
          }
        },
        {
          "id": "organize",
          "options": {
            "renameByName": {
              "vm\\component": "VM"
            },
            "indexByName": {
              "vm\\component": 0,
              "total": 1,
              "host": 2,
              "network": 3,
              "storage": 4,
              "contention": 5,
              "throttle": 6
            }
          }
        },
        {
          "id": "sortBy",
          "options": {
            "sort": [
              {
                "field": "total",
                "desc": true
              }
            ]
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "decimals": 2,
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": false,
            "width": 104
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 5
              },
              {
                "color": "red",
                "value": 10
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "total"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-background",
                  "mode": "gradient"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "throttle"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "contention"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "VM"
            },
            "properties": [
              {
                "id": "unit",
                "value": "string"
              },
              {
                "id": "custom.width",
                "value": 150
              },
              {
                "id": "links",
                "value": [
                  {
                    "title": "Open ${__value.text} end to end",
                    "url": "/d/vst-vm-e2e/vm-end-to-end-guest-to-vmstore?var-vm=${__value.raw}&${__url_time_range}"
                  }
                ]
              }
            ]
          }
        ]
      },
      "options": {
        "showHeader": true,
        "cellHeight": "sm",
        "footer": {
          "show": false
        }
      }
    },
    {
      "id": 15,
      "type": "timeseries",
      "title": "QoS throttle latency by VM",
      "description": "latencyThrottleMs: time a VM spends waiting because a QoS maximum is holding it back. Non-zero means a ceiling is active; it is the intended effect on a noisy VM and a self-inflicted problem anywhere else.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 14,
        "y": 22,
        "w": 10,
        "h": 13
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vm) (tintri_vm_latency_ms{vmstore=~\"$vmstore\", component=\"throttle\"}) > 0",
          "refId": "A",
          "legendFormat": "{{vm}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 20,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "dashed"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "transparent",
                "value": null
              },
              {
                "color": "red",
                "value": 5
              }
            ]
          },
          "links": [
            {
              "title": "Open ${__field.labels.vm} end to end",
              "url": "/d/vst-vm-e2e/vm-end-to-end-guest-to-vmstore?var-vm=${__field.labels.vm}&${__url_time_range}"
            }
          ]
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true,
          "calcs": [
            "mean",
            "max",
            "lastNotNull"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 16,
      "type": "timeseries",
      "title": "Contention latency by VM (top 6)",
      "description": "latencyContentionMs: queueing behind other work on the VMstore. When many VMs rise together, look for the VM whose IOPS rose first (next panel).",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 35,
        "w": 12,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vm) (tintri_vm_latency_ms{vmstore=~\"$vmstore\", component=\"contention\"}) and on (vm) topk(6, max by (vm) (max_over_time(tintri_vm_latency_ms{vmstore=~\"$vmstore\", component=\"contention\"}[$__range] @ end())))",
          "refId": "A",
          "legendFormat": "{{vm}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "links": [
            {
              "title": "Open ${__field.labels.vm} end to end",
              "url": "/d/vst-vm-e2e/vm-end-to-end-guest-to-vmstore?var-vm=${__field.labels.vm}&${__url_time_range}"
            }
          ]
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "calcs": [
            "mean",
            "max"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 17,
      "type": "timeseries",
      "title": "Top 6 VMs by normalized IOPS",
      "description": "normalizedTotalIops, the unit Tintri QoS limits are set in (larger I/Os count as several normalized operations). The noisy neighbour is usually at the top of this list.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 35,
        "w": 12,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vm) (tintri_vm_normalized_iops{vmstore=~\"$vmstore\"}) and on (vm) topk(6, max by (vm) (max_over_time(tintri_vm_normalized_iops{vmstore=~\"$vmstore\"}[$__range] @ end())))",
          "refId": "A",
          "legendFormat": "{{vm}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "short",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "links": [
            {
              "title": "Open ${__field.labels.vm} end to end",
              "url": "/d/vst-vm-e2e/vm-end-to-end-guest-to-vmstore?var-vm=${__field.labels.vm}&${__url_time_range}"
            }
          ]
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "calcs": [
            "mean",
            "max"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 18,
      "type": "table",
      "title": "VMs with a QoS maximum set",
      "description": "tintri_vm_qos_max_normalized_iops > 0 (from qosConfig.maxNormalizedIops), with current normalized IOPS and throttle latency. A ceiling left on a VM after an incident is a common cause of a slow VM months later.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 43,
        "w": 24,
        "h": 6
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vmstore, vm) (tintri_vm_qos_max_normalized_iops{vmstore=~\"$vmstore\"}) > 0",
          "refId": "A",
          "legendFormat": "__auto",
          "range": false,
          "instant": true,
          "editorMode": "code",
          "format": "table"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vmstore, vm) (tintri_vm_normalized_iops{vmstore=~\"$vmstore\"}) and on (vm) (tintri_vm_qos_max_normalized_iops{vmstore=~\"$vmstore\"} > 0)",
          "refId": "B",
          "legendFormat": "__auto",
          "range": false,
          "instant": true,
          "editorMode": "code",
          "format": "table"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vmstore, vm) (tintri_vm_latency_ms{vmstore=~\"$vmstore\", component=\"throttle\"}) and on (vm) (tintri_vm_qos_max_normalized_iops{vmstore=~\"$vmstore\"} > 0)",
          "refId": "C",
          "legendFormat": "__auto",
          "range": false,
          "instant": true,
          "editorMode": "code",
          "format": "table"
        }
      ],
      "transformations": [
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true
            },
            "renameByName": {
              "vmstore": "VMstore",
              "vm": "VM",
              "Value #A": "QoS max (normalized IOPS)",
              "Value #B": "Normalized IOPS now",
              "Value #C": "Throttle latency"
            }
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": false
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Throttle latency"
            },
            "properties": [
              {
                "id": "unit",
                "value": "ms"
              },
              {
                "id": "decimals",
                "value": 1
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "red",
                      "value": 5
                    }
                  ]
                }
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-background",
                  "mode": "gradient"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Normalized IOPS now"
            },
            "properties": [
              {
                "id": "decimals",
                "value": 0
              }
            ]
          }
        ]
      },
      "options": {
        "showHeader": true,
        "cellHeight": "sm",
        "footer": {
          "show": false
        }
      }
    },
    {
      "id": 19,
      "type": "row",
      "title": "Appliance",
      "collapsed": false,
      "gridPos": {
        "x": 0,
        "y": 49,
        "w": 24,
        "h": 1
      },
      "panels": []
    },
    {
      "id": 20,
      "type": "table",
      "title": "Appliances",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "description": "Model and TxOS from appliance/default/info; file system state and unread alerts from operationalStatus; performance reserve from statsSummary.",
      "gridPos": {
        "x": 0,
        "y": 50,
        "w": 24,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vmstore, vcenter_datastore_name, model, txos_version) (tintri_appliance_version{vmstore=~\"$vmstore\"})",
          "refId": "A",
          "legendFormat": "__auto",
          "range": false,
          "instant": true,
          "editorMode": "code",
          "format": "table"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vmstore) (tintri_appliance_filesystem_up{vmstore=~\"$vmstore\"})",
          "refId": "B",
          "legendFormat": "__auto",
          "range": false,
          "instant": true,
          "editorMode": "code",
          "format": "table"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vmstore) (tintri_appliance_alerts_unread{vmstore=~\"$vmstore\"})",
          "refId": "C",
          "legendFormat": "__auto",
          "range": false,
          "instant": true,
          "editorMode": "code",
          "format": "table"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vmstore) (tintri_datastore_performance_reserve_used_percent{vmstore=~\"$vmstore\"})",
          "refId": "D",
          "legendFormat": "__auto",
          "range": false,
          "instant": true,
          "editorMode": "code",
          "format": "table"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vmstore) (tintri_datastore_vms{vmstore=~\"$vmstore\"})",
          "refId": "E",
          "legendFormat": "__auto",
          "range": false,
          "instant": true,
          "editorMode": "code",
          "format": "table"
        }
      ],
      "transformations": [
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Value #A": true
            },
            "renameByName": {
              "vmstore": "VMstore",
              "vcenter_datastore_name": "vSphere datastore",
              "model": "Model",
              "txos_version": "TxOS",
              "Value #B": "File system",
              "Value #C": "Unread alerts",
              "Value #D": "Perf. reserve used",
              "Value #E": "VMs"
            }
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": false
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "File system"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "type": "value",
                    "options": {
                      "1": {
                        "text": "UP",
                        "color": "green"
                      },
                      "0": {
                        "text": "DOWN",
                        "color": "red"
                      }
                    }
                  }
                ]
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Perf. reserve used"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "gauge",
                  "mode": "basic",
                  "valueDisplayMode": "text"
                }
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 100
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "#EAB839",
                      "value": 80
                    },
                    {
                      "color": "red",
                      "value": 95
                    }
                  ]
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Unread alerts"
            },
            "properties": [
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "#FF9830",
                      "value": 1
                    }
                  ]
                }
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          }
        ]
      },
      "options": {
        "showHeader": true,
        "cellHeight": "sm",
        "footer": {
          "show": false
        }
      }
    }
  ]
}

vm-end-to-end.json

Show code: vm-end-to-end.json (1488 lines)
{
  "uid": "vst-vm-e2e",
  "title": "VM end to end: guest to VMstore",
  "description": "One VM through vSphere, the ESXi NFS client and the Tintri VMstore. vmwareblogs.co.in post 29.",
  "tags": [
    "vsphere",
    "tintri",
    "correlation",
    "opentelemetry"
  ],
  "editable": true,
  "graphTooltip": 1,
  "timezone": "browser",
  "schemaVersion": 42,
  "version": 1,
  "refresh": "1m",
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "fiscalYearStartMonth": 0,
  "liveNow": false,
  "timepicker": {
    "refresh_intervals": [
      "30s",
      "1m",
      "5m",
      "15m"
    ]
  },
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      },
      {
        "datasource": {
          "type": "loki",
          "uid": "loki"
        },
        "enable": true,
        "hide": false,
        "iconColor": "#F2495C",
        "name": "ESXi storage and vMotion events",
        "target": {
          "refId": "Anno",
          "queryType": "range",
          "editorMode": "code",
          "expr": "{service_name=\"esxi\"} | esx_event=~\"apd_start|apd_timeout|nfs_disconnect|vmotion_failure\""
        },
        "titleFormat": "{{esx_event}} on {{host_name}}",
        "textFormat": "",
        "instant": false
      }
    ]
  },
  "templating": {
    "list": [
      {
        "name": "cluster",
        "label": "Cluster",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "query": {
          "query": "label_values(vcenter_vm_cpu_utilization_percent, vcenter_cluster_name)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery",
          "qryType": 1
        },
        "definition": "label_values(vcenter_vm_cpu_utilization_percent, vcenter_cluster_name)",
        "refresh": 2,
        "multi": true,
        "includeAll": true,
        "hide": 0,
        "regex": "",
        "sort": 1,
        "options": [],
        "current": {
          "text": "All",
          "value": "$__all"
        }
      },
      {
        "name": "vm",
        "label": "VM",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "query": {
          "query": "label_values(vcenter_vm_cpu_utilization_percent{vcenter_cluster_name=~\"$cluster\"}, vcenter_vm_name)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery",
          "qryType": 1
        },
        "definition": "label_values(vcenter_vm_cpu_utilization_percent{vcenter_cluster_name=~\"$cluster\"}, vcenter_vm_name)",
        "refresh": 2,
        "multi": false,
        "includeAll": false,
        "hide": 0,
        "regex": "",
        "sort": 1,
        "options": [],
        "current": {
          "text": "app-db-01",
          "value": "app-db-01"
        }
      },
      {
        "name": "host",
        "label": "ESXi host",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "query": {
          "query": "label_values(vcenter_vm_cpu_utilization_percent{vcenter_vm_name=\"$vm\"}, vcenter_host_name)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery",
          "qryType": 1
        },
        "definition": "label_values(vcenter_vm_cpu_utilization_percent{vcenter_vm_name=\"$vm\"}, vcenter_host_name)",
        "refresh": 2,
        "multi": false,
        "includeAll": false,
        "hide": 0,
        "regex": "",
        "sort": 1,
        "options": [],
        "current": {}
      },
      {
        "name": "datastore",
        "label": "Datastore",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "query": {
          "query": "label_values(vsphere_vm_disk_info{vcenter_vm_name=\"$vm\"}, vcenter_datastore_name)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery",
          "qryType": 1
        },
        "definition": "label_values(vsphere_vm_disk_info{vcenter_vm_name=\"$vm\"}, vcenter_datastore_name)",
        "refresh": 2,
        "multi": false,
        "includeAll": false,
        "hide": 0,
        "regex": "",
        "sort": 1,
        "options": [],
        "current": {}
      },
      {
        "name": "vmstore",
        "label": "VMstore",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "query": {
          "query": "label_values(tintri_datastore_iops{vcenter_datastore_name=\"$datastore\"}, vmstore)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery",
          "qryType": 1
        },
        "definition": "label_values(tintri_datastore_iops{vcenter_datastore_name=\"$datastore\"}, vmstore)",
        "refresh": 2,
        "multi": false,
        "includeAll": false,
        "hide": 2,
        "regex": "",
        "sort": 1,
        "options": [],
        "current": {}
      }
    ]
  },
  "links": [
    {
      "title": "vSphere cluster overview",
      "type": "link",
      "url": "/d/vst-vsphere-cluster/vsphere-cluster-overview",
      "icon": "dashboard",
      "keepTime": true,
      "includeVars": false,
      "targetBlank": false,
      "asDropdown": false,
      "tags": []
    },
    {
      "title": "Tintri VMstore",
      "type": "link",
      "url": "/d/vst-tintri-vmstore/tintri-vmstore-performance-and-capacity",
      "icon": "dashboard",
      "keepTime": true,
      "includeVars": false,
      "targetBlank": false,
      "asDropdown": false,
      "tags": []
    },
    {
      "title": "VM end to end",
      "type": "link",
      "url": "/d/vst-vm-e2e/vm-end-to-end-guest-to-vmstore",
      "icon": "dashboard",
      "keepTime": true,
      "includeVars": false,
      "targetBlank": false,
      "asDropdown": false,
      "tags": []
    }
  ],
  "panels": [
    {
      "id": 1,
      "type": "text",
      "title": "",
      "gridPos": {
        "x": 0,
        "y": 0,
        "w": 24,
        "h": 2
      },
      "transparent": true,
      "options": {
        "mode": "markdown",
        "content": "**$vm** on **$host** &nbsp;\u2192&nbsp; datastore **$datastore** &nbsp;\u2192&nbsp; VMstore **$vmstore**. Read left to right: what the VM sees in vSphere, what the host's NFS client sees for that datastore, what the VMstore measures for the whole appliance and for this VM. The layer where the number first jumps is the layer to investigate."
      }
    },
    {
      "id": 2,
      "type": "stat",
      "title": "vSphere: VM disk latency",
      "description": "Worst virtual disk, worst direction, 10 min average (vcenter.vm.disk.latency.avg). This is what the guest experiences, plus guest queueing.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 2,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(avg_over_time(vcenter_vm_disk_latency_avg_milliseconds{vcenter_vm_name=\"$vm\"}[10m]))",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 10
              },
              {
                "color": "red",
                "value": 20
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 3,
      "type": "stat",
      "title": "ESXi NFS client: host to datastore",
      "description": "datastore.total*Latency.average for this host and this datastore (bridge metric).",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 4,
        "y": 2,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(avg_over_time(vsphere_host_datastore_latency_milliseconds{vcenter_host_name=\"$host\", vcenter_datastore_name=\"$datastore\"}[10m]))",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 10
              },
              {
                "color": "red",
                "value": 20
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 4,
      "type": "stat",
      "title": "VMstore: appliance latency",
      "description": "latencyTotalMs for the whole VMstore behind this datastore.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 8,
        "y": 2,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(avg_over_time(tintri_datastore_latency_ms{vcenter_datastore_name=\"$datastore\", component=\"total\"}[10m]))",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 5
              },
              {
                "color": "red",
                "value": 10
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2,
          "links": [
            {
              "title": "Open the Tintri VMstore dashboard",
              "url": "/d/vst-tintri-vmstore/tintri-vmstore-performance-and-capacity?var-vmstore=$vmstore&${__url_time_range}"
            }
          ]
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 5,
      "type": "stat",
      "title": "VMstore: this VM",
      "description": "latencyTotalMs for this VM as the VMstore measures it.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 2,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(avg_over_time(tintri_vm_latency_ms{vm=\"$vm\", component=\"total\"}[10m]))",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 5
              },
              {
                "color": "red",
                "value": 10
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 6,
      "type": "stat",
      "title": "QoS throttle on this VM",
      "description": "latencyThrottleMs. Anything above zero means a QoS maximum is slowing this VM down.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 16,
        "y": 2,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(avg_over_time(tintri_vm_latency_ms{vm=\"$vm\", component=\"throttle\"}[10m]))",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#FF9830",
                "value": 0.5
              },
              {
                "color": "red",
                "value": 5
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 7,
      "type": "stat",
      "title": "CPU ready",
      "description": "Rules out the CPU before you blame storage.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 20,
        "y": 2,
        "w": 4,
        "h": 4
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(avg_over_time(vcenter_vm_cpu_readiness_percent{vcenter_vm_name=\"$vm\"}[10m]))",
          "refId": "A",
          "legendFormat": "__auto",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 5
              },
              {
                "color": "red",
                "value": 10
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "decimals": 1
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "textMode": "value",
        "orientation": "auto",
        "wideLayout": true,
        "showPercentChange": false
      }
    },
    {
      "id": 8,
      "type": "timeseries",
      "title": "Latency at every layer, same clock",
      "description": "One VM's I/O measured at four points. If 1 rises and 4 does not, the time is being added in ESXi or the network. If 4 rises with 3, the VMstore is busy for everyone; if 4 rises alone, look at this VM's own breakdown and QoS.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 6,
        "w": 24,
        "h": 9
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(vcenter_vm_disk_latency_avg_milliseconds{vcenter_vm_name=\"$vm\", direction=\"write\"})",
          "refId": "A",
          "legendFormat": "1 vSphere VM disk (write)",
          "range": true,
          "instant": false,
          "editorMode": "code"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(vsphere_host_datastore_latency_milliseconds{vcenter_host_name=\"$host\", vcenter_datastore_name=\"$datastore\", direction=\"write\"})",
          "refId": "B",
          "legendFormat": "2 ESXi NFS client, host to datastore (write)",
          "range": true,
          "instant": false,
          "editorMode": "code"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(tintri_datastore_latency_ms{vcenter_datastore_name=\"$datastore\", component=\"total\"})",
          "refId": "C",
          "legendFormat": "3 VMstore appliance total",
          "range": true,
          "instant": false,
          "editorMode": "code"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(tintri_vm_latency_ms{vm=\"$vm\", component=\"total\"})",
          "refId": "D",
          "legendFormat": "4 VMstore, this VM",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 0,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "1 vSphere VM disk (write)"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#F2CC0C"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "2 ESXi NFS client, host to datastore (write)"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#FF9830"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "3 VMstore appliance total"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#8AB8FF"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "4 VMstore, this VM"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#73BF69"
                }
              }
            ]
          }
        ]
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true,
          "calcs": [
            "mean",
            "max",
            "lastNotNull"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 9,
      "type": "timeseries",
      "title": "VMstore latency breakdown for $vm",
      "description": "The same component split as the VMstore UI, for this VM only.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 15,
        "w": 12,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (component) (tintri_vm_latency_ms{vm=\"$vm\", component=~\"host|network|storage|contention|throttle\"})",
          "refId": "A",
          "legendFormat": "{{component}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 40,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "normal",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "host"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#5794F2"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "network"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#B877D9"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "storage"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#73BF69"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "contention"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#FF9830"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "throttle"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#F2495C"
                }
              }
            ]
          }
        ]
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "calcs": [
            "mean",
            "max"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 10,
      "type": "timeseries",
      "title": "IOPS and the QoS ceiling",
      "description": "Raw and normalized IOPS for the VM, with its QoS ceiling if one is set. Normalized IOPS flat against the red line is throttling.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 15,
        "w": 12,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(tintri_vm_iops{vm=\"$vm\", op=\"total\"})",
          "refId": "A",
          "legendFormat": "VMstore operationsTotalIops",
          "range": true,
          "instant": false,
          "editorMode": "code"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(tintri_vm_normalized_iops{vm=\"$vm\"})",
          "refId": "B",
          "legendFormat": "VMstore normalized IOPS",
          "range": true,
          "instant": false,
          "editorMode": "code"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max(tintri_vm_qos_max_normalized_iops{vm=\"$vm\"}) > 0",
          "refId": "C",
          "legendFormat": "QoS max (normalized)",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "short",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "QoS max (normalized)"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#F2495C"
                }
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "fill": "dash",
                  "dash": [
                    10,
                    6
                  ]
                }
              },
              {
                "id": "custom.fillOpacity",
                "value": 0
              }
            ]
          }
        ]
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "calcs": [
            "mean",
            "max",
            "lastNotNull"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 11,
      "type": "timeseries",
      "title": "Neighbours on the same VMstore: top 5 by normalized IOPS",
      "description": "When this VM's contention latency rises, the cause is usually on this list.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 23,
        "w": 12,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (vm) (tintri_vm_normalized_iops{vcenter_datastore_name=\"$datastore\"}) and on (vm) topk(5, max by (vm) (max_over_time(tintri_vm_normalized_iops{vcenter_datastore_name=\"$datastore\"}[$__range] @ end())))",
          "refId": "A",
          "legendFormat": "{{vm}}",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "short",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "links": [
            {
              "title": "Open ${__field.labels.vm} end to end",
              "url": "/d/vst-vm-e2e/vm-end-to-end-guest-to-vmstore?var-vm=${__field.labels.vm}&${__url_time_range}"
            }
          ]
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "calcs": [
            "mean",
            "max"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 12,
      "type": "timeseries",
      "title": "Throughput: vSphere vs VMstore",
      "description": "vcenter.vm.disk.throughput is KiB/s per virtual disk; the VMstore reports decimal MB/s. The two should track each other; a gap means I/O the VMstore does not attribute to this VM (or the reverse).",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 23,
        "w": 12,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(vcenter_vm_disk_throughput{vcenter_vm_name=\"$vm\"}) / 1024",
          "refId": "A",
          "legendFormat": "vSphere virtual disks (MiB/s)",
          "range": true,
          "instant": false,
          "editorMode": "code"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(tintri_vm_throughput_mbps{vm=\"$vm\", op=\"total\"})",
          "refId": "B",
          "legendFormat": "VMstore (MB/s)",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "short",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "calcs": [
            "mean",
            "max"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 13,
      "type": "row",
      "title": "Host context",
      "collapsed": false,
      "gridPos": {
        "x": 0,
        "y": 31,
        "w": 24,
        "h": 1
      },
      "panels": []
    },
    {
      "id": 14,
      "type": "timeseries",
      "title": "$host CPU and memory",
      "description": "The host the VM runs on now.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 32,
        "w": 10,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "vcenter_host_cpu_utilization_percent{vcenter_host_name=\"$host\"}",
          "refId": "A",
          "legendFormat": "CPU",
          "range": true,
          "instant": false,
          "editorMode": "code"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "vcenter_host_memory_utilization_percent{vcenter_host_name=\"$host\"}",
          "refId": "B",
          "legendFormat": "Memory",
          "range": true,
          "instant": false,
          "editorMode": "code"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "gradientMode": "opacity",
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            },
            "axisSoftMin": 0,
            "lineInterpolation": "smooth",
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true,
          "calcs": [
            "mean",
            "max"
          ],
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 15,
      "type": "logs",
      "title": "ESXi log lines from $host (storage, vMotion, warnings)",
      "datasource": {
        "type": "loki",
        "uid": "loki"
      },
      "gridPos": {
        "x": 10,
        "y": 32,
        "w": 14,
        "h": 8
      },
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "loki"
          },
          "refId": "A",
          "editorMode": "code",
          "queryType": "range",
          "expr": "{service_name=\"esxi\", host_name=~\"(?i)$host\"} | detected_level=~\"warn|error\" or esx_event=~\".+\" | keep host_name, esx_event, detected_level"
        }
      ],
      "options": {
        "showTime": true,
        "showLabels": false,
        "showCommonLabels": false,
        "wrapLogMessage": true,
        "enableLogDetails": true,
        "dedupStrategy": "none",
        "sortOrder": "Descending"
      }
    }
  ]
}

15. What’s next

With the three dashboards in place the next steps are about using them. If you are new to the series, start with part 1 for why OpenTelemetry fits a vSphere shop, then part 6, which extends this end-to-end view upwards from an application trace to the datastore. VCF Operations vs OpenTelemetry and Grafana covers when this stack replaces VCF Operations and when it sits beside it, and the PowerCLI config generator builds one collector config per vCenter if you have several.

On the Tintri side, the six-part VMware, Tintri and Cisco series is the platform this monitors: reference architecture, network design, VMstore for vSphere, ESXi host build, the troubleshooting runbook and day 2 operations. The API guides go deeper on what the exporter calls: the VMstore REST API, Tintri Global Center, the vSphere Automation API, VCF 9 with Tintri NFS, the design guide and API-driven troubleshooting, which turns the questions dashboard 3 raises into scripted checks. For Kubernetes on the same storage, see the solutions architect design guide and the deploy workflow.

The August posts are the scripted versions of several panels here, and worth keeping for the days Grafana is not where you are: per-VM latency from the VMstore REST API, correlating vSphere and VMstore latency in one table, auditing Tintri per-VM QoS, the NFS datastore health sweep, the daily Tintri fleet sweep and wiring Grafana into vCenter.

Grafana dashboard 'vSphere cluster overview' in dark theme: six summary stats (4 ESXi hosts, 21 VMs on, cluster CPU 15 percent, memory 30 percent, fullest datastore 87.5 percent in red, 5 storage events), host CPU and memory time series for esx-01 to esx-04, datastore capacity bars for ds-vmstore-01 and ds-vmstore-02, NFS client latency per host with a spike on ds-vmstore-01, a top 10 VM latency table led by etl-batch-07, CPU ready by VM and ESXi storage events from Loki.

Leave a Reply