We consider a safety system represented by a monotone (coherent) structure function of n components. The state of the components and the system is only revealed through inspection, which is carried out at intervals of length T. If the inspection shows that the system is in a critical state or has failed, it is overhauled and all components are restored to a good-as-new condition. Costs are associated with tests, system downtime, and repairs. The problem is to find an optimal T minimizing the expected long-run cost per unit of time. The purpose of this paper is to present a formal set-up for this problem and to show how an optimal T can be determined. A special case where the components have three states is given particular attention. It corresponds to a ‘delay time type system’, where the presence of a fault in a component does not lead to an immediate failure—there will be a ‘delay time’ between the occurrence of the fault and the failure of the component.