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

Unable to load all the rules with * wildcard in a Directory #3786

Closed
Neru007 opened this Issue Feb 2, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@Neru007
Copy link

Neru007 commented Feb 2, 2018

What did you do? Trying to load the rules configuration from a directory with *.rules

What did you expect to see? Expected that all the rules file should get loaded

What did you see instead? Under which circumstances? Prometheus unable to load the configuration and getting error "failed to reload config: one or more errors occurred while applying the new configuration (--config.file=/opt/config/prometheus.yml)"

Environment RHEL 7.3

  • System information:

    Linux 3.10.0-514.el7.x86_64 x86_64

  • Prometheus version:

prometheus, version 2.0.0 (branch: HEAD, revision: 0a74f98)
build user: root@615b82cb36b6
build date: 20171108-07:11:59
go version: go1.9.2

  • Alertmanager version:

alertmanager, version 0.11.0 (branch: HEAD, revision: 30dd0426c08b6479d9a26259ea5efd63bc1ee273)
build user: root@3e103e3fc918
build date: 20171116-17:43:56
go version: go1.9.2

  • Prometheus configuration file:
# my global config
global:
  scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
  alertmanagers:
  - static_configs:
    - targets:
       - localhost:8080

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
   - '/etc/autoscale/*.rules'
   - "system.rules"
  • Alertmanager configuration file:
insert configuration here (if relevant to the issue)
  • Logs:
insert Prometheus and Alertmanager logs relevant to the issue here
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Feb 2, 2018

Can you share the rest of the logs?

@Neru007

This comment has been minimized.

Copy link
Author

Neru007 commented Feb 2, 2018

Well the only logs I'm able to see is below.

level=error ts=2018-02-02T09:27:27.272558364Z caller=manager.go:485 component="rule manager" msg="loading groups failed" err="open /opt/config/autoscale/autoscale.yml: permission denied"
level=error ts=2018-02-02T09:27:27.272634989Z caller=main.go:413 msg="Failed to apply configuration" err="error loading rules, previous rule set restored"
level=error ts=2018-02-02T09:27:27.272823735Z caller=main.go:298 msg="Error reloading config" err="one or more errors occurred while applying the new configuration (--config.file=/opt/config/prometheus.yml)"
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Feb 2, 2018

You need to fix your file permissions.

@Neru007

This comment has been minimized.

Copy link
Author

Neru007 commented Feb 2, 2018

Thanks, Worked like a charm.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.