aboutsummaryrefslogtreecommitdiff
path: root/modules/private/monitoring/objects_immae-eu.nix
blob: a1d1adb74dc842a0a46fe7a7b7443e78674b9e92 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{ ... }:
let
  defaultPassiveInfo = {
    use = "external-passive-service";
    freshness_threshold = "450";
    retry_interval = "1";
    host_name = "immae.eu";
  };
in
{
  host = {
    "immae.eu" = {
      alias = "immae.eu";
      address = "immae.eu";
      use = "linux-server";
      hostgroups = "webstatus-hosts";
      _webstatus_name = "immaeEu";
    };
  };
  service = map (s: defaultPassiveInfo // s) [
    {
      service_description = "size on root partition";
      servicegroups = "webstatus-resources";
    }

    {
      service_description = "total number of process";
      servicegroups = "webstatus-resources";
    }

    {
      service_description = "average load";
      servicegroups = "webstatus-resources";
    }

    {
      service_description = "swap usage";
      servicegroups = "webstatus-resources";
    }

    {
      service_description = "no mdadm array is degraded";
      servicegroups = "webstatus-resources";
    }

    {
      service_description = "ntp is activated and working";
      servicegroups = "webstatus-resources";
    }

    {
      service_description = "ssh connexion responds";
    }

    {
      service_description = "fail2ban is active";
      servicegroups = "webstatus-resources";
    }

    {
      service_description = "pacman packages are not too old";
      servicegroups = "webstatus-resources";
      freshness_threshold = "10800";
      notification_interval = "0";
    }

    {
      service_description = "rsync backup happened not too long ago";
      servicegroups = "webstatus-backup";
    }

    {
      service_description = "eriomem backup is up and not full";
      freshness_threshold = "10800";
      notification_interval = "120";
      servicegroups = "webstatus-backup";
    }

    {
      service_description = "postfix service is active";
    }

    {
      service_description = "tinc@Immae service is active";
    }

    {
      service_description = "sshd service is active";
    }

    {
      service_description = "httpd service is active";
      servicegroups = "webstatus-resources";
    }

    {
      service_description = "postfix SSL is up to date";
    }

    {
      service_description = "mailq is empty";
      servicegroups = "webstatus-email";
    }

    ## Sending e-mail
    {
      service_description = "immae.eu email service is active";
      servicegroups = "webstatus-email";
      freshness_threshold = "1350";
    }

    #### Web scenarios
    {
      service_description = "Default website site is running on ns208507.ip-188-165-209.eu";
      freshness_threshold = "1800";
    }
  ];
}