Refresh the IBM Spectrum Scale meta data used by the IBM Spectrum Scale Performance Monitoring Bridge for Grafana - IBM/ibm-spectrum-scale-bridge-for-grafana GitHub Wiki
-
Verify grafana-bridge process is running
Command:
ps -ef |grep Grafana
Example output:
[root@scale-11 ~]# ps -ef |grep Grafana root 391458 1 0 10:35 ? 00:03:51 python3 zimonGrafanaIntf.py -c 10 root 626718 626648 0 18:28 pts/0 00:00:00 grep --color=auto Grafana
-
Get scale_grafana apikey value
Command:
KEYVALUE=$(mmperfmon config show --apikey scale_grafana |jq '.key')
Example output:
[root@scale-11 ~]# KEYVALUE=$(mmperfmon config show --apikey scale_grafana |jq '.key') [root@scale-11 ~]# echo $KEYVALUE "3e651f67-cd9c-443e-9ce1-84621763e557"
-
Send metadata update request to a grafana-bridge process via REST API
Command:
curl http://localhost:4242/api/update -u scale_grafana:$KEYVALUE
Example output:
[root@scale-11 ~]# curl http://localhost:4242/api/update -u scale_grafana:$KEYVALUE {"msg": "Successfully retrieved MetaData"}
-
Get grafana bridge container ID
Command:
podman ps
Example output:
[root@RHEL86 ~]# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 665d502b8fa1 localhost/podman-pause:4.0.2-1648830555 5 days ago Up 5 days ago 0.0.0.0:4242->4242/tcp 0c5476d22f6a-infra 7604c56bc35f localhost/scale_bridge:test_7.0.8_dev sh -c python3 zim... 5 days ago Up 5 days ago 0.0.0.0:4242->4242/tcp bridge- test-708
-
Verify the container is in a running state
Command:
podman logs <CONTAINER-ID>
Example output:
[root@RHEL86 ~]# podman logs 7604c56bc35f 2022-11-25 10:37 - INFO - *** IBM Spectrum Scale bridge for Grafana - Version: 7.0.8-dev *** 2022-11-25 10:37 - INFO - Successfully retrieved MetaData 2022-11-25 10:37 - INFO - Received sensors:CPU, DiskFree, GPFSFilesystem, GPFSFilesystemAPI, GPFSNSDDisk, GPFSNSDFS, GPFSNSDPool, GPFSNode, GPFSNodeAPI, GPFSRPCS, GPFSVFSX, GPFSWaiters, Load, Memory, Netstat, Network, TopProc, CTDBDBStats, CTDBStats, SMBGlobalStats, SMBStats, GPFSDiskCap, GPFSFileset, GPFSInodeCap, GPFSPool, GPFSPoolCap 2022-11-25 10:37 - INFO - Initial cherryPy server engine start have been invoked. Python version: 3.6.8 (default, Oct 20 2022, 09:31:56) [GCC 8.5.0 20210514 (Red Hat 8.5.0-15)], cherryPy version: 18.6.1. 2022-11-25 10:37 - INFO - server started
-
Run bash inside the grafana bridge containers
Command:
podman exec -it <CONTAINER-ID> bash
Example output:
[root@RHEL86 ~]# podman exec -it 7604c56bc35f bash [root@test_bridge_708 bridge]#
-
Get scale_grafana apikey value
Command:
echo $APIKEYVALUE
Example output:
[root@test_bridge_708 bridge]# echo $APIKEYVALUE 3e651f67-cd9c-443e-9ce1-84621763e557
-
Send metadata update request to a grafana-bridge process via REST API
Command:
curl http://localhost:4242/api/update -u scale_grafana:$APIKEYVALUE -k
Example output:
[root@test_bridge_708 bridge]# curl http://localhost:4242/api/update -u scale_grafana:$APIKEYVALUE -k {"msg": "Successfully retrieved MetaData"} [root@test_bridge_708 bridge]# exit
-
Get grafanaBridge pod names
Command:
oc get po -o wide -n ibm-spectrum-scale |grep grafana
Example output:
[[email protected] ~]# oc get po -o wide -n ibm-spectrum-scale |grep grafana ibm-spectrum-scale-grafana-bridge-699fb97c58-9wqtt 1/1 Running 0 4d8h 10.254.20.31 worker1.helene.cp.fyre.ibm.com <none> <none> ibm-spectrum-scale-grafana-bridge-699fb97c58-jrs4z 1/1 Running 0 4d8h 10.254.15.211 worker0.helene.cp.fyre.ibm.com <none> <none>
-
Send metadata update request to a grafana-bridge process in each pod via REST API
Command:
curl https://localhost:8443/api/update -u scale_grafana:`cat /etc/perfmon-api-keys/scale_grafana` -k
Example output:
[[email protected] ~]# oc rsh ibm-spectrum-scale-grafana-bridge-699fb97c58-9wqtt Defaulted container "grafanabridge" out of: grafanabridge, initservice (init) sh-4.4$ curl https://localhost:8443/api/update -u scale_grafana:`cat /etc/perfmon-api-keys/scale_grafana` -k {"msg": "Successfully retrieved MetaData"} sh-4.4$ exit [[email protected] ~]# oc rsh ibm-spectrum-scale-grafana-bridge-699fb97c58-jrs4z Defaulted container "grafanabridge" out of: grafanabridge, initservice (init) sh-4.4$ curl https://localhost:8443/api/update -u scale_grafana:`cat /etc/perfmon-api-keys/scale_grafana` -k {"msg": "Successfully retrieved MetaData"} sh-4.4$ exit