We consider a monitored system with observation Y (t) at time t modeled by a stochastic process, and where system failure is connected to the exceedance of some threshold for this process. Typically, the threshold is not exceeded under normal conditions, where the process Y (t) is supposed to show some kind of stationarity. However, due to unexpected events the process may leave the stationary behavior, in which case an early detection of an increasing Y (t) is necessary to avoid costly failures of the system. The prediction of the time T of future exceedance of a given threshold for the process Y (t) will hence be an important issue, and is the basic problem studied in the paper. We assume that Y (t) is a stochastic process with a probability mechanism depending on an unobservable underlying process S(t). The latter process has a finite state space, {0, 1, . . . , k}, where state 0 corresponds to the normal stationary conditions for the process Y (t), while states 1, 2, . . . in increasing order means an increasing severity of the underlying conditions which eventually will lead to system failure. In particular we consider the case when Y (t) is modeled as a Wiener process. It is then natural to assume that the drift parameter of the process equals 0 when S(t) = 0, while the drift is positive and increasing with S(t), if S(t) ≥ 1. A special case with k = 1 will be considered in detail. In this case estimation of the unobservable "switching" time τ at which the underlying process S(t) changes from state 0 to state 1 is of particular interest. A Bayesian approach will be used, where a Markov Chain Monte Carlo approach will be needed for doing the computations in the most general cases.