Skip to content

feat: expose metrics from Victoria#754

Open
gsanchietti wants to merge 2 commits into
nethsecurity-8.8from
victoria_alerting
Open

feat: expose metrics from Victoria#754
gsanchietti wants to merge 2 commits into
nethsecurity-8.8from
victoria_alerting

Conversation

@gsanchietti
Copy link
Copy Markdown
Member

@gsanchietti gsanchietti commented May 5, 2026

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:
image

@gsanchietti gsanchietti self-assigned this May 5, 2026
@gsanchietti gsanchietti changed the title [EXPERIMENTAL] feat: expose metrics from Victoria feat: expose metrics from Victoria [EXPERIMENTAL] May 5, 2026
@gsanchietti gsanchietti force-pushed the victoria_alerting branch 5 times, most recently from 48012c2 to f600cc4 Compare May 5, 2026 13:46
@gsanchietti gsanchietti requested a review from Copilot May 6, 2026 12:44
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 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.netdata to ns.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 the error.cannot_retrieve_netdata_configuration i18n 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.

Comment thread src/views/standalone/monitoring/MetricsView.vue Outdated
Comment thread src/composables/useMetricsCharts.ts
Comment thread src/views/standalone/monitoring/MetricsView.vue Outdated
Comment thread src/views/standalone/monitoring/MetricsView.vue Outdated
Comment thread src/views/standalone/monitoring/MetricsView.vue Outdated
Comment thread src/components/standalone/monitoring/metrics/SystemMetricsSection.vue Outdated
@gsanchietti
Copy link
Copy Markdown
Member Author

Addressed the review feedback from this round:

  • Metrics preferences now use the existing per-user preference helpers and the stored values are validated before use.
  • Time-range labels were reduced to parameterized i18n entries.
  • TimeLineChart now lets custom options override defaults.
  • The empty-state icon now uses faChartLine.
  • The Telegraf configuration error uses a dedicated translation key.

All review threads from this pass are resolved.

@gsanchietti gsanchietti force-pushed the victoria_alerting branch 5 times, most recently from 8a7b629 to 82b01ac Compare May 7, 2026 12:06
@gsanchietti gsanchietti changed the title feat: expose metrics from Victoria [EXPERIMENTAL] feat: expose metrics from Victoria May 7, 2026
@Tbaile Tbaile force-pushed the victoria_alerting branch from ca4b03a to efba518 Compare May 7, 2026 14:48
@gsanchietti gsanchietti marked this pull request as ready for review May 12, 2026 04:39
@gsanchietti gsanchietti requested a review from Tbaile May 12, 2026 04:39
@Tbaile Tbaile changed the base branch from main to nethsecurity-8.8 May 12, 2026 14:18
@Tbaile Tbaile force-pushed the victoria_alerting branch from efba518 to 23bd3bc Compare May 13, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Monitoring: adding long time storage for metrics

3 participants