Retention policy on Measurement

It took me a bit to understand the whole structure, here is a summary that should answer your question

  • Retention Policy are at database level
  • Measurement are at database level
  • A single measurement can belong to several retention policies (can have points in any existing RP)
  • When you read or write data you always specify the RP and Measurement, if you don’t specify the RP, the default one is used.

about your second question:

  • you can have many RP and many measurements
  • you can use any combination of RP and Measurement (view it as a matrix)
  • You can’t strictly segregate measurements in different RPs, but you can specify which RP you want to use, leaving the others empty

a problem I had
When you delete data, you won’t be able to specify Measurement and RP
(Note: you should not delete data manually, let the RP manage that, but sometimes you might need to delete wrong data…)
so you can:

  • drop a measurement across all RPs
  • drop a RP across all measurements
  • Identify and drop single points or series in a specific measurement

A common solution to this kind of issue is to use a different measurement for data downsampling, here is a sample setup
RPs:

  • standard → duration of 14d
  • long → duration of 365d

Measurements:

  • sqlserver_cpu
  • sqlserver_cpu_hist
Measurement\RP standard long
sqlserver_cpu X
sqlserver_cpu_hist X

This helped me several times because when you do something wrong and have to delete data, it might not even be possible to identify and delete data if they share the same measurement.

I hope this helps