Skip to content

Commit

Permalink
[agroal#28] Prometheus documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperpedersen committed May 18, 2020
1 parent 4edd54b commit 3e6c8b6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Pronounced: p-g-a-gro-al, named after [A](https://www.visitportugal.com/en/conte
* Perform connection validation
* Enable / disable database access
* Graceful / fast shutdown
* Prometheus support
* Transport Layer Security (TLS) v1.2+ support
* Daemon mode
* User vault
Expand Down
16 changes: 16 additions & 0 deletions doc/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,22 @@ The child processes support `SIGQUIT` as a mechanism to shutdown. This will not
It should not be needed to use `SIGKILL` for `pgagroal`. Please, consider using `SIGABRT` instead, and share the
core dump and debug logs with the `pgagroal` community.

## Prometheus

pgagroal has support for [Prometheus](https://prometheus.io/) when the `metrics` port is specified.

The module serves two endpoints

* `/` - Overview of the functionality (`text/html`)
* `/metrics` - The metrics (`text/plain`)

All other URLs will result in a 403 response.

The metrics endpoint supports `Transfer-Encoding: chunked` to account for a large amount of data.

The implementation is done in [prometheus.h](../src/include/prometheus.h) and
[prometheus.c](../src/libpgagroal/prometheus.c).

## Logging

[zf_log](https://github.com/wonder-mice/zf_log) is used for the logging framework.
Expand Down

0 comments on commit 3e6c8b6

Please sign in to comment.