Compare commits

...

3 Commits

Author SHA1 Message Date
h7x4 966081ebfc bicep/mysql: enable userstat 2026-06-03 15:31:27 +09:00
h7x4 39d313579c bicep/mysql: rotate slow query logs 2026-06-03 15:21:18 +09:00
h7x4 3386153b8b ildkule/prometheus/exim: make scheme explicit 2026-06-03 13:35:13 +09:00
2 changed files with 24 additions and 11 deletions
+15
View File
@@ -23,6 +23,9 @@ in
bind-address = values.services.mysql.ipv4;
skip-networking = 0;
# Useful for the mysqld prometheus exporter
userstat = 1;
# This was needed in order to be able to use all of the old users
# during migration from knakelibrak to bicep in Sep. 2023
secure_auth = 0;
@@ -71,4 +74,16 @@ in
];
};
};
services.logrotate = lib.mkIf (cfg.settings.mysqld.slow-query-log == 1) {
enable = true;
settings.mysql-slowlog = {
files = [ cfg.settings.mysqld.slow-query-log-file ];
frequency = "weekly";
rotate = 12;
create = "0660 mysql mysql";
minsize = "1M";
compress = true;
};
};
}
@@ -1,14 +1,12 @@
{ ... }:
{
services.prometheus = {
scrapeConfigs = [
{
job_name = "exim";
scrape_interval = "15s";
static_configs = [{
targets = [ "microbel.pvv.ntnu.no:9636" ];
}];
}
];
};
services.prometheus.scrapeConfigs = [{
job_name = "exim";
scrape_interval = "15s";
scheme = "http";
static_configs = [{
targets = [ "microbel.pvv.ntnu.no:9636" ];
}];
}];
}