blob: 62810c5d668f5e3deb020c195af7d844f2f56ffa [file] [log] [blame]
local cluster = import "lib/cluster.libsonnet";
local global = import "lib/global.libsonnet";
// Monitoring tiers set up on k0. See README for architectural background.
{
local k0 = self,
local cfg = {
storageClasses+: {
prometheus: "waw-hdd-redundant-3",
victoria: "waw-hdd-redundant-3",
},
},
// Cluster tier - prometheus.
cluster: cluster.Cluster("k0") {
cfg+: cfg {
username: "cluster-k0",
upstreams: [
{ password: std.split(importstr "secrets/plain/global-agent-cluster-k0", "\n")[0], remote: k0.global.internalIngestURL },
],
},
},
// Global tier - victoria metrics.
global: global.Global("k0") {
cfg+: cfg {
hosts: {
globalAPI: "monitoring-global-api.k0.hswaw.net",
},
agents: [
// Ingestion from k0 cluster tier.
{ username: k0.cluster.cfg.username, password: std.split(importstr "secrets/plain/global-agent-cluster-k0", "\n")[0], },
// Access from q3k's test Grafana.
{ username: "grafana", password: std.split(importstr "secrets/plain/global-agent-grafana", "\n")[0], },
],
},
},
}