Skip to content

rdemachkovych/prometheus

 
 

Repository files navigation

prometheus logo

Ansible Role: prometheus

Build Status License Ansible Role Twitter URL

Deploy Prometheus monitoring system

More info

An Ansible role that installs Prometheus Monitoring server.

Requirements

None

Role Variables

Have a look at the defaults/main.yml for variables that can be overridden.

Example usage

---
- hosts: all
  gather_facts: yes

- hosts: all
  become: yes
  become_user: root
  roles:
  - role:
      - SoInteractive.prometheus
  vars:
    prometheus_external_labels:
      monitoring: a
    prometheus_tgroup:
      - port: 9100
        labels:
          env: {{ system_domain }}
          job: node
        targets_group: all 

Defining alerting rules files

Put the rules files to rules folder

Alerting rules are defined in the following syntax:

ALERT <alert name>
  IF <expression>
  [ FOR <duration> ]
  [ LABELS <label set> ]
  [ ANNOTATIONS <label set> ]

Example Alertmanager rules files:

# Alert for any instance that is unreachable for >5 minutes.
ALERT InstanceDown
  IF up == 0
  FOR 5m
  LABELS { severity = "page" }
  ANNOTATIONS {
    summary = "Instance {{ $labels.instance }} down",
    description = "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes.",
  }

About

Deploy Prometheus monitoring system

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%