Merge ~sergiodj/loki-snap:add-promtail-config into loki-snap:rock

Proposed by Sergio Durigan Junior
Status: Merged
Merged at revision: 1c2c6714c5ad3cd49456b4b7538539a0f4d3dfa6
Proposed branch: ~sergiodj/loki-snap:add-promtail-config
Merge into: loki-snap:rock
Diff against target: 33 lines (+19/-0)
2 files modified
etc/loki/promtail-local-config.yaml (+18/-0)
snapcraft.yaml (+1/-0)
Reviewer Review Type Date Requested Status
Athos Ribeiro Approve
Canonical Server Pending
Review via email: mp+418565@code.launchpad.net

Description of the change

This MP adds a local promtail configuration file. This is useful because promtail is an important tool in the Loki workflow. I will also add this file to the ROCK image being generated from this snap.

To post a comment you must log in.
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

LGTM, I left a comment/question inline, but I do not believe it is an issue for the snap :)

review: Approve
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the review, Athos. I'm leaving a reply to your comment with a question; let me know what you think.

Revision history for this message
Athos Ribeiro (athos-ribeiro) :
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

On Wednesday, April 06 2022, Athos Ribeiro wrote:

> Diff comments:
>
>> diff --git a/etc/loki/promtail-local-config.yaml b/etc/loki/promtail-local-config.yaml
>> new file mode 100644
>> index 0000000..3b92565
>> --- /dev/null
>> +++ b/etc/loki/promtail-local-config.yaml
>> @@ -0,0 +1,18 @@
>> +server:
>> + http_listen_port: 9080
>> + grpc_listen_port: 0
>> +
>> +positions:
>> + filename: /tmp/positions.yaml
>
> +1

Thanks Athos. Pushed.

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/etc/loki/promtail-local-config.yaml b/etc/loki/promtail-local-config.yaml
2new file mode 100644
3index 0000000..f36356d
4--- /dev/null
5+++ b/etc/loki/promtail-local-config.yaml
6@@ -0,0 +1,18 @@
7+server:
8+ http_listen_port: 9080
9+ grpc_listen_port: 0
10+
11+positions:
12+ filename: ${SNAP_COMMON}/positions.yaml
13+
14+clients:
15+ - url: http://localhost:3100/loki/api/v1/push
16+
17+scrape_configs:
18+- job_name: system
19+ static_configs:
20+ - targets:
21+ - localhost
22+ labels:
23+ job: varlogs
24+ __path__: /var/log/*log
25diff --git a/snapcraft.yaml b/snapcraft.yaml
26index 2d45a86..e88b11f 100644
27--- a/snapcraft.yaml
28+++ b/snapcraft.yaml
29@@ -89,3 +89,4 @@ parts:
30 - bin/config-set
31 - bin/common
32 - etc/loki/loki.yaml
33+ - etc/loki/promtail-local-config.yaml

Subscribers

People subscribed via source and target branches