fredcli batch get-logs
Display log events for a batch.
Synopsis
fredcli batch get-logs command
Display the most recent log events for the given batch.
fredcli batch get-logs command [options] BATCH_IDOptions
- -l, --limit <limit>
The maximum number of log events to retrieve.
- Default
10
- -i, --interval <interval>
The amount of time, in hours (h) or days (d), in which to find events. For example, -i 24h (24 hours) or -i 2d (2 days).
- Default
12h
- --output <output>
The output format to use.
- Default
text
- Options
text | json | yaml
- -v, --verbose
Show more detailed output.
Arguments
- BATCH_ID
Required argument
Description
This command retrieves log events from FRED Cloud for a given batch and displays them
in the console. By default, up to 10 events within the past 12 hours are shown. The
-l
/ --limit
option can be used to specify how many events to show, and the
-i
/ --interval
option can specify how far back in time to look for events.
The output for this command can be text, json, or yaml, as specified by the
--output
option. For non-text output, more detailed information is shown if
the -v
/ --verbose
flag is given. Each event includes the date and GMT time
for when the event occurred.
The specific events shown are dependent on the type of batch and the specific version of FRED used.
Examples
The following example shows the logs from an in-process batch simulating events in the Chicago, IL area.
fredcli batch get-logs 7bd3ede8a23d474b82c021a7e9cf67eb
2021-06-18 07:19:15.080000 GMT+0000 run_set 1 completed at Fri Jun 18 07:19:15 GMT 2021
2021-06-18 07:19:15.080000 GMT+0000
2021-06-18 07:19:15.083000 GMT+0000 fred_job: running job chicago-event id 1 run 11 ...
2021-06-18 07:19:15.085000 GMT+0000 fred_job: running job chicago-event id 1 run 12 ...
2021-06-18 07:19:15.088000 GMT+0000 fred_job: running job chicago-event id 1 run 13 ...
2021-06-18 07:19:15.092000 GMT+0000 fred_job: running job chicago-event id 1 run 14 ...
2021-06-18 07:19:15.094000 GMT+0000 fred_job: running job chicago-event id 1 run 15 ...
Here is another call for the same simulation using JSON output and the --verbose
flag. Only a partial output is shown.
$ fredcli batch get-logs 7bd3ede8a23d474b82c021a7e9cf67eb --output json -v
[
. . .
{
"timestamp": "2021-06-18 07:19:15.083000 GMT+0000",
"message": {
"docker": {
"container_id": "333dae8f08db87b585b08b8698c11c1f17ef80ec805cd1f03a7ad462ab642da8"
},
"kubernetes": {
"container_hash": "335566905560.dkr.ecr.us-east-1.amazonaws.com/[email protected]:34b0ae0d1aab339c6a8ad15b252ac9ab2365e835ad672e392e7a19c742c23d58",
"container_image": "335566905560.dkr.ecr.us-east-1.amazonaws.com/fred-cloud-runner:latest",
"container_name": "fred-runner",
"host": "ip-192-168-2-38.ec2.internal",
"labels": {
"app": "fred-cloud",
"controller-uid": "282b7777-7540-4219-b612-b49af669a351",
"job-name": "fred-job-7bd3ede8a23d474b82c021a7e9cf67eb"
},
"namespace_name": "fred-runner",
"pod_id": "57c2c671-0801-4672-b484-e3c796d34f3e",
"pod_name": "fred-job-7bd3ede8a23d474b82c021a7e9cf67eb-44lpb"
},
"log": "fred_job: running job chicago-event id 1 run 11 ...\n",
"stream": "stdout"
},
"ingestionTime": "2021-06-18 07:19:17.610000 GMT+0000"
},
{
"timestamp": "2021-06-18 07:19:15.085000 GMT+0000",
"message": {
"docker": {
. . .