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

feat: initial Prometheus analyzers #855

Merged
merged 3 commits into from
Jan 12, 2024

Commits on Jan 11, 2024

  1. feat: initial Prometheus analyzers

    Added a prometheus integration with two analyzers:
    1. PrometheusConfigValidate
    2. PrometheusConfigRelabelReport
    
    The integration does not deploy any Prometheus stack in the cluster.
    Instead, it searches the provided --namespace for a Prometheus
    configuration, stored in a ConfigMap or Secret. If it finds one, it
    unmarshals it into memory and runs the analyzers on it.
    
    PrometheusConfigValidate checks if the actual Prometheus configuration is valid or has
    any errors.
    
    PrometheusConfigRelabelReport tries to distill the scrape config
    relabeling rules to give a concise label set per job that targets need
    to have to be scraped. This analyzer is unconventional, in that it does
    not necessarily mean there are issues with the config. It merely tries
    to give a human-readable explanation of the relabel rules it discovers,
    leaning on the LLM and prompt.
    
    Tested on both kube-prometheus and Google Managed Prometheus
    stacks.
    
    Signed-off-by: Daniel Clark <danielclark@google.com>
    pintohutch committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    fb1428a View commit details
    Browse the repository at this point in the history
  2. review: feedback cycle 1

    Simplify ConfigValidate prompt and add comments.
    
    Signed-off-by: Daniel Clark <danielclark@google.com>
    pintohutch committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    d1a2939 View commit details
    Browse the repository at this point in the history
  3. review: feedback cycle 2

    Add Prometheus configuration discovery to integration activate command.
    
    Also improve logging to make this more clear to users.
    
    Signed-off-by: Daniel Clark <danielclark@google.com>
    pintohutch committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    ca04575 View commit details
    Browse the repository at this point in the history