Allow enable/disable of Prometheus endpoints

Since these are unauthenticated, it might be the case that an
administrator wishes to completely disable these metrics endpoints.
Provide that option via pvc.conf through pvc-ansible's existing
enable_prometheus_exporters option and the new enable_prometheus
configuration flag.

Defaults to "yes" to provide all functionality unless explicitly
disabled, as the author assumes that the PVC API is secured in other
ways as well and that metric information is not completely sensitive.
This commit is contained in:
2023-12-29 09:23:35 -05:00
parent 52f68909f6
commit 4969e90f8a
3 changed files with 31 additions and 11 deletions

View File

@ -44,6 +44,9 @@ subsystem:
# Enable or disable the API client, if installed, when node is Primary
enable_api: yes
# Enable or disable the Prometheus metrics endpoints in the API; if disabled, these return 404
enable_prometheus: yes
# Cluster configuration
cluster: