Jialiang Cai created AMBARI-26638:
-------------------------------------

             Summary: Replace legacy Ambari Metrics with Prometheus and 
VictoriaMetrics
                 Key: AMBARI-26638
                 URL: https://issues.apache.org/jira/browse/AMBARI-26638
             Project: Ambari
          Issue Type: New Feature
            Reporter: Jialiang Cai


h2. Problem

Ambari still depends on the legacy Ambari Metrics System, Ganglia integrations,
widget metadata, and timeline-metrics APIs. That architecture carries a large
HBase-based collector stack, is difficult to deploy and operate on current
platforms, and does not provide the discovery and query contracts required by
the React frontend.

The React frontend also assumes that known services have specialized summary
components. A newly introduced service such as VictoriaMetrics can therefore
be running correctly while its summary is blank and its sidebar health marker
remains unknown.

h2. Proposed Changes

Replace the legacy monitoring path with a Prometheus-compatible architecture
backed by VictoriaMetrics:

# Add an Ambari Agent telemetry subsystem that collects native Linux metrics,
   reads component JMX endpoints from stack-defined telemetry profiles, exposes
   Prometheus text format, and receives assignment updates through the existing
   Ambari realtime channel.
# Add server-side target discovery, telemetry assignment compilation, HTTP
   service discovery, Prometheus query proxying, datasource management,
   dashboard persistence, chart sharing, and built-in dashboard provisioning.
# Add the VictoriaMetrics stack service with VictoriaMetrics Server, VMAGENT,
   and VMAUTH components, verified multi-architecture artifacts, deployment
   topology recommendations, runtime directory preparation, and package
   metadata.
# Provision a managed Ambari identity for VMAGENT HTTP service discovery before
   component startup. Persist only the required managed configuration and make
   provisioning idempotent across cluster creation and service installation.
# Replace legacy Metrics, Ganglia, timeline, widget, and SCOM implementation
   paths with the new Metrics APIs and schema upgrade.
# Add React monitoring routes and screens for dashboards, dashboard editing,
   panel rendering, Prometheus exploration, targets, datasources, and shared
   charts. Integrate monitoring links into service navigation and service
   dashboards.
# Provide built-in Linux fleet and host dashboards plus service dashboards for
   HDFS, YARN, HBase, and Hive.
# Add a generic React service summary for services without a specialized
   summary. It must render master, worker, and client component health, counts,
   alerts, maintenance state, host links, and an explicit empty state.
# Drive sidebar service health from the authoritative service state stream so
   dynamically added services do not remain gray after they are started.
# Correct deployment integration by excluding the Metrics RPM from
    stack-select, allowing the RPM version to be overridden, preserving encoded
    PromQL parameters, tolerating missing realtime update payloads, and
    enforcing a valid VictoriaMetrics component topology.

h2. Compatibility And Migration

The legacy Ambari Metrics System is intentionally removed rather than operated
in parallel. Upgrade catalog changes migrate the database model from legacy
widgets and layouts to dashboards, datasources, and chart shares. Existing
non-Metrics service management behavior remains unchanged.

h2. Acceptance Criteria

# Ambari Agent exposes assigned Linux and supported component telemetry in
   Prometheus format and updates assignments without an agent restart.
# Ambari Server returns valid HTTP service-discovery targets and proxies
   Prometheus queries without corrupting encoded query parameters.
# A Blueprint deployment can install and start VictoriaMetrics Server, VMAGENT,
   and VMAUTH without manual credential creation or stack-select failures.
# The managed discovery identity is created before VMAGENT starts and repeated
   provisioning remains idempotent.
# React users can manage datasources, inspect targets, explore metrics, and
   view or edit provisioned dashboards.
# VictoriaMetrics and other services without specialized React summaries show
   component status and navigation instead of a blank page.
# The service sidebar reflects the current service state and alert health.
# Focused server, agent, stack advisor, React tests, and a production frontend
   build pass.
# A three-node Rocky Linux 8 ARM64 Blueprint deployment completes with all
   VictoriaMetrics components in STARTED state and the React summary displaying
   healthy service status.

h2. Runtime Evidence

The implementation was exercised on a local three-node Rocky Linux 8 ARM64
container cluster. The Blueprint request completed at 100 percent; the initial
managed {{victoriametrics-scrape}} configuration contained the generated service
discovery identity; VMAGENT completed its first INSTALL and START commands; and
VictoriaMetrics Server, VMAGENT, and VMAUTH all reached STARTED state. The
updated React assets were then deployed into the running Ambari Server and the
VictoriaMetrics summary and green sidebar health state were manually verified.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to