For this you need to run prometheus with '--web.enable-admin-api'
Get date in ISO 8601 format
date --iso-8601=seconds
Modify this json with date and job values, and save it as data.json
{
"min_time": "2018-01-01T17:38:20-03:00",
"max_time": "2018-01-03T17:38:20-03:00",
"matchers": [{
"type": "EQ",
"name": "job",
"value": "my-job"
}]
}
Curl this baby
curl -k -d "@data.json" -X POST -H "Content-Type: application/json" -g 'http://localhost:9090/api/v2/admin/tsdb/delete_series'