REST API calls are not being logged at all in default log level, the commands or basically anything the API call invokes is not being logged either except when it fails. This makes basic troubleshooting almost impossible Given the increase in REST API use by other projects and users and the general slowness of REST API it is important to be able to identify what is going on with the engine We need to log enough information to be able to identify what endpoints have been called, by whom, what commands did it trigger and how long it took
The API calls, like any other HTTP request, are logged in the web server log: /var/log/http/ssl_access_log. That includes the request time stamp, the request URL, the matrix and query parameters, and the response code. If additional parameters are required the can be added as a custom log. For example, to create a custom log that also displays the time that it takes to serve the request the %D format specified can be added to the log format: LogFormat \ "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" \ myformat CustomLog \ logs/mylog \ mylog These lines need to be added to the /etc/httpd/conf.d/ssl.conf file, then the web server needs to be restarted: # systemctl restart httpd The details about the executed commands are already included in the engine log, like any other command. If there is the need to link them together the "Correlation-Id" header is intended exactly for that, and it can be added to the web server log as well: LogFormat ... \"%{Correlation-Id}\" ... I believe that with this configuration of the web server log all the required information can be obtained.
(In reply to Juan Hernández from comment #2) Sounds as a great improvement which should be done ASAP Context within engine.log is important, and providing the suggested corellation id would be good enough
This request has been proposed for two releases. This is invalid flag usage. The ovirt-future release flag has been cleared. If you wish to change the release flag, you must clear one release flag and then set the other release flag to ?.
Verified on ovirt-engine-4.1.1-0.0