LogCollector v2.3.2 及以后版本支持根据采集配置采集服务器上的指标数据,采集 Prometheus 格式的各类指标数据。本文介绍创建指标采集配置的操作步骤。
说明
指标主题为邀测功能,若有相关业务需求,可联系客户经理开通白名单。
填写规则名称。
填写插件配置。
填写采集插件配置,详情可参考 Prometheus 官网。示例如下:
global: scrape_interval: 30s # Default is every 30s. scrape_timeout: 10s #is set to the global default (10s). # A scrape configuration containing exactly one endpoint to scrape: # Here it's Prometheus itself. scrape_configs: # The job name is added as a label 'job=<job_name>' to any timeseries scraped from this config. - job_name: 'prometheus' # metrics_path defaults to '/metrics' # metrics_path: '/metrics' # scheme defaults to 'http'. # scheme: 'http' static_configs: - targets: ['localhost:9090']
单击提交。
创建采集配置之后,LogCollector 将采集指标数据并保存至指定的指标主题中,您可以在指标主题中执行检索分析操作。具体操作,请参考检索分析指标主题。