About OMS
OUTSCALE Monitoring Services (OMS) allows you to trace and monitor your OUTSCALE API calls.
OMS logs the requests and responses of the API calls performed by your account. Each log records information such as what IP performed the event, the resources that were affected by the event, the time at which the event occurred, and more.
Retrieving and analyzing these logs can, for example, serve as part of a strategy to detect anomalies and other malicious use on your account.
Scope
OMS logs calls that were performed with the OUTSCALE API.
It does not log:
-
Calls performed with the OUTSCALE Object Storage (OOS) and AWS-compliant APIs.
-
Unauthorized calls (response status code 401) and invalid calls (response status code 404).
If used by an EIM user, OMS retrieves all possible logs of the account and not just the logs of the EIM user. |
ReadApiLogs Method
Basic Use
You can retrieve your logs with the ReadApiLogs method. A log is available for 32 days after the corresponding event occurs.
$ osc-cli api ReadApiLogs
{
"Logs": [
{
"AccountId": "123456780123",
"CallDuration": 93,
"QueryAccessKey": "ABCDEFGHIJKLMNOPQRST",
"QueryApiName": "oapi",
"QueryApiVersion": "1.14",
"QueryCallName": "CreateVolume",
"QueryDate": "2021-08-11T09:55:02.842375Z",
"QueryHeaderRaw": "Host: api.eu-west-2.outscale.com\\nAccept: */*\\nConnection: close\\nUser-agent: osc_sdk 1.5\\nX-Osc-Date: 20210811T095502Z\\nContent-Type: application/json\\nx-osc-target: OutscaleService.CreateVolume\\nAuthorization: *****\\nContent-Length: 69\\nAccept-Encoding: gzip, deflate\\nX-Forwarded-For: 11.111.111.111",
"QueryHeaderSize": 302,
"QueryIpAddress": "11.111.111.111",
"QueryPayloadRaw": "{\"Size\": 10, \"SubregionName\": \"eu-west-2a\", \"VolumeType\": \"standard\"}",
"QueryPayloadSize": 69,
"QueryUserAgent": "osc_sdk 1.5",
"RequestId": "8aac17df-ca98-48c7-9f00-181205675fbc",
"ResponseSize": 220,
"ResponseStatusCode": 200
}
]
}
|
Filter Behavior
The quantity of logs retrieved can be very large. You can therefore use filters to make your request more specific and therefore limit the size of the output.
$ osc-cli api ReadApiLogs --Filters '{ \
"ResponseStatusCode": [500, 501], \
"QueryIpAddress": ["255.255.255.254", "255.255.255.255"] \
}'
If you use multiple filters at the same time, these filters will be combined according to an AND logic. If you specify multiple values within one filter, these values will be combined according to an OR logic. Therefore, in the above example, the logic is: ( |
Processing Order
A ReadApiLogs request is processed as follows:
-
Filters are applied to retrieve only the events corresponding to your request. If no event corresponds to the filters, an empty list is returned.
-
Retrieved events are ordered by date, from the oldest item to the newest item.
-
The
NextPageToken
andResultsPerPage
parameters are applied to paginate the results. -
The
With
parameter is applied to determine the content displayed in each retrieved log.
Related Pages
Corresponding API Method
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.