This paper is devoted to the problem of the H2-optimal discrete observer-filter, meant for detection of slowly varying additive faults in marine ship control processes. Sensitivity of the observer to the external disturbance is to be minimized by the choice of its parameters. Fault detection is a hot area of research, but most of the published papers do not concern a case with initially given spectral features of external disturbances. External disturbances, which are considered in this research, can be presented as a sum of harmonic oscillations with given central frequency (sea wave disturbance) and a constant signal (ocean currents and wind). The novel discrete H2-optimization algorithm is proposed to solve the problem of polyharmonical disturbance suppression. This approach guaranties nonuniqueness of the optimal solution that often makes possible to provide additional useful properties, such as insensitivity of the residual signal to the constant external disturbance, i.e. its integral action. Let us note that it is possible (not always) only if at least two sensors are used. It is notable, that the observer-filter can be designed in a multipurpose structure consisting of basic and auxiliary observers and a dynamical corrector that makes possible the retuning of the basic item in real time on-board. The novel discrete algorithm of adaptive fault detection observer analytical design in a multipurpose structure is proposed, and its effectiveness is demonstrated by the numerical example of the fault detection process with implementation of the MATLAB package.