Replacement policies based on measurements of some increasing state variable, e.g. wear, accumulated damage or accumulated stress, are studied in this paper. It is assumed that the state measurements may be regarded as realizations of some stochastic process and that the proneness to failure of an active unit may be described by an increasing state-dependent failure rate function. Average long-run cost per unit time is considered. The optimal replacement rule is shown to be a control limit rule, i.e. it is optimal to replace either at failure or when the state variable has reached some threshold value, whichever occurs first. The optimal rule is determined. Some generalizations and special cases are given.