-
Notifications
You must be signed in to change notification settings - Fork 47
feat: add templatePath in grafana metric harvest cli #4056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
See if you can make it in tabular format if that looks better? |
There was a problem hiding this 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 enhances the Grafana metrics harvest CLI by adding template path information to the metrics output, improving traceability between metrics and their source templates.
Key changes:
- Refactored metric processing code into a new
cmd/tools/util.gofile for better code organization - Updated
grafana metricscommand to display template paths alongside metric names - Added metadata generation for MCP (Model Context Protocol) server consumption
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cmd/tools/util.go | New file containing refactored counter processing logic, template parsing, and metadata generation functions |
| cmd/tools/grafana/metrics.go | Updated to use refactored utilities and display template paths in output |
| cmd/tools/generate/generate.go | Refactored to use shared utilities from tools package |
| cmd/tools/generate/counter.go | Simplified by moving core logic to util.go |
| integration/test/alert_rule_test.go | Updated function calls to match new API signatures |
| docs/ontap-metrics.md | Documentation updates with new metric descriptions and template paths |
| mcp/metadata/*.json | New metadata files for ONTAP, StorageGrid, and Cisco metrics |
| grafana/dashboards/cmode/node.json | Removed signed sessions panel from CIFS visualization |
| grafana/dashboards/asar2/overview.json | Removed NVMe panel from overview dashboard |
| cmd/tools/generate/counter.yaml | Added descriptions for new metrics (audit_log, security_account_*, etc.) |
| cmd/tools/generate/storagegrid_counter.yaml | Added bucket and tenant metric descriptions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
rahulguptajss
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. CI is failing.
|
Using a space instead of a comma as the separator makes it easier to read. vs |
replaced comma with space. |
|
Made the changes, CI is green now. |
Validated with existing
generate metricsandgenerate descCLI with updatedgrafana metricsharvest CLI.