feat(prometheus): Support all Prometheus parameters #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
Added support for
Testing
Prometheus
I followed our Prometheus Installation documentation when building my Prometheus test system.
Chart deployed from the branch with:
helm template \ --namespace default \ --values values.yaml \ bindplane \ charts/bindplane | kubectl apply -f -
Port forwarding used to connect to the ui on port 3011.
Tested by ensuring topology view has active measurements.
Default Prometheus Install
Basic Auth
Web.yaml config
TLS
I used step cli to create a CA and signed certificate for my host
prometheus-tls.c.bpcli-dev.internal
.I configured web.yml on the prometheus server with:
I then created a secret with:
kubectl create secret generic prometheus-tls \ --from-file ca.crt
TLS is tested by configuring the ca and keeping skip verify set to false.
Mutual TLS
I used step cli to create another signed certificate, this time the keypair is used for bindplane's client auth.
The client auth type and client ca file were configured like this:
After restarting prometheus, bindplane starts logging client auth errors (Expected, bindplane does not have a client keypair configured yet)
I created the secret with the bindplane client keypair and the ca
Mimir
Using our in house tooling, I deployed mimir to my test cluster with:
The mimir config requires the following be set
prometheus.host
prometheus.port
prometheus.queryPathPrefix
prometheus.remoteWrite.host
prometheus.remoteWrite.port
prometheus.remoteWrite.path
The query host and remote write host are not the same.
I did not use our recording rule with mimir, so measurements are not exactly working 100% but I did confirm that remote write + query endpoints are working. No errors from bindplane, agents page does show measurements on a brand new install of bindplane.
Please check that the PR fulfills these requirements