Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus配置采用file_sd_configs作target发现时报错找不到文件 #58

Open
u-kyou opened this issue Jun 4, 2021 · 2 comments

Comments

@u-kyou
Copy link

u-kyou commented Jun 4, 2021

prometheus采用了类似如下的配置:

      - job_name: "node"
        file_sd_configs:
          - refresh_interval: 1m
            files:
              - "/etc/prometheus/config_pvc/node/*.yml"

/etc/prometheus/config_pvc/node/下会动态更新需要监控的target文件,但发现coordinator日志有如下报错,实际上文件确实存在的:

level=error ts=2021-06-04T03:18:06.090Z caller=file.go:344 component="discovery manager scrape" discovery=file msg="Error reading file" path=/etc/prometheus/config_pvc/node/xxxxxxxxxxxxxxx.yml err="open /etc/prometheus/config_pvc/node/xxxxxxxxxxxxxxxyml: no such file or directory"
@RayHuangCN
Copy link
Member

您是否正确挂载了此文件?

@u-kyou
Copy link
Author

u-kyou commented Jun 9, 2021

您是否正确挂载了此文件?

确实是挂载了,从日志来看都已经读到了文件的路径,说明file_sd_configs文件发现是没问题的。感觉是open操作时出了问题报了这个error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants