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