We address the problem of detecting the presence of a recurring stimulus by monitoring the voltage on a multiunit electrode located in a brain region densely populated by stimulus reactive neurons. Published experimental results suggest that under these conditions, when a stimulus is present, the measurements are gaussian with typical second-order statistics. In this letter we systematically derive a generic, optimal detector for the presence of a stimulus in these conditions and describe its implementation. The optimality of the proposed detector is in the sense that it maximizes the life span (or time to injury) of the subject. In addition, we construct a model for the acquired multiunit signal drawing on basic assumptions regarding the nature of a single neuron, which explains the second-order statistics of the raw electrode voltage measurements that are high-pass-filtered above 300 Hz. The operation of the optimal detector and that of a simpler suboptimal detection scheme is demonstrated by simulations and on real electrophysiological data.