-
Notifications
You must be signed in to change notification settings - Fork 142
/
Copy pathargument_specs.yml
176 lines (176 loc) · 8.6 KB
/
argument_specs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
---
# yamllint disable rule:line-length
argument_specs:
main:
short_description: "Installs and configures prometheus"
description:
- "Prometheus monitoring system configuration and management"
author:
- "Prometheus Community"
options:
prometheus_version:
description:
- "Prometheus package version. Also accepts C(latest) as parameter."
- "Prometheus >= 2.x is supported"
default: "3.1.0"
prometheus_binary_url:
description: "URL of the prometheus binaries .tar.gz file"
default: "https://github.com/{{ _prometheus_repo }}/releases/download/v{{ prometheus_version }}/prometheus-{{ prometheus_version }}.{{ ansible_facts['system'] | lower }}-{{ _prometheus_go_ansible_arch }}.tar.gz"
prometheus_checksums_url:
description: URL of the prometheus checksums file
default: "https://github.com/{{ _prometheus_repo }}/releases/download/v{{ prometheus_version }}/sha256sums.txt"
prometheus_config_dir:
description: "Path to directory with prometheus configuration"
default: "/etc/prometheus"
prometheus_db_dir:
description: "Path to directory with prometheus database"
default: "/var/lib/prometheus"
prometheus_read_only_dirs:
description: "Additional paths that Prometheus is allowed to read (useful for SSL certs outside of the config directory)"
type: "list"
elements: "str"
prometheus_binary_install_dir:
description:
- "I(Advanced)"
- "Directory to install binaries"
default: "/usr/local/bin"
prometheus_web_listen_address:
description: "Address on which prometheus will be listening"
default: "0.0.0.0:9090"
prometheus_web_config:
description: "A Prometheus L(web config yaml,https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md) for configuring TLS and auth."
type: "dict"
prometheus_web_external_url:
description: "External address on which prometheus is available. Useful when behind reverse proxy. Ex. `http://example.org/prometheus`"
prometheus_metrics_path:
description: "Prometheus external metrics path"
default: "/{{ (prometheus_web_external_url + '/metrics') | regex_replace('^(.*://)?(.*?)/') }}"
prometheus_storage_retention:
description:
- "Data retention period"
default: "30d"
prometheus_storage_retention_size:
description:
- "Data retention period by size"
- "Maximum number of bytes that can be stored for blocks."
- "Units supported: KB, MB, GB, TB, PB."
default: "0"
prometheus_agent_mode:
description:
- "The Agent mode optimizes Prometheus for the remote write use case. It disables querying, alerting, and local storage, and replaces it with a customized TSDB WAL. L(Everything,https://prometheus.io/docs/prometheus/latest/feature_flags/#prometheus-agent) else stays the same."
- "This feature is available starting from Prometheus v2.32.0."
type: bool
default: false
prometheus_config_flags_extra:
description:
- "Additional configuration flags passed to prometheus binary at startup"
- "Example: prometheus_config_flags_extra: { alertmanager.timeout: 10s }"
type: "dict"
prometheus_alertmanager_config:
description:
- "Configuration responsible for pointing where alertmanagers are. This should be specified as list in yaml format."
- "It is compatible with the official L(alertmanager_config,https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config)"
type: "list"
elements: "str"
prometheus_alert_relabel_configs:
description:
- "Alert relabeling rules. This should be specified as list in yaml format."
- "It is compatible with the official L(alert_relabel_configs,https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs)"
type: "list"
elements: "str"
prometheus_global:
description:
- "Prometheus global config. It is compatible with the L(official configuration,https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file)"
type: "dict"
default:
scrape_interval: "60s"
scrape_timeout: "15s"
evaluation_interval: "15s"
prometheus_remote_write:
description:
- "Remote write. Compatible with the L(official configuration,https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write)"
type: "list"
elements: "str"
prometheus_remote_read:
description:
- "Remote read. It is compatible with the L(official configuration,https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_read)"
type: "list"
elements: "str"
prometheus_external_labels:
description: "Provide map of additional labels which will be added to any time series or alerts when communicating with external systems"
type: "dict"
default:
environment: "{{ ansible_fqdn | default(ansible_host) | default(inventory_hostname) }}"
prometheus_targets:
description:
- "Targets which will be scraped."
type: "dict"
prometheus_scrape_configs:
description:
- "Prometheus scrape jobs provided in same format as in the L(official docs,https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config)"
type: "list"
elements: "dict"
default:
- job_name: "prometheus"
metrics_path: "{{ prometheus_metrics_path }}"
static_configs:
- targets:
- "{{ ansible_fqdn | default(ansible_host) | default('localhost') }}:9090"
- job_name: "node"
file_sd_configs:
- files:
- "{{ prometheus_config_dir }}/file_sd/node.yml"
prometheus_config_file:
description: "Variable used to provide custom prometheus configuration file in form of ansible template"
default: "prometheus.yml.j2"
prometheus_alert_rules:
description:
- "Full list of alerting rules which will be copied to C({{ prometheus_config_dir }}/rules/ansible_managed.yml)."
- "Alerting rules can be also provided by other files located in C({{ prometheus_config_dir }}/rules/) which have a C(*.yml) or C(*.yaml) extension"
- "Please see default values in role defaults/main.yml"
type: "list"
elements: "dict"
prometheus_alert_rules_files:
description:
- "List of folders where ansible will look for files containing alerting rules which will be copied to C({{ prometheus_config_dir }}/rules/)."
- "Files must have a C(*.yml) or C(*.yaml) extension"
type: "list"
elements: "str"
default:
- "prometheus/rules/*.yml"
- "prometheus/rules/*.yaml"
prometheus_static_targets_files:
description:
- "List of folders where ansible will look for files containing custom static target configuration files which will be copied to C({{ prometheus_config_dir }}/file_sd/)."
type: "list"
elements: "str"
default:
- "prometheus/targets/*.yml"
- "prometheus/targets/*.json"
prometheus_scrape_config_files:
description:
- "List of folders where ansible will look for files containing custom scrape config configuration files which will be copied to C({{ prometheus_config_dir }}/scrape_configs/)."
- "This feature is available starting from Prometheus v2.43.0."
type: "list"
elements: "str"
default:
- "prometheus/scrape_configs/*.yml"
- "prometheus/scrape_configs/*.json"
prometheus_system_group:
description:
- "System group for Prometheus."
type: "str"
default: "prometheus"
prometheus_system_user:
description:
- "System user for Prometheus."
type: "str"
default: "prometheus"
prometheus_stop_timeout:
description:
- "How long to wait for Prometheus to shutdown. This is passed as a systemd TimeoutStopSec time spec."
type: "str"
default: "600s"
prometheus_local_cache_path:
description: Local path to stash the archive and its extraction
default: /tmp/prometheus-{{ ansible_facts['system'] | lower }}-{{ _prometheus_go_ansible_arch }}/{{ prometheus_version }}