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

Allow to specify -prometheus-http-prefix for mimirtool analyze prometheus #4966

Merged
merged 1 commit into from
May 10, 2023

Commits on May 9, 2023

  1. Allow to specify -prometheus-http-prefix for mimirtool analyze promet…

    …heus
    
    When configuring mimirtool via environment variables users might use the
    following:
    
    ```
    MIMIR_ADDRESS=https://mimir:9090
    MIMIR_TENANT_ID=default
    MIMIR_API_USER=default
    MIMIR_API_KEY=1234
    ```
    
    It works as expected for `mimirtool analyze ruler` but not for
    `mimirtool analyze prometheus`.
    
    The HTTP client for `analyze ruler` is done with
    `github.com/grafana/mimir/pkg/mimirtool/client`, when for `analyze
    prometheus` it is done with only the address.
    
    Depending on which prometheus the user wants to analyze the path is not
    the same. For a mimir based analysis user needs to provide
    `/prometheus`.
    
    This commit allow to specify the path to use for a mimir based analysis.
    It also simplify the scripting around the tool.
    
    Example:
    
    ```
    source .secrets.env
    mimirtool analyze grafana && \
    mimirtool analyze ruler && \
    mimirtool analyze prometheus --prometheus-http-prefix="/prometheus"
    ```
    
    Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
    wilfriedroset committed May 9, 2023
    Configuration menu
    Copy the full SHA
    794e427 View commit details
    Browse the repository at this point in the history