Author: Robert Kaussow <mail@thegeeklab.de>
Date:   Sat May 29 15:59:30 2021 +0200

    fix: use the right bind port in molecule tests
This commit is contained in:
Robert Kaussow 2021-05-29 14:45:55 +00:00
parent 19fa13371a
commit 45d2ea28f5

401
index.md Normal file
View File

@ -0,0 +1,401 @@
---
title: prometheus
type: docs
---
[![Source Code](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white)](https://gitea.rknet.org/ansible/xoxys.prometheus) [![Build Status](https://img.shields.io/drone/build/ansible/xoxys.prometheus?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.prometheus) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?label=license)](LICENSE)
Deploy Prometheus monitoring system.
* [Default Variables](#default-variables)
* [prometheus_alert_relabel_configs](#prometheus_alert_relabel_configs)
* [prometheus_alert_rules](#prometheus_alert_rules)
* [prometheus_alert_rules_extra](#prometheus_alert_rules_extra)
* [prometheus_alert_rules_files](#prometheus_alert_rules_files)
* [prometheus_alertmanager_config](#prometheus_alertmanager_config)
* [prometheus_base_dir](#prometheus_base_dir)
* [prometheus_config_dir](#prometheus_config_dir)
* [prometheus_config_flags_extra](#prometheus_config_flags_extra)
* [prometheus_data_dir](#prometheus_data_dir)
* [prometheus_external_labels](#prometheus_external_labels)
* [prometheus_extra_groups](#prometheus_extra_groups)
* [prometheus_file_sd_dir](#prometheus_file_sd_dir)
* [prometheus_global](#prometheus_global)
* [prometheus_group](#prometheus_group)
* [prometheus_packages](#prometheus_packages)
* [prometheus_read_only_dirs](#prometheus_read_only_dirs)
* [prometheus_remote_read](#prometheus_remote_read)
* [prometheus_remote_write](#prometheus_remote_write)
* [prometheus_rules_dir](#prometheus_rules_dir)
* [prometheus_scrape_configs](#prometheus_scrape_configs)
* [prometheus_static_targets_files](#prometheus_static_targets_files)
* [prometheus_storage_retention](#prometheus_storage_retention)
* [prometheus_storage_retention_size](#prometheus_storage_retention_size)
* [prometheus_targets](#prometheus_targets)
* [prometheus_user](#prometheus_user)
* [prometheus_user_home](#prometheus_user_home)
* [prometheus_version](#prometheus_version)
* [prometheus_web_bind_ip](#prometheus_web_bind_ip)
* [prometheus_web_bind_port](#prometheus_web_bind_port)
* [prometheus_web_config](#prometheus_web_config)
* [prometheus_web_external_url](#prometheus_web_external_url)
* [Dependencies](#dependencies)
---
## Default Variables
### prometheus_alert_relabel_configs
#### Default value
```YAML
prometheus_alert_relabel_configs: []
```
#### Example usage
```YAML
prometheus_alert_relabel_configs:
- action: labeldrop
regex: replica
```
### prometheus_alert_rules
#### Default value
```YAML
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, therefore it should always be
firing in Alertmanager and always fire against a receiver. There are integrations
with various notification mechanisms that send a notification when this alert
is not firing.
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
```YAML
prometheus_alert_rules_extra: []
```
### prometheus_alert_rules_files
#### Default value
```YAML
prometheus_alert_rules_files:
- prometheus/rules/*.rules
```
### prometheus_alertmanager_config
#### Default value
```YAML
prometheus_alertmanager_config: []
```
#### Example usage
```YAML
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
```YAML
prometheus_base_dir: /opt/prometheus
```
### prometheus_config_dir
#### Default value
```YAML
prometheus_config_dir: '{{ prometheus_base_dir }}/conf'
```
### prometheus_config_flags_extra
#### Default value
```YAML
prometheus_config_flags_extra: []
```
#### Example usage
```YAML
prometheus_config_flags_extra:
- name: storage.tsdb.retention
value: 15d
- name: alertmanager.timeout
- value: 10s
```
### prometheus_data_dir
#### Default value
```YAML
prometheus_data_dir: '{{ prometheus_base_dir }}/data'
```
### prometheus_external_labels
#### Default value
```YAML
prometheus_external_labels:
environment: '{{ ansible_fqdn | default(ansible_host) | default(inventory_hostname)
}}'
```
### prometheus_extra_groups
#### Default value
```YAML
prometheus_extra_groups: []
```
### prometheus_file_sd_dir
#### Default value
```YAML
prometheus_file_sd_dir: '{{ prometheus_config_dir }}/file_sd'
```
### prometheus_global
#### Default value
```YAML
prometheus_global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
```
### prometheus_group
#### Default value
```YAML
prometheus_group: '{{ prometheus_user }}'
```
### prometheus_packages
#### Default value
```YAML
prometheus_packages: []
```
### prometheus_read_only_dirs
#### Default value
```YAML
prometheus_read_only_dirs: []
```
### prometheus_remote_read
#### Default value
```YAML
prometheus_remote_read: []
```
#### Example usage
```YAML
prometheus_remote_read:
- url: https://demo.cloudalchemy.org:9201/read
basic_auth:
password: FOO
```
### prometheus_remote_write
#### Default value
```YAML
prometheus_remote_write: []
```
#### Example usage
```YAML
prometheus_remote_write:
- url: https://dev.kausal.co/prom/push
basic_auth:
password: FOO
```
### prometheus_rules_dir
#### Default value
```YAML
prometheus_rules_dir: '{{ prometheus_config_dir }}/rules'
```
### prometheus_scrape_configs
#### Default value
```YAML
prometheus_scrape_configs:
- job_name: prometheus
metrics_path: "{{ prometheus_web_external_url | urlsplit('path') }}/metrics"
static_configs:
- targets:
- "{{ ansible_fqdn | default(ansible_host) | default('localhost') }}:9090"
```
### prometheus_static_targets_files
#### Default value
```YAML
prometheus_static_targets_files:
- prometheus/targets/*.yml
- prometheus/targets/*.json
```
### prometheus_storage_retention
#### Default value
```YAML
prometheus_storage_retention: 30d
```
### prometheus_storage_retention_size
> __[EXPERIMENTAL]__ Maximum number of bytes that can be stored for blocks.
#### Default value
```YAML
prometheus_storage_retention_size: '0'
```
### prometheus_targets
#### Default value
```YAML
prometheus_targets: []
```
#### Example usage
```YAML
prometheus_targets:
- name: node
config:
- targets:
- localhost:9100
labels:
env: test
```
### prometheus_user
#### Default value
```YAML
prometheus_user: prometheus_adm
```
### prometheus_user_home
#### Default value
```YAML
prometheus_user_home: /home/{{ prometheus_user }}
```
### prometheus_version
#### Default value
```YAML
prometheus_version: 2.27.0
```
### prometheus_web_bind_ip
#### Default value
```YAML
prometheus_web_bind_ip: 127.0.0.1
```
### prometheus_web_bind_port
#### Default value
```YAML
prometheus_web_bind_port: 9090
```
### prometheus_web_config
See official [documentation](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md).
#### Default value
```YAML
prometheus_web_config:
tls_server_config: {}
http_server_config: {}
basic_auth_users: {}
```
### prometheus_web_external_url
#### Default value
```YAML
prometheus_web_external_url: ''
```
## Dependencies
None.