gcs icon indicating copy to clipboard operation
gcs copied to clipboard

Grafana dashboard not showing gluster volumes

Open JohnStrunk opened this issue 6 years ago • 9 comments

During testing for GCS 1.0-pre, the Grafana dashboard is not displaying metrics for gluster volumes.

Once GCS is deployed, I created the following workload in namespace test:

$ kubectl --kubeconfig=kubeconfig apply -n test -f scratch/test-glusterfs.yml
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: test-glusterfs
spec:
  storageClassName: glusterfs-csi
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi

---

apiVersion: batch/v1
kind: Job
metadata:
  name: fs-performance
spec:
  template:
    metadata:
      name: fs-performance
    spec:
      containers:
        - name: fio
          image: quay.io/johnstrunk/fs-performance:latest
          args: ["clone", "kernel"]
          env:
            - name: TARGET_CAPACITY_MB
              value: "500"
            - name: TARGET_PATH
              value: "/target"
            - name: CLONE_REPO
              value: "https://github.com/gluster/glusterfs.git"
          volumeMounts:
            - name: target
              mountPath: /target
      restartPolicy: Never
      volumes:
        - name: target
          persistentVolumeClaim:
            claimName: test-glusterfs

After the workload started, I viewed the gluster Grafana dashboard, and the "Volume" dropdown only had the entry "None". All graphs either displayed "N/A" or "no data points". Datasource was the default: "Prometheus"

JohnStrunk avatar Feb 07 '19 18:02 JohnStrunk

ping: @sidharthanup @cloudbehl

JohnStrunk avatar Feb 07 '19 18:02 JohnStrunk

AFAIK this happens because of multiple port forwarding and stuff that happens from pod to inside cluster to outside cluster, all they way up to the host. Which is why maybe Grafana is not able to resolve it initially. @sidharthanup Correct me if I'm wrong. However, If you create a new Datasource with exact same config from inside the Grafana UI, it works instantly. (This could be documented as a manual fix maybe??) @cloudbehl Any thoughts on this?

umangachapagain avatar Feb 08 '19 09:02 umangachapagain

@umangachapagain no clues why it is not working now? @sidharthanup any updates from your side?

cloudbehl avatar Feb 11 '19 14:02 cloudbehl

@aravindavk @aruniiird @shtripat ~~Problem seems to be in the gluster-prometheus side..Once GCS is deployed, gluster-prometheus is not exposing any of the gluster metrics, not even the ps ones. One of the latest refactoring PRs must have prevented this. Looking into it.~~

sidharthanup avatar Feb 12 '19 08:02 sidharthanup

Disregard the previous comment. The metrics are available and exported properly...GCS was deployed incorrectly and hence the above issue. Now I did some debugging and as @JohnStrunk reports the grafana dashboard does not show any metrics: grafana-default

This is the volume capacity utilization metrics:

grafana-capacitynograph

It seems like volume='$Volume' is where the issue lies. Removing it displays the correct metrics:

grafana-capacityyesgraph

Also specifying volume=<name of gluster volume> yields the correct metrics( as it should):

grafana-with-volname-literal

So it seems like the Volume variable is not being set by gluster mixin. Not just for this metric but the same issue for others as well. @cloudbehl @umangachapagain Could you guys check it out in the gluster mixins side?

sidharthanup avatar Feb 13 '19 10:02 sidharthanup

@anmolsachan Can you verify this? As far as I remember, this wasn't the case when we tested against 0.5.

umangachapagain avatar Feb 13 '19 11:02 umangachapagain

@umangachapagain @sidharthanup Ack, Will verify what's the issue here.

anmolsachan avatar Feb 13 '19 11:02 anmolsachan

@sidharthanup i deployed the GCS setup, I cannot see any gluster_volume* metrics in in prometheus. The grafana dashboards need those metrics for displaying the info.

It seems like volume='$Volume' is where the issue lies. Removing it displays the correct metrics:

$Volume is intended and needs to be there to select different volumes.

Also specifying volume=<name of gluster volume> yields the correct metrics( as it should):

Thats translates to volume='$Volume where $Volume is the selector.

anmolsachan avatar Feb 13 '19 13:02 anmolsachan

Are there any updates or associated issues/PRs?

JohnStrunk avatar Feb 19 '19 18:02 JohnStrunk