Author: Robert Kaussow <mail@thegeeklab.de>
Date:   Sat May 29 17:52:24 2021 +0200

    feat: add web tls config
This commit is contained in:
Robert Kaussow 2021-05-29 15:59:58 +00:00
parent 45d2ea28f5
commit f8f8de624a

View File

@ -22,6 +22,7 @@ Deploy Prometheus monitoring system.
* [prometheus_file_sd_dir](#prometheus_file_sd_dir)
* [prometheus_global](#prometheus_global)
* [prometheus_group](#prometheus_group)
* [prometheus_log_level](#prometheus_log_level)
* [prometheus_packages](#prometheus_packages)
* [prometheus_read_only_dirs](#prometheus_read_only_dirs)
* [prometheus_remote_read](#prometheus_remote_read)
@ -35,10 +36,16 @@ Deploy Prometheus monitoring system.
* [prometheus_user](#prometheus_user)
* [prometheus_user_home](#prometheus_user_home)
* [prometheus_version](#prometheus_version)
* [prometheus_web_basic_auth_users](#prometheus_web_basic_auth_users)
* [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)
* [prometheus_web_http_server](#prometheus_web_http_server)
* [prometheus_web_tls_cert_path](#prometheus_web_tls_cert_path)
* [prometheus_web_tls_cert_source](#prometheus_web_tls_cert_source)
* [prometheus_web_tls_enabled](#prometheus_web_tls_enabled)
* [prometheus_web_tls_key_path](#prometheus_web_tls_key_path)
* [prometheus_web_tls_key_source](#prometheus_web_tls_key_source)
* [Dependencies](#dependencies)
---
@ -157,10 +164,8 @@ prometheus_config_flags_extra: []
```YAML
prometheus_config_flags_extra:
- name: storage.tsdb.retention
value: 15d
- name: alertmanager.timeout
- value: 10s
value: 10s
```
### prometheus_data_dir
@ -216,6 +221,14 @@ prometheus_global:
prometheus_group: '{{ prometheus_user }}'
```
### prometheus_log_level
#### Default value
```YAML
prometheus_log_level: error
```
### prometheus_packages
#### Default value
@ -281,7 +294,8 @@ prometheus_rules_dir: '{{ prometheus_config_dir }}/rules'
```YAML
prometheus_scrape_configs:
- job_name: prometheus
metrics_path: "{{ prometheus_web_external_url | urlsplit('path') }}/metrics"
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') }}:9090"
@ -359,6 +373,16 @@ prometheus_user_home: /home/{{ prometheus_user }}
prometheus_version: 2.27.0
```
### prometheus_web_basic_auth_users
See official [documentation](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md).
#### Default value
```YAML
prometheus_web_basic_auth_users: _unset_
```
### prometheus_web_bind_ip
#### Default value
@ -375,25 +399,62 @@ prometheus_web_bind_ip: 127.0.0.1
prometheus_web_bind_port: 9090
```
### prometheus_web_config
### prometheus_web_external_url
#### Default value
```YAML
prometheus_web_external_url: http://localhost:9090/
```
### prometheus_web_http_server
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_http_server: _unset_
```
### prometheus_web_external_url
### prometheus_web_tls_cert_path
#### Default value
```YAML
prometheus_web_external_url: ''
prometheus_web_tls_cert_path: '{{ prometheus_base_dir }}/tls/certs/mycert.pem'
```
### prometheus_web_tls_cert_source
#### Default value
```YAML
prometheus_web_tls_cert_source: mycert.pem
```
### prometheus_web_tls_enabled
#### Default value
```YAML
prometheus_web_tls_enabled: false
```
### prometheus_web_tls_key_path
#### Default value
```YAML
prometheus_web_tls_key_path: '{{ prometheus_base_dir }}/tls/private/mykey.pem'
```
### prometheus_web_tls_key_source
#### Default value
```YAML
prometheus_web_tls_key_source: mykey.pem
```
## Dependencies