We discuss the possible usage of the compressive sampling for the early detection of the rogue waves. One of the promising techniques for the early detection of the rogue waves is to measure the triangular Fourier spectra which begin to appear at the early stages of their development. For the early detection of the rogue waves it is possible to treat such a spectrum as a sparse signal since we would mainly be interested in the high amplitude triangular region located at the central wavenumber. Therefore compressive sampling can be a very efficient tool for the rogue wave early warning systems. By employing a numerical approach we show that triangular Fourier spectra can be sensed by compressive measurements at the early stages of the development of rogue waves such as those in the form of Peregrine and Akhmediev-Peregrine solitons. Our results may lead to development of the early warning and measurement systems which use the compressive sampling thus the memory requirements for those systems can be greatly reduced.