Prometheus之azure_sd_config配置

半兽人 发表于: 2020-10-20   最后更新时间: 2020-10-20 21:29:15  
{{totalSubscript}} 订阅, 1,720 游览

Azure SD正处于测试阶段:在未来的版本中,仍然可能对配置进行实质性修改

Azure SD配置允许从Azure虚拟机中检索和获取目标。

下面的测试标签在relabeling期间在目标上仍然是可用的:

  • __meta_azure_machine_id: 机器ID
  • __meta_azure_machine_location: 机器运行的位置
  • __meta_azure_machine_name: 机器名称
  • __meta_azure_machine_private_ip: 机器的内网IP
  • __meta_azure_machine_resource_group: 机器的资源组
  • __meta_azure_tag_<tagname>: 机器的每个tag值

对于Azure发现,看看下面的配置选项:

# The information to access the Azure API.
# The subscription ID.
subscription_id: <string>
# The tenant ID.
tenant_id: <string>
# The client ID.
client_id: <string>
# The client secret.
client_secret: <string>

# Refresh interval to re-read the instance list.
[ refresh_interval: <duration> | default = 300s ]

# The port to scrape metrics from. If using the public IP address, this must
# instead be specified in the relabeling rule.
[ port: <int> | default = 80 ]
更新于 2020-10-20

查看Prometheus更多相关的文章或提一个关于Prometheus的问题,也可以与我们一起分享文章