# netapp/harvest architecture

> Architecture diagram of the GitHub repository netapp/harvest, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/netapp/harvest
- Repository: https://github.com/netapp/harvest

## Overview

NetApp Harvest collects performance, capacity, and hardware metrics from ONTAP, StorageGRID, E-Series, and network devices, transforms them, and exports them to time-series backends. The principal runtime path is configured poller → collectors and plugins → metric matrices → exporters. The repository also includes local-system monitoring, operational tools, and an MCP server for querying Harvest-collected metrics and managing alert rules. Relationships below are limited to README statements and source-index references or shown excerpts; unsampled collector details are represented by their enclosing directories.

Main entry points: [`cmd/poller/poller.go`](https://github.com/netapp/harvest/blob/main/cmd/poller/poller.go) (Poller orchestration), [`pkg/matrix/matrix.go`](https://github.com/netapp/harvest/blob/main/pkg/matrix/matrix.go) (Metric matrices), [`cmd/collectors/eseries/rest/client.go`](https://github.com/netapp/harvest/blob/main/cmd/collectors/eseries/rest/client.go) (E-Series collection), [`cmd/poller/collector/collector.go`](https://github.com/netapp/harvest/blob/main/cmd/poller/collector/collector.go) (Collector runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Collection runtime"]
  node_configuration["Poller configuration<br/>[conf.go]"]
  node_poller["Poller orchestration<br/>[poller.go]"]
  node_collector_runtime["Collector runtime<br/>[collector.go]"]
  node_plugin_runtime["Plugin framework<br/>[plugin.go]"]
  node_matrix["Metric matrices<br/>[matrix.go]"]
end

subgraph group_sources["Target collectors"]
  node_ontap_rest["ONTAP REST collectors"]
  node_ontap_zapi["ONTAP ZAPI collectors<br/>[zapi.go]"]
  node_ontap_perf["ONTAP performance<br/>[restperf.go]"]
  node_eseries["E-Series collection<br/>[client.go]"]
  node_eseries_hardware["E-Series hardware<br/>[controller.go]"]
  node_eseries_perf["E-Series performance<br/>[controller.go]"]
  node_storagegrid["StorageGRID collection<br/>[storagegrid.go]"]
  node_storagegrid_api["StorageGRID API client<br/>[client.go]"]
  node_network_devices["Network device collectors<br/>[client.go]"]
  node_local_metrics["Local system metrics<br/>[main.go]"]
end

subgraph group_outputs["Metrics and outputs"]
  node_influxdb["InfluxDB exporter<br/>[influxdb.go]"]
  node_prometheus["Prometheus exporter<br/>[prometheus.go]"]
  node_victoriametrics["VictoriaMetrics exporter<br/>[victoriametrics.go]"]
end

subgraph group_operations["Operations and query"]
  node_harvest_cli["Harvest command<br/>[harvest.go]"]
  node_rest_tool["REST diagnostic tool<br/>[client.go]"]
  node_mcp_server["MCP server<br/>[main.go]"]
  node_mcp_rules["Alert rule manager<br/>[manager.go]"]
end

node_operator(("Operator"))
node_prometheus_service[("Prometheus service")]

node_operator -->|"configures"| node_configuration
node_configuration -->|"configures"| node_poller
node_poller -->|"starts collectors"| node_collector_runtime
node_poller -->|"dispatches to"| node_ontap_rest
node_poller -->|"dispatches to"| node_ontap_zapi
node_poller -->|"dispatches to"| node_ontap_perf
node_poller -->|"dispatches to"| node_eseries
node_poller -->|"dispatches to"| node_eseries_perf
node_poller -->|"dispatches to"| node_storagegrid
node_poller -->|"dispatches to"| node_network_devices
node_poller -->|"dispatches to"| node_local_metrics
node_collector_runtime -->|"uses"| node_plugin_runtime
node_collector_runtime -->|"records metrics"| node_matrix
node_ontap_rest -.->|"produces metrics"| node_matrix
node_ontap_zapi -.->|"produces metrics"| node_matrix
node_ontap_perf -.->|"produces metrics"| node_matrix
node_eseries -.->|"produces metrics"| node_matrix
node_eseries -.->|"uses plugin"| node_eseries_hardware
node_eseries_perf -.->|"transforms metrics"| node_matrix
node_eseries_perf -->|"fetches data"| node_eseries
node_storagegrid -->|"requests data"| node_storagegrid_api
node_storagegrid -->|"builds metrics"| node_matrix
node_network_devices -.->|"produces metrics"| node_matrix
node_local_metrics -->|"updates metrics"| node_matrix
node_poller -->|"routes metrics"| node_influxdb
node_poller -.->|"routes metrics"| node_prometheus
node_poller -->|"routes metrics"| node_victoriametrics
node_operator -->|"runs"| node_harvest_cli
node_operator -.->|"inspects targets"| node_rest_tool
node_operator -->|"queries metrics"| node_mcp_server
node_mcp_server -.->|"queries"| node_prometheus_service
node_mcp_server -.->|"manages rules"| node_mcp_rules

click node_configuration "https://github.com/netapp/harvest/blob/main/pkg/conf/conf.go"
click node_poller "https://github.com/netapp/harvest/blob/main/cmd/poller/poller.go"
click node_collector_runtime "https://github.com/netapp/harvest/blob/main/cmd/poller/collector/collector.go"
click node_plugin_runtime "https://github.com/netapp/harvest/blob/main/cmd/poller/plugin/plugin.go"
click node_matrix "https://github.com/netapp/harvest/blob/main/pkg/matrix/matrix.go"
click node_ontap_rest "https://github.com/netapp/harvest/tree/main/cmd/collectors/rest"
click node_ontap_zapi "https://github.com/netapp/harvest/blob/main/cmd/collectors/zapi/collector/zapi.go"
click node_ontap_perf "https://github.com/netapp/harvest/blob/main/cmd/collectors/restperf/restperf.go"
click node_eseries "https://github.com/netapp/harvest/blob/main/cmd/collectors/eseries/rest/client.go"
click node_eseries_hardware "https://github.com/netapp/harvest/blob/main/cmd/collectors/eseries/plugins/hardware/controller.go"
click node_eseries_perf "https://github.com/netapp/harvest/blob/main/cmd/collectors/eseriesperf/plugins/controller/controller.go"
click node_storagegrid "https://github.com/netapp/harvest/blob/main/cmd/collectors/storagegrid/storagegrid.go"
click node_storagegrid_api "https://github.com/netapp/harvest/blob/main/cmd/collectors/storagegrid/rest/client.go"
click node_network_devices "https://github.com/netapp/harvest/blob/main/cmd/collectors/cisco/rest/client.go"
click node_local_metrics "https://github.com/netapp/harvest/blob/main/cmd/collectors/unix/main.go"
click node_influxdb "https://github.com/netapp/harvest/blob/main/cmd/exporters/influxdb/influxdb.go"
click node_prometheus "https://github.com/netapp/harvest/blob/main/cmd/exporters/prometheus/prometheus.go"
click node_victoriametrics "https://github.com/netapp/harvest/blob/main/cmd/exporters/victoriametrics/victoriametrics.go"
click node_harvest_cli "https://github.com/netapp/harvest/blob/main/cmd/harvest/harvest.go"
click node_rest_tool "https://github.com/netapp/harvest/blob/main/cmd/tools/rest/client.go"
click node_mcp_server "https://github.com/netapp/harvest/blob/main/mcp/cmd/server/main.go"
click node_mcp_rules "https://github.com/netapp/harvest/blob/main/mcp/pkg/rules/manager.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_configuration,node_poller,node_collector_runtime,node_plugin_runtime,node_matrix toneBlue
class node_ontap_rest,node_ontap_zapi,node_ontap_perf,node_eseries,node_eseries_hardware,node_eseries_perf,node_storagegrid,node_storagegrid_api,node_network_devices,node_local_metrics,node_prometheus_service toneAmber
class node_influxdb,node_prometheus,node_victoriametrics toneMint
class node_harvest_cli,node_rest_tool,node_mcp_server,node_mcp_rules toneRose
class node_operator toneIndigo
```

## Components

### Collection runtime

- [Poller configuration](https://github.com/netapp/harvest/blob/main/pkg/conf/conf.go): `pkg/conf/conf.go`
- [Poller orchestration](https://github.com/netapp/harvest/blob/main/cmd/poller/poller.go): `cmd/poller/poller.go`
- [Collector runtime](https://github.com/netapp/harvest/blob/main/cmd/poller/collector/collector.go): `cmd/poller/collector/collector.go`
- [Plugin framework](https://github.com/netapp/harvest/blob/main/cmd/poller/plugin/plugin.go): `cmd/poller/plugin/plugin.go`
- [Metric matrices](https://github.com/netapp/harvest/blob/main/pkg/matrix/matrix.go): `pkg/matrix/matrix.go`

### Target collectors

- [ONTAP REST collectors](https://github.com/netapp/harvest/tree/main/cmd/collectors/rest): `cmd/collectors/rest`
- [ONTAP ZAPI collectors](https://github.com/netapp/harvest/blob/main/cmd/collectors/zapi/collector/zapi.go): `cmd/collectors/zapi/collector/zapi.go`
- [ONTAP performance](https://github.com/netapp/harvest/blob/main/cmd/collectors/restperf/restperf.go): `cmd/collectors/restperf/restperf.go`
- [E-Series collection](https://github.com/netapp/harvest/blob/main/cmd/collectors/eseries/rest/client.go): `cmd/collectors/eseries/rest/client.go`
- [E-Series hardware](https://github.com/netapp/harvest/blob/main/cmd/collectors/eseries/plugins/hardware/controller.go): `cmd/collectors/eseries/plugins/hardware/controller.go`
- [E-Series performance](https://github.com/netapp/harvest/blob/main/cmd/collectors/eseriesperf/plugins/controller/controller.go): `cmd/collectors/eseriesperf/plugins/controller/controller.go`
- [StorageGRID collection](https://github.com/netapp/harvest/blob/main/cmd/collectors/storagegrid/storagegrid.go): `cmd/collectors/storagegrid/storagegrid.go`
- [StorageGRID API client](https://github.com/netapp/harvest/blob/main/cmd/collectors/storagegrid/rest/client.go): `cmd/collectors/storagegrid/rest/client.go`
- [Network device collectors](https://github.com/netapp/harvest/blob/main/cmd/collectors/cisco/rest/client.go): `cmd/collectors/cisco/rest/client.go`
- [Local system metrics](https://github.com/netapp/harvest/blob/main/cmd/collectors/unix/main.go): `cmd/collectors/unix/main.go`

### Metrics and outputs

- [InfluxDB exporter](https://github.com/netapp/harvest/blob/main/cmd/exporters/influxdb/influxdb.go): `cmd/exporters/influxdb/influxdb.go`
- [Prometheus exporter](https://github.com/netapp/harvest/blob/main/cmd/exporters/prometheus/prometheus.go): `cmd/exporters/prometheus/prometheus.go`
- [VictoriaMetrics exporter](https://github.com/netapp/harvest/blob/main/cmd/exporters/victoriametrics/victoriametrics.go): `cmd/exporters/victoriametrics/victoriametrics.go`

### Operations and query

- [Harvest command](https://github.com/netapp/harvest/blob/main/cmd/harvest/harvest.go): `cmd/harvest/harvest.go`
- [REST diagnostic tool](https://github.com/netapp/harvest/blob/main/cmd/tools/rest/client.go): `cmd/tools/rest/client.go`
- [MCP server](https://github.com/netapp/harvest/blob/main/mcp/cmd/server/main.go): `mcp/cmd/server/main.go`
- [Alert rule manager](https://github.com/netapp/harvest/blob/main/mcp/pkg/rules/manager.go): `mcp/pkg/rules/manager.go`

### Other components

- **Operator**
- **Prometheus service**

## Connections

- Operator → Poller configuration: configures (evidence: `README.md`)
- Poller configuration → Poller orchestration: configures (evidence: `cmd/poller/poller.go`)
- Poller orchestration → Collector runtime: starts collectors (evidence: `cmd/poller/poller.go`)
- Poller orchestration → ONTAP REST collectors: dispatches to (evidence: `cmd/poller/poller.go`)
- Poller orchestration → ONTAP ZAPI collectors: dispatches to (evidence: `cmd/poller/poller.go`)
- Poller orchestration → ONTAP performance: dispatches to (evidence: `cmd/poller/poller.go`)
- Poller orchestration → E-Series collection: dispatches to (evidence: `cmd/poller/poller.go`)
- Poller orchestration → E-Series performance: dispatches to (evidence: `cmd/poller/poller.go`)
- Poller orchestration → StorageGRID collection: dispatches to (evidence: `cmd/poller/poller.go`)
- Poller orchestration → Network device collectors: dispatches to (evidence: `cmd/poller/poller.go`)
- Poller orchestration → Local system metrics: dispatches to (evidence: `cmd/poller/poller.go`)
- Collector runtime → Plugin framework: uses (evidence: `cmd/poller/collector/collector.go`)
- Collector runtime → Metric matrices: records metrics (evidence: `cmd/poller/collector/collector.go`)
- ONTAP REST collectors → Metric matrices: produces metrics
- ONTAP ZAPI collectors → Metric matrices: produces metrics
- ONTAP performance → Metric matrices: produces metrics
- E-Series collection → Metric matrices: produces metrics
- E-Series collection → E-Series hardware: uses plugin
- E-Series performance → Metric matrices: transforms metrics
- E-Series performance → E-Series collection: fetches data (evidence: `cmd/collectors/eseriesperf/plugins/controller/controller.go`)
- StorageGRID collection → StorageGRID API client: requests data (evidence: `cmd/collectors/storagegrid/storagegrid.go`)
- StorageGRID collection → Metric matrices: builds metrics (evidence: `cmd/collectors/storagegrid/storagegrid.go`)
- Network device collectors → Metric matrices: produces metrics
- Local system metrics → Metric matrices: updates metrics (evidence: `cmd/collectors/unix/main.go`)
- Poller orchestration → InfluxDB exporter: routes metrics (evidence: `README.md`)
- Poller orchestration → Prometheus exporter: routes metrics
- Poller orchestration → VictoriaMetrics exporter: routes metrics (evidence: `cmd/poller/poller.go`)
- Operator → Harvest command: runs (evidence: `cmd/harvest/harvest.go`)
- Operator → REST diagnostic tool: inspects targets
- Operator → MCP server: queries metrics (evidence: `README.md`)
- MCP server → Prometheus service: queries
- MCP server → Alert rule manager: manages rules
