Skip to content

Commit

Permalink
Merge pull request #36 from valiantlynx/working
Browse files Browse the repository at this point in the history
Working
  • Loading branch information
valiantlynx authored Apr 6, 2024
2 parents 3f7d985 + f2e7b75 commit a411e7f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alertmanager
3 changes: 1 addition & 2 deletions ansible/roles/docker_deploy/files/prometheus/alert.rules
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
groups:
- name: example
- name: devops
rules:

# Alert for any instance that is unreachable for >2 minutes.
- alert: service_down
expr: up == 0
Expand Down
13 changes: 11 additions & 2 deletions ansible/roles/docker_deploy/files/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ global:
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'my-project'
monitor: 'devops'

# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
Expand Down Expand Up @@ -89,4 +89,13 @@ scrape_configs:
- job_name: 'svelte-manga-api'
scrape_interval: 5s
static_configs:
- targets: ['svelte-manga-api.valiantlynx.com']
- targets: ['svelte-manga-api.valiantlynx.com']


- job_name: 'node_exporter_kasm'
static_configs:
- targets: ['kasm.valiantlynx.com:9100']

- job_name: 'cadvisor_kasm'
static_configs:
- targets: ['kasm.valiantlynx.com:8080']
Binary file modified ansible/roles/docker_deploy/files/uptime-kuma/kuma.db
Binary file not shown.
6 changes: 3 additions & 3 deletions ansible/roles/docker_deploy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@
ansible.builtin.copy:
src: grafana/
dest: "{{ ansible_env.HOME }}/grafana/"
force: yes # Do not overwrite the file if it already exists
force: yes

- name: Copy uptime-kuma configuration folder
ansible.builtin.copy:
src: uptime-kuma/
dest: "{{ ansible_env.HOME }}/uptime-kuma/"
force: no
force: no # Do not overwrite the file if it already exists

- name: Generate Alertmanager configuration
ansible.builtin.template:
Expand Down Expand Up @@ -173,7 +173,7 @@
chdir: "{{ ansible_env.HOME }}/"

- name: Delete all hanging stuff
command: docker system prune -a -f
command: docker system prune -a -f --volumes
become: true
args:
chdir: "{{ ansible_env.HOME }}/"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ services:
ports:
- 9093:9093
volumes:
- ./ansible/roles/docker_deploy/files/alertmanager/:/etc/alertmanager/
- ./alertmanager/:/etc/alertmanager/
networks:
- monitoring
restart: always
Expand Down

0 comments on commit a411e7f

Please sign in to comment.