alpine: add prowlarr and exportarr
This commit is contained in:
parent
e7c8cec95e
commit
c993639066
3 changed files with 111 additions and 77 deletions
|
|
@ -29,28 +29,34 @@ in {
|
|||
];
|
||||
rules = [
|
||||
(builtins.toJSON {
|
||||
groups = [{
|
||||
name = "node";
|
||||
rules = [
|
||||
{
|
||||
alert = "io error";
|
||||
expr = ''node_filesystem_device_error{device_error!="permission denied"} > 0'';
|
||||
}
|
||||
{
|
||||
alert = "disk full";
|
||||
expr = ''node_filesystem_avail_bytes{fstype=~"ext4|btrfs"} < ${toString (50 * 1024 * 1024 * 1024)}'';
|
||||
}
|
||||
];
|
||||
}];
|
||||
groups = [
|
||||
{
|
||||
name = "node";
|
||||
rules = [
|
||||
{
|
||||
alert = "io error";
|
||||
expr = ''node_filesystem_device_error{device_error!="permission denied"} > 0'';
|
||||
}
|
||||
{
|
||||
alert = "disk full";
|
||||
expr = ''node_filesystem_avail_bytes{fstype=~"ext4|btrfs"} < ${toString (50 * 1024 * 1024 * 1024)}'';
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
})
|
||||
];
|
||||
alertmanagers = [ {
|
||||
static_configs = [ {
|
||||
targets = [
|
||||
"localhost:9093"
|
||||
alertmanagers = [
|
||||
{
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"localhost:9093"
|
||||
];
|
||||
}
|
||||
];
|
||||
} ];
|
||||
} ];
|
||||
}
|
||||
];
|
||||
exporters = {
|
||||
postgres = {
|
||||
enable = true;
|
||||
|
|
@ -58,39 +64,35 @@ in {
|
|||
};
|
||||
};
|
||||
alertmanager = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
configuration = {
|
||||
receivers = [{
|
||||
name = "ntfy";
|
||||
webhook_configs = [{
|
||||
url = "http://localhost${config.services.ntfy-sh.settings.listen-http}/alert/trigger";
|
||||
}];
|
||||
}];
|
||||
route = {
|
||||
receiver = "ntfy";
|
||||
# routes = [{
|
||||
# matchers = [
|
||||
# ''node_filesystem_device_error != 0''
|
||||
# ];
|
||||
# }];
|
||||
receiver = "alertmanager-ntfy";
|
||||
routes = [{
|
||||
matchers = [
|
||||
''node_filesystem_device_error != 0''
|
||||
];
|
||||
}];
|
||||
};
|
||||
};
|
||||
};
|
||||
alertmanager-ntfy = {
|
||||
enable = false;
|
||||
settings = {
|
||||
ntfy = {
|
||||
baseurl = "https://up.tristans.cloud";
|
||||
notification = {
|
||||
topic = "alert";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
# alertmanager-ntfy = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# ntfy = {
|
||||
# baseurl = "https://up.tristans.cloud";
|
||||
# notification = {
|
||||
# topic = "alert";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
services.grafana.provision.datasources.settings.datasources = [{
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
url = "http://localhost:${toString prometheus.port}";
|
||||
}];
|
||||
services.grafana.provision.datasources.settings.datasources = [
|
||||
{
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
url = "http://localhost:${toString prometheus.port}";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue