add systemd prometheus exporter

This commit is contained in:
Ingolf Wagner 2023-02-26 03:49:54 +01:00
parent 03d75bcc71
commit eda38be293
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -23,6 +23,7 @@
extraFlags = [ "--storage.tsdb.retention.time=30d" ]; extraFlags = [ "--storage.tsdb.retention.time=30d" ];
exporters = { exporters = {
systemd.enable = true;
node = { node = {
enable = true; enable = true;
enabledCollectors = [ "systemd" ]; enabledCollectors = [ "systemd" ];
@ -48,6 +49,16 @@
} }
{ {
job_name = "systemd"; job_name = "systemd";
static_configs = [{
targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ];
labels = {
service = "systemd-exporter";
server = "pepe";
};
}];
}
{
job_name = "node";
static_configs = [{ static_configs = [{
targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ];
labels = { labels = {