You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v2.46.0 can directly use the default configuration detection is ok, what does the new version do
What did you see instead? Under which circumstances?
Checking prometheus.yml
FAILED:
prometheus.yml: yaml: unmarshal errors:
line 2: field global not found in type rulefmt.RuleGroups
line 8: field alerting not found in type rulefmt.RuleGroups
line 15: field rule_files not found in type rulefmt.RuleGroups
line 21: field scrape_configs not found in type rulefmt.RuleGroups
System information
docker
Prometheus version
prometheus, version 2.51.2 (branch: HEAD, revision: b4c0ab52c3e9b940ab803581ddae9b3d9a452337)
build user: root@273ef2abb52b
build date: 20240410-14:05:54
go version: go1.22.2
platform: darwin/amd64
tags: netgo,builtinassets,stringlabels
Prometheus configuration file
No response
Alertmanager version
No response
Alertmanager configuration file
# my global configglobal:
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 configurationalerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.rule_files:
# - "first_rules.yml"# - "second_rules.yml"# A scrape configuration containing exactly one endpoint to scrape:# Here it's Prometheus itself.scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:
- targets: ["localhost:9090"]
Logs
No response
The text was updated successfully, but these errors were encountered:
check rules is designed for Prometheus rules. I think you’ve provided either a Prometheus config or an alertmanager config. Those need either promtool check config or amtool check-config.
What did you do?
promtool check rules prometheus.yml
What did you expect to see?
v2.46.0 can directly use the default configuration detection is ok, what does the new version do
What did you see instead? Under which circumstances?
Checking prometheus.yml
FAILED:
prometheus.yml: yaml: unmarshal errors:
line 2: field global not found in type rulefmt.RuleGroups
line 8: field alerting not found in type rulefmt.RuleGroups
line 15: field rule_files not found in type rulefmt.RuleGroups
line 21: field scrape_configs not found in type rulefmt.RuleGroups
System information
docker
Prometheus version
Prometheus configuration file
No response
Alertmanager version
No response
Alertmanager configuration file
Logs
No response
The text was updated successfully, but these errors were encountered: