feat: add Loki datasource configuration for Grafana
This commit is contained in:
17
hosts/web-arm/modules/grafana/datasources/loki.nix
Normal file
17
hosts/web-arm/modules/grafana/datasources/loki.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
services.grafana.provision.datasources.settings.datasources = [
|
||||
{
|
||||
name = "Loki";
|
||||
uid = "loki-datasource-uid"; # Stable UID
|
||||
type = "loki";
|
||||
url = "http://localhost:3100"; # Loki's local address
|
||||
access = "proxy"; # Grafana proxies requests
|
||||
isDefault = false; # Can be set to true if desired
|
||||
jsonData = {
|
||||
# Loki-specific options (e.g., derivedFields) can go here
|
||||
};
|
||||
editable = false; # Recommended for provisioned datasources
|
||||
}
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user