Puppet Class: icinga::monitor::toollabs

Defined in:
modules/icinga/manifests/monitor/toollabs.pp

Overview

Toolforge end points worth production monitoring

  • relevant cert expiry is monitored in icinga::monitor::certs



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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'modules/icinga/manifests/monitor/toollabs.pp', line 4

class icinga::monitor::toollabs {

    # toolserver.org (redirect page to Toolforge)
    @monitoring::host { 'www.toolserver.org':
        host_fqdn     => 'www.toolserver.org',
        contact_group => 'wmcs-team',
    }

    # monitoring of https://meta.wikimedia.org/wiki/PAWS
    @monitoring::host { 'paws.wmcloud.org':
        host_fqdn     => 'paws.wmcloud.org',
        contact_group => 'team-paws',
    }

    monitoring::service { 'paws_main_page':
        description    => 'PAWS Main page',
        check_command  => 'check_http_url!hub.paws.wmcloud.org!/hub/login',
        host           => 'paws.wmcloud.org',
        contact_group  => 'team-paws',
        check_interval => 5,
        retry_interval => 5,
        notes_url      => 'https://wikitech.wikimedia.org/wiki/PAWS',
    }

    # this homepage is served by a tool running within tools
    # itself. On a bastion 'become admin' to see source and
    # 'webservice restart' if needed.
    @monitoring::host { 'tools.wmflabs.org':
        host_fqdn => 'tools.wmflabs.org',
    }

    monitoring::service { 'tools.wmflabs.org':
        description   => 'toolschecker: tools homepage (admin tool)',
        check_command => 'check_http_slow!20',
        host          => 'tools.wmflabs.org',
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
        contact_group => 'wmcs-team',
    }

    # Monitors the tools nginx proxy by hitting the health endpoint
    # defined in dynamicproxy nginx.conf
    monitoring::service {'tools-proxy':
        description   => 'toolschecker: tools nginx proxy health',
        check_command => 'check_http_url!tools.wmflabs.org!/.well-known/healthz',
        host          => 'tools.wmflabs.org',
        contact_group => 'wmcs-team',
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
    }

    # Complex checks via a wsgi app running on a cluster for this purpose.
    # See profile::toolforge::checker for more details.
    $test_entry_host = 'checker.tools.wmflabs.org'
    @monitoring::host { $test_entry_host:
        host_fqdn => $test_entry_host,
    }

    # Toolschecker tests are pass/fail based on string return check
    $checker="check_http_url_at_address_for_string_with_timeout!300!${test_entry_host}"

    # become toolschecker
    # crontab -e (from a bastion)
    monitoring::service { 'tools-checker-toolscron':
        description   => 'toolschecker: check mtime mod from tools cron job',
        check_command => "${checker}!/cron!OK",
        host          => $test_entry_host,
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
        contact_group => 'wmcs-team',
    }

    monitoring::service { 'tools-checker-toolsdb':
        description   => 'toolschecker: toolsdb read/write',
        check_command => "${checker}!/db/toolsdb!OK",
        host          => $test_entry_host,
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
        contact_group => 'wmcs-team',
    }

    monitoring::service { 'tools-checker-wikilabelsrw':
        description   => 'toolschecker: wikilabels read/write',
        check_command => "${checker}!/db/wikilabelsrw!OK",
        host          => $test_entry_host,
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
        contact_group => 'wmcs-team',
    }

    monitoring::service { 'tools-checker-labs-dns-private':
        description   => 'toolschecker: Verify internal DNS from within Tools',
        check_command => "${checker}!/dns/private!OK",
        host          => $test_entry_host,
        contact_group => 'wmcs-team',
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
    }

    monitoring::service { 'tools-checker-etcd-k8s':
        description    => 'toolschecker: All k8s etcd nodes are healthy',
        check_command  => "${checker}!/etcd/k8s!OK",
        host           => $test_entry_host,
        check_interval => 5,
        retry_interval => 5,
        contact_group  => 'wmcs-team-email,wmcs-bots',
        notes_url      => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
    }

    monitoring::service { 'tools-checker-grid-continuious-stretch':
        description    => 'toolschecker: expect a long running job on stretch',
        check_command  => "${checker}!/grid/continuous/stretch!OK",
        host           => $test_entry_host,
        check_interval => 5,
        retry_interval => 5,
        contact_group  => 'wmcs-bots,wmcs-team-email',
        notes_url      => 'https://wikitech.wikimedia.org/wiki/portal:toolforge/admin/toolschecker',
    }

    # The mechanism for this test is too flaky to page.  We need to revise
    # if persisting with SMS notification.
    monitoring::service { 'tools-checker-grid-start-stretch':
        description    => 'toolschecker: start a job and verify on stretch',
        check_command  => "${checker}!/grid/start/stretch!OK",
        host           => $test_entry_host,
        check_interval => 5,
        retry_interval => 5,
        contact_group  => 'wmcs-bots,wmcs-team-email',
        notes_url      => 'https://wikitech.wikimedia.org/wiki/portal:toolforge/admin/toolschecker',
    }

    monitoring::service { 'tools-checker-k8s-node-ready':
        description    => 'toolschecker: All k8s worker nodes are healthy',
        check_command  => "${checker}!/k8s/nodes/ready!OK",
        host           => $test_entry_host,
        check_interval => 5,
        retry_interval => 5,
        contact_group  => 'wmcs-team-email,wmcs-bots',
        notes_url      => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
    }

    monitoring::service { 'tools-checker-ldap':
        description   => 'toolschecker: Test LDAP for query',
        check_command => "${checker}!/ldap!OK",
        host          => $test_entry_host,
        contact_group => 'wmcs-team-email,wmcs-bots',
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
    }

    monitoring::service { 'tools-checker-dumps':
        description   => 'toolschecker: Make sure enwiki dumps are not empty',
        check_command => "${checker}!/nfs/dumps!OK",
        host          => $test_entry_host,
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
        contact_group => 'wmcs-team',
    }

    monitoring::service { 'tools-checker-nfs-home':
        description   => 'toolschecker: NFS read/writeable on labs instances',
        check_command => "${checker}!/nfs/home!OK",
        host          => $test_entry_host,
        contact_group => 'wmcs-team',
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
    }

    monitoring::service { 'tools-checker-redis':
        description   => 'toolschecker: Redis set/get',
        check_command => "${checker}!/redis!OK",
        host          => $test_entry_host,
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
        contact_group => 'wmcs-team',
    }

    monitoring::service { 'tools-checker-self':
        description   => 'toolschecker service itself needs to return OK',
        check_command => "${checker}!/self!OK",
        host          => $test_entry_host,
        contact_group => 'wmcs-team',
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolschecker',
    }
}