我不得不让它在天蓝色平台上工作,vmagent的scrape_config解决方案在AWS中工作得很好,但在Azure中却找不到类似的解决方案。在这个特定的片段中,我们已经配置了从VM中抓取node_exporter的配置,它具有标记键: mon_exporters和值:节点。检查了正式文档配置,但没有找到任何关于过滤器选项的内容
有什么方法可以过滤掉VM基础上的我的需要吗?因为现在它会获取特定订阅中的所有VM
- job_name: 'node_exporter'
honor_timestamps: true
scrape_interval: 1m
scrape_timeout: 15s
metrics_path: /metrics
scheme: http
follow_redirects: true
azure_sd_configs:
- subscription_id: 'xxxxx'
authentication_method: 'ManagedIdentity'
environment: 'AzurePublicCloud'
refresh_interval: 5m
port: 9100
filters:
- name: 'tag:mon_exporters'
values: ["*node*"]发布于 2022-09-17 08:06:02
配置 in VictoriaMetrics不支持filters选项。但是您可以在action: keep 再标的__meta_azure_machine_tag_mon_exporters标签上保留所需的目标。尝试以下配置:
- job_name: 'node_exporter'
scrape_interval: 1m
azure_sd_configs:
- subscription_id: 'xxxxx'
authentication_method: 'ManagedIdentity'
port: 9100
relabel_configs:
- action: keep
if: '{__meta_azure_machine_tag_mon_exporters="node"}'请参阅有关这种类型的重命名这里的详细信息。
https://stackoverflow.com/questions/73725291
复制相似问题