Commit Graph

3 Commits

Author SHA1 Message Date
Amit Amrutiya
3415031006
fix: lint errors (#923)
Signed-off-by: amitamrutiya2210 <amitamrutiya2210@gmail.com>
2024-02-07 11:30:45 +00:00
simone ragonesi
d97dea2896
chore: improve codebase and doc quality (#922)
* chore(prometheus integration): fix mispelling

Signed-off-by: r3drun3 <simone.ragonesi@sighup.io>

* docs(readme): add badges to improve doc quality

Signed-off-by: r3drun3 <simone.ragonesi@sighup.io>

---------

Signed-off-by: r3drun3 <simone.ragonesi@sighup.io>
2024-02-07 09:12:41 +00:00
Daniel Clark
45fa827c04
feat: initial Prometheus analyzers (#855)
* 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>

* review: feedback cycle 1

Simplify ConfigValidate prompt and add comments.

Signed-off-by: Daniel Clark <danielclark@google.com>

* 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>

---------

Signed-off-by: Daniel Clark <danielclark@google.com>
2024-01-12 09:58:09 +00:00