Graphite data loss: 1st ret. policy

I am having an issue where data is being lost after 2 minutes when inserting into Graphite DB. The retention policy I am using in storage-schemas.conf is:

pattern = .*
retentions = 10s:2m,20s:4m

I am also having issues getting the data with the render API, as I am unable to fetch data past 3 minutes or 1 hour or with the current date. The render API I am using is:

GET : http://localhost:50000//render?target=metrics.*.api.proxy.north.*.*.danna.*.success.*&format=json&noNullPoints=true&from=20200110

The retention policy in storage-schemas.conf is set to retain data for 2 minutes. That is causing the data to be lost after 2 minutes. To retain data for a longer period, the retentions value needs to be updated to a higher value.

For example, if you want to retain data for 1 day with a 1-minute resolution, the retention policy in storage-schemas.conf should be:

pattern = .*
retentions = 1m:1d

Regarding the render API issue, the “from” parameter in the API call is set to a specific date (20200110), which means it will only fetch data from that date. To fetch data beyond 3 minutes or 1 hour or with the current date, the “from” parameter needs to be updated accordingly.

For example, to fetch data from the last 24 hours, the “from” parameter should be set to “-24h”. The updated API call would be:

GET : http://localhost:50000//render?target=metrics.*.api.proxy.north.*.*.danna.*.success.*&format=json&noNullPoints=true&from=-24h