Reputation: 169
We are working in a mobilefirst 6.3 project, and our .war is installed in a liberty profile server.
We didn't configure the TTL on the analytics before. is there any way (tool, rest service or file-system) that I can remove the analytics logs in mobilefirst.
Upvotes: 2
Views: 694
Reputation: 44516
MobileFirst Platform Foundation Analytics uses ElasticSearch and Lucene at its core - there is nothing special to be done from a MobileFirst perspective.
If you want to remove everything, the whole Analytics store:
servers/<server-name>/
in the Liberty installation
Otherwise, using either CURL or Postman you can invoke the DELETE
query.
You can find the ElasticSearch API here: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
Some additional questions about this topic in Stack Overflow:
Example steps:
http.enabled=true
and restart the Analytics server (if it's a cluster, you still only need to open the port on one of the cluster members) Postman example query:
DELETE
http://your-analytics-server:9500/worklight/network_transactions/_query
{
"query": {
"range": {
"worklight_data.timestamp": {
"to": 1432313605000
}
}
}
}
CURL example query:
curl -X DELETE 'http://server:9500/worklight/network_transactions/_query' (http://server:9500/worklight/network_transactions/_query%27) -d '{ "query" : { "range" : { "timestamp" : { "lte" : "1432222333424" } } } }'
Upvotes: 3