approach for predicting machine failure using maintenance history
Sequence labeling seems like a good fit for your problem. Your features could be the frequency of each kind of basic-msg in the past 4 runs (but maybe it would work better normalized by unit of time).

There are a good few libraries for Conditional Random Fields for example.