aboutsummaryrefslogtreecommitdiff
path: root/modules/private/monitoring/objects_backup-2.nix
blob: c302e453f08663f74fa26514beb688074e9bc914 (plain) (blame)
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
{ ... }:
{
  service = [
    {
      service_description = "Size on /backup2 partition";
      use = "local-service";
      check_command = ["check_local_disk" "10%" "5%" "/backup2"];
    }
    {
      service_description = "Last backup in /backup2/phare is not too old";
      use = "local-service";
      check_command = ["check_last_file_date" "/backup2/phare" "14" "backup"];
    }
    {
      service_description = "Last backup in /backup2/immae_eu is not too old";
      use = "local-service";
      check_command = ["check_last_file_date" "/backup2/immae_eu" "14" "backup"];
    }
    {
      service_description = "Last backup in /backup2/immae_fr is not too old";
      use = "local-service";
      check_command = ["check_last_file_date" "/backup2/immae_fr" "14" "backup"];
    }
    {
      service_description = "Last postgresql dump in /backup2/eldiron/postgresql_backup is not too old";
      use = "local-service";
      check_command = ["check_last_file_date" "/backup2/eldiron/postgresql_backup" "7" "postgres"];
    }
    {
      service_description = "Redis replication for eldiron is up to date";
      use = "local-service";
      check_command = ["check_redis_replication" "/run/redis_eldiron/redis.sock"];
    }
    {
      service_description = "Last redis dump in /backup2/eldiron/redis_backup is not too old";
      use = "local-service";
      check_command = ["check_last_file_date" "/backup2/eldiron/redis_backup" "7" "redis"];
    }
    {
      service_description = "Mysql replication for eldiron is up to date";
      use = "local-service";
      check_command = ["check_mysql_replication" "/run/mysqld_eldiron/mysqld.sock" "/var/secrets/mysql_replication/eldiron/client"];
    }
    {
      service_description = "Last mysql dump in /backup2/eldiron/mysql_backup is not too old";
      use = "local-service";
      check_command = ["check_last_file_date" "/backup2/eldiron/mysql_backup" "7" "mysql"];
    }
  ];
}