I want to use my already existing Prometheus and Grafana instances in the monitoring namespace to emulate what seldon-core-analytics
is doing. I'm using the prometheus community helm charts and installed kube-prometheus-stack
on k8s. Here's what I've done so far:
In the values.yaml
file, under the prometheus config, I added the following annotations:
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: "/prometheus
Next, I looked at the prometheus-config.yaml
in their Github repo and copied and pasted the configuration in a configmap file.
Also, created a ServiceMonitor
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: seldon-servicemonitor-default
labels:
seldon-monitor: seldon-default
namespace: monitoring
spec:
selector:
matchLabels:
app.kubernetes.io/managed-by: seldon-core
endpoints:
- interval: 15s
path: /metrics
port: http
- interval: 15s
path: /prometheus
port: http
namespaceSelector:
matchNames:
- seldon
- default
- monitoring
No errors with the above steps so far, but it doesn't appear as though the prometheus instance is able to scrape the metrics from a model I deployed on a different namespace. What other configuration do I need to do so that my own Prometheus and Grafana instances can gather and visualize the metrics from my seldon deployed models? The documentation doesn't really explain how to do this on your own instances, and the one they provide to you through seldon-core-analytics
isn't production-ready.