Open mowies opened 10 months ago
Thanos: could be a quick win to have a metrics provider since it's basically prometheus
I tested the Keptn Prometheus provider with Thanos, and it looks like it's working. I was considering to create a Thanos provider, but it seems that the Prometheus provider can be used to query Thanos š¤
I followed Keptn + HPA example and used Thanos server as the TargetServer for metrics instead of the Prometheus server. I might be mistaken as I don't have much experience with this.
Here is my KeptnMetric manifests I used
apiVersion: metrics.keptn.sh/v1alpha3
kind: KeptnMetricsProvider
metadata:
name: thanos-provider
namespace: podtato-kubectl
spec:
type: prometheus
targetServer: "http://thanos-query.thanos.svc.cluster.local:9090"
---
apiVersion: metrics.keptn.sh/v1alpha3
kind: KeptnMetric
metadata:
name: cpu-throttling
namespace: podtato-kubectl
spec:
provider:
name: thanos-provider
query: 'sum(kube_pod_container_resource_limits{resource="cpu"})'
fetchIntervalSeconds: 10
range:
interval: "5m"
step: "1m"
aggregation: "avg"
As you can see in the screenshot, we get metric output.
@sudiptob2 That should be the expected behavior because Thanos implements the Prometheus HTTP API to query data via PromQL. I think we can have a new KeptnMetricsProvider
type for Thanos in this case and reuse the functionality of the Prometheus provider.
@rakshitgondwal make sense. I was also thinking about that, like adding a case here for Thanos which just return PrometheusProvider
.
Perhaps, it might also be possible to solve without any code change, by simply mentioning to use prometheus
type for thanos in the documentation.
thanks for looking into this! i think we can find a nice solution that prevents lots of code duplication, but let's see. for now, the epic is still work in progress. i'll write some sub-tickets for it soon and then we can refine and work them
I know that @thschue was integrating Keptn with K8sGPT, maybe we should put it on the List as well.
Goal
Integrate well with other tools so that users can take the most advantage of the synergies of those tools together with Keptn.
Details
This epic should be used to do research on possible integration opportunities with the tools below, to connect with the maintainer teams to present what Keptn can do and to get feedback from them on integration options. This epic should also be used for any user guides and other documentation that comes out as a result of the research. Additionally, this epic should also include any needed implementation work to integrate better with other tools.
The tools that have the best fit are:
Definition of Done