alerts...
This commit is contained in:
parent
7278922625
commit
fc9971ddc9
5 changed files with 324 additions and 4 deletions
|
|
@ -6,7 +6,7 @@
|
|||
http_port = 3000;
|
||||
http_addr = "0.0.0.0";
|
||||
# Grafana needs to know on which domain and URL it's running
|
||||
# domain = "monitor.local";
|
||||
domain = "grafana.procopius.dk";
|
||||
# root_url = "https://monitor.local/grafana/"; # Not needed if it is `https://your.domain/`
|
||||
# serve_from_sub_path = true;
|
||||
};
|
||||
|
|
@ -22,11 +22,13 @@
|
|||
datasources.settings.datasources = [
|
||||
# "Built-in" datasources can be provisioned - c.f. https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources
|
||||
{
|
||||
uid = "prometheus";
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
||||
}
|
||||
{
|
||||
uid = "loki";
|
||||
name = "Loki";
|
||||
type = "loki";
|
||||
url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}";
|
||||
|
|
@ -41,7 +43,13 @@
|
|||
|
||||
# Note: removing attributes from the above `datasources.settings.datasources` is not enough for them to be deleted on `grafana`;
|
||||
# One needs to use the following option:
|
||||
# datasources.settings.deleteDatasources = [ { name = "foo"; orgId = 1; } { name = "bar"; orgId = 1; } ];
|
||||
# datasources.settings.deleteDatasources = [ { name = "prometheus"; orgId = 1; } { name = "loki"; orgId = 1; } ];
|
||||
|
||||
alerting.rules.path = "/etc/grafana/provisioning/alerting/alerts.yml";
|
||||
|
||||
# notifiers.settings = {
|
||||
# path = "/etc/grafana/provisioning/notifiers";
|
||||
# };
|
||||
|
||||
dashboards.settings.providers = [{
|
||||
name = "my dashboards";
|
||||
|
|
@ -91,4 +99,20 @@
|
|||
group = "grafana";
|
||||
mode = "0644";
|
||||
};
|
||||
|
||||
# 🔔 Alerts provisioning
|
||||
environment.etc."grafana/provisioning/alerting/alerts.yml" = {
|
||||
source = ./provisioning/alerting/alerts.yml;
|
||||
user = "grafana";
|
||||
group = "grafana";
|
||||
mode = "0644";
|
||||
};
|
||||
|
||||
# 📬 Contact point provisioning
|
||||
environment.etc."grafana/provisioning/notifiers/contact-points.yml" = {
|
||||
source = ./provisioning/notifiers/contact-points.yml;
|
||||
user = "grafana";
|
||||
group = "grafana";
|
||||
mode = "0644";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue