feat: expose metrics from Victoria#754
Open
gsanchietti wants to merge 2 commits into
Open
Conversation
48012c2 to
f600cc4
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Monitoring area to support the post-netdata monitoring stack by adding a new Metrics page that fetches historical data from Telegraf/VictoriaMetrics, and by repointing existing ping-latency configuration calls away from Netdata.
Changes:
- Switch Ping Latency Monitor configuration UBUS service from
ns.netdatatons.telegraf. - Add a new Monitoring → Metrics page (route + side menu entry) with time-range and auto-refresh controls.
- Introduce a metrics chart composable and UI components to render System and Network metric charts.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/views/standalone/monitoring/PingLatencyMonitorView.vue | Repoints configuration calls from Netdata to Telegraf. |
| src/views/standalone/monitoring/MetricsView.vue | New metrics page: controls + query to fetch historical metrics. |
| src/router/index.ts | Adds route for the new metrics page. |
| src/i18n/en.json | Adds English strings for the new Metrics UI. |
| src/composables/useMetricsCharts.ts | New composable to transform metrics payload into chart-ready data/options. |
| src/components/standalone/SideMenu.vue | Adds “Metrics” entry under Monitoring. |
| src/components/standalone/monitoring/metrics/SystemMetricsSection.vue | New “System” charts section layout. |
| src/components/standalone/monitoring/metrics/NetworkMetricsSection.vue | New “Network” charts section layout (traffic/packets/connections/latency/quality). |
| src/components/standalone/monitoring/metrics/MetricChartCard.vue | Shared card component rendering a TimeLineChart or an empty state. |
Comments suppressed due to low confidence (1)
src/views/standalone/monitoring/PingLatencyMonitorView.vue:54
- The backend was switched to
ns.telegraf, but the error title still uses theerror.cannot_retrieve_netdata_configurationi18n key (see the catch block below). In some locales this message explicitly mentions Netdata, which is now misleading. Please introduce a Telegraf/Victoria-specific (or generic) key and use it here.
const res = await ubusCall('ns.telegraf', 'get-configuration', {})
if (res?.data?.hosts) {
formPing.value.hostList = res.data.hosts
}
} catch (exception: any) {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
Addressed the review feedback from this round:
All review threads from this pass are resolved. |
8a7b629 to
82b01ac
Compare
Assisted-by: Copilot:Sonnet4.6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since netdata will be removed, switch monitor to Victoria Metrics by including a new page inside Monitoring section.
See companion PR: NethServer/nethsecurity#1633
Example:
