匿名
未登录
登录
Linux78|wiki
搜索
查看“Prometheus 基于文件的服务发现”的源代码
来自Linux78|wiki
名字空间
页面
讨论
更多
更多
页面选项
查看
查看源代码
历史
←
Prometheus 基于文件的服务发现
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
wiki:用户|用户
您可以查看与复制此页面的源代码。
=== Prometheus 基于文件的服务发现 === 官方文档:https://github.com/prometheus/prometheus/tree/master/discovery 服务发现支持: endpoints,ingress,kubernetes,node,pod,service。 Prometheus也提供了服务发现功能,可以从consul,dns,kubernetes,file等等多种来源发现新的目标。 * azure_sd_configs * consul_sd_configs * dns_sd_configs * ec2_sd_configs * openstack_sd_configs * file_sd_configs * gce_sd_configs * kubernetes_sd_configs * marathon_sd_configs * nerve_sd_configs * serverset_sd_configs * triton_sd_configs 1、编写配置文件:vim prometheus.yml scrape_configs: - job_name: 'prometheus' # 使用基于文件服务发现 file_sd_configs: # 指定服务发现的目录及配置文件 - files: ['/usr/local/prometheus/sd_config/*.yml'] # 每过5秒动态发现服务配置 refresh_interval: 5s 2、创建目录 mkdir /usr/local/prometheus/sd_config 3、写入配置文件 vim /usr/local/prometheus/sd_config/test.yml # 添加本地主机并填入标签 - targets: ['localhost:9090'] labels: idc: bj
返回至
Prometheus 基于文件的服务发现
。
导航
导航
首页
最近更改
随机页面
栏目
Nginx
Kubernetes
Spring Cloud
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志