feat(remnawave,monitoring): full node/host cleanup on sync and dynamic alerts.yml.j2
This commit is contained in:
1 parent
b2524d1d1e
commit
ae9beee5ca
4 files changed
+44
-30
No files matched your search
@@ -27,8 +27,8 @@
|
||||
msg: "{{ monitoring_scrape_targets | map(attribute='name') | list | sort }}"
|
||||
|
||||
- name: Установить правила алертов vmalert
|
||||
ansible.builtin.copy:
|
||||
src: alerts.yml
|
||||
ansible.builtin.template:
|
||||
src: alerts.yml.j2
|
||||
dest: "{{ monitoring_dir }}/vmalert/alerts.yml"
|
||||
owner: root
|
||||
group: root
|
||||
@@ -95,3 +95,4 @@
|
||||
group: root
|
||||
mode: "0644"
|
||||
when: xray_checker_subscription_url | length > 0
|
||||
|
||||
+7
-10
@@ -1,3 +1,4 @@
|
||||
#jinja2: variable_start_string:'[[', variable_end_string:']]', block_start_string:'[%', block_end_string:'%]'
|
||||
groups:
|
||||
- name: homelab_alerts
|
||||
rules:
|
||||
@@ -17,11 +18,9 @@ groups:
|
||||
(
|
||||
time() - tlast_over_time(up{job="integrations/node_exporter"}[30m]) > 180
|
||||
)
|
||||
or absent_over_time(up{job="integrations/node_exporter",instance="core-mon"}[30m])
|
||||
or absent_over_time(up{job="integrations/node_exporter",instance="core-net"}[30m])
|
||||
or absent_over_time(up{job="integrations/node_exporter",instance="core-secrets"}[30m])
|
||||
or absent_over_time(up{job="integrations/node_exporter",instance="ger-nod-02"}[30m])
|
||||
or absent_over_time(up{job="integrations/node_exporter",instance="rus-central"}[30m])
|
||||
[% for h in (['core-mon', 'core-net', 'core-secrets', 'rus-central'] + (groups['exit_nodes'] | default([]))) | unique | sort %]
|
||||
or absent_over_time(up{job="integrations/node_exporter",instance="[[ h ]]"}[30m])
|
||||
[% endfor %]
|
||||
for: 1m
|
||||
labels:
|
||||
severity: critical
|
||||
@@ -138,11 +137,9 @@ groups:
|
||||
(
|
||||
time() - tlast_over_time(up{job="integrations/cAdvisor"}[30m]) > 180
|
||||
)
|
||||
or absent_over_time(up{job="integrations/cAdvisor",instance="core-mon"}[30m])
|
||||
or absent_over_time(up{job="integrations/cAdvisor",instance="core-net"}[30m])
|
||||
or absent_over_time(up{job="integrations/cAdvisor",instance="core-secrets"}[30m])
|
||||
or absent_over_time(up{job="integrations/cAdvisor",instance="ger-nod-02"}[30m])
|
||||
or absent_over_time(up{job="integrations/cAdvisor",instance="rus-central"}[30m])
|
||||
[% for h in (['core-mon', 'core-net', 'core-secrets', 'rus-central'] + (groups['exit_nodes'] | default([]))) | unique | sort %]
|
||||
or absent_over_time(up{job="integrations/cAdvisor",instance="[[ h ]]"}[30m])
|
||||
[% endfor %]
|
||||
for: 1m
|
||||
labels:
|
||||
severity: critical
|
||||
Reference in new issue
Block a user