taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

uptime-kuma.rst (4124B)


      1 ..
      2   This file is part of GNU TALER.
      3   Copyright (C) 2024 Taler Systems SA
      4 
      5   TALER is free software; you can redistribute it and/or modify it under the
      6   terms of the GNU Affero General Public License as published by the Free Software
      7   Foundation; either version 3.0, or (at your option) any later version.
      8 
      9   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     10   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11   A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
     12 
     13   You should have received a copy of the GNU Affero General Public License along with
     14   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 
     16   @author Christian Grothoff
     17 
     18 Uptime Kuma
     19 ###########
     20 
     21 Uptime Kuma remains in use alongside :ref:`taler-monitoring`. It provides
     22 independent public availability checks and the exchange key and fee checks
     23 described below. Its monitors and notifications are configured separately from
     24 Sentol's Prometheus probes and Alertmanager routing.
     25 
     26 We use https://github.com/louislam/uptime-kuma to monitor public server and service
     27 availability. We run two servers:
     28 
     29 - https://uptimekuma.anastasis.lu/ monitors almost everything, and is our production
     30   monitor hosted by Anastasis SARL.
     31 
     32 - https://uptimekuma.taler.net/ is our secondary monitor, which monitors the
     33   production monitor.
     34 
     35 
     36 Monitoring servers
     37 ==================
     38 
     39 We monitor server availability using "PING":
     40 
     41 - gv.taler.net
     42 - firefly.gnunet.org
     43 - pixel.anastasis.lu
     44 
     45 Monitoring websites
     46 ===================
     47 
     48 For most websites, we simply use the HTTP(s) monitor. Make sure to enable advance
     49 notice for TLS certificate expiration.  Sites to monitor include:
     50 
     51 - anastasis.lu
     52 - docs.anastasis.lu
     53 - webui.anastasis.lu
     54 - gnunet.org
     55 - bib.gnunet.org
     56 - bugs.gnunet.org
     57 - docs.gnunet.org
     58 - gana.gnunet.org
     59 - git.gnunet.org
     60 - grafana.gnunet.org
     61 - lsd.gnunet.org
     62 - taler.net
     63 - bugs.taler.net
     64 - demo.taler.net
     65 - docs.taler.net
     66 - git.taler.net
     67 - mattermost.taler.net
     68 - sandstorm.taler.net
     69 - test.taler.net
     70 - tutorials.taler.net
     71 - weblate.taler.net
     72 - taler-ops.ch
     73 - taler-systems.com
     74 - schanzen.eu
     75 
     76 Monitoring REST APIs
     77 ====================
     78 
     79 For simple REST APIs, we simply use the HTTP(s) monitor on the /config endpoint.
     80 Make sure to enable advance notice for TLS certificate expiration.  APIs to monitor include:
     81 
     82 - v1.anastasis.lu
     83 - backend.demo.taler.net
     84 - backend.head.taler.net
     85 - backend.test.taler.net
     86 
     87 
     88 Monitoring services
     89 ===================
     90 
     91 We also monitor the following services using the HTTP(s) monitor  on the "/" endpoint:
     92 
     93 - davical.taler.net
     94 - fcfs.gnunet.org
     95 
     96 
     97 Monitoring exchanges
     98 ====================
     99 
    100 To monitor an exchange, we want to not merely monitor that the REST API is operational,
    101 but also check that the ``/keys`` response is not outdated.  This can be done by computing
    102 the minimum expiration time over all of the maxima of the different keys in the response.
    103 The HTTP(S) - JSON Query method can be
    104 used using the following query written in https://jsonata.org/:
    105 
    106 .. code-block:: text
    107 
    108   $min($append(
    109       [$max($map(signkeys, function($f) { $f.stamp_expire.t_s}))],
    110       [$max($map(denominations,
    111           function ($a){
    112             $max($map($a.denoms,
    113                  function ($d){
    114                      $d.stamp_expire_withdraw.t_s
    115                  }
    116             ))
    117           }
    118     ))])) > $millis()/1000
    119 
    120 We setup a separate monitor to check that wire fees are working
    121 (sure, they can be combined, but this way we can get a more precise alert):
    122 
    123 .. code-block:: none
    124 
    125   $max(wire_fees[*].[*].end_date.t_s) > $millis()/1000
    126 
    127 To separate-out global fees monitoring (which is not present on all systems),
    128 we also use (except on GLS, which doesn't support P2P):
    129 
    130 .. code-block:: none
    131 
    132   $max(global_fees[*].end_date.t_s) > $millis()/1000
    133 
    134 Exchanges to monitor include:
    135 
    136 - exchange.taler-ops.ch
    137 - exchange.e.netzbon-basel.ch
    138 - exchange.demo.taler.net
    139 - exchange.head.taler.net
    140 - exchange.test.taler.net
    141 
    142 
    143 Tagging monitors
    144 ================
    145 
    146 We tag each monitor with the host that the service
    147 is running on (e.g. firefly.gnunet.org).