Scrape Portworx Metrics on Konvoy Kuberentes Cluster

Konvoy is a complete, standalone distribution of Kubernetes that includes a native Kubernetes cluster pre-packaged for deployment with a complement of best-in-class addon services, enabled by default and ready for immediate use.

Monitoring Stack (Prometheus/Grafana/AlertManager) comes pre-install, now if you want to add Portworx metric and monitor in Grafana then you have to follow the below steps.

  • Create Service Monitor
kind: ServiceMonitor
metadata:
  namespace: kubeaddons
  name: portworx-prometheus-sm
  labels:
    release: prometheus-kubeaddons
spec:
  selector:
    matchLabels:
      name: portworx
  namespaceSelector:
    matchNames:
    - kube-system
  endpoints:
  - port: px-api
    targetPort: 9001

Here the important part is labels release: prometheus-kubeaddons this needs to be there as per D2iQ documentation. If you don’t add this label then you will not see the target in Prometheus.

  • Now in Grafana create a new DataSource
name: prometheus
URL: http://prometheus-kubeaddons-prom-prometheus:9090/

From this DOC Install Grafana section you only need to do Step 3 which has dashboard json. No need to do Step 1 & Step 2.

1 Like