add configuration and service
This commit is contained in:
23
templates/config.alloy.erb
Normal file
23
templates/config.alloy.erb
Normal file
@@ -0,0 +1,23 @@
|
||||
logging {
|
||||
level = "info"
|
||||
format = "logfmt"
|
||||
}
|
||||
|
||||
loki.source.file "system_logs" {
|
||||
targets = [
|
||||
<% @log_targets_array.each do |target| -%>
|
||||
{__path__ = "<%= target %>"},
|
||||
<% end -%>
|
||||
]
|
||||
forward_to = [loki.write.loki.receiver]
|
||||
}
|
||||
|
||||
loki.write "loki" {
|
||||
endpoint {
|
||||
url = "https://loki.confdroid.com/loki/api/v1/push"
|
||||
basic_auth {
|
||||
username = "<%= @ay_loki_username %>"
|
||||
password = "<%= @ay_loki_userpass %>"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user