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 alert.rules are not loading in 0.16.2 #2790

Closed
tsrinath1986 opened this Issue Jun 1, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@tsrinath1986
Copy link

tsrinath1986 commented Jun 1, 2017

Hi,
i installed prometheus on ubuntu 16.04 using apt. alertmanager installed from git.
when i write alert.rules and include in /etc/prometheus/prometheus.yml i am getting error after restarting service.
1

  • Prometheus version:
    prometheus, version 0.16.2

    insert output of prometheus -version here
    prometheus, version 0.16.2+ds (branch: debian/sid, revision: 0.16.2+ds-1ubuntu1)

  • Alertmanager version:
    0.7.0-rc.0 / 2017-05-19
    insert output of alertmanager -version here (if relevant to the issue)

  • Prometheus configuration file:

# Sample config for Prometheus.

global:
  scrape_interval:     15s # By default, scrape targets every 15 seconds.
  evaluation_interval: 15s # By default, scrape targets every 15 seconds.
  # scrape_timeout is set to the global default (10s).

  # Attach these labels to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
  external_labels:
      monitor: 'BrandWizard'

# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
  # - "first.rules"
  # - "second.rules"
#    - "alerts.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'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s
    scrape_timeout: 10s

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    target_groups:
      - targets: ['localhost:9090','localhost:8080']

  - job_name: node
    # If prometheus-node-exporter is installed, grab stats about the local
    # machine by default.
    target_groups:
      - targets: ['localhost:9100']
      - targets: ['stage.brandwizard.net:9100']

  • Alertmanager configuration file:
route:
  group_by: [Alertname]
# send all notifications to me.
  receiver: Admin-Alerts

receivers:
- name: Admin-Alerts
  email_configs:
  - to:xyz@gmail.com
    from: abc@gmail.com
    smarthost: smtp.gmail.com:587
    auth_username: "abc@gmail.com"
    auth_identity: "abc@gmail.com"
    auth_password: <hidden>
  • Logs:
insert Prometheus and Alertmanager logs relevant to the issue here

time="2017-06-01T00:13:41-07:00" level=info msg="Loading configuration file /etc/prometheus/prometheus.yml" source="main.go:196"
time="2017-06-01T00:13:41-07:00" level=error msg="Error loading rules, previous rule set restored: error parsing /etc/prometheus/alert.rules: parse error at line 3, char 4: alert summary missing" source="manager.go:336"
prometheus, version 0.16.2+ds (branch: debian/sid, revision: 0.16.2+ds-1ubuntu1)
build user: pkg-go-maintainers@lists.alioth.debian.org
build date: 20160408-04:15:29
go version: go1.6

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jun 1, 2017

That's a very old version of Prometheus. Try a newer version.

@tsrinath1986

This comment has been minimized.

Copy link
Author

tsrinath1986 commented Jun 1, 2017

in latest version node_exporter 0.14.0 not showing expressions in http://localhost:9090/graph
eg : node_cpu
can help me in this.
i followed below tutorial to setup node_exporter and prometheus.
https://www.digitalocean.com/community/tutorials/how-to-use-prometheus-to-monitor-your-ubuntu-14-04-server

@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.