close
Skip to content

feat: Harvest should load ASAr2 templates when monitoring ASAr2 clusters#3871

Merged
rahulguptajss merged 6 commits intomainfrom
cbg-asar2-templates
Sep 4, 2025
Merged

feat: Harvest should load ASAr2 templates when monitoring ASAr2 clusters#3871
rahulguptajss merged 6 commits intomainfrom
cbg-asar2-templates

Conversation

@cgrinds
Copy link
Copy Markdown
Collaborator

@cgrinds cgrinds commented Sep 2, 2025

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for ASAr2 templates in the Harvest monitoring system. When monitoring ASAr2 clusters, Harvest will now load ASAr2-specific templates from a dedicated directory structure.

  • Introduces model constants and remote detection logic for ASAr2 vs CDOT systems
  • Creates a separate ASAr2 template directory structure with default configuration
  • Updates template loading logic to prioritize ASAr2 templates when monitoring ASAr2 clusters

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/errs/errors.go Adds new error constant for template matching failures
pkg/conf/remotes.go Introduces model constants and ASAr2 detection logic with NewRemote constructor
pkg/api/ontapi/zapi/system.go Updates to use new CDOT constant instead of hardcoded string
conf/rest/default.yaml Removes ASAr2 templates from main default configuration
conf/rest/asar2/default.yaml Creates new ASAr2-specific default template configuration
cmd/tools/rest/client.go Refactors cluster info parsing to use new NewRemote constructor
cmd/poller/poller.go Adds ASAr2 template injection logic and improved logging
cmd/poller/collector/helpers.go Updates template loading to support multiple models and improved error handling
cmd/collectors/zapi/collector/zapi.go Updates to use model slice parameter for template loading
cmd/collectors/storagegrid/storagegrid.go Updates to use model slice parameter for template loading
cmd/collectors/rest/templating.go Adds ASAr2-specific template loading logic
cmd/collectors/rest/rest.go Updates to use CDOT constant
cmd/collectors/cisco/cisco.go Updates to use model slice parameter for template loading

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread pkg/conf/remotes.go
Comment thread cmd/poller/collector/helpers.go
@Hardikl
Copy link
Copy Markdown
Contributor

Hardikl commented Sep 3, 2025

Changes look good.

  1. I tried to create rest/custom.yaml file and made few changes there and it's reflected as expected for asar2 cluster.
  2. I tried to create asar2/custom.yaml file and made few changes there, but it's not reading this file and always read asar2/default.yaml file. I guess this is not we are expecting in our conversation.

@Hardikl
Copy link
Copy Markdown
Contributor

Hardikl commented Sep 3, 2025

ignore the comment as my custom.yaml file was in 9.16.0 folder. It's working as expected after moved to proper place.

Hardikl
Hardikl previously approved these changes Sep 3, 2025
@rahulguptajss rahulguptajss merged commit 671cbe0 into main Sep 4, 2025
10 checks passed
@rahulguptajss rahulguptajss deleted the cbg-asar2-templates branch September 4, 2025 05:37
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.

4 participants