mirror of https://gerrit.hackerspace.pl/hscloud
ops/monitoring: split up jsonnet, add simple docs
Change-Id: I8120958a6862411de0446896875766834457aba9changes/38/338/2
parent
ce81c39081
commit
2022ac2338
|
@ -0,0 +1,38 @@
|
||||||
|
Monitoring
|
||||||
|
==========
|
||||||
|
|
||||||
|
Setting up monitoring in hscloud is a work in progress.
|
||||||
|
|
||||||
|
Components
|
||||||
|
----------
|
||||||
|
|
||||||
|
Currently we have a per-cluster setup with prometheus scraping Kubernetes nodes
|
||||||
|
(kubeletes) for kubelet metrics and cAdvisor metrics.
|
||||||
|
|
||||||
|
.-----------------------------------------------------------.
|
||||||
|
| k0.hswaw.net |
|
||||||
|
|-----------------------------------------------------------|
|
||||||
|
| .---------------------. |
|
||||||
|
| | ns: metrics-cluster | .--------------------------. |
|
||||||
|
| |---------------------| | kubernetes.svc.cluster | |
|
||||||
|
| | prometheus |--> | apiserver proxy to nodes | |
|
||||||
|
| '---------------------' '--------------------------' |
|
||||||
|
| | |
|
||||||
|
'---------------------------------------- v ----------------'
|
||||||
|
.---------------------.
|
||||||
|
| bc0n01.hswaw.net |-.
|
||||||
|
Kubernetes |---------------------| |-.
|
||||||
|
Nodes | /metrics |-| |
|
||||||
|
| /metrics/cadvisor | |-|
|
||||||
|
'---------------------' | |
|
||||||
|
'---------------------' |
|
||||||
|
'---------------------'
|
||||||
|
|
||||||
|
Everything else (dashboard, aggregation, user metrics) is a work in progress.
|
||||||
|
|
||||||
|
Legacy
|
||||||
|
------
|
||||||
|
|
||||||
|
There is a legacy prometheus/grafana VM on https://metrics.hackerspace.pl/. The
|
||||||
|
certificate is expired, but it Generally Works, and will be kept going until
|
||||||
|
its functionality is migrated to hscloud.
|
|
@ -0,0 +1,11 @@
|
||||||
|
local lib = import "lib.libsonnet";
|
||||||
|
|
||||||
|
{
|
||||||
|
cluster: lib.Cluster("k0") {
|
||||||
|
cfg+: {
|
||||||
|
storageClasses+: {
|
||||||
|
prometheus: "waw-hdd-redundant-3",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
local cluster = import "lib/cluster.libsonnet";
|
||||||
|
|
||||||
|
{
|
||||||
|
Cluster: cluster.Cluster,
|
||||||
|
}
|
|
@ -1,8 +1,9 @@
|
||||||
local kube = import "../../kube/kube.libsonnet";
|
local kube = import "../../../kube/kube.libsonnet";
|
||||||
|
|
||||||
{
|
{
|
||||||
local top = self,
|
// Cluster sets up all cluster-specific monitoring resources in their own namespace.
|
||||||
// Per-cluster components
|
// Currently this consists of a prometheus server that scrapes k8s nodes for kubelet
|
||||||
|
// and cAdvisor metrics.
|
||||||
Cluster(name):: {
|
Cluster(name):: {
|
||||||
local cluster = self,
|
local cluster = self,
|
||||||
local cfg = cluster.cfg,
|
local cfg = cluster.cfg,
|
||||||
|
@ -15,7 +16,7 @@ local kube = import "../../kube/kube.libsonnet";
|
||||||
},
|
},
|
||||||
|
|
||||||
storageClasses: {
|
storageClasses: {
|
||||||
prometheus: "waw-hdd-redundant-3",
|
prometheus: error "storageClasses.prometheus must be set",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -223,6 +224,4 @@ local kube = import "../../kube/kube.libsonnet";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
k0: top.Cluster("k0"),
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue