diff options
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/vidhar/default.nix | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index 37485a02..5c58d522 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix | |||
@@ -202,11 +202,24 @@ | |||
202 | { url = "http://localhost:9094/loki/api/v1/push"; } | 202 | { url = "http://localhost:9094/loki/api/v1/push"; } |
203 | ]; | 203 | ]; |
204 | scrape_configs = [ | 204 | scrape_configs = [ |
205 | { job_name = "system"; | 205 | { job_name = "journal"; |
206 | journal = { | 206 | journal = { |
207 | json = true; | 207 | json = true; |
208 | max_age = "12h"; | ||
209 | path = "/var/log/journal"; | ||
210 | labels = { | ||
211 | job = "systemd-journal"; | ||
212 | }; | ||
213 | relabel_configs = [ | ||
214 | { source_labels = ["__journal__systemd_unit"]; | ||
215 | target_label = "unit"; | ||
216 | } | ||
217 | { source_labels = ["__journal__hostname"]; | ||
218 | target_label = "nodename"; | ||
219 | } | ||
220 | ]; | ||
208 | }; | 221 | }; |
209 | } | 222 | }; |
210 | ]; | 223 | ]; |
211 | }; | 224 | }; |
212 | }; | 225 | }; |