Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


The metrics API provides various metrics information

Easy Heading Free
navigationTitleOn this Page
navigationExpandOptionexpand-all-by-default

Section

Crawl metrics

Creates basic crawl metrics report from the audit index. This endpoint needs the ADMINISTRATOR  role to be executed.

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/metrics/:seedId/:crawlId

Path and Request Body Parameters

NameTypeRequiredDescription
seedIdstringRequiredThe seed id
crawlIdstringRequired

The crawl id

Response

Code Block
languagejs
themeRDark
{
    "crawl-metrics": {
        "seedId": "0dda9332-ca52-44e1-ba63-95e51b46f951",
        "crawlId": "1658154843524",
        "metrics": {
            "add": 3,
            "enqueued": 4,
            "crawlBegin": 1,
            "scanned": 1,
            "crawlEnd": 1,
            "scannedNotIndexed": 1,
            "controlItem": 4
        },
        "workerDistribution": [
            {
                "workerId": "worker_192.168.112.1:41443//AAABghGLnak=",
                "metrics": {
                    "add": 3,
                    "enqueued": 4,
                    "crawlBegin": 1,
                    "scanned": 1,
                    "crawlEnd": 1,
                    "scannedNotIndexed": 1,
                    "controlItem": 4
                }
            }
        ]
    }
}

Status: 200





Filter body parameters

How to select  audit items for aggregation. All fields are optional but we suggest at least one field is used (typically crawlId)

Section

Jobs performance statistics

Creates jobs performance statistics report from the audit index. This endpoint needs the ADMINISTRATOR  role to be executed.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/metrics/getJobsStatistics


Query String Parameters

NameTypeRequiredDescription
sizenumberOptional

How many audit items should be viewed in the report. This does not affect the aggregation part of the report. (default = 0)

aggSourcestringOptionalThe audit item "metrics" part selected for aggregation. Can be different workflow stages, workflow events or a workflow itself. Internal ids are required. Please check the audit index items for the idea which "id" can be selected.  (default = root)
aggSortFieldstringOptionalHow to sort audit items requested by the "size" parameter. Descending order is used. (default = sumExecutionTime). Options: maxStageExecutionTime, minStageExecutionTime, avgStageExecutionTime, sumExecutionTime, countStages

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier(s) of the batch(es) to be acknowledged
Code Block
themeRDark
{
  "filter" : {
    "seedId" : "seedId"
	"connectionId" : "connectionId",
	"connectorId" : "connectorId",
	"docId" : "docId",
    "crawlId": "crawlId",
	"timestampFrom" : millis from
	"timestampTo" : millis to
  }
}


Response

Examples

Acknowledge a single batch

Code Block
languagejs
themeRDark
PUT /aspire/_api/manager/batch/ack/AAABcID5GBc=?type=scan

PUT /aspire/_api/manager/batch/ack?type=scan
{
  "id": ["AAABcID5GBc="]
}

Acknowledge multiple batches

Code Block
languagejs
themeRDark
PUT /aspire/_api/manager/batch/ack?type=scan
{
  "id": ["AAABcID5GBc=", "AAABcIueWUc="]
}

Response

Code Block
languagejs
themeRDark
{
  "message": "optional response message"
}
{
  "jobsStatisticsReport": {
    "configuration": {
      "JobStatisticsFilter": {
        "seedId": "0dda9332-ca52-44e1-ba63-95e51b46f951",
        "connectorId": null,
        "connectionId": null,
        "crawlId": null,
        "docId": null,
        "timestampFrom": null,
        "timestampTo": null
      },
      "size": 1,
      "aggSource": "root",
      "aggSortField": "sumExecutionTime"
    },
    "aggregations": {
      "documentsCount": {
        "value": 3
      },
      "metrics.root.countStages": {
        "count": 3,
        "min": 4.0,
        "max": 4.0,
        "avg": 4.0,
        "sum": 12.0
      },
      "metrics.root.minStageExecutionTime": {
        "count": 3,
        "min": 0.0,
        "max": 3.0,
        "avg": 1.3333333333333333,
        "sum": 4.0
      },
      "metrics.root.sumExecutionTime": {
        "count": 3,
        "min": 1065.0,
        "max": 2044.0,
        "avg": 1579.3333333333333,
        "sum": 4738.0
      },
      "metrics.root.avgStageExecutionTime": {
        "count": 3,
        "min": 266.0,
        "max": 511.0,
        "avg": 394.6666666666667,
        "sum": 1184.0
      },
      "metrics.root.maxStageExecutionTime": {
        "count": 3,
        "min": 518.0,
        "max": 1507.0,
        "avg": 1014.0,
        "sum": 3042.0
      }
    },
    "audit": {
      "itemId": "c:\\tmp\\ach1\\Directory4\\test2.txt",
      "seedId": "0dda9332-ca52-44e1-ba63-95e51b46f951",
      "connectionId": "0b069957-0f95-40b3-b036-f4f9c93614e1",
      "crawlId": "1658154843524",
      "crawlType": "full",
      "timestamp": 1658154891061,
      "type": "add",
      "worker": "worker_192.168.112.1:41443//AAABghGLnak=",
      "status": "success",
      "retry": false,
      "statistics": {
        "jobId": "192.168.112.1:41443/2022-07-18T13:42:18Z/21",
        "startTimestamp": 1658154882983,
        "stage": [
          {
            "source": "onAddUpdate",
            "sourceName": "onAddUpdate",
            "startTimestamp": 1658154883014,
            "stage": {
              "source": "627a709e-74ee-456c-a263-056a63a389f0",
              "sourceName": "fs2it",
              "startTimestamp": 1658154883014,
              "stage": {
                "source": "f0d17635-3fcc-475b-918b-86e157448df0",
                "sourceName": "onAdik",
                "startTimestamp": 1658154883014,
                "endTimestamp": 1658154883530
              },
              "endTimestamp": 1658154883530
            },
            "endTimestamp": 1658154883530
          },
          {
            "source": "onPublish",
            "sourceName": "onPublish",
            "startTimestamp": 1658154883530,
            "stage": {
              "source": "627a709e-74ee-456c-a263-056a63a389f0",
              "sourceName": "fs2it",
              "startTimestamp": 1658154883531,
              "stage": [
                {
                  "source": "58be59a2-c88d-437e-abc5-6cf5ab804fb6",
                  "sourceName": "pepoScr1",
                  "startTimestamp": 1658154883531,
                  "endTimestamp": 1658154885038
                },
                {
                  "source": "9da23484-1523-4ab7-8e16-455390866c59",
                  "sourceName": "fsPubPep",
                  "startTimestamp": 1658154885038,
                  "endTimestamp": 1658154885039
                },
                {
                  "source": "8f07f20b-3934-4944-8046-583aa49e84ed",
                  "sourceName": "pubikE",
                  "startTimestamp": 1658154885039,
                  "endTimestamp": 1658154885059
                }
              ],
              "endTimestamp": 1658154885059
            },
            "endTimestamp": 1658154885059
          }
        ],
        "endTimestamp": 1658154885059,
        "crawlId": "1658154843524",
        "seedId": "0dda9332-ca52-44e1-ba63-95e51b46f951",
        "id": "c:\\tmp\\ach1\\Directory4\\test2.txt",
        "connectorId": "4048af9e-55ae-4ee0-a730-66f1d87f14e1",
        "connectionId": "0b069957-0f95-40b3-b036-f4f9c93614e1",
        "metrics": {
          "root": {
            "maxStageExecutionTime": 1507,
            "minStageExecutionTime": 1,
            "avgStageExecutionTime": 511,
            "sumExecutionTime": 2044,
            "countStages": 4
          },
          "f0d17635-3fcc-475b-918b-86e157448df0": {
            "maxStageExecutionTime": 516,
            "minStageExecutionTime": 516,
            "avgStageExecutionTime": 516,
            "sumExecutionTime": 516,
            "countStages": 1
          },
          "58be59a2-c88d-437e-abc5-6cf5ab804fb6": {
            "maxStageExecutionTime": 1507,
            "minStageExecutionTime": 1507,
            "avgStageExecutionTime": 1507,
            "sumExecutionTime": 1507,
            "countStages": 1
          },
          "627a709e-74ee-456c-a263-056a63a389f0": {
            "maxStageExecutionTime": 1507,
            "minStageExecutionTime": 1,
            "avgStageExecutionTime": 511,
            "sumExecutionTime": 2044,
            "countStages": 4
          },
          "onPublish": {
            "maxStageExecutionTime": 1507,
            "minStageExecutionTime": 1,
            "avgStageExecutionTime": 509,
            "sumExecutionTime": 1528,
            "countStages": 3
          },
          "8f07f20b-3934-4944-8046-583aa49e84ed": {
            "maxStageExecutionTime": 20,
            "minStageExecutionTime": 20,
            "avgStageExecutionTime": 20,
            "sumExecutionTime": 20,
            "countStages": 1
          },
          "onAddUpdate": {
            "maxStageExecutionTime": 516,
            "minStageExecutionTime": 516,
            "avgStageExecutionTime": 516,
            "sumExecutionTime": 516,
            "countStages": 1
          },
          "9da23484-1523-4ab7-8e16-455390866c59": {
            "maxStageExecutionTime": 1,
            "minStageExecutionTime": 1,
            "avgStageExecutionTime": 1,
            "sumExecutionTime": 1,
            "countStages": 1
          }
        }
      }
    }
  }
}

Status: 200Status: 200, 404