In this paper, we consider a wave equation with incomplete data, where we do not know the potential coefficient and the initial conditions. From observing the system in the boundary, we want to get information on the potential coefficient independently of the initial conditions. This can be obtained using the sentinel method of Lions, which is a functional insensitive to certain parameters. Shows us through the adjoint system that the existence of the sentinel is equivalent to an optimal control problem. We solve this optimal control problem by using the Hilbert uniqueness method (HUM).