feat: add metrics exporters for Dovecot and Postfix, update Signal execution command, and improve configuration management
This commit is contained in:
8
hosts/mail/modules/metrics/default.nix
Normal file
8
hosts/mail/modules/metrics/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../utils/modules/victoriametrics/default.nix
|
||||
./postfix-exporter.nix
|
||||
./dovecot-exporter.nix
|
||||
];
|
||||
}
|
||||
15
hosts/mail/modules/metrics/dovecot-exporter.nix
Normal file
15
hosts/mail/modules/metrics/dovecot-exporter.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services.prometheus.exporters.dovecot = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.victoriametrics.extraScrapeConfigs = [
|
||||
''
|
||||
- job_name: "dovecot-exporter"
|
||||
static_configs:
|
||||
- targets: ['localhost:9166']
|
||||
''
|
||||
];
|
||||
}
|
||||
16
hosts/mail/modules/metrics/postfix-exporter.nix
Normal file
16
hosts/mail/modules/metrics/postfix-exporter.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
services.prometheus.exporters.postfix = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.victoriametrics.extraScrapeConfigs = [
|
||||
''
|
||||
- job_name: "postfix-exporter"
|
||||
static_configs:
|
||||
- targets: ['localhost:9154']
|
||||
''
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user