[Kimchi-devel] [RFC] [Wok] Feature: User Activity Log

Lucio Correia luciojhc at linux.vnet.ibm.com
Fri Feb 5 20:51:33 UTC 2016


User Activity Log functionality
-------------------------------
Host admin wants to have access to all actions performed by Wok users, 
either through API, web user interface, with the option to download User 
Acitivity Log in a text file.


REST API
--------
Only one API will be exposed:
- GET /logs - Collection of log entries for all installed plugins.
Examples of filtering:
/logs?plugin=kimchi - All log entries for Kimchi plugin
/logs?user=admin - All log entries from admin user
/logs?request=PUT - All log entries relative to PUT requests
/logs?date=20160110 - All Jan 10th's log entries


Backend design
--------------
- Define activity texts for each currently implemented activity of all 
plugins
- Implement method to retrieve the activity texts in Wok and all plugins
- Log events to a JSON file in the host file system. Each user request 
received by Wok will generate an entry in the respective log file. 
Fields to be saved for each entry: plugin, datetime, user, request type 
(PUT, POST, GET, DELETE), activity text (i.e. "create guest 'vm-sample'")
- Implement code for retrieving and filtering log events by the fields above


Web User interface design
-------------------------
Create a new tab: "User Activity" - available only to Wok admins
- Search fields to filter log events by installed plugin, date, user, 
and/or request type
- Show search results in a table containing plugin, datetime, user, 
request type, activity text
- User may sort the table by plugin, datetime, user or request type
- Button for downloading current search results as a txt file


-- 
Lucio Correia
Software Engineer
IBM LTC Brazil




More information about the Kimchi-devel mailing list