Skip to content

feat: Harvest should monitor Arista switches#4313

Merged
rahulguptajss merged 4 commits into
mainfrom
cbg-arista
Jun 10, 2026
Merged

feat: Harvest should monitor Arista switches#4313
rahulguptajss merged 4 commits into
mainfrom
cbg-arista

Conversation

@cgrinds

@cgrinds cgrinds commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 5, 2026 17:20
@cla-bot cla-bot Bot added the cla-signed label Jun 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class Arista EOS switch monitoring to Harvest by introducing an AristaRest collector (using Arista eAPI JSON-RPC runCmds), along with supporting configuration, docs/metadata generation, and Grafana provisioning/dashboard integration.

Changes:

  • Registers and wires a new AristaRest collector into poller negotiation/discovery and collector allowlists.
  • Adds Arista EOS 4.18.5 templates + plugins (version, interfaces, optics, LLDP, environment) with unit tests and fixtures.
  • Extends docs, MkDocs nav, Grafana tooling/tests, and MCP metric metadata generation for Arista.

Reviewed changes

Copilot reviewed 51 out of 52 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/conf/collectors.go Adds AristaRest to collector classification maps.
mkdocs.yml Adds Arista metrics page to site navigation.
mcp/metadata/arista_metrics.json Adds MCP metric description metadata for Arista metrics.
grafana/dashboards/arista.yml Adds Grafana provisioning provider for Arista dashboards.
docs/dashboards.md Updates docs to include Arista as a metrics source.
docs/arista-switch-metrics.md New Arista metrics reference (generated output).
conf/aristarest/default.yaml Default Arista collector schedule and object list.
conf/aristarest/eos/4.18.5/environment.yaml Arista environment template (EOS 4.18.5).
conf/aristarest/eos/4.18.5/interface.yaml Arista interface template (EOS 4.18.5).
conf/aristarest/eos/4.18.5/lldp.yaml Arista LLDP template (EOS 4.18.5).
conf/aristarest/eos/4.18.5/optic.yaml Arista optics template (EOS 4.18.5).
conf/aristarest/eos/4.18.5/version.yaml Arista version/identity template (EOS 4.18.5).
cmd/tools/util.go Adds Arista counter fields + Arista counter doc generator.
cmd/tools/grafana/grafana.go Includes Arista dashboards folder + folder mapping for imports.
cmd/tools/grafana/grafana_test.go Extends Grafana expression checks to Arista dashboards.
cmd/tools/grafana/dashboard_test.go Allows arista tag + includes Arista dashboards in interval checks.
cmd/tools/generate/generate.go Includes Arista dashboards in metrics generation; wires Arista metadata generation.
cmd/tools/generate/counter.go Generates Arista counter docs + Arista MCP metadata file.
cmd/tools/generate/arista_counter.yaml Adds generated counter definition YAML for Arista.
cmd/tools/generate/arista_counter.tmpl Adds template for generating Arista metric documentation.
cmd/poller/poller.go Imports Arista collector; adds Arista negotiation and collector filtering.
cmd/collectors/discovery.go Adds Arista REST discovery/check path.
cmd/collectors/arista/arista.go New Arista collector module + plugin loader.
cmd/collectors/arista/rest/client.go Arista eAPI JSON-RPC client implementation.
cmd/collectors/arista/rest/client_test.go Unit tests for Arista REST client parsing/helpers.
cmd/collectors/arista/rest/testdata/show_version.json Arista REST client test fixture.
cmd/collectors/arista/rest/testdata/show_hostname.json Arista REST client test fixture.
cmd/collectors/arista/rest/testdata/show_interfaces_transceiver.json Arista REST client test fixture.
cmd/collectors/arista/rest/testdata/show_lldp_neighbors_detail.json Arista REST client test fixture.
cmd/collectors/arista/rest/testdata/show_env_temperature.json Arista REST client test fixture.
cmd/collectors/arista/rest/testdata/show_env_power.json Arista REST client test fixture.
cmd/collectors/arista/rest/testdata/show_env_cooling.json Arista REST client test fixture.
cmd/collectors/arista/rest/testdata/banner_error.json Arista REST client test fixture.
cmd/collectors/arista/rest/testdata/banner_enable.json Arista REST client test fixture.
cmd/collectors/arista/plugins/version/version.go Version/labels/uptime plugin for Arista.
cmd/collectors/arista/plugins/version/version_test.go Unit test for Arista version plugin parsing.
cmd/collectors/arista/plugins/version/testdata/version.json Arista version plugin test fixture.
cmd/collectors/arista/plugins/optic/optic.go Optics (DOM) plugin for Arista.
cmd/collectors/arista/plugins/optic/optic_test.go Unit tests for optics parsing (populated/empty).
cmd/collectors/arista/plugins/optic/testdata/transceiver.json Arista optics plugin test fixture.
cmd/collectors/arista/plugins/optic/testdata/transceiver_empty.json Arista optics plugin test fixture.
cmd/collectors/arista/plugins/networkinterface/networkinterface.go Interface counters/admin/link/error-status plugin for Arista.
cmd/collectors/arista/plugins/networkinterface/networkinterface_test.go Unit test for interface parsing and label sanitization.
cmd/collectors/arista/plugins/networkinterface/testdata/interfaces.json Arista interface plugin test fixture.
cmd/collectors/arista/plugins/lldp/lldp.go LLDP neighbor labels plugin for Arista.
cmd/collectors/arista/plugins/lldp/lldp_test.go Unit tests for LLDP parsing and quote trimming.
cmd/collectors/arista/plugins/lldp/testdata/lldp.json Arista LLDP plugin test fixture.
cmd/collectors/arista/plugins/environment/environment.go Environment (temps/fans/PSU) plugin for Arista.
cmd/collectors/arista/plugins/environment/environment_test.go Unit test for environment parsing across sub-responses.
cmd/collectors/arista/plugins/environment/testdata/environment.json Arista environment plugin test fixture.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/collectors/arista/arista.go
Comment thread cmd/collectors/arista/arista.go
Comment thread cmd/collectors/arista/plugins/networkinterface/networkinterface.go
Comment thread docs/arista-switch-metrics.md Outdated
rahulguptajss
rahulguptajss previously approved these changes Jun 8, 2026
Comment thread cmd/tools/generate/arista_counter.yaml Outdated
APIs:
- API: eAPI
Endpoint: show interfaces
AristaCounter: interfaceCounters.inErrors

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interfaceCounters.inputErrorsDetail.fcsErrors


func (e *Environment) parseCooling(output gjson.Result, envMat *matrix.Matrix) {
if ambient := output.Get("ambientTemperature"); ambient.Exists() {
instance, err := envMat.NewInstance("cooling_ambient")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handle error?

Copilot AI review requested due to automatic review settings June 8, 2026 12:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 53 out of 54 changed files in this pull request and generated 10 comments.

Comment thread cmd/tools/generate/arista_counter.yaml
Comment thread cmd/tools/generate/arista_counter.yaml
Comment thread docs/arista-switch-metrics.md
Comment thread docs/arista-switch-metrics.md
Comment thread docs/arista-switch-metrics.md
Comment thread grafana/dashboards/arista/arista.json
Comment thread grafana/dashboards/arista/arista.json
Comment thread grafana/dashboards/arista/arista.json Outdated
Comment thread docs/arista-switch-metrics.md
Comment thread docs/arista-switch-metrics.md
@rahulguptajss rahulguptajss merged commit 7f02b2b into main Jun 10, 2026
13 checks passed
@rahulguptajss rahulguptajss deleted the cbg-arista branch June 10, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to poll arista network switches in netapp harvest to view storage IO flow on Arista leaf switches

4 participants