We consider anomaly localization where the objective is to identify anomalous components in a system quickly and reliably. Due to resource constraints, only a subset of the components can be observed at a time. The observations from a probed component are realizations drawn from two different distributions depending on whether the component is normal or anomalous. We consider both independent and exclusive models. In the former, each component can be abnormal with a certain probability independent of other components. In the latter, one and only one component is abnormal. Optimal and asymptotically optimal index policies are developed under various system models and cost functions. The results find applications in intrusion detection, spectrum scanning and target search.