grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.64k stars 3.42k forks source link

Install Loki microservices with Tanka and Minio #5960

Open irizzant opened 2 years ago

irizzant commented 2 years ago

Describe the bug I need to install Loki inusing Tanka as explained here, using s3 implemented with Minio.

I set the following variables:

    // S3 variables -- Remove if not using s3
    storage_backend: 's3',
    s3_access_key: '{S3_ACCESS_KEY}',
    s3_secret_access_key: '${S3_SECRET_KEY}',
    s3_address: 'myminio.example.com:9000',
    s3_bucket_name: 'loki',

but when Loki starts I see that it tries to connect via http:

level=error ts=2022-04-19T14:01:08.970840787Z caller=reporter.go:202 msg="failed to delete corrupted cluster seed file, deleting it" err="RequestError: send request failed\ncaused by: Delete \"http://myminio.example.com:9000/loki/loki_cluster_seed.json\": EOF"

The config.yaml created is:

storage_config:
    aws:
        s3: s3://${S3_ACCESS_KEY}:${S3_SECRET_KEY}@myminio.example.com:9000/loki
        s3forcepathstyle: true

Which comes from these lines.

By changing the configuration as shown here I was able to start Loki correctly and the connection to the bucket is established via https.

To Reproduce Steps to reproduce the behavior:

  1. Deploy Loki as shown here
  2. Specify a Minio S3 bucket for storage which uses https

Expected behavior Loki should by default connect via https to the s3 bucket and start

Environment:

Screenshots, Promtail config, or terminal output If applicable, add any output to help explain your problem.

DylanGuedes commented 2 years ago

Just double checking, is the problem not enforcing the usage of HTTPS instead of HTTP? Or not parsing the given s3 URL correctly?

irizzant commented 2 years ago

@DylanGuedes the default should be HTTPS but in reality connections are established via HTTP. Changing s3 URL format to the one shown here makes the connections work with HTTPS

irizzant commented 2 years ago

Any update on this?