Closed SckyzO closed 8 months ago
Hi @SckyzO , I have double-checked that no changes are required to the Docker file itself. You can mount ZIMonSensors.cfg file using podman run --mount option (https://docs.podman.io/en/latest/markdown/podman-run.1.html) Here is an example:
[root@RHEL92-32 ~]# podman run -dt -p 9250:9250 -e "SERVER=9.152.187.158" -e "APIKEYVALUE=dc8c2900-e642-488d-b5a8-a67bf70a9389" -e "PROMETHEUS=9250" -e "TLSKEYPATH=/etc/bridge_ssl/certs" -e "TLSKEYFILE=privkey.pem" -e "TLSCERTFILE=cert.pem" -v /tmp:/var/log/ibm_bridge_for_grafana -v /etc/bridge_ssl/certs:/etc/bridge_ssl/certs --mount type=bind,src=/opt/IBM/zimon/ZIMonSensors.cfg,target=/opt/IBM/zimon/ZIMonSensors.cfg,ro=true --pod new:my-bridge-mount-test-pod --name bridge-mount-test scale_bridge:test_8.0.0_dev
b15bca01aa6c7f66103c76f6badb2a59d24702fe9ebef3ff6dde04b41da3f980
Verify by using /sensorsconfig endpoint
[root@RHEL92-32 ~]# podman container inspect -f '{{.NetworkSettings.IPAddress}}' bridge-mount-test
10.88.0.37
[root@RHEL92-32 tmp]# curl https://10.88.0.37:9250/sensorsconfig -u scale_grafana:dc8c2900-e642-488d-b5a8-a67bf70a9389 -k | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2437 100 2437 0 0 76156 0 --:--:-- --:--:-- --:--:-- 78612
[
{
"name": "\"CPU\"",
"period": "1"
},
{
"name": "\"Load\"",
"period": "1"
},
{
"name": "\"Memory\"",
"period": "1"
},
{
"filter": "\"netdev_name=veth.*|docker.*|flannel.*|cali.*|cbr.*\"",
"name": "\"Network\"",
"period": "1"
},
{
"name": "\"Netstat\"",
"period": "10"
},
{
"name": "\"Diskstat\"",
"period": "0"
},
{
"filter": "\"mountPoint=/.*/docker.*|/.*/kubelet.*\"",
"name": "\"DiskFree\"",
"period": "600"
},
{
"name": "\"Infiniband\"",
"period": "0"
},
{
"name": "\"GPFSDisk\"",
"period": "0"
},
{
"name": "\"GPFSFilesystem\"",
"period": "10"
},
{
"name": "\"GPFSNSDDisk\"",
"period": "10",
"restrict": "\"nsdNodes\""
},
{
"name": "\"GPFSPoolIO\"",
"period": "0"
},
{
"name": "\"GPFSVFSX\"",
"period": "10"
},
{
"name": "\"GPFSIOC\"",
"period": "0"
},
{
"name": "\"GPFSVIO64\"",
"period": "0"
},
{
"name": "\"GPFSPDDisk\"",
"period": "10",
"restrict": "\"nsdNodes\""
},
{
"name": "\"GPFSvFLUSH\"",
"period": "0"
},
{
"name": "\"GPFSNode\"",
"period": "10"
},
{
"name": "\"GPFSNodeAPI\"",
"period": "10"
},
{
"name": "\"GPFSFilesystemAPI\"",
"period": "10"
},
{
"name": "\"GPFSLROC\"",
"period": "0"
},
{
"name": "\"GPFSCHMS\"",
"period": "0"
},
{
"name": "\"GPFSAFM\"",
"period": "0"
},
{
"name": "\"GPFSAFMFS\"",
"period": "0"
},
{
"name": "\"GPFSAFMFSET\"",
"period": "0"
},
{
"name": "\"GPFSRPCS\"",
"period": "10"
},
{
"name": "\"GPFSWaiters\"",
"period": "10"
},
{
"name": "\"GPFSFilesetQuota\"",
"period": "3600",
"restrict": "\"@CLUSTER_PERF_SENSOR\""
},
{
"name": "\"GPFSFileset\"",
"period": "300",
"restrict": "\"@CLUSTER_PERF_SENSOR\""
},
{
"name": "\"GPFSPool\"",
"period": "300",
"restrict": "\"@CLUSTER_PERF_SENSOR\""
},
{
"name": "\"GPFSDiskCap\"",
"period": "86400",
"restrict": "\"@CLUSTER_PERF_SENSOR\""
},
{
"name": "\"GPFSEventProducer\"",
"period": "0"
},
{
"name": "\"GPFSMutex\"",
"period": "0"
},
{
"name": "\"GPFSCondvar\"",
"period": "0"
},
{
"name": "\"TopProc\"",
"period": "60"
},
{
"name": "\"GPFSQoS\"",
"period": "0"
},
{
"name": "\"GPFSFCM\"",
"period": "0"
},
{
"name": "\"GPFSBufMgr\"",
"period": "30"
},
{
"name": "\"NFSIO\"",
"period": "0",
"restrict": "\"cesNodes\"",
"type": "\"Generic\""
},
{
"name": "\"SMBStats\"",
"period": "0",
"restrict": "\"cesNodes\"",
"type": "\"Generic\""
},
{
"name": "\"SMBGlobalStats\"",
"period": "0",
"restrict": "\"cesNodes\"",
"type": "\"Generic\""
},
{
"name": "\"CTDBStats\"",
"period": "0",
"restrict": "\"cesNodes\"",
"type": "\"Generic\""
},
{
"name": "\"CTDBDBStats\"",
"period": "0",
"restrict": "\"cesNodes\"",
"type": "\"Generic\""
}
]
Applied updates to the instructions for creating containers https://github.com/IBM/ibm-spectrum-scale-bridge-for-grafana/wiki/Running-the-IBM-Spectrum-Scale-Performance-Monitoring-Bridge-in-a-docker-container
As discussed in this issue : #169, it would be interesting to allow the container to mount a volume with the mmsdrfs/ZIMonsensors.cfg file rather than having to integrate it before manually or automatically building the container. Especially since this file can be updated.