Add ability in monasca api to delete metrics

Registered by Bradley Klein on 2016-06-30

As we push new metrics into monasca, we've discovered this is an iterative process, and typically requires several attempts before getting it right. At charter we've been using a script to accomplish this, but as we deploy MaaS, customers should have the ability to remove their own metrics. Example functionality in https://github.com/openstack/puppet-monasca/blob/master/templates/vertica/prune_vertica.py.erb. This would be role driven and only a monasca-admin for a given project should be able to do this.

Blueprint information

Status:
Not started
Approver:
Roland Hochmuth
Priority:
High
Drafter:
Bradley Klein
Direction:
Needs approval
Assignee:
Bradley Klein
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

With vertica, when executing the DELETE statement, depending on the size of the dataset being deleted, this can block writes to the database. Some thoughts on how we might still implement this feature without having customers lock up the database:

1. Have this feature be config file driven -- so operators who aren't comfortable with this can disable the API.
2. Create a special monasca-delete-user role and only users with this role on their project can call the API.
3. Have the API batch up DELETE requests, and have a separate service perform the deletes at a configurable maintenance window (in the middle of the night or something.
4. Similar to #3, but instead of a separate service spawn a thread in the API process that performs the deletes during the maintenance window.

It probably makes sense to do a combination of the above, probably 1, 2 and 4. Also need to decide where to 'store' the delete requests, possibly mysql or just kafka.

For influx and cassandra, there are better options (time to live, project/metric specific partitioning), so we'll likely only move forward for now with this for the vertica java implementation (discussed during the newton mid-cycle).

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.