add extra inputs option for the loki and mimir sinks
This commit is contained in:
parent
93e27dd3e5
commit
53c592abd9
1 changed files with 17 additions and 2 deletions
|
|
@ -16,6 +16,20 @@ in {
|
|||
description = "Supplementary groups added to the vector systemd service to allow reading protected log files.";
|
||||
example = [ "nginx" "postfix" ];
|
||||
};
|
||||
|
||||
extraMetricInputs = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [];
|
||||
description = "Additional vector component IDs to feed into the mimir sink alongside host_metrics.";
|
||||
example = [ "proxmox_normalize_metrics" ];
|
||||
};
|
||||
|
||||
extraLogInputs = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [];
|
||||
description = "Additional vector component IDs to feed into the loki sink alongside journald_logs.";
|
||||
example = [ "proxmox_normalize_logs" ];
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
|
@ -70,14 +84,15 @@ in {
|
|||
sinks = {
|
||||
mimir = {
|
||||
type = "prometheus_remote_write";
|
||||
inputs = [ "add_host_label_metrics" ];
|
||||
inputs = [ "add_host_label_metrics" ] ++ cfg.extraMetricInputs;
|
||||
endpoint = "https://met.adm.htw.stura-dresden.de/api/v1/push";
|
||||
tls.verify_certificate = false;
|
||||
healthcheck.enabled = false;
|
||||
};
|
||||
|
||||
loki = {
|
||||
type = "loki";
|
||||
inputs = [ "add_host_label_logs" ];
|
||||
inputs = [ "add_host_label_logs" ] ++ cfg.extraLogInputs;
|
||||
endpoint = "https://log.adm.htw.stura-dresden.de";
|
||||
labels = {
|
||||
host = "{{ host }}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue