history

Usage

fugue [global options] history [options] (<FID> | <alias>)

Arguments

<FID> | <alias>
FID or alias of the target process

Options

Global options are detailed here.

-s | --start <start_time>
Start time of job list. Includes only jobs started or updated after a specific time. Format: "mm/dd/YYYY HH:MM"
-e | --end <end_time>
End time of job list. Includes only jobs started or updated before a specific time. Format: "mm/dd/YYYY HH:MM"
--json
Emit output as JSON. The JSON flag displays command output in JSON format, which is useful for automation.
--help
Show help text. The help flag is available throughout the CLI in both an application-level and command-level context. It enables a user to view help text for any command within the Fugue CLI.

Definition

The history command displays a detailed list of the most recent jobs, or internal operations, for a specified process. The list includes dry-run jobs.

Jobs and processes

Processes consume Conductor compute time during jobs, where process data is reviewed and acted upon as necessary at regular intervals. Each job can potentially represent some change in the managed infrastructure, although most jobs are simply inspection and require no action. Jobs for multiple processes may be running at any given time.

How and whether jobs are emitted is dependent on process state. Valid process states are Running, Suspended, and Killing. Running is the most common state, where the process may be building architecture, monitoring configuration, or otherwise doing what it’s intended to do. Processes which are Killing are being cleaned up by the current job, and processes which are Suspended do not emit jobs until they are reactivated with a resume command.

For more information about the Fugue process model, see Processes.

Output

Sample history output for a composition aliased mycomposition:

Jobs History Report for user/xxxxxxxxxxxx - Tue Oct 18 2016 2:16pm
mycomposition (6d512f24-5bda-4cf3-99ae-53109f791a45)

Row Id      Started    Last Updated    Job Type      Jobs Ran    Job Status    Description
----------  ---------  --------------  ------------  ----------  ------------  -------------
1476814599  2:16pm                     KILL (dry)    0           IN PROGRESS
1476814569  2:16pm     2:16pm          SYSTEM        1           SUCCEEDED     JobSucceeded
1476814539  2:15pm     2:16pm          UPDATE        1           SUCCEEDED     JobSucceeded
1476814509  2:13pm     2:15pm          SYSTEM        4           SUCCEEDED     JobSucceeded
1476814388  2:13pm     2:13pm          RESUME        1           SUCCEEDED     JobSucceeded
1476814328  2:12pm     2:12pm          RESUME (dry)  1           SUCCEEDED     JobSucceeded
1476814268  10:52am    2:11pm          SYSTEM        390         SUCCEEDED     JobSucceeded
1476802321  10:52am    10:52am         RUN           1           SUCCEEDED     JobSucceeded

The history table includes the following details:

Row Id
Unique ID for a group of identical jobs run in succession.
Started
Timestamp of when the job group was started.
Last Updated
Timestamp of when the job group was most recently updated.
Job Type

Type of job group. (dry) indicates a dry-run. Possible values:

KILL
User-issued kill command.
RUN
User-issued run command.
UPDATE
User-issued update command.
RESUME
User-issued resume command.
SYSTEM

Internal system operations, generally related to process maintenance and enforcement. Note: System jobs are combined under the same job group ID.

Note: Because Suspended processes do not emit jobs, there is no SUSPEND job type.

Jobs Ran
Number of jobs run under the same job group ID. Only applies to SYSTEM jobs; all other job types correspond to exactly 1 job.
Job Status

Status of job group. Possible values:

IN PROGRESS
Job is in progress.
SUCCEEDED
Job has successfully completed.
FAILED
Job has failed.
HALTED
Job has timed out or has been interrupted by a user-issued suspend command.
Description

Details about the job group. If job completed successfully, JobSucceeded is displayed. If job is in progress, field is blank. If job did not complete successfully, an error message is displayed. Example errors (not an exhaustive list):

  • UnknownServiceError
  • ApiVersionNotFoundError
  • EndpointConnectionError
  • ConnectionClosedError

Examples

Emitting history output as JSON

To emit the history of all jobs for a process as JSON, use the --json option:

fugue history --json <FID | alias>

Example output:

[
    {
        "correlation_id": "536f7940-e230-467d-b03d-5e340f49e247",
        "count": 1,
        "description": "JobSucceeded",
        "dry_run": false,
        "fid": "e60ccbc1-3a8a-46a2-9105-3c02601f2506",
        "id": "1476814959",
        "job_status": "RUN",
        "job_type": "RUN",
        "last_updated": 1476814988,
        "message": "SUCCESS",
        "start_time": 1476814959,
        "status_code": 200
    },
    {
        "correlation_id": null,
        "count": 8,
        "description": "JobSucceeded",
        "dry_run": false,
        "fid": "e60ccbc1-3a8a-46a2-9105-3c02601f2506",
        "id": "1476815200",
        "job_status": "SYSTEM",
        "job_type": "SYSTEM",
        "last_updated": 1476815228,
        "message": "SUCCESS",
        "start_time": 1476814990,
        "status_code": 200
    },
    {
        "correlation_id": "d7362b6a-bcc6-42c3-ab39-c2706a67aea7",
        "count": 1,
        "description": "JobSucceeded",
        "dry_run": true,
        "fid": "e60ccbc1-3a8a-46a2-9105-3c02601f2506",
        "id": "1476815231",
        "job_status": "KILL",
        "job_type": "KILL (dry)",
        "last_updated": 1476815259,
        "message": "translation complete",
        "start_time": 1476815231,
        "status_code": 200
    },
    {
        "correlation_id": null,
        "count": 8,
        "description": "JobSucceeded",
        "dry_run": false,
        "fid": "e60ccbc1-3a8a-46a2-9105-3c02601f2506",
        "id": "1476815470",
        "job_status": "SYSTEM",
        "job_type": "SYSTEM",
        "last_updated": 1476815499,
        "message": "SUCCESS",
        "start_time": 1476815260,
        "status_code": 200
    }
]

For comparison’s sake, this is how the same information looks without the --json option:

Jobs History Report for user/xxxxxxxxxxxx - Tue Oct 18 2016 2:30pm
mycomposition (e60ccbc1-3a8a-46a2-9105-3c02601f2506)

Row Id      Started    Last Updated    Job Type    Jobs Ran    Job Status    Description
----------  ---------  --------------  ----------  ----------  ------------  -------------
1476815380  2:27pm     2:30pm          SYSTEM      8           SUCCEEDED     JobSucceeded
1476815231  2:27pm     2:27pm          KILL (dry)  1           SUCCEEDED     JobSucceeded
1476815200  2:23pm     2:27pm          SYSTEM      8           SUCCEEDED     JobSucceeded
1476814959  2:22pm     2:23pm          RUN         1           SUCCEEDED     JobSucceeded

JSON-formatted history output

The following fields are returned with fugue history --json <FID | alias>:

correlation_id
GUID correlating to the user command for which the job group was created.
count
Number of jobs associated with the same job group ID.
description
Details about the job group.
dry_run
Whether job group is a dry-run.
fid
Fugue ID of the process.
id
Unique ID for a group of identical jobs run in succession (same as Row Id in normal history output).
job_status
Status of job group.
job_type
Type of job group.
last_updated
Unix timestamp of when the job group was most recently updated.
message
Content of most recent internal message, if applicable; either SUCCESS or an error message.
start_time
Unix timestamp of when the job group was started.
status_code
Numerical status code for a job.

Returning Job History For a Specific Period of Time

To retrieve job history for a specific period of time, use the -s | --start and -e | --end options, formatted as "mm/dd/YYYY HH:MM".

For example, given the following history output:

Jobs History Report for becki/141874191075 - Fri Sep 23 2016 5:27pm
mycomposition (cd42fb5b-3f6f-45df-8e8b-6af08d597dcf)

Row Id      Started    Last Updated    Job Type    Jobs Ran    Job Status    Description
----------  ---------  --------------  ----------  ----------  ------------  -------------
1474666010  5:26pm                     SYSTEM      0           IN PROGRESS
1474665980  5:23pm     5:26pm          SYSTEM      7           SUCCEEDED     JobSucceeded
1474665770  5:22pm     5:23pm          UPDATE      1           SUCCEEDED     JobSucceeded
1474665740  5:22pm     5:22pm          RESUME      1           SUCCEEDED     JobSucceeded
1474665680  3:18pm     5:21pm          SYSTEM      246         SUCCEEDED     JobSucceeded
1474658293  3:18pm     3:18pm          RUN         1           SUCCEEDED     JobSucceeded

This example displays only jobs that were started or updated after 5 p.m. September 23, 2016:

fugue history -s "09/23/2016 17:00" mycomposition

Which produces this output:

Jobs History Report for <user>/<account> - Fri Sep 23 2016 5:24pm
mycomposition (cd42fb5b-3f6f-45df-8e8b-6af08d597dcf)

Row Id      Started    Last Updated    Job Type    Jobs Ran    Job Status    Description
----------  ---------  --------------  ----------  ----------  ------------  -------------
1474665830  5:23pm                     SYSTEM      0           IN PROGRESS
1474665800  5:23pm     5:23pm          SYSTEM      1           SUCCEEDED     JobSucceeded
1474665770  5:22pm     5:23pm          UPDATE      1           SUCCEEDED     JobSucceeded
1474665740  5:22pm     5:22pm          RESUME      1           SUCCEEDED     JobSucceeded
1474665680  3:18pm     5:21pm          SYSTEM      246         SUCCEEDED     JobSucceeded

This example displays only jobs that were started or updated before 5 p.m. September 23, 2016:

fugue history -e "09/23/2016 17:00" mycomposition

Which produces this output:

Jobs History Report for <user>/<account> - Fri Sep 23 2016 5:25pm
mycomposition (cd42fb5b-3f6f-45df-8e8b-6af08d597dcf)

Row Id      Started    Last Updated    Job Type    Jobs Ran    Job Status    Description
----------  ---------  --------------  ----------  ----------  ------------  -------------
1474665680  3:18pm     5:21pm          SYSTEM      246         SUCCEEDED     JobSucceeded
1474658293  3:18pm     3:18pm          RUN         1           SUCCEEDED     JobSucceeded

Note: Because SYSTEM job groups are often comprised of many individual jobs, the same list item shows up in both of the above examples. In this case, SYSTEM jobs for job group ID 1474665680 were started and/or updated before and after 5 p.m. September 23, 2016.