The problem of sequential anomaly detection is considered under sampling constraints and generalized error control. It is assumed that there is no prior information on the number of anomalies. It is required to control the probability at least k errors, of any kind, upon stopping, where k is a user specified integer. It is possible to sample only a fixed number of processes at each sampling instance. The processes to be sampled are determined based on the already acquired observations. The goal is to find a procedure that consists of a stopping rule and a decision rule and a sampling rule that satisfy the sampling and error constraints, and have as small as possible average sample size for every possible scenario regarding the subset of anomalous processes. We characterize the optimal expected sample size for this problem to a first order approximation as the error probability vanishes to zero, and we propose procedures that achieve it. The performance of those procedures is compared in a simulation study for different values of k.