deep_scrub_choked
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
# This file is managed by ansible, don't make changes here - they will be
|
||||
# overwritten.
|
||||
[Unit]
|
||||
Description=alertmanager
|
||||
{% if container_binary == 'docker' %}
|
||||
After=docker.service network-online.target local-fs.target time-sync.target
|
||||
Requires=docker.service
|
||||
{% else %}
|
||||
After=network-online.target local-fs.target time-sync.target
|
||||
{% endif %}
|
||||
Wants=network-online.target local-fs.target time-sync.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory={{ alertmanager_data_dir }}
|
||||
EnvironmentFile=-/etc/environment
|
||||
{% if container_binary == 'podman' %}
|
||||
ExecStartPre=-/usr/bin/rm -f /%t/%n-pid /%t/%n-cid
|
||||
ExecStartPre=-/usr/bin/{{ container_binary }} rm --storage alertmanager
|
||||
{% endif %}
|
||||
ExecStartPre=-/usr/bin/{{ container_binary }} rm -f alertmanager
|
||||
ExecStart=/usr/bin/{{ container_binary }} run --rm --name=alertmanager \
|
||||
{% if container_binary == 'podman' %}
|
||||
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
|
||||
{% endif %}
|
||||
--pids-limit={{ 0 if container_binary == 'podman' else -1 }} \
|
||||
-v "{{ alertmanager_conf_dir }}:/etc/alertmanager:Z" \
|
||||
-v "{{ alertmanager_data_dir }}:/alertmanager:Z" \
|
||||
--net=host \
|
||||
--cpu-period={{ alertmanager_container_cpu_period }} \
|
||||
--cpu-quota={{ alertmanager_container_cpu_period * alertmanager_container_cpu_cores }} \
|
||||
--memory={{ alertmanager_container_memory }}GB \
|
||||
--memory-swap={{ alertmanager_container_memory * 2 }}GB \
|
||||
{{ alertmanager_container_image }} \
|
||||
--config.file=/etc/alertmanager/alertmanager.yml \
|
||||
--cluster.listen-address={{ grafana_server_addr }}:{{ alertmanager_cluster_port }} \
|
||||
{% for peer in grafana_server_addrs|difference(grafana_server_addr) %}
|
||||
--cluster.peer={{ peer }}:{{ alertmanager_cluster_port }} \
|
||||
{% endfor %}
|
||||
--storage.path=/alertmanager \
|
||||
--web.external-url=http://{{ ansible_facts['fqdn'] }}:{{ alertmanager_port }}/ \
|
||||
--web.listen-address={{ grafana_server_addr }}:{{ alertmanager_port }}
|
||||
{% if container_binary == 'podman' %}
|
||||
ExecStop=/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`"
|
||||
{% else %}
|
||||
ExecStop=/usr/bin/{{ container_binary }} stop alertmanager
|
||||
{% endif %}
|
||||
KillMode=none
|
||||
Restart=always
|
||||
RestartSec=10s
|
||||
TimeoutStartSec=120
|
||||
TimeoutStopSec=15
|
||||
{% if container_binary == 'podman' %}
|
||||
Type=forking
|
||||
PIDFile=/%t/%n-pid
|
||||
{% endif %}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,20 @@
|
||||
global:
|
||||
resolve_timeout: 5m
|
||||
|
||||
route:
|
||||
group_by: ['alertname']
|
||||
group_wait: 10s
|
||||
group_interval: 10s
|
||||
repeat_interval: 1h
|
||||
receiver: 'ceph-dashboard'
|
||||
receivers:
|
||||
- name: 'ceph-dashboard'
|
||||
webhook_configs:
|
||||
{% for host in groups['mgrs'] | default(groups['mons']) %}
|
||||
- url: '{{ dashboard_protocol }}://{{ hostvars[host]['ansible_facts']['fqdn'] }}:{{ dashboard_port }}/api/prometheus_receiver'
|
||||
{% if dashboard_protocol == 'https' and alertmanager_dashboard_api_no_ssl_verify | bool %}
|
||||
http_config:
|
||||
tls_config:
|
||||
insecure_skip_verify: true
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,57 @@
|
||||
# This file is managed by ansible, don't make changes here - they will be
|
||||
# overwritten.
|
||||
[Unit]
|
||||
Description=prometheus
|
||||
{% if container_binary == 'docker' %}
|
||||
After=docker.service network-online.target local-fs.target time-sync.target
|
||||
Requires=docker.service
|
||||
{% else %}
|
||||
After=network-online.target local-fs.target time-sync.target
|
||||
{% endif %}
|
||||
Wants=network-online.target local-fs.target time-sync.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/environment
|
||||
{% if container_binary == 'podman' %}
|
||||
ExecStartPre=-/usr/bin/rm -f /%t/%n-pid /%t/%n-cid
|
||||
ExecStartPre=-/usr/bin/{{ container_binary }} rm --storage prometheus
|
||||
{% endif %}
|
||||
ExecStartPre=-/usr/bin/{{ container_binary }} rm -f prometheus
|
||||
ExecStart=/usr/bin/{{ container_binary }} run --rm --name=prometheus \
|
||||
{% if container_binary == 'podman' %}
|
||||
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
|
||||
{% endif %}
|
||||
--pids-limit={{ 0 if container_binary == 'podman' else -1 }} \
|
||||
-v "{{ prometheus_conf_dir }}:/etc/prometheus:Z" \
|
||||
-v "{{ prometheus_data_dir }}:/prometheus:Z" \
|
||||
--net=host \
|
||||
--user={{ prometheus_user_id }} \
|
||||
--cpu-period={{ prometheus_container_cpu_period }} \
|
||||
--cpu-quota={{ prometheus_container_cpu_period * prometheus_container_cpu_cores }} \
|
||||
--memory={{ prometheus_container_memory }}GB \
|
||||
--memory-swap={{ prometheus_container_memory * 2 }}GB \
|
||||
{{ prometheus_container_image }} \
|
||||
--config.file=/etc/prometheus/prometheus.yml \
|
||||
--storage.tsdb.path=/prometheus \
|
||||
{% if prometheus_storage_tsdb_retention_time is defined %}
|
||||
--storage.tsdb.retention.time={{ prometheus_storage_tsdb_retention_time }} \
|
||||
{% endif %}
|
||||
--web.external-url=http://{{ ansible_facts['fqdn'] }}:{{ prometheus_port }}/ \
|
||||
--web.listen-address={{ grafana_server_addr }}:{{ prometheus_port }}
|
||||
{% if container_binary == 'podman' %}
|
||||
ExecStop=/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`"
|
||||
{% else %}
|
||||
ExecStop=/usr/bin/{{ container_binary }} stop prometheus
|
||||
{% endif %}
|
||||
KillMode=none
|
||||
Restart=always
|
||||
RestartSec=10s
|
||||
TimeoutStartSec=120
|
||||
TimeoutStopSec=15
|
||||
{% if container_binary == 'podman' %}
|
||||
Type=forking
|
||||
PIDFile=/%t/%n-pid
|
||||
{% endif %}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,38 @@
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
evaluation_interval: 15s
|
||||
|
||||
rule_files:
|
||||
- '/etc/prometheus/alerting/*'
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: ['{{ grafana_server_addr }}:{{ prometheus_port }}']
|
||||
- job_name: 'ceph'
|
||||
honor_labels: true
|
||||
static_configs:
|
||||
{% for host in groups[mgr_group_name] | default(groups[mon_group_name]) %}
|
||||
- targets: ['{{ host }}:9283']
|
||||
labels:
|
||||
instance: 'ceph_cluster'
|
||||
{% endfor %}
|
||||
- job_name: 'node'
|
||||
static_configs:
|
||||
{% for host in (groups['all'] | difference(groups[monitoring_group_name] | union(groups.get(client_group_name, []))) | union(groups.get(osd_group_name, []))) %}
|
||||
- targets: ['{{ host }}:{{ node_exporter_port }}']
|
||||
labels:
|
||||
instance: "{{ hostvars[host]['ansible_facts']['nodename'] }}"
|
||||
{% endfor %}
|
||||
- job_name: 'grafana'
|
||||
static_configs:
|
||||
{% for host in groups[monitoring_group_name] %}
|
||||
- targets: ['{{ host }}:{{ node_exporter_port }}']
|
||||
labels:
|
||||
instance: "{{ hostvars[host]['ansible_facts']['nodename'] }}"
|
||||
{% endfor %}
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- scheme: http
|
||||
static_configs:
|
||||
- targets: ['{{ grafana_server_addr }}:{{ alertmanager_port }}']
|
||||
Reference in New Issue
Block a user