Add ability to selectively publish logs to topics
monasca-log-api supports publishing logs to multiple topics. It would be nice to add the ability to selectively publish logs to specific topics.
This could be useful for example to route audit logs to a separate topic where it could be configured with a longer retention period than the topic where operational logs are stored.
In order to do this, the log payload in the REST request need to specify handling/routing of the log (batch). Something like:
POST /v3.0/logs HTTP/1.1
Host: 192.168.10.4:5607
Content-Type: application/json
X-Auth-Token: 27feed73a0ce413
Cache-Control: no-cache
{
“attributes”: {
“type”: “audit”,
…
},
"dimensions":{
},
"logs":[
{
}
},
{
}
}
]
}
The “attributes” field could be optional and if not specified, the routing would use the default topics.
The implementation of this could be added to monasca-common.
(Adding RBAC support for publishing to the selective kafka topics would be addressed in a separate blueprint)
Blueprint information
- Status:
- Not started
- Approver:
- Roland Hochmuth
- Priority:
- High
- Drafter:
- Venkat Sundaram
- Direction:
- Approved
- Assignee:
- Venkat Sundaram
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by