How to create udp retention policy

Hi
I write data into influxdb by using UDP protocol. And I want to create a half_year retention policy for data that be written by UDP. I want to set this configure into config file and don’t know how to do, can you give me an example for how to set my own udp retention policy in the config file ? Here is the UDP configure in the config file, I don’t know how to set.
enabled = true
bind-address = ":38086"
database = "mkt_data"
retention-policy = “”

First you need to create a retention policy, either for an existing database or at the same time when you’re creating a new database, in either case using the HTTP /query endpoint.

Then you would set the retention policy in the config file, e.g. retention-policy = "my-new-rp". After that, restart the influxd process to reflect the config file change. UDP writes will then go to the database and retention policy as configured in the UDP section of the config file.

1 Like

Can I create a retention policy in the config fire?

No. Retention policies must be created through the /query HTTP endpoint.