# Nutanix Monitoring

> Monitor Nutanix cluster health, VM performance, and storage metrics by collecting data from Prism and sending it to Last9.

Source: https://last9.io/docs/integrations/others/nutanix/

Last9 monitors Nutanix clusters by pulling metrics from the Nutanix Prism API and forwarding them through the OpenTelemetry Collector. You get cluster CPU and memory utilisation, storage consumption, VM health, and CVM status alongside all your other infrastructure metrics in a single platform.

## How it works

```
Nutanix Prism                 Collector                    Last9
(Prism Element   ──REST API──▶  OTel Collector  ──OTLP──▶  Levitate
 or Central)                   + nutanix-exporter           (metrics)
```

The OTel Collector runs on any Linux or Windows host that can reach Prism over HTTPS (port 9440). It scrapes the Prometheus-compatible metrics endpoint exposed by the nutanix-exporter and forwards them to Last9.

## Prerequisites

- A host (Linux or Windows) with network access to Nutanix Prism on port 9440
- OpenTelemetry Collector Contrib v0.90.0 or later
- [nutanix-exporter](https://github.com/claranet/nutanix-exporter) (open-source, Apache 2.0)
- A read-only Prism user account for monitoring
- Last9 OTLP endpoint and authentication credentials

## Step 1 — Create a read-only monitoring user in Prism

Log in to Prism Element or Prism Central → **Settings → Local User Management** → add a user with the **Viewer** role. Do not use the admin account for monitoring.

## Step 2 — Run the nutanix-exporter

The exporter queries the Prism REST API and exposes metrics on a local HTTP port for the OTel Collector to scrape.

```bash
docker run -d \
  --name nutanix-exporter \
  --restart unless-stopped \
  -p 9405:9405 \
  claranet/nutanix-exporter:latest \
  -nutanix.url="https://192.168.1.10:9440" \
  -nutanix.username="monitor_user" \
  -nutanix.password="<your-password>"
```

To run without Docker, download the binary from the [releases page](https://github.com/claranet/nutanix-exporter/releases) and pass the same flags:

```bash
./nutanix-exporter \
  -nutanix.url="https://192.168.1.10:9440" \
  -nutanix.username="monitor_user" \
  -nutanix.password="<your-password>"
```

:::note
The exporter connects to Prism without TLS certificate verification. Use this on a private network only, and ensure the host running the exporter is not accessible from the public internet.
:::

Verify the exporter is working:

```bash
curl http://localhost:9405/metrics | grep nutanix_cluster
```

## Step 3 — Configure OTel Collector to scrape the exporter

Add a `prometheus` receiver to your existing collector config, or create a new config:

```yaml
receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: nutanix
          scrape_interval: 60s
          static_configs:
            - targets: ["localhost:9405"]

processors:
  resourcedetection:
    detectors: [env, system]

exporters:
  otlphttp:
    endpoint: "https://<your-last9-otlp-endpoint>"
    headers:
      Authorization: "Basic <your-base64-credentials>"
    compression: gzip

service:
  pipelines:
    metrics:
      receivers: [prometheus]
      processors: [resourcedetection]
      exporters: [otlphttp]
```

## Metrics collected

Metric names use the Prometheus convention (underscores) as emitted by the nutanix-exporter:

| Metric                                           | Description                            |
| ------------------------------------------------ | -------------------------------------- |
| `nutanix_cluster_cpu_usage_ppm`                  | Cluster CPU usage in PPM (÷ 10000 = %) |
| `nutanix_cluster_memory_usage_bytes`             | Cluster memory used (bytes)            |
| `nutanix_cluster_memory_capacity_bytes`          | Total cluster memory (bytes)           |
| `nutanix_cluster_storage_usage_bytes`            | Storage consumed (bytes)               |
| `nutanix_cluster_storage_capacity_bytes`         | Total storage capacity (bytes)         |
| `nutanix_cluster_iops`                           | Cluster-wide I/O operations per second |
| `nutanix_cluster_io_latency_usecs`               | Average I/O latency (microseconds)     |
| `nutanix_cluster_io_throughput_bytes`            | I/O throughput (bytes/s)               |
| `nutanix_vms_power_state`                        | VM power state (1 = on, 0 = off)       |
| `nutanix_vms_memory_mb`                          | Per-VM configured memory (MB)          |
| `nutanix_vms_num_vcpus`                          | Per-VM vCPU count                      |
| `nutanix_hosts_cpu_usage_ppm`                    | Per-host CPU usage in PPM              |
| `nutanix_hosts_memory_usage_bytes`               | Per-host memory usage (bytes)          |
| `nutanix_hosts_status`                           | Host status (1 = normal, 0 = degraded) |
| `nutanix_storage_containers_storage_usage_bytes` | Storage container usage (bytes)        |

## Monitoring multiple clusters

Run one nutanix-exporter instance per cluster, each on a different port:

```bash
# Cluster 1 on port 9405
docker run -d --name nutanix-cluster1 -p 9405:9405 \
  claranet/nutanix-exporter:latest \
  -nutanix.url="https://10.0.0.10:9440" \
  -nutanix.username="monitor_user" \
  -nutanix.password="<cluster1-password>"

# Cluster 2 on port 9406
docker run -d --name nutanix-cluster2 -p 9406:9405 \
  claranet/nutanix-exporter:latest \
  -nutanix.url="https://10.0.0.20:9440" \
  -nutanix.username="monitor_user" \
  -nutanix.password="<cluster2-password>"
```

Then add both targets to the collector:

```yaml
static_configs:
  - targets: ["localhost:9405"]
    labels:
      cluster: "prism-cluster-01"
  - targets: ["localhost:9406"]
    labels:
      cluster: "prism-cluster-02"
```

## Recommended alerts

Once metrics are flowing, set up these alerts in Last9:

| Alert                   | PromQL                                                                               | Threshold        |
| ----------------------- | ------------------------------------------------------------------------------------ | ---------------- |
| Cluster CPU high        | `nutanix_cluster_cpu_usage_ppm / 10000`                                              | > 80% for 10 min |
| Cluster storage filling | `nutanix_cluster_storage_usage_bytes / nutanix_cluster_storage_capacity_bytes * 100` | > 85%            |
| Host degraded           | `nutanix_hosts_status == 0`                                                          | for 5 min        |
| VM powered off          | `nutanix_vms_power_state == 0`                                                       | for 5 min        |

## Comparison with Datadog

|                              | Last9 (OTel + nutanix-exporter)                                                          | Datadog                                                                   |
| ---------------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| **Agent required**           | No dedicated agent — uses open-source nutanix-exporter + OTel Collector already deployed | Datadog Agent must be installed on each host                              |
| **Agent memory**             | OTel Collector: 80–120 MB total (shared with all other receivers)                        | Datadog Agent: 250–500 MB per host                                        |
| **Nutanix integration cost** | Included in Last9 subscription; nutanix-exporter is Apache 2.0                           | Nutanix integration requires Datadog Infrastructure Pro plan              |
| **Metrics available**        | 15+ cluster, VM, host, storage, and I/O metrics                                          | Similar set via Datadog Nutanix integration                               |
| **Custom metrics**           | Any Prism API field via exporter config                                                  | Limited to Datadog's predefined metric list without custom checks         |
| **Multi-cluster**            | Multiple exporter instances, one config                                                  | Requires Datadog Agent on each cluster's management host                  |
| **On-premise friendly**      | Collector runs on-premise, no outbound dependency other than Last9 endpoint              | Requires Datadog Agent internet access to datadoghq.com                   |
| **Alerting**                 | Same alert engine as all other Last9 metrics — no separate tool                          | Nutanix alerts in Datadog Monitor use same engine but separate dashboards |

The key advantage: because Last9 uses the OpenTelemetry Collector that is already deployed for host metrics, MSSQL, Oracle, and IIS monitoring, adding Nutanix adds no new agent — just a new receiver in the existing config.

## Alternative — SNMP

If you cannot install the nutanix-exporter but Nutanix SNMP is enabled on your cluster, you can collect a subset of cluster metrics via the SNMP receiver. See the [SNMP Monitoring guide](/docs/integrations/others/snmp/) for setup details.

:::note
The SNMP approach gives fewer metrics (no per-VM breakdown) compared to the Prism REST API approach above. Use the nutanix-exporter when possible.
:::

## Troubleshooting

| Symptom                        | Solution                                                                                                   |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------- |
| Exporter returns empty metrics | Check `NUTANIX_HOST` is reachable: `curl -k https://<prism-ip>:9440/api/nutanix/v3/clusters/list`          |
| TLS certificate error          | Set `NUTANIX_INSECURE=true` for self-signed Prism certs (acceptable on private networks)                   |
| No data in Last9               | Check OTel Collector logs: `journalctl -u otelcol -f`; confirm exporter target is reachable from collector |
| CPU metric value looks wrong   | Prism reports CPU in PPM (parts per million) — divide by 10,000 to get percentage                          |
| Missing VM metrics             | Prism Central required for cross-cluster VM metrics; Prism Element gives only local cluster VMs            |
