Skip to content

PodAlert- Check volume Show error #391

@aland-zhang

Description

@aland-zhang

Searchlight:V7.0.0


apiVersion: monitoring.appscode.com/v1alpha1
kind: PodAlert
metadata:
  clusterName: ''
  creationTimestamp: '2018-07-02T02:07:31Z'
  name: pod-volume-demo-0
  namespace: nginx-example
  resourceVersion: '25377547'
  selfLink: >-
    /apis/monitoring.appscode.com/v1alpha1/namespaces/nginx-example/podalerts/pod-volume-demo-0
  uid: ad51079d-7d9c-11e8-8fd9-6c92bf6f7932
spec:
  alertInterval: 3m
  check: pod-volume
  checkInterval: 1m
  selector:
    matchLabels:
      app: nginx
  vars:
    critical: '95'
    volumeName: nginx-logs
    warning: '70'

kubectl get pvc nginx-logs -o yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  annotations:
    pv.kubernetes.io/bind-completed: "yes"
    pv.kubernetes.io/bound-by-controller: "yes"
    volume.beta.kubernetes.io/storage-class: cephfs
    volume.beta.kubernetes.io/storage-provisioner: ceph.com/cephfs
  creationTimestamp: 2018-07-02T02:05:21Z
  name: nginx-logs
  namespace: nginx-example
  resourceVersion: "25376897"
  selfLink: /api/v1/namespaces/nginx-example/persistentvolumeclaims/nginx-logs
  uid: 60516b3f-7d9c-11e8-8fd9-6c92bf6f7932
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  volumeName: pvc-60516b3f-7d9c-11e8-8fd9-6c92bf6f7932
status:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 1Gi
  phase: Bound

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  creationTimestamp: 2018-05-22T13:52:56Z
  name: cephfs
  resourceVersion: "10517709"
  selfLink: /apis/storage.k8s.io/v1/storageclasses/cephfs
  uid: 6e905727-5dc7-11e8-a3dd-6c92bf6f7932
parameters:
  adminId: admin
  adminSecretName: ceph-secret
  adminSecretNamespace: rook
  monitors: 10.10.126.247:6790
provisioner: ceph.com/cephfs
reclaimPolicy: Delete
volumeBindingMode: Immediate

Plugin Output

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x11558f7]

goroutine 1 [running]:
github.com/appscode/searchlight/plugins/check_volume.(*plugin).checkVolume(0xc420355e00, 0xc42078b330, 0xd, 0xc42073e200, 0x80, 0xc42073e200, 0x80, 0x0)
	/go/src/github.com/appscode/searchlight/plugins/check_volume/lib.go:277 +0x107
github.com/appscode/searchlight/plugins/check_volume.(*plugin).checkPodVolume(0xc420355e00, 0x1dba5e0, 0xc42040e000, 0xc420355e00)
	/go/src/github.com/appscode/searchlight/plugins/check_volume/lib.go:342 +0x5b6
github.com/appscode/searchlight/plugins/check_volume.(*plugin).Check(0xc420355e00, 0x0, 0x0, 0x0)
	/go/src/github.com/appscode/searchlight/plugins/check_volume/lib.go:358 +0x62
github.com/appscode/searchlight/plugins/check_volume.NewCmd.func1(0xc4203e3900, 0xc42019a600, 0x0, 0xc)
	/go/src/github.com/appscode/searchlight/plugins/check_volume/lib.go:388 +0x219
github.com/appscode/searchlight/vendor/github.com/spf13/cobra.(*Command).execute(0xc4203e3900, 0xc42019a540, 0xc, 0xc, 0xc4203e3900, 0xc42019a540)
	/go/src/github.com/appscode/searchlight/vendor/github.com/spf13/cobra/command.go:766 +0x2c1
github.com/appscode/searchlight/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc42028d180, 0xc42028d900, 0xc42028d680, 0xc42028d400)
	/go/src/github.com/appscode/searchlight/vendor/github.com/spf13/cobra/command.go:852 +0x334
github.com/appscode/searchlight/vendor/github.com/spf13/cobra.(*Command).Execute(0xc42028d180, 0x14d8338, 0x1178a32)
	/go/src/github.com/appscode/searchlight/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
	/go/src/github.com/appscode/searchlight/cmd/hyperalert/main.go:16 +0x48

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions