hydra-notify: support sending diagnostic dumps to STDERR on request

[?]
Aug 18, 2021, 7:42 PM
3ELC3W2DNZLEMIIOGJ4VPWSYDPVTVP5SXRDCAGBKVAW66DBJWNIAC

Dependencies

  • [2] 4H6FVIWG hydra-notify: make the prometheus endpoint configurable, default-off
  • [*] FUOOHCAA Init a docs section for monitoring, document queue-runner-status and the prometheus metrics
  • [*] IE2PRAQU hydra-queue-runner: Send build notifications
  • [*] P4SME2BC Abstract over postgres' LISTEN/NOTIFY
  • [*] FN3QFV6V hydra-notify: Create a helper for running each plugin on an event
  • [*] I7DFJWL6 hydra-notify: initial scratch take of prometheus events

Change contents

  • edit in doc/manual/src/monitoring/README.md at line 24
    [2.766]
    ### Diagnostic Dump
    The notification daemon can also dump its metrics to stderr whether or not the exporter
    is configured. This is particularly useful for cases where metrics data is needed but the
    exporter was not enabled.
    To trigger this diagnostic dump, send a Postgres notification with the
    `hydra_notify_dump_metrics` channel and no payload. See
    [Re-sending a notification](../notifications.md#re-sending-a-notification).
  • edit in src/script/hydra-notify at line 102
    [6.1922]
    [7.0]
    $listener->subscribe("hydra_notify_dump_metrics");
  • edit in src/script/hydra-notify at line 148
    [8.1170]
    [8.1170]
    if ($channelName eq "hydra_notify_dump_metrics") {
    print STDERR "Dumping prometheus metrics:\n${\$prom->format}\n";
    next;
    }