[Openstack] [OpenStack] [nova] Is there any method to record the operation of a nova user

sylecn sylecn at gmail.com
Fri Jun 27 11:32:31 UTC 2014


On Fri, Jun 27, 2014 at 5:03 PM, yangmin zhu <zym0017d at gmail.com> wrote:

> Hi all,
> I want to record a user's operation for later audit purpose. For
> example, A user may start/reboot/shutdown a VM using nova command from
> terminal or using the dashboard from browser.
>
> How can I record this action and it's result to a log file(or some
> other database) for later check? And I also want to do this for user's
> operations in cinder and nova-network, such as creating a volume or
> assigning a floating ip to a VM.
>
> Is there any existing solution for this purpose? If not, where and how
> should I start to do it myself by modifying the current nova's(or
> cinder, nova-network) code?
>

I think this can be done via a WSGI middleware. You can add WSGI middleware
in
paste deploy config file (api-paste.erb).  I see there is already a
logrequest
filter, you can check what it does and implement something similar.

Another solution will be wrap openstack API with your API and only expose
your
API to user. This way you can do any logging you want. You can also log the
result of the request.

--
Thanks,
Yuanle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140627/ec3aeb1f/attachment.html>


More information about the Openstack mailing list