10 Commits

Author SHA1 Message Date
Andreas Deininger
eb21e61a4f monitoring: Use _ for unused function arguments 2024-12-01 22:03:10 +00:00
Alberto Bertogli
a54d81f406 monitoring: Get build information from Go's runtime
Currently, chasquid gets version information from build-time flags that
have to be passed by the user.

This patch extends this logic so, if no flags are given, Go's build
information will be used to construct a synthetic version string.
2023-02-05 11:01:36 +00:00
Alberto Bertogli
4a00a83c23 Add tracing annotations
This patch changes several internal packages to receive and pass tracing
annotations, making use of the new tracing library, so we can have
better debugging information.
2022-11-13 11:09:19 +00:00
Alberto Bertogli
c3b4cde29a monitoring: Add dark mode CSS to the monitoring home page 2022-10-21 10:12:06 +01:00
ThinkChaos
bb1b921e3c Add /exit endpoint to monitoring server
Allows terminating chasquid via the network. Useful to trigger a restart
(if there is an init system to relaunch chasquid) and thus reload certificates.

Amended-by: Alberto Bertogli <albertito@blitiri.com.ar>
  Added tests, and adjusted shutdown sequence.
2020-11-12 23:24:21 +00:00
Alberto Bertogli
48c37b5687 monitoring: Show the go version used to build the binary
This patch makes the monitoring web server index show the go compiler
version used to build the binary, which can be convenient when
troubleshooting.
2020-09-11 12:34:36 +01:00
Alberto Bertogli
7fe42a368a monitoring: Add OpenMetrics exporter
This patch makes chasquid's monitoring server expose an OpenMetrics
metrics endpoint.

It adds a new package "expvarom" which implements an HTTP handler that
exports expvar variables in the OpenMetrics text format.

Then, the handler is registered by the monitoring server at /metrics
(where most things expect it to be).

The existing exported variables are also extended with descriptions,
which is optional, but improves the readability of the metrics.
2020-08-21 12:07:33 +01:00
Alberto Bertogli
a6a20fb6e0 monitoring: Add a config dump handler
This patch adds a handler to the monitoring HTTP server which dumps
the parsed config, so it can easily be reviewed for troubleshooting.
2020-07-28 02:12:29 +01:00
Alberto Bertogli
33446fd565 monitoring: Reorganize index structure
This patch improves the organization of the monitoring index page:

- Include the hostname (both OS and configured) for convenience.
- Round the uptime presentation for readability.
- Add a tiny CSS for consistency with the traces.
- Re-arrange the list of links for readability.
2020-07-08 23:23:17 +01:00
Alberto Bertogli
a08b86a663 Move monitoring HTTP server code to a separate file
This patch moves the monitoring HTTP server code to its own file, for
readability purposes only.
2020-07-08 22:15:37 +01:00