13791: Health check endpoint docs wip
[arvados.git] / doc / admin / health-checks.html.textile.liquid
1 ---
2 layout: default
3 navsection: admin
4 title: Health checks
5 ...
6
7 {% comment %}
8 Copyright (C) The Arvados Authors. All rights reserved.
9
10 SPDX-License-Identifier: CC-BY-SA-3.0
11 {% endcomment %}
12
13 Arvados services support endpoints for monitoring the status of a cluster.
14
15 Health check endpoints are found at @/_health/ping@ for many Arvados services.
16
17 Services must have ManagementToken configured.  This is used to authorize access to the health check endpoint.  If ManagementToken is not configured, health checks will return the error @404 disabled@.
18
19 The requester must provide the HTTP header @Authorization: Bearer (ManagementToken)@.
20
21 This endpoint returns a JSON object with the field @health@.  This has a value of either @OK@ or @ERROR@.  On error, it may also include a  field @error@ with additional information.
22
23 h2. How to enable health checks on each service.
24
25 h3. API server
26
27 Set @MangementToken@ in @application.yml@
28
29 <pre>
30   # Token to be included in all healthcheck requests. Disabled by default.
31   # Server expects request header of the format "Authorization: Bearer xxx"
32   ManagementToken: ...
33 </pre>
34
35 h3. Node Manager
36
37 Set @port@ (the listen port) and @MangementToken@ in the @Manage@ section of @node-manager.ini@ .
38
39 <pre>
40 [Manage]
41 port=8888
42 ManagementToken=...
43 </pre>
44
45
46 *
47 * keepstore
48 * keep-web
49 * keepproxy
50 * arv-git-httpd
51 * websockets
52
53 h2. Healthcheck aggregator
54
55 The service @arvados-health@ performs health checks on all configured services and returns a single value of @OK@ or @ERROR@ for the entire cluster.  It exposes the endpoint @/_health/all@ .
56
57 The healthcheck aggregator uses the "NodeProfile" section of the cluster-wide configuration file.  Here is an example.
58
59 <pre>
60 Cluster:
61   # The cluster uuid prefix
62   zzzzz:
63     NodeProfile:
64       # For each node, the profile name corresponds to a
65       # locally-resolvable hostname, and describes which Arvados
66       # services are available on that machine.
67       api:
68         arvados-controller:
69           Listen: 8000
70         arvados-api-server:
71           Listen: 8001
72       manage:
73         arvados-node-manager:
74           Listen: 8002
75       workbench:
76         arvados-workbench:
77           Listen: 8003
78         arvados-ws:
79           Listen: 8004
80       keep:
81         keep-web:
82           Listen: 8005
83         keepproxy:
84           Listen: 8006
85       keep0:
86         keepstore:
87           Listen: 25701
88       keep1:
89         keepstore:
90           Listen: 25701
91 </pre>