File tree Expand file tree Collapse file tree 5 files changed +16
-3
lines changed Expand file tree Collapse file tree 5 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ loki_data_dir: /usr/share/loki # default: "/usr/share/{{ loki_hostname }}"
1818loki_requires_package : python2-passlib # default: python3-passlib
1919loki_proxy_basic_auth_username : log # default: loki
2020loki_proxy_basic_auth_password : # default: "{{ vault_loki_proxy_basic_auth_password }}"
21+ loki_retention_period : 7d # default: 14d
2122` ` `
2223
2324Ensure the nginx proxy includes the loki config:
Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ loki_data_dir: /usr/share/{{ loki_hostname }}
55loki_nginx_data_dir : " {{ nginx_data_dir }}/proxies"
66loki_proxy_basic_auth_username : loki
77loki_proxy_basic_auth_password : " {{ vault_loki_proxy_basic_auth_password }}"
8+ loki_retention_period : 14d
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ query_range:
2828
2929limits_config :
3030 metric_aggregation_enabled : true
31- retention_period : 30d
31+ retention_period : {{ loki_retention_period }}
3232
3333schema_config :
3434 configs :
@@ -64,4 +64,4 @@ frontend:
6464#
6565# If you would like to disable reporting, uncomment the following lines:
6666analytics :
67- reporting_enabled : false
67+ reporting_enabled : false
Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ The `prometheus.yml` template contains predefined srcape jobs that lookup proxy
9696* **n8n https**: Targets are `nginx_proxies` with exporter `n8n`.
9797* **uptime-kuma https**: Targets are `nginx_proxies` with exporter `uptime-kuma`.
9898* **meilisearch https**: Targets are `nginx_proxies` with exporter `meilisearch`.
99- * **blackbox**: Targets are `nginx_proxies` with `monitor` not false and host is `blackbox01:9115`.
99+ * **blackbox**: Target is `blackbox_exporter_hostname`.
100+ * **loki http**: Targetis `loki_hostname`.
100101
101102# ## Custom scrapers
102103
Original file line number Diff line number Diff line change @@ -186,5 +186,15 @@ scrape_configs:
186186 target_label : instance
187187 - target_label : __address__
188188 replacement : {{ blackbox_exporter_hostname }}:9115
189+ {% endif %}
190+ {% if loki_hostname is defined %}
191+ - job_name : loki
192+ metrics_path : " /metrics"
193+ scrape_interval : 60s
194+ honor_labels : true
195+ scheme : http
196+ static_configs :
197+ - targets :
198+ - {{ loki_hostname }}:3100
189199{% endif %}
190200 {{ prometheus_custom_scrapers | indent(2) }}
You can’t perform that action at this time.
0 commit comments