ansible-role-prometheus/defaults/main.yml

36 lines
1.3 KiB
YAML

---
prometheus_install: True
# 2.45.0 is the latest LTS
prometheus_version: 2.45.0
prometheus_download_url: 'https://github.com/prometheus/prometheus/releases/download/v{{ prometheus_version }}/{{ prometheus_file }}'
prometheus_user: prometheus
prometheus_home: /opt/prometheus
prometheus_dist_dir: '{{ prometheus_home }}/dist'
prometheus_data_dir: '{{ prometheus_home }}/data'
prometheus_confdir: '/opt/prometheus/conf'
prometheus_cmd: '{{ prometheus_dist_dir }}/{{ prometheus_dir }}/prometheus'
prometheus_loglevel: info
prometheus_http_port: 9090
prometheus_opts: '--storage.tsdb.retention.time=120d'
# --storage.tsdb.retention.size=512GB
prometheus_nginx_letsencrypt_managed: true
prometheus_nginx_virthost_name: "{{ ansible_fqdn }}"
prometheus_nginx_server_name: "{{ ansible_fqdn }}"
prometheus_nginx_virthosts:
- virthost_name: '{{ prometheus_nginx_virthost_name }}'
listen: '{{ http_port }}'
server_name: '{{ prometheus_nginx_server_name }}'
server_aliases: ''
index: index.html
ssl_enabled: true
ssl_only: true
ssl_letsencrypt_certs: '{{ nginx_letsencrypt_managed }}'
root: '{{ nginx_webroot }}'
server_tokens: 'off'
proxy_standard_setup: True
locations:
- location: /
target: http://localhost:{{ prometheus_http_port }}