Bug 1347631
Summary: | [RFE] adding logging to REST API calls | ||
---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | Michal Skrivanek <michal.skrivanek> |
Component: | RestAPI | Assignee: | Vinzenz Feenstra [evilissimo] <vfeenstr> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Aleksei Slaikovskii <aslaikov> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 4.0.0 | CC: | bugs, gklein, lsurette, lsvaty, melewis, mgoldboi, mkalinin, mperina, oourfali, pstehlik, rbalakri, Rhev-m-bugs, srevivo, ykaul |
Target Milestone: | ovirt-4.1.0-beta | Keywords: | FutureFeature |
Target Release: | 4.1.0.2 | Flags: | mperina:
ovirt-4.1?
pstehlik: testing_plan_complete- rule-engine: planning_ack? mperina: devel_ack+ lsvaty: testing_ack+ |
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: |
With this update, a log file located in /var/log/httpd/ovirt-requests-log now logs all requests made to the Red Hat Virtualization Manager via HTTPS, including how long each request took. There is a 'Correlation-Id' header included to allow for easier comparison of requests when compared with the engine.log. CorrelationIds are now generated for every request automatically and can be passed to the REST API per Correlation-Id header or per correlation_id query parameter.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2017-02-01 14:53:11 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1390192, 1430942 |
Description
Michal Skrivanek
2016-06-17 09:50:45 UTC
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 |