专属
文档
插件
助手
邀请
顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像

交易
充值流量我的订单

文档

工具

功能
提交工单页面收录

帮助
轩辕镜像免费版

其他
关于我们网站地图
热门搜索:
stackdriver-exporter

prometheuscommunity/stackdriver-exporter

prometheuscommunity

prometheuscommunity/stackdriver-exporter

3 次收藏下载次数: 0状态:社区镜像维护者:prometheuscommunity仓库类型:镜像最近更新:19 天前
让 AI 帮你使用轩辕镜像? · 展开查看说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

轩辕镜像,让镜像更快,让人生更轻。点击查看
镜像简介
标签列表
镜像标签列表与下载命令
轩辕镜像,让镜像更快,让人生更轻。点击查看

Google Stackdriver Prometheus Exporter

https://github.com/prometheus-community/stackdriver_exporter/actions/workflows/ci.yml/badge.svg](https://github.com/prometheus-community/stackdriver_exporter/actions/workflows/ci.yml) https://github.com/prometheus-community/stackdriver_exporter/actions/workflows/golangci-lint.yml/badge.svg](https://github.com/prometheus-community/stackdriver_exporter/actions/workflows/golangci-lint.yml) https://goreportcard.com/badge/github.com/prometheus-community/stackdriver_exporter](https://goreportcard.com/report/github.com/prometheus-community/stackdriver_exporter) https://pkg.go.dev/badge/github.com/prometheus-community/stackdriver_exporter?status.svg](https://pkg.go.dev/github.com/prometheus-community/stackdriver_exporter?tab=doc) !GitHub go.mod Go version ([***]

A Prometheus exporter for Google Stackdriver Monitoring metrics. It acts as a proxy that requests Stackdriver API for the metric's time-series everytime prometheus scrapes it.

Installation

Binaries

Download the already existing https://github.com/prometheus-community/stackdriver_exporter/releases for your platform:

console
$ ./stackdriver_exporter <flags>

From source

Using the standard go install (you must have Go already installed in your local machine):

console
$ go install github.com/prometheus-community/stackdriver_exporter
$ stackdriver_exporter <flags>

Docker

To run the stackdriver exporter as a Docker container, run:

console
$ docker run -p 9255:9255 prometheuscommunity/stackdriver-exporter <flags>

Kubernetes

You can find a helm chart in the prometheus-community charts repository at https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-stackdriver-exporter

bash
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm install [RELEASE_NAME] prometheus-community/prometheus-stackdriver-exporter

Cloud Foundry

The exporter can be deployed to an already existing Cloud Foundry environment:

console
$ git clone https://github.com/prometheus-community/stackdriver_exporter.git
$ cd stackdriver_exporter

Modify the included https://github.com/prometheus-community/stackdriver_exporter/blob/master/manifest.yml to include the desired properties. Then you can push the exporter to your Cloud Foundry environment:

console
$ cf push

BOSH

This exporter can be deployed using the https://github.com/cloudfoundry-community/prometheus-boshrelease.

Usage

Credentials and Permissions

The Google Stackdriver Exporter uses the Google Golang Client Library, which offers a variety of ways to provide credentials. Please refer to the Google Application Default Credentials documentation to see how the credentials can be provided.

If you are using IAM roles, the roles/monitoring.viewer IAM role contains the required permissions. See the Access Control Guide for more information.

If you are still using the legacy Access scopes, the https://www.googleapis.com/auth/monitoring.read scope is required.

Flags

FlagRequiredDefaultDescription
google.project-idsNoGCloud SDK auto-discoveryRepeatable flag of Google Project IDs
google.projects.filterNoGCloud projects filter expression. See more here.
google.universe-domainNogoogleapis.comTarget specific Google Cloud environments, such as public cloud, or specific sovereign clouds
monitoring.metrics-ingest-delayNoOffsets metric collection by a delay appropriate for each metric type, e.g. because bigquery metrics are slow to appear
monitoring.drop-delegated-projectsNoNoDrop metrics from attached projects and fetch project_id only.
monitoring.metrics-prefixesYesRepeatable flag of Google Stackdriver Monitoring Metric Type prefixes (see https://github.com/prometheus-community/stackdriver_exporter#example and available metrics)
monitoring.metrics-intervalNo5mMetric's timestamp interval to request from the Google Stackdriver Monitoring Metrics API. Only the most recent data point is used
monitoring.metrics-offsetNo0sOffset (into the past) for the metric's timestamp interval to request from the Google Stackdriver Monitoring Metrics API, to handle latency in published metrics
monitoring.filtersNoAdditonal filters to be sent on the Monitoring API call. Add multiple filters by providing this parameter multiple times. See monitoring.filters for more info.
monitoring.aggregate-deltasNoIf enabled will treat all DELTA metrics as an in-memory counter instead of a gauge. Be sure to read what to know about aggregating DELTA metrics
monitoring.aggregate-deltas-ttlNo30mHow long should a delta metric continue to be exported and stored after GCP stops producing it. Read slow moving metrics to understand the problem this attempts to solve
monitoring.descriptor-cache-ttlNo0sHow long should the metric descriptors for a prefixed be cached for
stackdriver.max-retriesNo0Max number of retries that should be attempted on 503 errors from stackdriver.
stackdriver.http-timeoutNo10sHow long should stackdriver_exporter wait for a result from the Stackdriver API.
stackdriver.max-backoff=NoMax time between each request in an exp backoff scenario.
stackdriver.backoff-jitterNo1sThe amount of jitter to introduce in a exp backoff scenario.
stackdriver.retry-statusesNo503The HTTP statuses that should trigger a retry.
web.config.fileNo[EXPERIMENTAL] Path to configuration file that can enable TLS or authentication.
web.listen-addressNo:9255Address to listen on for web interface and telemetry Repeatable for multiple addresses.
web.systemd-socketNoUse systemd socket activation listeners instead of port listeners (Linux only).
web.stackdriver-telemetry-pathNo/metricsPath under which to expose Stackdriver metrics.
web.telemetry-pathNo/metricsPath under which to expose Prometheus metrics

TLS and basic authentication

The Stackdriver Exporter supports TLS and basic authentication.

To use TLS and/or basic authentication, you need to pass a configuration file using the --web.config.file parameter. The format of the file is described https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md.

Metrics

The exporter returns the following metrics:

MetricDescriptionLabels
stackdriver_monitoring_api_calls_totalTotal number of Google Stackdriver Monitoring API calls madeproject_id
stackdriver_monitoring_scrapes_totalTotal number of Google Stackdriver Monitoring metrics scrapesproject_id
stackdriver_monitoring_scrape_errors_totalTotal number of Google Stackdriver Monitoring metrics scrape errorsproject_id
stackdriver_monitoring_last_scrape_errorWhether the last metrics scrape from Google Stackdriver Monitoring resulted in an error (1 for error, 0 for success)project_id
stackdriver_monitoring_last_scrape_timestampNumber of seconds since 1970 since last metrics scrape from Google Stackdriver Monitoringproject_id
stackdriver_monitoring_last_scrape_duration_secondsDuration of the last metrics scrape from Google Stackdriver Monitoringproject_id

Metrics gathered from Google Stackdriver Monitoring are converted to Prometheus metrics:

  • Metric's names are normalized according to the Prometheus specification using the following pattern:
    1. namespace is a constant prefix (stackdriver)
    2. subsystem is the normalized monitored resource type (ie gce_instance)
    3. name is the normalized metric type (ie compute_googleapis_com_instance_cpu_usage_time)
  • Labels attached to each metric are an aggregation of:
    1. the unit in which the metric value is reported
    2. the metric type labels (see Metrics List)
    3. the monitored resource labels (see Monitored Resource Types)
  • For each timeseries, only the most recent data point is exported.
  • Stackdriver GAUGE metric kinds are reported as Prometheus Gauge metrics
  • Stackdriver CUMULATIVE metric kinds are reported as Prometheus Counter metrics.
  • Stackdriver DELTA metric kinds are reported as Prometheus Gauge metrics or an accumulating Counter if monitoring.aggregate-deltas is set
  • Only BOOL, INT64, DOUBLE and DISTRIBUTION metric types are supported, other types (STRING and MONEY) are discarded.
  • DISTRIBUTION metric type is reported as a Prometheus Histogram, except the _sum time series is not supported.

Example

If we want to get all CPU (compute.googleapis.com/instance/cpu) and Disk (compute.googleapis.com/instance/disk) metrics for all Google Compute Engine instances, we can run the exporter with the following options:

stackdriver_exporter \
  --google.project-ids=my-test-project \
  --monitoring.metrics-prefixes "compute.googleapis.com/instance/cpu"
  --monitoring.metrics-prefixes "compute.googleapis.com/instance/disk"

Using filters

The structure for a filter is <targeted_metric_prefix>:<filter_query>

The targeted_metric_prefix is used to ensure the filter is only applied to the metric_prefix(es) where it makes sense. It does not explicitly have to match a value from metric_prefixes but the targeted_metric_prefix must be at least a prefix to one or more metric_prefixes

Example:
metrics_prefixes = pubsub.googleapis.com/snapshot, pubsub.googleapis.com/subscription/num_undelivered_messages
targeted_metric_prefix options would be \ pubsub.googleapis.com (apply to all defined prefixes)
pubsub.googleapis.com/snapshot (apply to only snapshot metrics)
pubsub.googleapis.com/subscription (apply to only subscription metrics)
pubsub.googleapis.com/subscription/num_undelivered_messages (apply to only the specific subscription metric) \

The filter_query will be applied to a final metrics API query when querying for metric data. You can read more about the metric API filter options in GCPs documentation [***]

The final query sent to the metrics API already includes filters for project and metric type. Each applicable filter_query will be appended to the query with an AND. String filter values that contain special characters (e.g. : colon) must be quoted with quotation marks ". Please always check logs for potential syntax errors from GCP.

Full example

stackdriver_exporter \
 --google.project-ids=my-test-project \
 --monitoring.metrics-prefixes='pubsub.googleapis.com/subscription' \
 --monitoring.metrics-prefixes='compute.googleapis.com/instance/cpu' \
 --monitoring.metrics-prefixes='cloudsql.googleapis.com/database' \
 --monitoring.filters='pubsub.googleapis.com/subscription:resource.labels.subscription_id=monitoring.regex.full_match("us-west4.*my-team-subs.*")' \
 --monitoring.filters='compute.googleapis.com/instance/cpu:resource.labels.instance=monitoring.regex.full_match("us-west4.*my-team-subs.*")' \
 --monitoring.filters='cloudsql.googleapis.com/database:resource.labels.database_id="my-test-project:my-database-name"'

Using projects filter:

stackdriver_exporter \
  --google.projects.filter='labels.monitoring="true"'

Filtering enabled collectors

The stackdriver_exporter collects all metrics type prefixes by default.

For advanced uses, the collection can be filtered by using a repeatable URL param called collect. In the Prometheus configuration you can use you can use this syntax under the scrape config.

yaml
params:
  collect:
  - compute.googleapis.com/instance/cpu
  - compute.googleapis.com/instance/disk

What to know about Aggregating DELTA Metrics

Treating DELTA Metrics as a gauge produces data which is wildly inaccurate/not very useful (see https://github.com/prometheus-community/stackdriver_exporter/issues/116). However, aggregating the DELTA metrics overtime is not a perfect solution and is intended to produce data which mirrors GCP's data as close as possible.

The biggest challenge to producing a correct result is that a counter for prometheus does not start at 0, it starts at the first value which is exported. This can cause inconsistencies when the exporter first starts and for slow moving metrics which are described below.

Start-up Delay

When the exporter first starts it has no persisted counter information and the stores will be empty. When the first sample is received for a series it is intended to be a change from a previous value according to GCP, a delta. But the prometheus counter is not initialized to 0 so it does not export this as a change from 0, it exports that the counter started at the sample value. Since the series exported are dynamic it's not possible to export an initial 0 value in order to account for this issue. The end result is that it can take a few cycles for aggregated metrics to start showing rates exactly as GCP.

As an example *** a prometheus query, sum by(backend_target_name) (rate(stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_request_bytes_count[1m])) which is aggregating 5 series. All 5 series will need to have two samples from GCP in order for the query to produce the same result as GCP.

Slow Moving Metrics

A slow moving metric would be a metric which is not constantly changing with every sample from GCP. GCP does not consistently report slow moving metrics DELTA metrics. If this occurs for too long (default 5m) prometheus will mark the series as stale. The end result is that the next reported sample will be treated as the start of a new series and not an increment from the previous value. Here's an example of this in action, ![]([***]

There are two features which attempt to combat this issue,

  1. monitoring.aggregate-deltas-ttl which controls how long a metric is persisted in the data store after its no longer being reported by GCP
  2. Metrics which were not collected during a scrape are still exported at their current counter value

The configuration when using monitoring.aggregate-deltas gives a 30 minute buffer to slower moving metrics and monitoring.aggregate-deltas-ttl can be adjusted to tune memory requirements vs correctness. Storing the data for longer results in a higher memory cost.

The feature which continues to export metrics which are not collected can cause the sample has been rejected because another sample with the same timestamp, but a different value, has already been ingested if your scrape config for the exporter has honor_timestamps enabled (this is the default value). This is caused by the fact that it's not possible to know the different between GCP having late arriving data and GCP not exporting a value. The underlying counter is still incremented when this happens so the next reported sample will show a higher rate than expected.

Contributing

Refer to the https://github.com/prometheus-community/stackdriver_exporter/blob/master/CONTRIBUTING.md.

License

Apache License 2.0, see https://github.com/prometheus-community/stackdriver_exporter/blob/master/LICENSE.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 stackdriver-exporter 镜像标签

docker pull docker.xuanyuan.run/prometheuscommunity/stackdriver-exporter:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull prometheuscommunity/stackdriver-exporter:<标签>

更多 stackdriver-exporter 镜像推荐

frodenas/stackdriver-exporter logo

frodenas/stackdriver-exporter

frodenas
暂无描述
1 次收藏50万+ 次下载
6 年前更新
weaveworks/stackdriver-exporter logo

weaveworks/stackdriver-exporter

weaveworks
暂无描述
2.2千+ 次下载
7 年前更新
rancher/prom-node-exporter logo

rancher/prom-node-exporter

rancher
暂无描述
1 次收藏1000万+ 次下载
2 年前更新
penpotapp/exporter logo

penpotapp/exporter

penpotapp
Penpot是用于设计与代码协作的开源设计工具,支持设计师创建设计稿、原型及设计系统,开发者可直接使用现成代码。
10 次收藏100万+ 次下载
1 个月前更新
bitnamicharts/node-exporter logo

bitnamicharts/node-exporter

bitnamicharts
Bitnami提供的Helm chart,用于在Kubernetes环境中部署Node Exporter,以收集主机系统的硬件和操作系统指标。
50万+ 次下载
10 个月前更新
percona/mongodb_exporter logo

percona/mongodb_exporter

percona
MongoDB的Prometheus导出器,支持分片、复制和存储引擎相关监控指标
12 次收藏500万+ 次下载
1 个月前更新

查看更多 stackdriver-exporter 相关镜像

轩辕镜像配置手册

按平台快速找到配置文档

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

iKuai 镜像加速

宝塔面板

一键配置镜像源

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

一键安装

一键安装 Docker

Linux Docker 一键安装

需要其他帮助?请查看我们的 常见问题 Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

免费版与专业版区别

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
prometheuscommunity/stackdriver-exporter
教程轩辕镜像功能与使用教程
价格查看流量套餐与价格
热门查看热门 Docker 镜像推荐
博客Docker 镜像公告与技术博客
官方公众号:源码跳动|官方技术交流群:831623681
官方公众号:源码跳动|官方技术交流群:|问题咨询请:提交工单
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.