Verify that the grafana bridge returns data as expected - IBM/ibm-spectrum-scale-bridge-for-grafana GitHub Wiki
-
Get grafana-bridge container ip
Example output:
[root@RHEL92-32 ~]# podman run -dt -p 4242:4242,9250:9250 -e "SERVER=9.1XX.XXX.XXX" -e "APIKEYVALUE=54dc249a-6de2-4399-bec0-6155f35ff3c7" -e "PORT=4242" -e "PROMETHEUS=9250" -e "PROTOCOL=http" -e "BASICAUTH=False" -e "TLSKEYFILE=privkey.pem" -e "TLSCERTFILE=cert.pem" -v /tmp:/var/log/ibm_bridge_for_grafana --mount type=bind,src=/home/zimon/ZIMonSensors.cfg,target=/opt/IBM/zimon/ZIMonSensors.cfg,ro=true --pod new:my-bridge-basic-auth-test-pod --name bridge-basic-auth-test scale_bridge:test_8.0.1_dev 2b8c209cd59f3a70aa9f6925928cb9d23b0250b6cde54e50fe99dfef37d760c6 [root@myhost ~]# podman container inspect -f '{{.NetworkSettings.IPAddress}}' bridge-basic-auth-test 10.88.0.178
-
Make sure that the sensor for which you want to test the bridge response is enabled.
Example output:
[root@RHEL92-32 ~]# curl http://10.88.0.178:4242/metadata/sensorsconfig -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg== | jq '.[]|select(.name |contains("GPFSFilesystem"))' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2437 100 2437 0 0 396k 0 --:--:-- --:--:-- --:--:-- 475k { "name": "\"GPFSFilesystem\"", "period": "10" } { "name": "\"GPFSFilesystemAPI\"", "period": "10" }
-
Query the available tags for a specific metric
Example output:
[root@RHEL92-32 ~]# curl http://10.88.0.178:4242/api/search/lookup?m=gpfs_fs_disks -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg== {"type": "LOOKUP", "metric": "gpfs_fs_disks", "tags": [], "results": [{"tags": {"node": "scale-11", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "afmCacheFS"}}, {"tags": {"node": "scale-11", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "cesSharedRoot"}}, {"tags": {"node": "scale-11", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}, {"tags": {"node": "scale-12", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "afmCacheFS"}}, {"tags": {"node": "scale-12", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "cesSharedRoot"}}, {"tags": {"node": "scale-12", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}, {"tags": {"node": "scale-13", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "afmCacheFS"}}, {"tags": {"node": "scale-13", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "cesSharedRoot"}}, {"tags": {"node": "scale-13", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}, {"tags": {"node": "scale-14", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "afmCacheFS"}}, {"tags": {"node": "scale-14", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "cesSharedRoot"}}, {"tags": {"node": "scale-14", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}, {"tags": {"node": "scale-15", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "afmCacheFS"}}, {"tags": {"node": "scale-15", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "cesSharedRoot"}}, {"tags": {"node": "scale-15", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}, {"tags": {"node": "scale-16", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "afmCacheFS"}}, {"tags": {"node": "scale-16", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "cesSharedRoot"}}, {"tags": {"node": "scale-16", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}, {"tags": {"node": "scale-17", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "afmCacheFS"}}, {"tags": {"node": "scale-17", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "cesSharedRoot"}}, {"tags": {"node": "scale-17", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}]}
-
Filter available entries for specific metric/tag
Example output:
[root@RHEL92-32 ~]# curl http://10.88.0.178:4242/api/search/lookup?m=gpfs_fs_disks%7Bgpfs_fs_name=localFS%7D -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg== {"type": "LOOKUP", "metric": "gpfs_fs_disks", "tags": [{"key": "gpfs_fs_name", "value": "localFS"}], "results": [{"tags": {"node": "scale-11", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}, {"tags": {"node": "scale-12", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}, {"tags": {"node": "scale-13", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}, {"tags": {"node": "scale-14", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}, {"tags": {"node": "scale-15", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}, {"tags": {"node": "scale-16", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}, {"tags": {"node": "scale-17", "gpfs_cluster_name": "scale-cluster-1.vmlocal", "gpfs_fs_name": "localFS"}}]}
-
Get grafana-bridge container ip
Example output:
[root@myhost ~]# podman run -dt -p 4242:4242,9250:9250 -e "SERVER=9.1XX.XXX.XXX" -e "APIKEYVALUE=54dc249a-6de2-4399-bec0-6155f35ff3c7" -e "PORT=4242" -e "PROMETHEUS=9250" -e "PROTOCOL=http" -e "BASICAUTH=True" -e "BASICAUTHUSER=scale_admin" -e "BASICAUTHPASSW=TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg==" -v /tmp:/var/log/ibm_bridge_for_grafana --mount type=bind,src=/home/zimon/ZIMonSensors.cfg,target=/opt/IBM/zimon/ZIMonSensors.cfg,ro=true --pod new:my-bridge-basic-auth-test-pod --name bridge-basic-auth-test scale_bridge:test_8.0.1_dev 88b828af73324e7a3508485914fbc6539d45a340b858a58b7f610a0bea157994 [root@myhost ~]# podman container inspect -f '{{.NetworkSettings.IPAddress}}' bridge-basic-auth-test 10.88.0.177
-
Make sure that the sensor for which you want to test the metrics is enabled.
Example output:
[root@RHEL92-32 ~]# curl http://10.88.0.177:9250/metadata/sensorsconfig -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg== | jq '.[]|select(.name |contains("GPFSDiskCap"))' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2437 100 2437 0 0 396k 0 --:--:-- --:--:-- --:--:-- 475k { "name": "\"GPFSDiskCap\"", "period": "86400", "restrict": "\"@CLUSTER_PERF_SENSOR\"" }
-
Verify the sensor listed in the grafana-bridge supported Prometheus endpoints.
-
Query the sensors metrics
Example output:
[root@RHEL92-32 ~]# curl http://10.88.0.177:9250/metrics_gpfs_diskcap -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg== # HELP gpfs_disk_disksize Desc not found # TYPE gpfs_disk_disksize gauge gpfs_disk_disksize{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="afmCacheFS",gpfs_diskpool_name="system",gpfs_disk_name="disk04"} 16777216.0 1732007181000 gpfs_disk_disksize{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="cesSharedRoot",gpfs_diskpool_name="data",gpfs_disk_name="disk06"} 16777216.0 1732007181000 gpfs_disk_disksize{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="cesSharedRoot",gpfs_diskpool_name="system",gpfs_disk_name="disk01"} 16777216.0 1732007181000 gpfs_disk_disksize{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="localFS",gpfs_diskpool_name="system",gpfs_disk_name="disk02"} 16777216.0 1732007181000 gpfs_disk_disksize{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="localFS",gpfs_diskpool_name="system",gpfs_disk_name="disk03"} 16777216.0 1732007181000 # HELP gpfs_disk_free_fragkb Desc not found # TYPE gpfs_disk_free_fragkb gauge gpfs_disk_free_fragkb{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="afmCacheFS",gpfs_diskpool_name="system",gpfs_disk_name="disk04"} 11864.0 1732007181000 gpfs_disk_free_fragkb{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="cesSharedRoot",gpfs_diskpool_name="data",gpfs_disk_name="disk06"} 1912.0 1732007181000 gpfs_disk_free_fragkb{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="cesSharedRoot",gpfs_diskpool_name="system",gpfs_disk_name="disk01"} 4656.0 1732007181000 gpfs_disk_free_fragkb{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="localFS",gpfs_diskpool_name="system",gpfs_disk_name="disk02"} 15944.0 1732007181000 gpfs_disk_free_fragkb{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="localFS",gpfs_diskpool_name="system",gpfs_disk_name="disk03"} 12104.0 1732007181000 # HELP gpfs_disk_free_fullkb Desc not found # TYPE gpfs_disk_free_fullkb gauge gpfs_disk_free_fullkb{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="afmCacheFS",gpfs_diskpool_name="system",gpfs_disk_name="disk04"} 14274560.0 1732007181000 gpfs_disk_free_fullkb{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="cesSharedRoot",gpfs_diskpool_name="data",gpfs_disk_name="disk06"} 16709632.0 1732007181000 gpfs_disk_free_fullkb{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="cesSharedRoot",gpfs_diskpool_name="system",gpfs_disk_name="disk01"} 15373312.0 1732007181000 gpfs_disk_free_fullkb{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="localFS",gpfs_diskpool_name="system",gpfs_disk_name="disk02"} 13508608.0 1732007181000 gpfs_disk_free_fullkb{gpfs_cluster_name="scale-cluster-1.vmlocal",gpfs_fs_name="localFS",gpfs_diskpool_name="system",gpfs_disk_name="disk03"} 15134720.0 1732007181000