Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data source: Changing Loki server URL does not change TLS serverName #83844

Closed
remram44 opened this issue Mar 4, 2024 · 1 comment
Closed
Labels
datasource/Loki needs investigation for unconfirmed bugs. use type/bug for confirmed bugs, even if they "need" more investigating type/bug

Comments

@remram44
Copy link

remram44 commented Mar 4, 2024

What happened?

I created a data source with URL https://loki:3100, enabled TLS validation with a custom CA certificate. It worked.

Later, I change the URL to https://loki2:3100. However every panel fails with a TLS error:

Get "https://loki2:3100/loki/api/v1/query_range?direction=backward&end=1709566583228000000&limit=1000&query=%7B%7D&start=1709562983228000000&step=2000ms": tls: failed to verify certificate: x509: certificate is valid for loki2, loki2.logging.svc, not loki

Looking into the Grafana database, I can see that url correctly changed to https://loki2:3100, however json_data contains "serverName":"loki". It has not been updated, expected the new location to use the old server name, and validation fails every time.

What did you expect to happen?

Updating the URL of a Loki data source is possible.

Did this work before?

I haven't tried another Grafana version. It worked before I updated the data source obviously.

How do we reproduce it?

  1. Create a Loki data source
  2. Update the URL

Is the bug inside a dashboard panel?

no

Environment (with versions)?

Grafana: 10.3.3

Grafana platform?

Docker

Datasource(s)?

Loki

@matyax matyax added type/bug needs investigation for unconfirmed bugs. use type/bug for confirmed bugs, even if they "need" more investigating labels May 2, 2024
@svennergr
Copy link
Contributor

If you change the URL of your data source, you also need to update the CA certificate along because the domain name is likely part of your certifiate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasource/Loki needs investigation for unconfirmed bugs. use type/bug for confirmed bugs, even if they "need" more investigating type/bug
Projects
None yet
Development

No branches or pull requests

4 participants