Skip to content

WIP Add a Prometheus metrics+alerting stack tweakable per hosting scenario#14

Closed
solsson wants to merge 18 commits into
masterfrom
metrics-from-scratch
Closed

WIP Add a Prometheus metrics+alerting stack tweakable per hosting scenario#14
solsson wants to merge 18 commits into
masterfrom
metrics-from-scratch

Conversation

@solsson

@solsson solsson commented Nov 19, 2019

Copy link
Copy Markdown
Collaborator

We set up https://github.com/Yolean/kubernetes-monitoring in 2017 and we're using it in production. But despite that kube-prometheus works well, like brancz/kubernetes-grafana concludes it appears "close to unmaintainable due to the many steps of generation". Now that we need to make our monitoring stack a bit more lightweight, for use with local development, we'll evaluate the individual parts of kube-prometheus.

"Tweakable" would mean that we can select individual modules and override resource limits, retention etc using Kustomize.

Note that Prometheus Operator is already included in provision, since 50512ad.

containerd/containerd#3412

k3s has upgraded to 1.3.0 in master since 834f7df7ecb8eb8be27ebb300f2bcb23f24397b2
and ofc we don't know when GKE's _CONTAINERD nodes will upgrade.
and is quite impractical with Kustomize due to:

 - Large repo that takes a long time to fetch
 - Namespace "default" is hard coded in bundle.yaml

... so let's install it by default.
… annotations

... despite such annotations being inflexible.
The rule with ServiceMonitor having to be in the same namespace as the
prometheus instance is quite impractical, in particular with Kustomize.
breaks kubefwd, but reachable with:
kubectl -n ystack port-forward svc/prometheus-operated 9090
kubectl -n ystack port-forward svc/alertmanager-operated 9093

... and the alert doesn't work
provision failures at k3s crictl info with the message
failed to connect: failed to connect, make sure you are running as root and the runtime has been started: context deadline exceeded

This reverts commit 09712775dc3b2a3f6bb677ec689aaac1b62bc230.
because kubefwd found so much to forward, and failed to actually forward alertmanager.
We do need local access to prometheus but kubefwd was pretty much my only reason
to keep monotiring resources in the ystack namespaces. It's cleaner this way.
For some reason I failed to get service discovery with a plain alertmanager-main service.

To troubleshoot I did:
kubectl -n ystack-monitoring get secret prometheus-now -o=jsonpath='{.data.prometheus\.yaml\.gz}' | base64 -D - | gunzip -
kubectl -n ystack-monitoring get endpoints alertmanager-operated
@solsson solsson changed the title Add a Prometheus metrics+alerting stack tweakable per hosting scenario WIP Add a Prometheus metrics+alerting stack tweakable per hosting scenario Jan 23, 2020
@solsson

solsson commented Jun 21, 2020

Copy link
Copy Markdown
Collaborator Author

#27 #30 changes the scope a bit; sourcing github.com/Yolean/kubernetes-assert to replace kube-prometheus

@solsson solsson closed this Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant