services/monitoring: enable node graph and service graph
This commit is contained in:
parent
b39418084f
commit
60fca938fb
2 changed files with 30 additions and 0 deletions
|
@ -82,12 +82,15 @@ in
|
|||
datasources = [
|
||||
{
|
||||
name = "Prometheus";
|
||||
# wait for https://github.com/NixOS/nixpkgs/pull/175330
|
||||
# uid = "PBFA97CFB590B2093";
|
||||
inherit (links.prometheus) url;
|
||||
type = "prometheus";
|
||||
isDefault = true;
|
||||
}
|
||||
{
|
||||
name = "Loki";
|
||||
# uid = "P8E80F9AEF21F6940";
|
||||
inherit (links.loki) url;
|
||||
type = "loki";
|
||||
}
|
||||
|
@ -107,6 +110,7 @@ in
|
|||
enable = true;
|
||||
listenAddress = links.prometheus.ipv4;
|
||||
inherit (links.prometheus) port;
|
||||
extraFlags = [ "--enable-feature=remote-write-receiver" ];
|
||||
globalConfig = {
|
||||
scrape_interval = "60s";
|
||||
};
|
||||
|
|
|
@ -5,6 +5,7 @@ let
|
|||
dataDir = "/srv/storage/private/tempo";
|
||||
tempoConfig = {
|
||||
search_enabled = true;
|
||||
metrics_generator_enabled = true;
|
||||
server = {
|
||||
http_listen_address = links.tempo.ipv4;
|
||||
http_listen_port = links.tempo.port;
|
||||
|
@ -44,6 +45,25 @@ let
|
|||
queue_depth = 1000;
|
||||
};
|
||||
};
|
||||
metrics_generator = {
|
||||
registry.external_labels = {
|
||||
source = "tempo";
|
||||
host = config.networking.hostName;
|
||||
};
|
||||
storage = {
|
||||
path = "${dataDir}/generator/wal";
|
||||
remote_write = [
|
||||
{
|
||||
url = "${links.prometheus.url}/api/v1/write";
|
||||
send_exemplars = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
overrides.metrics_generator_processors = [
|
||||
"service-graphs"
|
||||
"span-metrics"
|
||||
];
|
||||
};
|
||||
in {
|
||||
links = {
|
||||
|
@ -74,8 +94,14 @@ in {
|
|||
services.grafana.provision.datasources = [
|
||||
{
|
||||
name = "Tempo";
|
||||
# wait for https://github.com/NixOS/nixpkgs/pull/175330
|
||||
# uid = "P214B5B846CF3925F";
|
||||
inherit (links.tempo) url;
|
||||
type = "tempo";
|
||||
jsonData = {
|
||||
serviceMap.datasourceUid = "PBFA97CFB590B2093"; # prometheus
|
||||
nodeGraph.enabled = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue