Add telegraf metrics for x509 certificates

This commit is contained in:
Agatha Lovelace 2023-03-25 14:24:09 +01:00
parent 068f557afd
commit 9eda1cc1f6
Signed by: sorceress
GPG Key ID: 01D0B3AB10CED4F8
2 changed files with 22 additions and 0 deletions

View File

@ -41,6 +41,14 @@
];
}];
}
{
job_name = "telegraf";
static_configs = [{
targets = [
config.services.telegraf.extraConfig.outputs.prometheus_client.listen
];
}];
}
];
};
}

View File

@ -22,5 +22,19 @@
};
};
};
services.telegraf = {
enable = true;
extraConfig = {
inputs.x509_cert = {
sources = [ "https://technogothic.net:443" ];
interval = "10m";
};
outputs.prometheus_client = {
listen = "localhost:9004";
metric_version = 2;
};
};
};
}