Server/grafana: provision prometheus datasource
This commit is contained in:
parent
3d4deae65a
commit
d65b4380e7
2 changed files with 16 additions and 1 deletions
|
|
@ -23,6 +23,14 @@ in {
|
|||
services = {
|
||||
grafana = {
|
||||
enable = true;
|
||||
|
||||
provision = {
|
||||
enable = true;
|
||||
datasources.settings = {
|
||||
apiVersion = 1;
|
||||
};
|
||||
};
|
||||
|
||||
settings = {
|
||||
analytics.reporting_enabled = false;
|
||||
security = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{...}: {
|
||||
{config, ...}: {
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
enableReload = true;
|
||||
|
|
@ -21,4 +21,11 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
services.grafana.provision = {
|
||||
datasources.settings.datasources = [{
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
url = "http://127.0.0.1:${builtins.toString config.services.prometheus.port}";
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue