blob: 62810c5d668f5e3deb020c195af7d844f2f56ffa [file] [log] [blame]
Serge Bazanski363bf4f2020-08-24 21:00:56 +02001local cluster = import "lib/cluster.libsonnet";
2local global = import "lib/global.libsonnet";
3
4// Monitoring tiers set up on k0. See README for architectural background.
Sergiusz Bazanski2022ac22020-06-06 17:04:07 +02005
6{
Serge Bazanski363bf4f2020-08-24 21:00:56 +02007 local k0 = self,
8 local cfg = {
9 storageClasses+: {
10 prometheus: "waw-hdd-redundant-3",
11 victoria: "waw-hdd-redundant-3",
Sergiusz Bazanski2022ac22020-06-06 17:04:07 +020012 },
13 },
Serge Bazanski363bf4f2020-08-24 21:00:56 +020014
15 // Cluster tier - prometheus.
16 cluster: cluster.Cluster("k0") {
17 cfg+: cfg {
18 username: "cluster-k0",
19 upstreams: [
20 { password: std.split(importstr "secrets/plain/global-agent-cluster-k0", "\n")[0], remote: k0.global.internalIngestURL },
21 ],
22 },
23 },
24
25 // Global tier - victoria metrics.
26 global: global.Global("k0") {
27 cfg+: cfg {
28 hosts: {
29 globalAPI: "monitoring-global-api.k0.hswaw.net",
30 },
31 agents: [
32 // Ingestion from k0 cluster tier.
33 { username: k0.cluster.cfg.username, password: std.split(importstr "secrets/plain/global-agent-cluster-k0", "\n")[0], },
34 // Access from q3k's test Grafana.
35 { username: "grafana", password: std.split(importstr "secrets/plain/global-agent-grafana", "\n")[0], },
36 ],
37 },
38 },
Sergiusz Bazanski2022ac22020-06-06 17:04:07 +020039}