A queue snapshot script can count fixed status buckets and show the bucket requested by a selector.

Program

Play the script to choose the status bucket and inspect the queue snapshot report.

queue_snapshot_report.sh
#!/usr/bin/env bash

wanted_status=
open_count=0
waiting_count=0
tickets="open:high waiting:normal open:normal"
for ticket in $tickets; do
    status="${ticket%%:*}"
    if [[ "$status" == "open" ]]; then
        open_count=$((open_count + 1))
    else
        waiting_count=$((waiting_count + 1))
    fi
done
if [[ "$wanted_status" == "open" ]]; then
    shown=$open_count
else
    shown=$waiting_count
fi
echo "$wanted_status tickets=$shown open=$open_count waiting=$waiting_count"
#!/usr/bin/env bash

wanted_status=
open_count=0
waiting_count=0
tickets="open:high waiting:normal open:normal"
for ticket in $tickets; do
    status="${ticket%%:*}"
    if [[ "$status" == "open" ]]; then
        open_count=$((open_count + 1))
    else
        waiting_count=$((waiting_count + 1))
    fi
done
if [[ "$wanted_status" == "open" ]]; then
    shown=$open_count
else
    shown=$waiting_count
fi
echo "$wanted_status tickets=$shown open=$open_count waiting=$waiting_count"
bucket counters Each status bucket is a scalar counter that stays easy to inspect.
status selector The selector changes which bucket is highlighted without changing the source shape.
snapshot output The report includes the selected bucket and the full queue summary.