This repository is used to build an image for use with the OpenShift Must-Gather tool. This container image deploys a DaemonSet within the cluster that will collect SAR and other Node Metrics.
The plan is to have the list of metrics configurable through arguments or environment variables, however at this stage the collection is defined in the collect-metrics.sh
script.
Metrics collection tool is split into two parts, deploying and collecting.
To start retaining metrics for Nodes within the cluster, the 'deploy' option is used when running the image as below:
$ oc adm must-gather --image quay.io/mwasher/node-monitor-deploy -- deploy
Adding the collect-nodes-metrics
label to the desired Nodes will indicate to the tool which Nodes should be monitored.
$ oc label nodes/worker-0.dev-cluster.michael-washer.dev collect-node-metrics=""
To bundle and download the metrics from all labeled Nodes, the 'collect' option should be used as below:
$ oc adm must-gather --image quay.io/mwasher/node-monitor-deploy -- collect
To remove the metrics collectors the 'destroy' option should be used:
$ oc adm must-gather --image quay.io/mwasher/node-monitor-deploy -- destroy