summaryrefslogtreecommitdiff
path: root/hosts/vidhar
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-01-01 23:58:40 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-01-01 23:58:40 +0100
commit09d068578357a4fab865b1d56dcf4b0f2c352a6d (patch)
treec43a41e1a82ac49b17154b2c0c03e696a83e6273 /hosts/vidhar
parentee4098134e21f6c1ca6eda7c33cd15efdc1923a7 (diff)
downloadnixos-09d068578357a4fab865b1d56dcf4b0f2c352a6d.tar
nixos-09d068578357a4fab865b1d56dcf4b0f2c352a6d.tar.gz
nixos-09d068578357a4fab865b1d56dcf4b0f2c352a6d.tar.bz2
nixos-09d068578357a4fab865b1d56dcf4b0f2c352a6d.tar.xz
nixos-09d068578357a4fab865b1d56dcf4b0f2c352a6d.zip
vidhar: loki
Diffstat (limited to 'hosts/vidhar')
-rw-r--r--hosts/vidhar/default.nix30
-rw-r--r--hosts/vidhar/zfs.nix6
2 files changed, 36 insertions, 0 deletions
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix
index 0bb1f680..6002947f 100644
--- a/hosts/vidhar/default.nix
+++ b/hosts/vidhar/default.nix
@@ -155,5 +155,35 @@
155 sopsFile = ./grafana-secret-key; 155 sopsFile = ./grafana-secret-key;
156 owner = "grafana"; 156 owner = "grafana";
157 }; 157 };
158
159 services.loki = {
160 enable = true;
161 configuration = {
162 auth_enabled = false;
163 server = {
164 http_listen_port = 9094;
165 grpc_listen_port = 9095;
166 };
167 };
168 };
169 services.promtail = {
170 enable = true;
171 configuration = {
172 server = {
173 http_listen_port = 9080;
174 grpc_listen_port = 0;
175 };
176 clients = [
177 { url = "http://localhost:9094/loki/api/v1/push"; }
178 ];
179 scrape_configs = [
180 { job_name = "system";
181 journal = {
182 json = true;
183 };
184 }
185 ];
186 };
187 };
158 }; 188 };
159} 189}
diff --git a/hosts/vidhar/zfs.nix b/hosts/vidhar/zfs.nix
index 53ba5120..8c164bbd 100644
--- a/hosts/vidhar/zfs.nix
+++ b/hosts/vidhar/zfs.nix
@@ -89,6 +89,12 @@ in {
89 options = [ "zfsutil" ]; 89 options = [ "zfsutil" ];
90 }; 90 };
91 91
92 "/var/lib/loki" =
93 { device = "ssd-raid1/local/var-lib-loki";
94 fsType = "zfs";
95 options = [ "zfsutil" ];
96 };
97
92 "/var/log" = 98 "/var/log" =
93 { device = "ssd-raid1/local/var-log"; 99 { device = "ssd-raid1/local/var-log";
94 fsType = "zfs"; 100 fsType = "zfs";