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

When Prometheus and Thanos sidecar are launched simultaneously, should the Thanos sidecar launch configuration tsdb.path point to the Prometheus storage.tsdb.path-defined TSDB database data directory? #7943

Open
vitaaaaa1 opened this issue Nov 28, 2024 · 1 comment

Comments

@vitaaaaa1
Copy link

I am using Bitnami's Helm Chart to install Prometheus + Those sidecar, but I found that the default Prometheus uses the tsdb data directory path of --storage.tsdb.path=/bitnami/prometheus/data, while the Thanos sidecar points to the Prometheus tsdb data directory of --tsdb.path=/prometheus/. It's strange that the sidecar can work normally and upload tsbd data blocks to Minio, which is confusing. Am I misunderstanding the meaning of the tsdb.path parameter, or does the sidecar not need to access the Prometheus tsdb data directory to upload data blocks?

Copy link

dosubot bot commented Nov 28, 2024

The --tsdb.path parameter in the Thanos sidecar configuration is intended to specify the data directory of the Prometheus TSDB. This is where the Prometheus instance stores its data, and the sidecar uses this path to access the TSDB blocks for operations such as uploading them to object storage [1].

In your case, it seems there is a discrepancy between the paths used by Prometheus and the Thanos sidecar. Prometheus is using --storage.tsdb.path=/bitnami/prometheus/data, while the Thanos sidecar is configured with --tsdb.path=/prometheus/. Despite this mismatch, the sidecar is still able to upload data blocks to Minio, which might be due to the sidecar's ability to function without direct access to the Prometheus TSDB data directory under certain configurations.

The Thanos sidecar can upload TSDB data blocks to object storage by running alongside a Prometheus instance and using the --tsdb.path flag to specify the path to the Prometheus data directory. However, it does not require direct access to the Prometheus TSDB data directory because it uploads the TSDB blocks as Prometheus produces them every 2 hours. This is done by configuring the sidecar with the --objstore.config-file flag to specify the object storage configuration [1][2].

If the sidecar is functioning correctly despite the path mismatch, it might be due to the way the Helm Chart is configured or how the sidecar interacts with Prometheus in your setup. It would be beneficial to ensure that the paths are aligned to avoid potential issues with data consistency and reliability.

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant