I have created a dockerfile on which i have written telegraf and influxdb instalation and configuration. when i created image from dockerfile and run container, i am getting data from telegraf to influxdb telegraf database.
But when I am trying to set retention policies for telegraf database in influxdb using entrypoint script in dockerfile. the polcies are not set on the docker container.
I used below commands in script but nothing is worked.
curl -G "http://localhost:8086/query" --data-urlencode "q=CREATE RETENTION POLICY m5 ON telegraf DURATION 1d REPLICATION 1
curl -XPOST "http://localhost:8086/query" --data-urlencode "q=CREATE DATABASE mydb"
influx -port 8086 -execute "CREATE RETENTION POLICY mypolicy1 ON telegraf DURATION 10d REPLICATION 1 DEFAULT"
How to run influx commands from entrypoint script which reflects on docker container?. Can any body help me on this..