本页面为机器翻译。阅读英文原文。

Component

core/observability/prometheus

A Prometheus metrics server, storing what it scrapes in a local time-series database. Its targets are wired through its `scrape_target` uses-socket, which admits servers, stateful servers and workers, and each connection becomes one scrape job, its label and cadence set on that connection. The target says where it serves metrics: it publishes `metrics_endpoint`, the address Prometheus scrapes, or, on Kubernetes, `metrics_service` or `metrics_pod_selector`, which Prometheus discovers from the cluster. A target publishing none of them halts the build, naming it. A connection's optional `credential` is presented to its target as a bearer token, read from a file the Recipe delivers by reference; a target publishing `metrics_credential_required` true halts the build while its connection carries none. Prometheus publishes its own metrics address as `metrics_endpoint` too. With `values.otlp_receiver` true it also receives metrics pushed over OTLP HTTP, at the address it then publishes as `otlp_http_endpoint`, and that endpoint authenticates no caller. It carries `observability.aggrega.ai/metrics: otlp-http`, which an OpenTelemetry Collector's `metrics` socket selects. On Kubernetes the Manifest chooses between two realizations. `prometheus` synthesizes the server as a workload and fetches nothing, for a build that must complete with no chart repository reachable. `prometheus-chart` renders the prometheus-community Helm chart, whose cluster-wide read grant also lets the server scrape whatever the cluster advertises through scrape annotations.

来源

官方由本目录认定为官方发布者的签名身份签名。
内容摘要
sha256:38e18a4b893d4aa8832ed40fc3c53cff0a0ded5f43d2917022d01a439bc1adf4
发布时间
2026-11-10T10:13:14Z
签名身份
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

签名

  • 官方application/vnd.dev.sigstore.bundle.v0.3+json

    https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

    sha256:7083446ed180c9d97ee682a5699d388f7b3102198778e2b9d1b801321757d9f8

此版本的引用

oci://hub.aggrega.ai/component/core/observability/prometheus:1.0.0

开发者参数

开发者在 Aggregate 中设置的值。

名称类型默认值必需描述
otlp_receiverbooleanfalse否Turns on Prometheus's OTLP receiver, which accepts metrics pushed over OTLP HTTP at /api/v1/otlp/v1/metrics, and publishes its base address as `otlp_http_endpoint`; while false that key is empty and an OpenTelemetry Collector wired to this server halts the build. The receiver authenticates no caller, so anything that reaches the server's port can write metrics into it. The address is published only inside the Release; the compose realization also publishes the port on the host's loopback address, and on every host interface while `infra.publish_on_all_interfaces` is true.

运维规格

运维人员按环境调整的基础设施规格。

名称类型默认值必需描述
portinteger (min 1024, max 65535)9090否HTTP port the Prometheus query and scrape endpoint listens on. Most operators should omit this and let the Recipe assign the default (9090).
publish_on_all_interfacesbooleanfalse否Publishes the server's port on every host interface rather than on the host's loopback address only. Read only by the compose realization; false publishes the port on 127.0.0.1 only, and true on every host interface, where any machine that reaches the host reaches it — the OTLP receiver included while `values.otlp_receiver` is true, which authenticates no caller. The Kubernetes realizations ignore it.
external_base_urlstring—否Externally reachable base URL of the metrics server, as assembled at the ingress tier, including any path the ingress serves it under — for example https://prometheus.example.com or https://tools.example.com/prometheus. The server composes from this the relative and absolute links back to itself that it writes. On its own the server would also move every endpoint under that address's path; the Recipes keep it serving at its root instead, so its health checks and every consumer reaching it through its published host and port are unaffected, and an ingress in front of it maps the address's path onto that root. Omitted, the server derives those links from its own host name and listening port.
engine_versionstringv3.5.0否Prometheus container image tag. Selects the image tag on container targets; the chart-backed realization pins its own image tag.
source_versionstring—否Version of the Helm chart the chart-backed realization pulls. Read only by that realization; the workload-synthesis and Compose realizations pull no source artifact and ignore it. Changing it away from the Recipe's default does not guarantee value-mapping compatibility with the new chart.
computeobject—否—
storageobject—否—
overridesobject (open)—否Provider-specific overrides. Accepts any nested structure. Each Recipe documents which keys it reads.

输出契约

此组件通过 uses 拓扑向使用方发布的值。

名称类型默认值必需描述
hoststring—是In-cluster DNS name of the Service fronting the query endpoint. A dashboard or an alert rule evaluator points its data-source address at this name together with `port`.
portinteger—是TCP port that Service serves the query endpoint on. It follows the port an operator set in the Release, so a consumer reads it rather than assuming a default.
protocolstring—否How the published address is spoken to — `http`, so a consumer composes a data-source URL on that scheme.
otlp_http_endpointstring—否The OTLP HTTP base address metrics are received at — `http://<host>:<port>/api/v1/otlp` — while `values.otlp_receiver` is true; empty while it is false.
metrics_endpointstring—否The address Prometheus serves its own metrics at — `http://<host>:<port>/metrics`, on the query endpoint — for another scraper to scrape.

uses 套接字

此组件用于建立连接的依赖套接字。通过某个套接字接入的每个连接,其目标都必须满足该套接字的标签选择器,且每个连接都可以在该套接字声明的槽位中携带附加项。必需槽位须由 Aggregate 或 Release 通过该套接字接入的每个连接来填充。

scrape_target

选择器
component.aggrega.ai/type in (server, stateful-server, worker)
注入
env

经由此套接字的每个连接可填充的槽位

槽位选择器必需注入敏感描述
credentialfeature.aggrega.ai/kind=secret否env, file是Optional credential Prometheus presents when it scrapes the target of this connection, as Authorization: Bearer followed by the attachment's value, so the attachment holds the bare token. It reaches the server by reference, as a file the scrape job reads on every scrape: on Kubernetes the Secret the credential publishes is mounted as a file, and a credential publishing no Secret name and data key halts the build; on Docker Compose the value arrives as the container variable PROMETHEUS_SCRAPE_<n>_CREDENTIAL, which the start-up command writes to the file. The scrape configuration names only the file. Prometheus scrapes the address the target publishes, which inside a Release is usually http, so the credential crosses the network unencrypted there. Unattached, the scrape presents none, and a target publishing metrics_credential_required true halts the build.

附加槽位

Feature 附加到此组件时所用的命名绑定点。槽位的选择器限定哪个 Feature 可以填充该槽位,其 inject 列表则指明 Feature 的内容可以如何交付。必需槽位必须在每个实例上完成绑定,可以通过实例上的附加,也可以通过其上层作用域的附加;敏感槽位则声明为用于处理机密内容。Feature 也可以以任何槽位都未声明的名称进行附加。

未声明附加槽位。

自注入允许列表

env

关系

与其他已发布实体之间的类型化边。没有已发布目标的引用会呈现为断开的边,而不是链接。

使用

被使用

Component 概念参考 →

Aggrega 目录 — 收录组件、功能、配方以及渲染它们的插件的开放索引。

基于共享的 Aggrega 设计系统构建。

隐私