Warning
This project is currently being integrated into octl. As a result, osc-logs may soon be deprecated and will no longer receive active development. We recommend using octl for new integrations when the equivalent functionality becomes available.
- API Reference: Outscale API Logs
- Releases: https://github.com/outscale/osc-logs/releases
- jq Utility: https://stedolan.github.io/jq/
osc-logs is a lightweight command-line utility that continuously fetches and prints API call logs from your OUTSCALE account.
By default, logs are displayed as line-delimited JSON to standard output, starting from the program’s execution time.
- Go 1.23+ (only for manual build)
- OUTSCALE credentials configured in
~/.osc/config.json - Internet access to query the OUTSCALE API
Download the latest release for your platform from the GitHub Releases page.
go install github.com/outscale/osc-logs@latestThe tool uses the following file to authenticate:
~/.osc/config.json
{
"default": {
"access_key": "MyAccessKey",
"secret_key": "MySecretKey",
"region": "eu-west-2"
}
}osc-logs [OPTIONS]| Option | Description |
|---|---|
-w, --write |
Write all traces to a file instead of stdout |
-c, --count |
Exit after <count> logs |
-i, --interval |
Wait <wait> seconds between API calls (default: 10) |
-p, --profile |
Use a specific config profile (default: "default") |
-I, --ignore |
Ignore specific API calls (comma-separated) |
-v, --version |
Print version and exit |
Ignored calls default to
ReadApiLogs. Example:--ignore=ReadApiLogs,ReadVms
osc-logs -w logs.jsontail -f logs.jsonShow only date, operation name, and status code in TSV format:
jq -s -r '(.[] | [.QueryDate, .QueryCallName, .ResponseStatusCode]) | @tsv' logs.jsonSample output:
2022-06-17T12:14:28.378111Z ReadVolumes 200
2022-06-17T12:14:30.379899Z CreateVms 200
osc-logs is released under the BSD 3-Clause License. © 2024 Outscale SAS
See LICENSE for details.
See CONTRIBUTING.md for guidelines on how to contribute or run tests.