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

component="rule manager" msg="loading groups failed" err="yaml: unmarshal errors:\n line 1: cannot unmarshal !!seq into rulefmt.RuleGroups" #3670

Closed
MJMcGuinness opened this Issue Jan 9, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@MJMcGuinness
Copy link

MJMcGuinness commented Jan 9, 2018

What did you do?**
Tried to add a rules file and update the config

What did you expect to see?**
Prometheus server to start running as normal

What did you see instead? Under which circumstances?**
./prometheus --config.file=prometheus.yml
level=info ts=2018-01-09T14:19:25.071064072Z caller=main.go:215 msg="Starting Prometheus" version="(version=2.0.0, branch=HEAD, revision=0a74f98628a0463dddc90528220c94de5032d1a0)"
level=info ts=2018-01-09T14:19:25.071210482Z caller=main.go:216 build_context="(go=go1.9.2, user=root@615b82cb36b6, date=20171108-07:11:59)"
level=info ts=2018-01-09T14:19:25.071246348Z caller=main.go:217 host_details="(Linux 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Dec 28 14:23:39 EST 2017 x86_64 corklab-16.cork.ie.ibm.com (none))"
level=info ts=2018-01-09T14:19:25.08096863Z caller=main.go:314 msg="Starting TSDB"
level=info ts=2018-01-09T14:19:25.081006157Z caller=targetmanager.go:71 component="target manager" msg="Starting target manager..."
level=info ts=2018-01-09T14:19:25.080911169Z caller=web.go:380 component=web msg="Start listening for connections" address=0.0.0.0:9090
level=warn ts=2018-01-09T14:19:25.614524237Z caller=head.go:317 component=tsdb msg="unknown series references in WAL samples" count=46668
level=info ts=2018-01-09T14:19:25.616529594Z caller=main.go:326 msg="TSDB started"
level=info ts=2018-01-09T14:19:25.616652664Z caller=main.go:394 msg="Loading configuration file" filename=prometheus.yml
level=error ts=2018-01-09T14:19:25.618426689Z caller=manager.go:485 component="rule manager" msg="loading groups failed" err="yaml: unmarshal errors:\n line 1: cannot unmarshal !!seq into rulefmt.RuleGroups"
level=error ts=2018-01-09T14:19:25.618522118Z caller=main.go:413 msg="Failed to apply configuration" err="error loading rules, previous rule set restored"
level=error ts=2018-01-09T14:19:25.618712627Z caller=main.go:356 msg="Error loading config" err="one or more errors occurred while applying the new configuration (--config.file=prometheus.yml)"

Environment**
Linux (Red Hat 4.8.5-16)

System information:
Linux 3.10.0-693.11.6.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:

    insert output of alertmanager --version here (if relevant to the issue)

  • Prometheus configuration file:

- name: host
  rules:
  - alert: high_cpu_load
    expr: node_load1 > 1.5
    for: 30s
    labels:
      severity: warning
    annotations:
      summary: "Server under high load"
      description: "Cpu host is under high load, the avg load 1m is at {{ $value}}. Reported by instance {{ $labels.instance }} of job {{ $labels.job }}."

  • Alertmanager configuration file:
insert configuration here (if relevant to the issue)
  • Logs:
insert Prometheus and Alertmanager logs relevant to the issue here
@simonpasquier

This comment has been minimized.

Copy link
Member

simonpasquier commented Jan 10, 2018

If I read ok, you miss the groups: line at the top

groups:
- name: host
  rules:
  - alert: high_cpu_load
    expr: node_load1 > 1.5
    for: 30s
    labels:
      severity: warning
    annotations:
      summary: "Server under high load"
      description: "Cpu host is under high load, the avg load 1m is at {{ $value}}. Reported by instance {{ $labels.instance }} of job {{ $labels.job }}."

Also you can use promtool check rules <rule file> to verify the format.

@gouthamve

This comment has been minimized.

Copy link
Member

gouthamve commented Jan 10, 2018

Yep, as @simonpasquier pointed out this looks like a config problem rather than an issue with the prometheus server. I am closing this as it makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.

Feel free to reopen if you think this is due to a bug in Prometheus.

@gouthamve gouthamve closed this Jan 10, 2018

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 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 23, 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.