{
  "GlobalSettings": {
    "type": "dynamic"
  },
  "vectors": [
    {
      "URL": "$BaseURL/nifi-api/process-groups/root/process-groups",
      "urlId": 1,
      "replaceParams": [
        {
          "param": "processGroupId",
          "path": "$.processGroups[*].id"
        }
      ]
    },
    {
      "URL": "$BaseURL/nifi-api/process-groups/processGroupId#1/input-ports",
      "urlId": 2,
      "depURLIds": [
        1
      ],
      "path": [
        {
          "isPartOfHierarchy": true,
          "defName": "processGroupId#1"
        },
        {
          "isPartOfHierarchy": true,
          "query": "$.inputPorts[*].portType"
        },
        {
          "isPartOfHierarchy": true,
          "query": "$.inputPorts[*].status.name",
          "replaceVectorKey": "portName"
        }
      ],
      "metrics": [
        {
          "mPath": "$.inputPorts[?(@.status.name == 'portName')].status.aggregateSnapshot.",
          "attribute": [
            {
              "name": "activeThreadCount",
              "index": 1
            },
            {
              "name": "flowFilesIn",
              "index": 2
            },
            {
              "name": "bytesIn",
              "index": 3,
	      "convertTo": "kb",
              "convertFrom": "bytes"
            },
            {
              "name": "flowFilesOut",
              "index": 4
            },
            {
              "name": "bytesOut",
              "index": 5,
	      "convertTo": "kb",
              "convertFrom": "bytes"
            },
            {
              "name": "runStatus",
              "index": 6,
              "dataFromPattern": {
                "value": true,
                "pattern": [
                  {
                    "pValue": "Stopped",
                    "updatedValue": 1,
                    "useAsRegex": false
                  },
                  {
                    "pValue": "Running",
                    "updatedValue": 2,
                    "useAsRegex": false
                  },
                  {
                    "pValue": "Disabled",
                    "updatedValue": 3,
                    "useAsRegex": false
                  },
                  {
                    "pValue": "Invalid",
                    "updatedValue": 4,
                    "useAsRegex": false
                  }
                ]
              }
            }
          ]
        }
      ]
    }
  ]
}
