Add ability to selectively publish logs to topics

Registered by Venkat Sundaram on 2016-05-25

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: 27feed73a0ce4138934e30d619b415b0
Cache-Control: no-cache

{
    “attributes”: {
        “type”: “audit”,
        …
    },
    "dimensions":{
        "hostname":"mini-mon",
        "service":"monitoring"
    },
    "logs":[
        {
            "message":"msg1",
            "dimensions":{
                "component":"mysql",
                "path":"/var/log/mysql.log"
            }
        },
        {
            "message":"msg2",
            "dimensions":{
                "component":"monasca-api",
                "path":"/var/log/monasca/monasca-api.log"
            }
        }
    ]
}

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

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.