A Ruby-based monitor for predicting chemical depletion