Data retrieval from connected devices for a data-driven anomaly detection system while complying with performance and/or availability requirements of services that rely on operation of the connected devices. Determining the amount of data, type of data, and retrieval frequency for detecting performance anomalies for each connected device that is relied upon by services so as to maintain required performance and/or availability to the service. The required parameters being the subject of an SLA for the service or the connected devices, such as IoT devices.