【发布时间】:2021-06-08 17:52:23
【问题描述】:
我已经在我的 linux 节点上安装了 prometheus。我在 Windows 服务器上有一个从应用程序导出指标的 go 应用程序。 Windows 节点的指标路径位于 /app/metrics。注意,metrics 的输出是 json 格式。
这是我的 prometheus.yml:
scrape_configs:
- job_name: 'prometheus_metrics'
static_configs:
- targets: ['localhost:9090']
- job_name: 'node_exporter_metrics'
static_configs:
- targets: ['localhost:9100']
- job_name: 'app-qa-1'
metrics_path: /app/metrics
scheme: http
static_configs:
- targets: ['app-qa-1:1701']
当我查询指标并通过 promtool 时,我得到:
error while linting: text format parsing error in line 1: invalid metric name
在我的目标页面上,Windows 节点出现此错误:
"INVALID" is not a valid start token
这就是我的 Windows 节点的指标的样子:
"api.engine.gateway.50-percentile": 0,
"api.engine.gateway.75-percentile": 0,
"api.engine.gateway.95-percentile": 0,
"api.engine.gateway.99-percentile": 0,
"api.engine.gateway.999-percentile": 0,
"api.engine.gateway.count": 0,
"api.engine.gateway.fifteen-minute": 0,
"api.engine.gateway.five-minute": 0,
【问题讨论】:
标签: windows go prometheus