16.2. 配置 Prometheus 服务器以从 Apache Karaf 容器中提取公开的指标 要让 Prometheus 服务器从 Apache Karaf 容器中提取指标,必须将公开指标的端点添加到 Prometheus 配置文件的 targets 属性中。 流程 进入 Prometheus 安装目录中的 /prometheus.yml 配置文件。 添加 Apache Karaf 端点以提取: scrape_configs: - job_name: 'prometheus' # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: - targets: ['localhost:9779'] scrape_configs: - job_name: 'prometheus' # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: - targets: ['localhost:9779'] Copy to Clipboard Copied! Toggle word wrap Toggle overflow 前一个下一个