add thanos role
This commit is contained in:
29
roles/thanos/templates/thanos-compact.service.j2
Normal file
29
roles/thanos/templates/thanos-compact.service.j2
Normal file
@ -0,0 +1,29 @@
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
[Unit]
|
||||
Description=Thanos Store Compactor
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
After=prometheus.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ thanos_user }}
|
||||
Group={{ thanos_group }}
|
||||
SyslogIdentifier=thanos-compact
|
||||
ExecStart={{ thanos_bin_path }}/thanos compact \
|
||||
{% if thanos_compact_data_dir %}
|
||||
--data-dir={{ thanos_compact_data_dir }} \
|
||||
{% endif %}
|
||||
{% if thanos_compact_objstore_config_file %}
|
||||
--objstore.config-file={{ thanos_compact_objstore_config_file }} \
|
||||
{% endif %}
|
||||
{% if thanos_compact_http_address %}
|
||||
--http-address={{ thanos_compact_http_address }} \
|
||||
{% endif %}
|
||||
{% if thanos_compact_wait %}
|
||||
--wait \
|
||||
{% endif %}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
25
roles/thanos/templates/thanos-query-frontend.service.j2
Normal file
25
roles/thanos/templates/thanos-query-frontend.service.j2
Normal file
@ -0,0 +1,25 @@
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
[Unit]
|
||||
Description=Thanos Query Frontend
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
After=prometheus.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ thanos_user }}
|
||||
Group={{ thanos_group }}
|
||||
SyslogIdentifier=thanos-query-frontend
|
||||
ExecStart={{ thanos_bin_path }}/thanos query-frontend \
|
||||
--query-range.response-cache-config-file={{ thanos_etc_path }}/cache.yaml \
|
||||
--labels.response-cache-config-file={{ thanos_etc_path }}/cache.yaml \
|
||||
{% if thanos_query_frontend_http_address %}
|
||||
--http-address={{ thanos_query_frontend_http_address }} \
|
||||
{% endif %}
|
||||
{% if thanos_query_frontend_downstream_url %}
|
||||
--query-frontend.downstream-url={{ thanos_query_frontend_downstream_url }} \
|
||||
{% endif %}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
28
roles/thanos/templates/thanos-query.service.j2
Normal file
28
roles/thanos/templates/thanos-query.service.j2
Normal file
@ -0,0 +1,28 @@
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
[Unit]
|
||||
Description=Thanos Query
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
After=prometheus.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ thanos_user }}
|
||||
Group={{ thanos_group }}
|
||||
SyslogIdentifier=thanos-query
|
||||
ExecStart={{ thanos_bin_path }}/thanos query \
|
||||
{% if thanos_query_http_address %}
|
||||
--http-address={{ thanos_query_http_address }} \
|
||||
{% endif %}
|
||||
{% if thanos_query_grpc_address %}
|
||||
--grpc-address={{ thanos_query_grpc_address }} \
|
||||
{% endif %}
|
||||
{% if thanos_query_store %}
|
||||
{% for s in thanos_query_store %}
|
||||
--store={{ s }} \
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
32
roles/thanos/templates/thanos-sidecar.service.j2
Normal file
32
roles/thanos/templates/thanos-sidecar.service.j2
Normal file
@ -0,0 +1,32 @@
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
[Unit]
|
||||
Description=Thanos Sidecar
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
After=prometheus.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ thanos_user }}
|
||||
Group={{ thanos_group }}
|
||||
SyslogIdentifier=thanos-sidecar
|
||||
ExecStart={{ thanos_bin_path }}/thanos sidecar \
|
||||
{% if thanos_sidecar_tsdb_path %}
|
||||
--tsdb.path={{ thanos_sidecar_tsdb_path }} \
|
||||
{% endif %}
|
||||
{% if thanos_sidecar_objstore_config_file %}
|
||||
--objstore.config-file={{ thanos_sidecar_objstore_config_file }} \
|
||||
{% endif %}
|
||||
{% if thanos_sidecar_prometheus_url %}
|
||||
--prometheus.url={{ thanos_sidecar_prometheus_url }} \
|
||||
{% endif %}
|
||||
{% if thanos_sidecar_http_address %}
|
||||
--http-address={{ thanos_sidecar_http_address }} \
|
||||
{% endif %}
|
||||
{% if thanos_sidecar_grpc_address %}
|
||||
--grpc-address={{ thanos_sidecar_grpc_address }} \
|
||||
{% endif %}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
29
roles/thanos/templates/thanos-store.service.j2
Normal file
29
roles/thanos/templates/thanos-store.service.j2
Normal file
@ -0,0 +1,29 @@
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
[Unit]
|
||||
Description=Thanos Store Gateway
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
After=prometheus.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ thanos_user }}
|
||||
Group={{ thanos_group }}
|
||||
SyslogIdentifier=thanos-store
|
||||
ExecStart={{ thanos_bin_path }}/thanos store \
|
||||
{% if thanos_store_data_dir %}
|
||||
--data-dir={{ thanos_store_data_dir }} \
|
||||
{% endif %}
|
||||
{% if thanos_store_objstore_config_file %}
|
||||
--objstore.config-file={{ thanos_store_objstore_config_file }} \
|
||||
{% endif %}
|
||||
{% if thanos_store_http_address %}
|
||||
--http-address={{ thanos_store_http_address }} \
|
||||
{% endif %}
|
||||
{% if thanos_store_grpc_address %}
|
||||
--grpc-address={{ thanos_store_grpc_address }} \
|
||||
{% endif %}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user