Galaxy
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

prometheus

Source Code Build Status License: MIT

Deploy Prometheus monitoring system.


Default Variables

prometheus_alert_relabel_configs

Default value

prometheus_alert_relabel_configs: []

Example usage

prometheus_alert_relabel_configs:
  - action: labeldrop
    regex: replica

prometheus_alert_rules

Default value

prometheus_alert_rules:
  - alert: Watchdog
    expr: vector(1)
    for: 10m
    labels:
      severity: warning
    annotations:
      description: >-
        This is an alert meant to ensure that the entire alerting pipeline is functional.
        This alert is always firing. There are integrations with various notification
        mechanisms that send a notification when this alert is not firing anymore.        
      summary: Ensure entire alerting pipeline is functional
  - alert: InstanceDown
    expr: up == 0
    for: 5m
    labels:
      severity: critical
    annotations:
      description: '{% raw %}{{ $labels.instance }} of job {{ $labels.job }} has been
        down for more than 5 minutes.{% endraw %}'
      summary: '{% raw %}Instance {{ $labels.instance }} down{% endraw %}'

prometheus_alert_rules_extra

Default value

prometheus_alert_rules_extra: []

prometheus_alert_rules_files

Default value

prometheus_alert_rules_files:
  - prometheus/rules/*.rules

prometheus_alertmanager_config

Default value

prometheus_alertmanager_config: []

Example usage

prometheus_alertmanager_config:
  - scheme: https
    path_prefix: alertmanager/
    basic_auth:
      username: user
      password: pass
    static_configs:
      - targets: ["127.0.0.1:9093"]
    proxy_url: "127.0.0.2"

prometheus_base_dir

Default value

prometheus_base_dir: /opt/prometheus

prometheus_config_dir

Default value

prometheus_config_dir: '{{ prometheus_base_dir }}/conf'

prometheus_config_flags_extra

Default value

prometheus_config_flags_extra: []

Example usage

prometheus_config_flags_extra:
  - name: alertmanager.timeout
    value: 10s

prometheus_data_dir

Default value

prometheus_data_dir: '{{ prometheus_base_dir }}/data'

prometheus_external_labels

Default value

prometheus_external_labels:
  environment: '{{ ansible_fqdn | default(ansible_host) | default(inventory_hostname)
    }}'

prometheus_extra_groups

Default value

prometheus_extra_groups: []

prometheus_file_sd_dir

Default value

prometheus_file_sd_dir: '{{ prometheus_config_dir }}/file_sd'

prometheus_global

Default value

prometheus_global:
  scrape_interval: 15s
  scrape_timeout: 10s
  evaluation_interval: 15s

prometheus_group

Default value

prometheus_group: '{{ prometheus_user }}'

prometheus_log_level

Default value

prometheus_log_level: error

prometheus_packages

Default value

prometheus_packages:
  - tar

prometheus_read_only_dirs

Default value

prometheus_read_only_dirs: []

prometheus_remote_read

Default value

prometheus_remote_read: []

Example usage

prometheus_remote_read:
  - url: https://demo.cloudalchemy.org:9201/read
    basic_auth:
      password: FOO

prometheus_remote_write

Default value

prometheus_remote_write: []

Example usage

prometheus_remote_write:
  - url: https://dev.kausal.co/prom/push
    basic_auth:
      password: FOO

prometheus_rules_dir

Default value

prometheus_rules_dir: '{{ prometheus_config_dir }}/rules'

prometheus_scrape_configs

Default value

prometheus_scrape_configs:
  - job_name: prometheus
    metrics_path: "{{ prometheus_web_external_url | urlsplit('path') if (prometheus_web_external_url\
      \ | urlsplit('path')) | length > 1 else '' }}/metrics"
    static_configs:
      - targets:
          - "{{ ansible_fqdn | default(ansible_host) | default('localhost') }}:61000"

prometheus_static_targets_files

Default value

prometheus_static_targets_files:
  - prometheus/targets/*.yml
  - prometheus/targets/*.json

prometheus_storage_retention

Default value

prometheus_storage_retention: 30d

prometheus_storage_retention_size

[EXPERIMENTAL] Maximum number of bytes that can be stored for blocks.

Default value

prometheus_storage_retention_size: '0'

prometheus_targets

Default value

prometheus_targets: []

Example usage

prometheus_targets:
 - name: node
   config:
     - targets:
         - localhost:9100
       labels:
         env: test

prometheus_user

Default value

prometheus_user: prometheus_adm

prometheus_user_comment

Default value

prometheus_user_comment: Prometheus

prometheus_user_home

Default value

prometheus_user_home: /home/{{ prometheus_user }}

prometheus_version

Default value

prometheus_version: 2.27.0

prometheus_web_basic_auth_users

See official documentation.

Default value

prometheus_web_basic_auth_users: _unset_

prometheus_web_bind_ip

Default value

prometheus_web_bind_ip: 127.0.0.1

prometheus_web_bind_port

Default value

prometheus_web_bind_port: 61000

prometheus_web_external_url

Default value

prometheus_web_external_url: http://localhost:61000/

prometheus_web_http_server

See official documentation.

Default value

prometheus_web_http_server: _unset_

prometheus_web_tls_cert_path

Default value

prometheus_web_tls_cert_path: '{{ prometheus_base_dir }}/tls/certs/mycert.pem'

prometheus_web_tls_cert_source

Default value

prometheus_web_tls_cert_source: mycert.pem

prometheus_web_tls_enabled

Default value

prometheus_web_tls_enabled: false

prometheus_web_tls_key_path

Default value

prometheus_web_tls_key_path: '{{ prometheus_base_dir }}/tls/private/mykey.pem'

prometheus_web_tls_key_source

Default value

prometheus_web_tls_key_source: mykey.pem

Discovered Tags

tls_renewal
 

Dependencies

None.