INFLUXDB Typical time series database, the should be shipped scene is the information storage after the information collection, mainly is the storage stage between information gathering and information display, the acquisition stage can be a variety of ways, various metric overlay, the display stage mainly concentrates on Grafna above
- Show RETENTION policies on "TestDB" //view RETENTION policies of the current database
- CREATE RETENTION POLICY "Rp_name" on "db_name" DURATION 30d REPLICATION 1 DEFAULT //Create a new Retention policies
#注释如下:
- rp_name: Policy Name
- db_name: Specific database name
- 30d: Save 30 days, 30
- It has a variety of time parameters, such as: h (hours), w (week)
- replication 1< Span class= "pun" >: The number of copies, here 1 Yes,
- default Set as default policy
Another: Methods of modification and deletion;
- ALTER RETENTION POLICY "Rp_name" on db_name"DURATION 3w DEFAULT
- DROP RETENTION POLICY "rp_name" on "db_name"
INFLUXDB Basic Operation