Grafana Gauge - Filter and group based on the wildcard value in the series

The business would like to have a dashboard(Gauge based) where they could monitor the number of orders yet to be shipped. They need a flexible way of creating dashboards. For example, Current orders with pending shipments for more than 1 day, 3 days, 7 days, 10 days, 14 days. The date range should be flexible enough to be changed by them.

Application pushes the gauge metric(orders delayed for shipping) to Graphite with the format: (env.host.orders.delayed-shipping.<number-of-days>, current-value)

However, In Grafana, How to filter values in the key(not the gauge value) based on certain patterns? For example, when the following metrics are pushed

  • (env.host.orders.delayed-shipping.0, 30)
  • (env.host.orders.delayed-shipping.1, 20)
  • (env.host.orders.delayed-shipping.3, 15)
  • (env.host.orders.delayed-shipping.6, 10)
  • (env.host.orders.delayed-shipping.8, 5)
  • (env.host.orders.delayed-shipping.9, 3)
  • (env.host.orders.delayed-shipping.10, 1)

The business wants to create dashboards for the following:

  • Shipments Pending for more than 3 days: 34 (15+10+5+3+1)
  • Shipments Pending for more than 7 days: 9 (5+3+1)