loki icon indicating copy to clipboard operation
loki copied to clipboard

Fix reading logs from remote Docker daemon with TLS

Open longsleep opened this issue 3 years ago • 3 comments

The Docker daemon can listen with TLS encryption and thus the Docker client needs to make HTTPS requests when the configured Docker host has https scheme configured. Furthermore other HTTP client related settings when the Docker daemon is using http or https protocol. This change initializes the Docker client HTTP support from the scraping configuration to let TLS connections succeed.

Fixes: https://github.com/grafana/loki/issues/6894

This is more or less a trivial fix, as most of the details are already implemented by Prometheus. Though the details required extending the targetGroup struct as did not pass through the required configuration. With some refactoring the change could probably be made more elegant. This is a quick fix which works for me

Checklist

  • [ ] Documentation added
  • [ ] Tests updated
  • [ ] Is this an important fix or new feature? Add an entry in the CHANGELOG.md.
  • [ ] Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

longsleep avatar Aug 15 '22 08:08 longsleep

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 15 '22 08:08 CLAassistant

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

grafanabot avatar Aug 16 '22 07:08 grafanabot

Hi! This issue has been automatically marked as stale because it has not had any activity in the past 30 days.

We use a stalebot among other tools to help manage the state of issues in this project. A stalebot can be very useful in closing issues in a number of cases; the most common is closing issues or PRs where the original reporter has not responded.

Stalebots are also emotionless and cruel and can close issues which are still very relevant.

If this issue is important to you, please add a comment to keep it open. More importantly, please add a thumbs-up to the original issue entry.

We regularly sort for closed issues which have a stale label sorted by thumbs up.

We may also:

  • Mark issues as revivable if we think it's a valid issue but isn't something we are likely to prioritize in the future (the issue will still remain closed).
  • Add a keepalive label to silence the stalebot if the issue is very common/popular/important.

We are doing our best to respond, organize, and prioritize all issues but it can be a challenging task, our sincere apologies if you find yourself at the mercy of the stalebot.

stale[bot] avatar Sep 21 '22 06:09 stale[bot]

Thanks for the reply, will pick this up again asap.

longsleep avatar Oct 28 '22 16:10 longsleep

@longsleep should we take over? 😊

jeschkies avatar Jan 12 '23 09:01 jeschkies

@longsleep should we take over?

@jeschkies if you can please do. I can't tell when I will have the time to come back to this yet (but it is not forgotten).

longsleep avatar Jan 12 '23 09:01 longsleep

@longsleep could you give me permissions to push to you branch?

jeschkies avatar Feb 02 '23 13:02 jeschkies

@longsleep could you give me permissions to push to you branch?

@jeschkies sure I invited you to my fork, let me know if that is not enough. Thanks!

longsleep avatar Feb 03 '23 13:02 longsleep

Thanks, @longsleep. Could you also sign the CLA?

jeschkies avatar Feb 03 '23 16:02 jeschkies

Thanks, @longsleep. Could you also sign the CLA?

Sure, done!

longsleep avatar Feb 03 '23 19:02 longsleep