3 # Assert that we're still opted in
4 LAST_OPT_REVISION
=$
(ceph config get mgr mgr
/telemetry
/last_opt_revision
)
5 if [ $LAST_OPT_REVISION -ne 3 ]; then
6 echo "last_opt_revision is incorrect"
12 if ! [[ $STATUS == *"Telemetry requires re-opt-in"* ]]
14 echo "STATUS does not contain re-opt-in warning"
18 # Check new collections
19 COLLECTIONS
=$
(ceph telemetry collection
ls)
20 NEW_COLLECTIONS
=("perf_perf" "basic_mds_metadata" "basic_pool_usage" "basic_rook_v01" "perf_memory_metrics")
21 for col in ${NEW_COLLECTIONS[@]}; do
22 if ! [[ $COLLECTIONS == *$col* ]];
24 echo "COLLECTIONS does not contain" "'"$col"'."
29 # Run preview commands
30 ceph telemetry preview
31 ceph telemetry preview-device
32 ceph telemetry preview-all
34 # Opt in to new collections
35 ceph telemetry on
--license sharing-1-0
36 ceph telemetry
enable channel perf
41 until [[ $STATUS != *"Telemetry requires re-opt-in"* ]] ||
[ $timeout -le 0 ]; do
44 timeout
=$
(( timeout
- 1 ))
46 if [ $timeout -le 0 ]; then
47 echo "STATUS should not contain re-opt-in warning at this point"
53 ceph telemetry show-device