This project has retired. For details please refer to its Attic page.
Falcon - GET /api/instance/logs/:entity-type/:entity-name

GET /api/instance/logs/:entity-type/:entity-name

Description

Get log of a specific instance of an entity.

Parameters

  • :entity-type Valid options are cluster, feed or process.
  • :entity-name Name of the entity.
  • start <optional param> Show instances from this date. Date format is yyyy-MM-dd'T'HH:mm'Z'.
    • By default, it is set to (end - (10 * entityFrequency)).
  • end <optional param> Show instances up to this date. Date format is yyyy-MM-dd'T'HH:mm'Z'.
    • Default is set to now.
  • colo <optional param> Colo on which the query should be run.
  • runId <optional param> Run Id.
  • lifecycle <optional param> Valid lifecycles for feed are Eviction/Replication(default) and for process is Execution(default).
  • filterBy <optional param> Filter results by list of field:value pairs. Example: filterBy=STATUS:RUNNING,CLUSTER:primary-cluster
    • Supported filter fields are STATUS, CLUSTER, SOURCECLUSTER, STARTEDAFTER.
    • Query will do an AND among filterBy fields.
  • orderBy <optional param> Field by which results should be ordered.
    • Supports ordering by "status","startTime","endTime","cluster".
  • sortOrder <optional param> Valid options are "asc" and "desc"
  • offset <optional param> Show results from the offset, used for pagination. Defaults to 0.
  • numResults <optional param> Number of results to show per request, used for pagination. Only integers > 0 are valid, Default is 10.
  • doAs <optional query param> allows the current user to impersonate the user passed in doAs when interacting with the Falcon system.

Results

Log of specified instance.

Examples

Rest Call

GET http://localhost:15000/api/instance/logs/process/SampleProcess?colo=*&start=2012-04-03T07:00Z

Result

{
    "instances": [
        {
            "actions": [
                {
                    "logFile": "http:\/\/localhost:50070\/data\/apps\/falcon\/staging\/falcon\/workflows\/process\/SampleProcess\/logs\/job-2012-04-03-07-00\/000\/pig_SUCCEEDED.log",
                    "status": "SUCCEEDED",
                    "action": "pig"
                }
            ],
            "details": "",
            "endTime": "2013-10-21T14:40:26-07:00",
            "startTime": "2013-10-21T14:39:56-07:00",
            "cluster": "primary-cluster",
            "logFile": "http:\/\/localhost:50070\/data\/apps\/falcon\/staging\/falcon\/workflows\/process\/SampleProcess\/logs\/job-2012-04-03-07-00\/000\/oozie.log",
            "status": "SUCCEEDED",
            "instance": "2012-04-03T07:00Z"
        }
    ],
    "requestId": "default\/3527038e-8334-4e50-8173-76c4fa430d0b\n",
    "message": "default\/STATUS\n",
    "status": "SUCCEEDED"
}

Rest Call

GET http://localhost:15000/api/instance/logs/process/SampleProcess?colo=*&start=2012-04-03T07:00Z&filterBy=STATUS:SUCCEEDED,CLUSTER:primary-cluster&orderBy=startTime&offset=2&numResults=2&doAs=joe

Result

{
    "instances": [
        {
            "actions": [
                {
                    "logFile": "http:\/\/localhost:50070\/data\/apps\/falcon\/staging\/falcon\/workflows\/process\/SampleProcess\/logs\/job-2012-04-03-07-00\/000\/pig_SUCCEEDED.log",
                    "status": "SUCCEEDED",
                    "action": "pig"
                }
            ],
            "details": "",
            "endTime": "2013-10-21T14:40:26-07:00",
            "startTime": "2013-10-21T14:39:56-07:00",
            "cluster": "primary-cluster",
            "logFile": "http:\/\/localhost:50070\/data\/apps\/falcon\/staging\/falcon\/workflows\/process\/SampleProcess\/logs\/job-2012-04-03-07-00\/000\/oozie.log",
            "status": "SUCCEEDED",
            "instance": "2012-04-03T07:00Z"
        },
        {
            "actions": [
                {
                    "logFile": "http:\/\/localhost:50070\/data\/apps\/falcon\/staging\/falcon\/workflows\/process\/SampleProcess\/logs\/job-2012-04-03-07-00\/001\/pig_SUCCEEDED.log",
                    "status": "SUCCEEDED",
                    "action": "pig"
                }
            ],
            "details": "",
            "endTime": "2013-10-21T14:42:27-07:00",
            "startTime": "2013-10-21T14:41:57-07:00",
            "cluster": "primary-cluster",
            "logFile": "http:\/\/localhost:50070\/data\/apps\/falcon\/staging\/falcon\/workflows\/process\/SampleProcess\/logs\/job-2012-04-03-07-00\/001\/oozie.log",
            "status": "SUCCEEDED",
            "instance": "2012-04-03T08:00Z"
        }
    ],
    "requestId": "default\/3527038e-8334-4e50-8173-76c4fa430d0b\n",
    "message": "default\/STATUS\n",
    "status": "SUCCEEDED"
}