In this paper, we model the insurance company's surplus flow by a perturbed compound Poisson model. Suppose that at a sequence of random time points, the insurance company observes the surplus to decide dividend payments. If the observed surplus level is larger than the maximum of a threshold $ b>0 $ and the last observed level (after dividends payment if possible), then a fraction $ 0<\theta<1 $ of the excess amount is paid out as a lump sum dividend. We assume that the solvency is also discretely monitored at these observation times, so that the surplus process stops when the observed value becomes negative. Integro-differential equations for the expected discounted dividend payments before ruin and the Gerber-Shiu expected discounted penalty function are derived, and solutions are also analyzed by Laplace transform method. Numerical examples are given to illustrate the applicability of our results.