ThanosRuler is missing follow_redirect setting

Summary of Open Issue: ThanosRuler Missing follow_redirect Setting

Issue ID: ThanosRuler#MissingFollowRedirect

Reported By: m-messiah Date: December 5, 2022 Thanos Version: v0.28.0 Object Storage Provider: Local filesystem

Description:

The ThanosRuler component of Thanos lacks a follow_redirect configuration, which results in unexpected behavior when alerting. In scenarios where the Alertmanager requires authentication, ThanosRuler automatically follows HTTP redirects to the OAuth provider. This behavior leads to ThanosRuler incorrectly interpreting a 200 OK status for sent alerts, rather than validating their actual transmission.

Expected Behavior:

The user expects to set alertmanagers.config: follow_redirects=false to stop following redirects. In the event of an HTTP 302 response, ThanosRuler should fail the alert sending process.

Steps to Reproduce:

  1. Set up an NGINX instance to redirect requests to a URL (e.g., location /api/v1/alerts { return 302 "https://example.com"; }).
  2. Configure ThanosRuler to use this NGINX instance as the Alertmanager.
  3. Generate alerts and observe the behavior.
  • Expected Result: Alerts should fail to send when a 302 is returned.
  • Actual Result: Alerts are reported as successfully sent.

Development Activity:

  • Multiple contributors (Akshit42-hue, ShivamTyagi12345, Kartik-Garg) have expressed interest in resolving this issue, with updates indicating plans to submit a pull request. Collaboration offers have been made between contributors.
  • Interest from new contributors has also been noted, with queries about implementing the proposed changes effectively.
  • As of August 24, 2023, a new PR has been created due to a period of inactivity on previous efforts, indicating progress on resolving the issue.

As a high-priority issue labeled as both a “good first issue” and “help wanted,” addressing this configuration gap is essential for ensuring that alert notifications work correctly under redirect scenarios.