├── exchange-docs └── home.md ├── src ├── main │ ├── resources │ │ ├── dw │ │ │ ├── anypoint │ │ │ │ ├── save-aggregate-assets.dwl │ │ │ │ ├── save-offset-var.dwl │ │ │ │ ├── coreservices-build-platform-login-request.dwl │ │ │ │ ├── save-apis-obtained.dwl │ │ │ │ ├── save-members-obtained.dwl │ │ │ │ ├── coreservices-build-connected-app-login-request.dwl │ │ │ │ ├── save-aggregated-member-payload-var.dwl │ │ │ │ ├── save-aggregated-api-payload-var.dwl │ │ │ │ ├── anypoint-exchange-build-graphql-dependencies-query.dwl │ │ │ │ ├── coreservices-filter-environments.dwl │ │ │ │ ├── mq-stats-categorization-per-env.dwl │ │ │ │ ├── analytics-query-request.dwl │ │ │ │ ├── build-mq-destination-metrics.dwl │ │ │ │ ├── anypoint-exchange-build-graphql-query.dwl │ │ │ │ └── mq-aggregate-metrics-per-region.dwl │ │ │ ├── aggregation │ │ │ │ ├── set-date-var.dwl │ │ │ │ ├── set-errors-var.dwl │ │ │ │ ├── set-null-response.dwl │ │ │ │ ├── set-org-id-var.dwl │ │ │ │ ├── set-org-name-var.dwl │ │ │ │ ├── set-entitlements-var.dwl │ │ │ │ ├── remove.ignore-lists.organizations.dwl │ │ │ │ ├── build-platform-benefits-from-query-params.dwl │ │ │ │ ├── build-orgs-aggregation.dwl │ │ │ │ ├── build-sdlc-raw-data-response.dwl │ │ │ │ ├── build-platform-raw-data-response.dwl │ │ │ │ └── build-platform-benefits-aggregation.dwl │ │ │ ├── common │ │ │ │ ├── set-auth-mode-from-props-var.dwl │ │ │ │ ├── set-loader-details-from-payload-var.dwl │ │ │ │ ├── set-master-org-id-from-props-vars.dwl │ │ │ │ ├── set-master-org-id-var.dwl │ │ │ │ ├── set-raw-data-from-props-var.dwl │ │ │ │ ├── set-raw-data-from-query-params-var.dwl │ │ │ │ ├── set-raw-data-from-loader-details-payload-var.dwl │ │ │ │ ├── set-auth-mode-var.dwl │ │ │ │ ├── set-client-id-from-props-var.dwl │ │ │ │ ├── set-client-secret-from-props-var.dwl │ │ │ │ ├── set-client-id-var.dwl │ │ │ │ ├── set-sdlc-details-from-props-var.dwl │ │ │ │ ├── set-collectors-from-payload-var.dwl │ │ │ │ ├── set-client-secret-var.dwl │ │ │ │ ├── set-collectors-from-props-var.dwl │ │ │ │ ├── set-collectors-from-query-params-var.dwl │ │ │ │ └── set-loader-details-from-props-var.dwl │ │ │ ├── apikit │ │ │ │ ├── error-not-acceptable.dwl │ │ │ │ ├── error-not-found.dwl │ │ │ │ ├── error-not-implemented.dwl │ │ │ │ ├── error-method-not-allowed.dwl │ │ │ │ ├── error-unsupported-media-type.dwl │ │ │ │ ├── error-any.dwl │ │ │ │ └── error-bad-request.dwl │ │ │ ├── sdlc │ │ │ │ ├── azure-convert-workitem-list.dwl │ │ │ │ ├── post-sdlc-metrics-not-implemented.dwl │ │ │ │ ├── build-jira-raw-data-response.dwl │ │ │ │ ├── azure-convert-repo-list.dwl │ │ │ │ ├── azure-backlog-query.dwl │ │ │ │ ├── azure-sprint-query.dwl │ │ │ │ ├── azure-convert-workitem-payload.dwl │ │ │ │ ├── build-confluence-raw-data-response.dwl │ │ │ │ ├── build-splunk-metrics-data-response.dwl │ │ │ │ └── azure-aggregate-cicd-runs.dwl │ │ │ ├── loader │ │ │ │ ├── loader-elk-build-structure.dwl │ │ │ │ ├── loader-csv-build-structure.dwl │ │ │ │ ├── loader-json-build-structure.dwl │ │ │ │ ├── loader-csv-build-benefits-structure.dwl │ │ │ │ ├── loader-json-build-benefits-structure.dwl │ │ │ │ ├── loader-mongodb-build-benefits-structure.dwl │ │ │ │ ├── loader-mongodb-build-metrics-structure.dwl │ │ │ │ ├── loader-success-response.dwl │ │ │ │ ├── loader-splunk-hec-request.dwl │ │ │ │ ├── loader-tableau-write-operation-path.dwl │ │ │ │ ├── loader-sfdc-build-benefits-structure.dwl │ │ │ │ ├── loader-sfdc-build-structure.dwl │ │ │ │ └── modules │ │ │ │ │ └── loaderBenefitsBasicStructure.dwl │ │ │ ├── poller │ │ │ │ └── set-poller-details-vat.dwl │ │ │ └── mcp │ │ │ │ ├── error-any.dwl │ │ │ │ ├── response-getAvailableCollectors.dwl │ │ │ │ ├── map-params-to-attributes.dwl │ │ │ │ ├── response-filter-metrics-by-collector.dwl │ │ │ │ ├── response-getPlatformMetricsByKey.dwl │ │ │ │ └── response-getCapabilities.dwl │ │ ├── properties │ │ │ └── secure │ │ │ │ ├── .gitignore │ │ │ │ └── _template.yaml │ │ ├── web │ │ │ ├── favicon.ico │ │ │ ├── assets │ │ │ │ ├── img │ │ │ │ │ ├── bg5.jpg │ │ │ │ │ ├── mike.jpg │ │ │ │ │ ├── anime3.png │ │ │ │ │ ├── anime6.png │ │ │ │ │ ├── emilyz.jpg │ │ │ │ │ ├── header.jpg │ │ │ │ │ ├── james.jpg │ │ │ │ │ ├── mslogo.png │ │ │ │ │ ├── angular.jpg │ │ │ │ │ ├── favicon.png │ │ │ │ │ ├── img_3115.jpg │ │ │ │ │ ├── apple-icon.png │ │ │ │ │ ├── argon-white.png │ │ │ │ │ ├── mslogoblack.png │ │ │ │ │ ├── default-avatar.png │ │ │ │ │ ├── angular2-logo-red.png │ │ │ │ │ └── angular2-logo-white.png │ │ │ │ └── fonts │ │ │ │ │ ├── nucleo.eot │ │ │ │ │ ├── nucleo.ttf │ │ │ │ │ ├── nucleo.woff │ │ │ │ │ └── nucleo.woff2 │ │ │ ├── nucleo.03ef1918e505c3e3471f.eot │ │ │ ├── nucleo.b17a118e13e53558658b.ttf │ │ │ ├── nucleo.5987dd12fea78ce5f97a.woff2 │ │ │ ├── nucleo.f0b489a5dbbff08833d2.woff │ │ │ ├── index.html │ │ │ └── runtime.2636733e998c14a784cc.js │ │ ├── api │ │ │ ├── examples │ │ │ │ ├── loaders │ │ │ │ │ ├── am.json │ │ │ │ │ ├── csv.json │ │ │ │ │ ├── json.json │ │ │ │ │ ├── mongodb.json │ │ │ │ │ ├── tableau.json │ │ │ │ │ ├── responses │ │ │ │ │ │ └── post-benefits-metrics.json │ │ │ │ │ ├── elk.json │ │ │ │ │ ├── post-platform-benefits.json │ │ │ │ │ └── splunk.json │ │ │ │ └── collectors │ │ │ │ │ ├── design-center │ │ │ │ │ └── design-center-metrics.json │ │ │ │ │ ├── responses │ │ │ │ │ ├── get-business-metrics.json │ │ │ │ │ └── get-sdlc-metrics.json │ │ │ │ │ ├── core-services │ │ │ │ │ └── core-services-metrics.json │ │ │ │ │ ├── exchange │ │ │ │ │ └── exchange-metrics.json │ │ │ │ │ └── object-store-v2 │ │ │ │ │ └── object-store-v2-metrics.json │ │ │ ├── traits │ │ │ │ ├── raw.raml │ │ │ │ ├── x-anypnt-org-id.raml │ │ │ │ ├── connected-app-auth.raml │ │ │ │ ├── business-metrics.raml │ │ │ │ ├── platform-auth.raml │ │ │ │ └── collectors.raml │ │ │ └── data-types │ │ │ │ ├── loaders │ │ │ │ ├── responses │ │ │ │ │ ├── sdlc-metrics.raml │ │ │ │ │ └── platform-benefits.raml │ │ │ │ ├── tableau.raml │ │ │ │ ├── common.raml │ │ │ │ ├── elk.raml │ │ │ │ ├── splunk.raml │ │ │ │ └── post-benefits-metrics.raml │ │ │ │ └── collectors │ │ │ │ ├── runtime-manager │ │ │ │ ├── hybrid │ │ │ │ │ ├── hybrid.raml │ │ │ │ │ └── environment.raml │ │ │ │ ├── runtime-manager.raml │ │ │ │ ├── cloudhub │ │ │ │ │ ├── environment.raml │ │ │ │ │ └── cloudhub.raml │ │ │ │ └── runtime-fabric │ │ │ │ │ └── runtime-fabric.raml │ │ │ │ ├── anypoint-mq │ │ │ │ ├── details.raml │ │ │ │ ├── details-array.raml │ │ │ │ ├── anypoint-mq.raml │ │ │ │ └── environment.raml │ │ │ │ ├── object-store-v2 │ │ │ │ ├── object-store-v2.raml │ │ │ │ └── environment.raml │ │ │ │ ├── design-center.raml │ │ │ │ ├── api-manager │ │ │ │ └── api-manager.raml │ │ │ │ ├── core-services.raml │ │ │ │ ├── get-business-metrics.raml │ │ │ │ └── get-sdlc-metrics.raml │ │ ├── weave │ │ │ └── autogenerated │ │ │ │ ├── 7aee42ef-0fc8-4057-89a3-2a2943b5c3b2 │ │ │ │ ├── Output-Payload.wev │ │ │ │ ├── Output-Variables-rpcId.wev │ │ │ │ ├── Output-Variables-rpcCollector.wev │ │ │ │ ├── Output-Variables-rpcMetricKey.wev │ │ │ │ ├── Output-Variables-outboundHeaders.wev │ │ │ │ ├── Input-Payload.wev │ │ │ │ ├── Input-Attributes.wev │ │ │ │ └── Output-Attributes.wev │ │ │ │ ├── 8ed3bf31-4e7e-4247-81e3-b0810196b42c │ │ │ │ ├── Input-Payload.wev │ │ │ │ ├── Output-Variables-outboundHeaders.wev │ │ │ │ └── Input-Attributes.wev │ │ │ │ ├── c56d6188-8c16-4217-8cca-3f3c0bb7a0d9 │ │ │ │ ├── Input-Payload.wev │ │ │ │ ├── Output-Payload.wev │ │ │ │ ├── Output-Variables-rpcId.wev │ │ │ │ ├── Output-Variables-rpcCollector.wev │ │ │ │ ├── Input-Attributes.wev │ │ │ │ └── Output-Attributes.wev │ │ │ │ ├── 63fdfd27-b25c-4ca5-8b85-0a43af062510 │ │ │ │ ├── Input-Payload.wev │ │ │ │ ├── Output-Payload.wev │ │ │ │ ├── Input-Attributes.wev │ │ │ │ └── Output-Attributes.wev │ │ │ │ ├── a167ca75-a594-416a-b1f5-ec7ed7fb864a │ │ │ │ ├── Input-Payload.wev │ │ │ │ ├── Input-Variables-expectedResponse.wev │ │ │ │ ├── Output-Variables-expectedResponse.wev │ │ │ │ ├── Output-Payload.wev │ │ │ │ └── Output-Attributes.wev │ │ │ │ ├── 21d300fe-073c-43b1-ab0b-be95f80fb468 │ │ │ │ ├── Output-Variables-rpcId.wev │ │ │ │ ├── Output-Variables-rpcCollector.wev │ │ │ │ ├── Output-Variables-outboundHeaders.wev │ │ │ │ ├── Input-Payload.wev │ │ │ │ ├── Output-Payload.wev │ │ │ │ ├── Input-Attributes.wev │ │ │ │ └── Output-Attributes.wev │ │ │ │ ├── 835da8bf-ff29-4b32-8975-a6caecd3d842 │ │ │ │ ├── Output-Payload.wev │ │ │ │ └── Output-Attributes.wev │ │ │ │ └── 74fdde6f-5b41-4c04-9beb-48f2d7b0665b │ │ │ │ └── Output-Payload.wev │ │ ├── sfdc │ │ │ ├── blank_dataset.csv │ │ │ ├── sfdc_sdlc_metrics.json │ │ │ └── sfdc_platform_metrics.json │ │ └── log4j2.xml │ └── mule │ │ ├── collectors │ │ ├── anypoint │ │ │ └── platform │ │ │ │ ├── collector-commons.xml │ │ │ │ ├── collector-runtime-fabric.xml │ │ │ │ ├── collector-design-center.xml │ │ │ │ ├── collector-api-platform.xml │ │ │ │ ├── collector-cloudhub.xml │ │ │ │ ├── collector-osv2.xml │ │ │ │ ├── collector-analytics.xml │ │ │ │ └── collector-exchange.xml │ │ └── external │ │ │ └── systems │ │ │ ├── collector-bitbucket.xml │ │ │ ├── collector-confluence.xml │ │ │ ├── collector-splunk.xml │ │ │ ├── collector-jenkins.xml │ │ │ └── collector-azuredevops.xml │ │ ├── sources │ │ ├── external │ │ │ └── systems │ │ │ │ └── apis │ │ │ │ ├── api-call-jenkins.xml │ │ │ │ ├── api-call-bitbucket.xml │ │ │ │ └── api-call-splunk.xml │ │ └── anypoint │ │ │ └── platform │ │ │ └── apis │ │ │ ├── api-call-design-center.xml │ │ │ ├── api-call-runtime-fabric.xml │ │ │ ├── api-call-cloudhub.xml │ │ │ └── api-call-osv2.xml │ │ └── loaders │ │ ├── loader-csv.xml │ │ └── loader-json-standard-format.xml └── test │ └── resources │ ├── examples │ └── responses │ │ ├── external │ │ ├── get-jenkins-jobs.json │ │ ├── get-splunk-dashboards.json │ │ ├── get-confluence-pages.json │ │ ├── get-bitbucket-repositories.json │ │ ├── get-jira-stories.json │ │ └── get-jira-backlog-items.json │ │ ├── anypoint │ │ └── platform │ │ │ ├── arm │ │ │ ├── get-applications-response.json │ │ │ ├── get-server-groups-response.json │ │ │ ├── get-deployments-response.json │ │ │ └── get-deployment-details-response.json │ │ │ ├── analytics │ │ │ └── get-events-response.json │ │ │ ├── apimanager │ │ │ ├── get-automated-policies-response.json │ │ │ └── get-api-policies-response.json │ │ │ ├── coreservices │ │ │ ├── post-login-response.json │ │ │ ├── get-usage-response.json │ │ │ ├── get-members-response.json │ │ │ └── get-environments-response.json │ │ │ ├── osv2 │ │ │ └── get-osv2-stats-response.json │ │ │ ├── mq │ │ │ ├── get-destinations-response.json │ │ │ ├── get-exchange-stats-response.json │ │ │ └── get-regions-response.json │ │ │ ├── exchange │ │ │ └── get-asset-dependencies-response.json │ │ │ └── designcenter │ │ │ └── get-projects-response.json │ │ ├── response-post-sdlc-metrics-not-implemented.json │ │ ├── response-get-sdlc-empty-metrics.json │ │ ├── response-get-sdlc-raw-empty-metrics.json │ │ ├── loaders │ │ └── response-loader-payload-example.json │ │ ├── response-get-platform-benefits.json │ │ ├── response-mcp-tool-getAvailableCollectors.json │ │ ├── response-mcp-tool-getPlatformMetricsByCollectorRtf.json │ │ ├── response-post-platform-benefits-csv.csv │ │ ├── response-mcp-tool-getPlatformMetricsByCollectorDc.json │ │ ├── response-mcp-tool-getPlatformMetricsByCollectorCore.json │ │ ├── response-mcp-tool-getPlatformMetricsByKey.json │ │ ├── response-get-sdlc-metrics.json │ │ ├── response-mcp-tool-getPlatformMetricsByCollectorEx.json │ │ ├── response-post-platform-benefits-json.json │ │ └── response-get-sdlc-metrics-errors.json │ ├── dw │ ├── mock-loader-strategy-payload-am.dwl │ ├── mock-poller-details-general-enabled.dwl │ ├── mock-poller-details-sdlc-enabled.dwl │ ├── mock-loader-strategy-payload-csv.dwl │ ├── mock-loader-strategy-payload-json.dwl │ ├── mock-loader-strategy-payload-logger.dwl │ ├── mock-loader-strategy-payload-mongodb.dwl │ ├── mock-loader-strategy-payload-tableau.dwl │ ├── mock-sdlc-details-enabled.dwl │ ├── mock-sdlc-details-disabled.dwl │ ├── mock-platform-metrics-call-attributes-collectors-ch.dwl │ ├── mock-loader-strategy-payload-elk.dwl │ ├── mock-call-attributes.dwl │ ├── add-jsonrpc-structure.dwl │ ├── mock-sdlc-call-attributes-raw.dwl │ ├── mock-loader-benefits-strategy-payload-am.dwl │ ├── mock-platform-metrics-call-attributes-connected-app.dwl │ ├── mock-platform-metrics-call-attributes-raw.dwl │ ├── mock-loader-benefits-strategy-payload-csv.dwl │ ├── mock-loader-benefits-strategy-payload-json.dwl │ ├── mock-platform-metrics-call-attributes-collectors-dc.dwl │ ├── mock-loader-benefits-strategy-payload-logger.dwl │ ├── mock-loader-benefits-strategy-payload-mongodb.dwl │ ├── mock-loader-strategy-payload-sfdc.dwl │ ├── mock-loader-strategy-payload-splunk.dwl │ ├── mock-loader-strategy-payload-splunk-https.dwl │ ├── add-jsonrpc-structure-minus-date.dwl │ ├── mock-loader-benefits-strategy-payload-tableau.dwl │ ├── mock-platform-benefits-call-attributes.dwl │ ├── mock-loader-benefits-strategy-payload-elk.dwl │ ├── mock-loader-benefits-strategy-payload-splunk.dwl │ ├── mock-loader-benefits-strategy-payload-sfdc.dwl │ └── mock-loader-benefits-strategy-payload-splunk-https.dwl │ └── log4j2-test.xml ├── img ├── approach.png ├── domains.png └── implementation_approach.png ├── mule-artifact.json ├── .gitignore ├── postman └── environment_template.json ├── UNLICENSE.md └── .github └── app-dev.yaml /exchange-docs/home.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/save-aggregate-assets.dwl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/test/resources/examples/responses/external/get-jenkins-jobs.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/arm/get-applications-response.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /img/approach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/img/approach.png -------------------------------------------------------------------------------- /img/domains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/img/domains.png -------------------------------------------------------------------------------- /src/main/resources/dw/aggregation/set-date-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | now() -------------------------------------------------------------------------------- /src/main/resources/dw/aggregation/set-errors-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | [] -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/analytics/get-events-response.json: -------------------------------------------------------------------------------- 1 | {"data":[]} -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/arm/get-server-groups-response.json: -------------------------------------------------------------------------------- 1 | {"data":[]} -------------------------------------------------------------------------------- /src/test/resources/examples/responses/external/get-splunk-dashboards.json: -------------------------------------------------------------------------------- 1 | { 2 | "feed": [] 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/dw/aggregation/set-null-response.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | null -------------------------------------------------------------------------------- /src/main/resources/properties/secure/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore all local secure property files 2 | app-*.yaml 3 | -------------------------------------------------------------------------------- /src/main/resources/dw/aggregation/set-org-id-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | payload.id -------------------------------------------------------------------------------- /src/main/resources/dw/aggregation/set-org-name-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | payload.name -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-post-sdlc-metrics-not-implemented.json: -------------------------------------------------------------------------------- 1 | {"message": "Not Implemented"} -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-auth-mode-from-props-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | p('auth.mode') -------------------------------------------------------------------------------- /src/main/resources/dw/aggregation/set-entitlements-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | payload.entitlements -------------------------------------------------------------------------------- /src/main/resources/dw/apikit/error-not-acceptable.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | {message: "Not acceptable"} -------------------------------------------------------------------------------- /src/main/resources/dw/apikit/error-not-found.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | {message: "Resource not found"} -------------------------------------------------------------------------------- /img/implementation_approach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/img/implementation_approach.png -------------------------------------------------------------------------------- /src/main/resources/dw/apikit/error-not-implemented.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | {message: "Not Implemented"} -------------------------------------------------------------------------------- /src/main/resources/dw/apikit/error-method-not-allowed.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | {message: "Method not allowed"} -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-loader-details-from-payload-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | payload.loaderDetails -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-master-org-id-from-props-vars.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | p('secure::auth.orgId') -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-master-org-id-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | attributes.headers."x-anypnt-org-id" -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-raw-data-from-props-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | vars.loaderDetails.rawData -------------------------------------------------------------------------------- /src/main/resources/dw/sdlc/azure-convert-workitem-list.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | payload.workItems.id joinBy "," -------------------------------------------------------------------------------- /src/main/resources/web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/api/examples/loaders/am.json: -------------------------------------------------------------------------------- 1 | { 2 | "collectors": ["all"], 3 | "loaderDetails": { 4 | "strategy": "am" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/save-offset-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | if (vars.offset == null) 0 else vars.offset -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-raw-data-from-query-params-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | attributes.queryParams.raw -------------------------------------------------------------------------------- /src/main/resources/dw/sdlc/post-sdlc-metrics-not-implemented.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | {message: "Not Implemented"} -------------------------------------------------------------------------------- /src/main/resources/dw/apikit/error-unsupported-media-type.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | {message: "Unsupported media type"} -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/bg5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/bg5.jpg -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/mike.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/mike.jpg -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-raw-data-from-loader-details-payload-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | payload.loaderDetails.rawData -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/anime3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/anime3.png -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/anime6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/anime6.png -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/emilyz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/emilyz.jpg -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/header.jpg -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/james.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/james.jpg -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/mslogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/mslogo.png -------------------------------------------------------------------------------- /src/main/resources/web/assets/fonts/nucleo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/fonts/nucleo.eot -------------------------------------------------------------------------------- /src/main/resources/web/assets/fonts/nucleo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/fonts/nucleo.ttf -------------------------------------------------------------------------------- /src/main/resources/web/assets/fonts/nucleo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/fonts/nucleo.woff -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/angular.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/angular.jpg -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/favicon.png -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/img_3115.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/img_3115.jpg -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-strategy-payload-am.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | loaderDetails: { 6 | strategy: 'am' 7 | } 8 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/apimanager/get-automated-policies-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "automatedPolicies":[], 3 | "total":0 4 | } 5 | -------------------------------------------------------------------------------- /src/main/resources/api/examples/loaders/csv.json: -------------------------------------------------------------------------------- 1 | { 2 | "collectors": ["all"], 3 | "loaderDetails": { 4 | "strategy": "csv", 5 | "rawData": "false" 6 | } 7 | } -------------------------------------------------------------------------------- /src/main/resources/api/examples/loaders/json.json: -------------------------------------------------------------------------------- 1 | { 2 | "collectors": ["all"], 3 | "loaderDetails": { 4 | "strategy": "json", 5 | "rawData": "false" 6 | } 7 | } -------------------------------------------------------------------------------- /src/main/resources/dw/apikit/error-any.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | message: "Internal Server error", 6 | error: error.description 7 | } -------------------------------------------------------------------------------- /src/main/resources/web/assets/fonts/nucleo.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/fonts/nucleo.woff2 -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/apple-icon.png -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/argon-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/argon-white.png -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/mslogoblack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/mslogoblack.png -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-get-sdlc-empty-metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "date": "2021-02-20T23:21:52.501-08:00", 3 | "sdlcMetrics": { 4 | 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/api/traits/raw.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 Trait 2 | queryParameters: 3 | raw: 4 | description: "Provide raw data" 5 | type: boolean 6 | default: false -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/default-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/default-avatar.png -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-get-sdlc-raw-empty-metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "date": "2021-02-21T05:14:11.816-08:00", 3 | "sdlcData": { 4 | 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/web/nucleo.03ef1918e505c3e3471f.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/nucleo.03ef1918e505c3e3471f.eot -------------------------------------------------------------------------------- /src/main/resources/web/nucleo.b17a118e13e53558658b.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/nucleo.b17a118e13e53558658b.ttf -------------------------------------------------------------------------------- /src/main/resources/api/examples/loaders/mongodb.json: -------------------------------------------------------------------------------- 1 | { 2 | "collectors": ["all"], 3 | "loaderDetails": { 4 | "strategy": "mongodb", 5 | "rawData": "false" 6 | } 7 | } -------------------------------------------------------------------------------- /src/main/resources/dw/apikit/error-bad-request.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | message: "Bad request", 6 | error: error.description default "" 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/angular2-logo-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/angular2-logo-red.png -------------------------------------------------------------------------------- /src/main/resources/web/assets/img/angular2-logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/assets/img/angular2-logo-white.png -------------------------------------------------------------------------------- /src/main/resources/web/nucleo.5987dd12fea78ce5f97a.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/nucleo.5987dd12fea78ce5f97a.woff2 -------------------------------------------------------------------------------- /src/main/resources/web/nucleo.f0b489a5dbbff08833d2.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mulesoft-catalyst/metrics-toolkit/HEAD/src/main/resources/web/nucleo.f0b489a5dbbff08833d2.woff -------------------------------------------------------------------------------- /src/test/resources/dw/mock-poller-details-general-enabled.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | generalPollerEnabled: "true", 6 | sdlcPollerEnabled: "false" 7 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-poller-details-sdlc-enabled.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | generalPollerEnabled: "true", 6 | sdlcPollerEnabled: "true" 7 | } -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/7aee42ef-0fc8-4057-89a3-2a2943b5c3b2/Output-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_7aee42ef_0fc8_4057_89a3_2a2943b5c3b2_Output_Payload = Any 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/8ed3bf31-4e7e-4247-81e3-b0810196b42c/Input-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_8ed3bf31_4e7e_4247_81e3_b0810196b42c_Input_Payload = Any 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/c56d6188-8c16-4217-8cca-3f3c0bb7a0d9/Input-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_c56d6188_8c16_4217_8cca_3f3c0bb7a0d9_Input_Payload = Any 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/c56d6188-8c16-4217-8cca-3f3c0bb7a0d9/Output-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_c56d6188_8c16_4217_8cca_3f3c0bb7a0d9_Output_Payload = Any 4 | 5 | -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-strategy-payload-csv.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | loaderDetails: { 6 | strategy: "csv", 7 | rawData: "false" 8 | } 9 | } -------------------------------------------------------------------------------- /src/main/resources/dw/loader/loader-elk-build-structure.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/x-ndjson 3 | --- 4 | flatten(payload map ((v,k) -> 5 | [{index: {}}] ++ 6 | [{ (v) }] 7 | ) 8 | ) -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/63fdfd27-b25c-4ca5-8b85-0a43af062510/Input-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_63fdfd27_b25c_4ca5_8b85_0a43af062510_Input_Payload = {| |} 4 | 5 | -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-strategy-payload-json.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | loaderDetails: { 6 | strategy: "json", 7 | rawData: "false" 8 | } 9 | } -------------------------------------------------------------------------------- /src/main/resources/api/examples/collectors/design-center/design-center-metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "total": 1, 3 | "apiSpecs": 1, 4 | "fragments": 0, 5 | "flowDesignerApps": 0 6 | } -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/coreservices-build-platform-login-request.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | username: vars.clientId, 6 | password: vars.clientSecret 7 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-strategy-payload-logger.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | loaderDetails: { 6 | strategy: "logger", 7 | rawData: "false" 8 | } 9 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-strategy-payload-mongodb.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | loaderDetails: { 6 | strategy: "mongodb", 7 | rawData: "false" 8 | } 9 | } -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/a167ca75-a594-416a-b1f5-ec7ed7fb864a/Input-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_a167ca75_a594_416a_b1f5_ec7ed7fb864a_Input_Payload = {| id: String |} 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-auth-mode-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | if (!isEmpty(attributes.headers."x-anypnt-client-id")) "connected-app-credentials" else "platform-credentials" -------------------------------------------------------------------------------- /src/main/resources/dw/poller/set-poller-details-vat.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | generalPollerEnabled: p('poller.enabled'), 6 | sdlcPollerEnabled: p('sdlc.poller.enabled') 7 | } -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/21d300fe-073c-43b1-ab0b-be95f80fb468/Output-Variables-rpcId.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_21d300fe_073c_43b1_ab0b_be95f80fb468_Output_Variables_rpcId = Any 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/7aee42ef-0fc8-4057-89a3-2a2943b5c3b2/Output-Variables-rpcId.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_7aee42ef_0fc8_4057_89a3_2a2943b5c3b2_Output_Variables_rpcId = Any 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/c56d6188-8c16-4217-8cca-3f3c0bb7a0d9/Output-Variables-rpcId.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_c56d6188_8c16_4217_8cca_3f3c0bb7a0d9_Output_Variables_rpcId = Any 4 | 5 | -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/coreservices/post-login-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "access_token": "***REMOVED***", 3 | "token_type": "bearer", 4 | "redirectUrl": "/home/" 5 | } 6 | -------------------------------------------------------------------------------- /src/main/resources/dw/sdlc/build-jira-raw-data-response.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | payload mapObject { 5 | ($$) : $ 6 | } - "issues" ++ { 7 | "issues" : vars.outputPayload 8 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/osv2/get-osv2-stats-response.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "timeStamp": "2021-02-23T00:00:00Z", 4 | "objectStoreRequestCount": 104027 5 | } 6 | ] -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-client-id-from-props-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | if (vars.authMode == 'connected-app-credentials') p('secure::auth.clientId') else p('secure::auth.username') -------------------------------------------------------------------------------- /src/main/resources/dw/loader/loader-csv-build-structure.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | import dw::loader::modules::loaderMetricsBasicStructure 3 | output application/csv 4 | --- 5 | loaderMetricsBasicStructure::main(payload: payload) -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/21d300fe-073c-43b1-ab0b-be95f80fb468/Output-Variables-rpcCollector.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_21d300fe_073c_43b1_ab0b_be95f80fb468_Output_Variables_rpcCollector = Any 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/7aee42ef-0fc8-4057-89a3-2a2943b5c3b2/Output-Variables-rpcCollector.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_7aee42ef_0fc8_4057_89a3_2a2943b5c3b2_Output_Variables_rpcCollector = Any 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/7aee42ef-0fc8-4057-89a3-2a2943b5c3b2/Output-Variables-rpcMetricKey.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_7aee42ef_0fc8_4057_89a3_2a2943b5c3b2_Output_Variables_rpcMetricKey = Any 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/c56d6188-8c16-4217-8cca-3f3c0bb7a0d9/Output-Variables-rpcCollector.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_c56d6188_8c16_4217_8cca_3f3c0bb7a0d9_Output_Variables_rpcCollector = Any 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/api/examples/loaders/tableau.json: -------------------------------------------------------------------------------- 1 | { 2 | "collectors": ["all"], 3 | "loaderDetails": { 4 | "strategy": "tableau", 5 | "rawData": "false", 6 | "outputDir": "/opt/metrics-toolkit/data" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/dw/loader/loader-json-build-structure.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | import dw::loader::modules::loaderMetricsBasicStructure 3 | output application/json 4 | --- 5 | loaderMetricsBasicStructure::main(payload: payload) -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-client-secret-from-props-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | if (vars.authMode == 'connected-app-credentials') p('secure::auth.clientSecret') else p('secure::auth.password') -------------------------------------------------------------------------------- /src/main/resources/dw/loader/loader-csv-build-benefits-structure.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | import dw::loader::modules::loaderBenefitsBasicStructure 3 | output application/csv 4 | --- 5 | loaderBenefitsBasicStructure::main(payload: payload) -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/21d300fe-073c-43b1-ab0b-be95f80fb468/Output-Variables-outboundHeaders.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_21d300fe_073c_43b1_ab0b_be95f80fb468_Output_Variables_outboundHeaders = {| |} 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/7aee42ef-0fc8-4057-89a3-2a2943b5c3b2/Output-Variables-outboundHeaders.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_7aee42ef_0fc8_4057_89a3_2a2943b5c3b2_Output_Variables_outboundHeaders = {| |} 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/8ed3bf31-4e7e-4247-81e3-b0810196b42c/Output-Variables-outboundHeaders.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_8ed3bf31_4e7e_4247_81e3_b0810196b42c_Output_Variables_outboundHeaders = {| |} 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/a167ca75-a594-416a-b1f5-ec7ed7fb864a/Input-Variables-expectedResponse.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_a167ca75_a594_416a_b1f5_ec7ed7fb864a_Input_Variables_expectedResponse = String 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/api/traits/x-anypnt-org-id.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 Trait 2 | headers: 3 | X-ANYPNT-ORG-ID: 4 | description: | 5 | Anypoint root Organization ID for acquiring metrics. 6 | type: string 7 | required: true -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/save-apis-obtained.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | if (vars.apisTotalObtained == null) 5 | (sizeOf(payload.assets)) 6 | else 7 | (vars.apisTotalObtained + (sizeOf(payload.assets))) -------------------------------------------------------------------------------- /src/main/resources/dw/loader/loader-json-build-benefits-structure.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | import dw::loader::modules::loaderBenefitsBasicStructure 3 | output application/json 4 | --- 5 | loaderBenefitsBasicStructure::main(payload: payload) -------------------------------------------------------------------------------- /src/main/resources/dw/loader/loader-mongodb-build-benefits-structure.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | import dw::loader::modules::loaderBenefitsBasicStructure 3 | output application/csv 4 | --- 5 | loaderBenefitsBasicStructure::main(payload: payload) -------------------------------------------------------------------------------- /src/main/resources/dw/loader/loader-mongodb-build-metrics-structure.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | import dw::loader::modules::loaderMetricsBasicStructure 3 | output application/json 4 | --- 5 | loaderMetricsBasicStructure::main(payload: payload) -------------------------------------------------------------------------------- /src/main/resources/dw/sdlc/azure-convert-repo-list.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | size: payload.count, 6 | repositories: (payload.value filter not $.isDisabled) map() -> {name: $.name} 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/a167ca75-a594-416a-b1f5-ec7ed7fb864a/Output-Variables-expectedResponse.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_a167ca75_a594_416a_b1f5_ec7ed7fb864a_Output_Variables_expectedResponse = String 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/save-members-obtained.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | if (vars.membersTotalObtained == null) 5 | (sizeOf(payload.data)) 6 | else 7 | (vars.membersTotalObtained + (sizeOf(payload.data))) -------------------------------------------------------------------------------- /src/main/resources/dw/sdlc/azure-backlog-query.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | "query": "Select [System.Id], [System.Title], [System.State], [System.WorkItemType] From WorkItems Where [System.IterationPath] = @project" 6 | } -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/coreservices-build-connected-app-login-request.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/x-www-form-urlencoded 3 | --- 4 | { 5 | grant_type: "client_credentials", 6 | client_id: vars.clientId, 7 | client_secret: vars.clientSecret 8 | } -------------------------------------------------------------------------------- /src/main/resources/dw/mcp/error-any.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | isError: true, 6 | content: [ 7 | { 8 | "type": "text", 9 | "text": "Error: " ++ error.description 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /src/main/resources/dw/sdlc/azure-sprint-query.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | "query": "Select [System.Id], [System.Title], [System.State], [System.WorkItemType] From WorkItems Where [System.IterationPath] = @CurrentIteration" 6 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-strategy-payload-tableau.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | loaderDetails: { 6 | strategy: "tableau", 7 | rawData: "false", 8 | tableau: { 9 | outputDir: "/tmp/test" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/dw/loader/loader-success-response.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | message: "Events loaded successfully", 6 | errors: vars.event map { 7 | businessGroup: $.businessGroup, 8 | errors: $.errors 9 | } 10 | } -------------------------------------------------------------------------------- /src/main/resources/api/examples/loaders/responses/post-benefits-metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "Events loaded successfully", 3 | "errors": [ 4 | { 5 | "businessGroup": "Fantasy Company", 6 | "errors": [ 7 | 8 | ] 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/835da8bf-ff29-4b32-8975-a6caecd3d842/Output-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_835da8bf_ff29_4b32_8975_a6caecd3d842_Output_Payload = {| |} {"class": "java.lang.Object", 4 | "typeAlias": "Object", 5 | "typeId": "java.lang.Object"} 6 | 7 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/a167ca75-a594-416a-b1f5-ec7ed7fb864a/Output-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_a167ca75_a594_416a_b1f5_ec7ed7fb864a_Output_Payload = {| |} {"class": "java.lang.Object", 4 | "typeAlias": "Object", 5 | "typeId": "java.lang.Object"} 6 | 7 | -------------------------------------------------------------------------------- /src/main/resources/dw/sdlc/azure-convert-workitem-payload.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | payload.value map() -> { 5 | id: $.id, 6 | name: $.fields."System.Title", 7 | taskType: $.fields."System.WorkItemType", 8 | status: $.fields."System.State" 9 | } -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/63fdfd27-b25c-4ca5-8b85-0a43af062510/Output-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_63fdfd27_b25c_4ca5_8b85_0a43af062510_Output_Payload = Array<"ap" | "apc" | "apm" | "arm" | "apma" | "amq" | "ch" | "core" | "dc" | "ex" | "osv2" | "rtf"> 4 | 5 | -------------------------------------------------------------------------------- /src/test/resources/examples/responses/loaders/response-loader-payload-example.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "Events loaded successfully", 3 | "errors": [ 4 | { 5 | "businessGroup": "Fantasy Company", 6 | "errors": [ 7 | 8 | ] 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /src/main/resources/api/data-types/loaders/responses/sdlc-metrics.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: SDLC Metrics Loader Response Datatype 3 | description: Models the response aftter posting SDLC metrics 4 | properties: 5 | message: 6 | type: string 7 | default: "Not implemented" -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-client-id-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | 4 | var clientId = attributes.headers."x-anypnt-client-id" 5 | var username = attributes.headers."x-anypnt-username" 6 | --- 7 | if (!isEmpty(clientId)) 8 | clientId 9 | else 10 | username -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/21d300fe-073c-43b1-ab0b-be95f80fb468/Input-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_21d300fe_073c_43b1_ab0b_be95f80fb468_Input_Payload = {| 4 | environment?: String, 5 | bg: String, 6 | collectorId: String, 7 | region?: String 8 | |} 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/7aee42ef-0fc8-4057-89a3-2a2943b5c3b2/Input-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_7aee42ef_0fc8_4057_89a3_2a2943b5c3b2_Input_Payload = {| 4 | environment?: String, 5 | bg: String, 6 | collectorId: String, 7 | region?: String 8 | |} 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/dw/aggregation/remove.ignore-lists.organizations.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | var ignoredOrganizations = Mule::p('secure::ignoreLists.organizations') splitBy "," 3 | output application/json 4 | --- 5 | payload filter ((item, index) -> 6 | !(ignoredOrganizations contains item.id) 7 | ) 8 | -------------------------------------------------------------------------------- /src/main/resources/dw/loader/loader-splunk-hec-request.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | //time: now().milliseconds, 6 | source: vars.loaderDetails.splunk.source, 7 | sourcetype: vars.loaderDetails.splunk.sourceType, 8 | index: vars.index, 9 | event: vars.event 10 | } -------------------------------------------------------------------------------- /src/main/resources/dw/loader/loader-tableau-write-operation-path.dwl: -------------------------------------------------------------------------------- 1 | vars.loaderDetails.tableau.outputDir as String 2 | ++ "/" 3 | ++ vars.metricsGroup as String 4 | ++ (if (vars.rawData == "true") "_raw_" else "_agg_") 5 | ++ ((vars.date as DateTime) as String {format: 'uuuuMMddHHmmssSSS'}) 6 | ++ ".json" -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/save-aggregated-member-payload-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | import * from dw::util::Values 3 | output application/java 4 | --- 5 | if (vars.aggregatedMemberPayload == null) payload 6 | else (vars.aggregatedMemberPayload update "data" with (vars.aggregatedMemberPayload.data ++ payload.data)) 7 | -------------------------------------------------------------------------------- /src/main/resources/dw/sdlc/build-confluence-raw-data-response.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | payload mapObject { 5 | ($$) : $ 6 | } - "results" - "_links" - "size" ++ 7 | { 8 | "size" : sizeOf(vars.outputPayload default[]) 9 | } ++ { 10 | "results" : vars.outputPayload 11 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/coreservices/get-usage-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "productionVCoresConsumed": 0.4, 3 | "sandboxVCoresConsumed": 30.6, 4 | "designVCoresConsumed": 0, 5 | "staticIpsConsumed": 21, 6 | "vpcsConsumed": 2, 7 | "vpnsConsumed": 4, 8 | "loadBalancersConsumed": 2 9 | } -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/save-aggregated-api-payload-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | import * from dw::util::Values 3 | output application/java 4 | --- 5 | if (vars.aggregatedAPIPayload == null) 6 | payload 7 | else 8 | (vars.aggregatedAPIPayload update "assets" with (vars.aggregatedAPIPayload.assets ++ payload.assets)) 9 | -------------------------------------------------------------------------------- /src/main/resources/dw/mcp/response-getAvailableCollectors.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json indent=false 3 | --- 4 | [ 5 | "ap", 6 | "apc", 7 | "apm", 8 | "arm", 9 | "apma", 10 | "amq", 11 | "ch", 12 | "core", 13 | "dc", 14 | "ex", 15 | "osv2", 16 | "rtf" 17 | ] -------------------------------------------------------------------------------- /src/test/resources/examples/responses/external/get-confluence-pages.json: -------------------------------------------------------------------------------- 1 | { 2 | "results": [], 3 | "limit": 25, 4 | "size": 25, 5 | "_links": { 6 | "base": "", 7 | "context": "", 8 | "next": "/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg", 9 | "self": "" 10 | } 11 | } -------------------------------------------------------------------------------- /src/main/resources/sfdc/blank_dataset.csv: -------------------------------------------------------------------------------- 1 | name,value,businessGroup,date,group,environmentType,environmentName 2 | Users Total,1.11,DummyBG,2021-01-22T12:51:17.329Z,Dummy,NA,NA 3 | CloudHub vCores Available Total,0.8,DummyBG,2021-02-04T15:45:38.836Z,Dummy,NA,NA 4 | CloudHub vCores Used Total,1.2,DummyBG,2021-02-04T15:45:38.836Z,Dummy,NA,NA 5 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/21d300fe-073c-43b1-ab0b-be95f80fb468/Output-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_21d300fe_073c_43b1_ab0b_be95f80fb468_Output_Payload = {| 4 | jsonrpc: String, 5 | timestamp: String {"format": "yyyy-MM-dd'T'HH:mm:ss'Z'"}, 6 | result: Array, 7 | id: Any 8 | |} | {| |} 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/74fdde6f-5b41-4c04-9beb-48f2d7b0665b/Output-Payload.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_74fdde6f_5b41_4c04_9beb_48f2d7b0665b_Output_Payload = {| 4 | jsonrpc: String, 5 | timestamp: String {"format": "yyyy-MM-dd'T'HH:mm:ss'Z'"}, 6 | result: Array, 7 | id: Any 8 | |} | {| |} 9 | 10 | -------------------------------------------------------------------------------- /src/test/resources/dw/mock-sdlc-details-enabled.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | bitbucket: { 6 | enabled: "true" 7 | }, 8 | jira: { 9 | enabled: "true" 10 | }, 11 | confluence: { 12 | enabled: "true" 13 | }, 14 | jenkins: { 15 | enabled: "true" 16 | }, 17 | splunk: { 18 | enabled: "true" 19 | } 20 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-sdlc-details-disabled.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | bitbucket: { 6 | enabled: "false" 7 | }, 8 | jira: { 9 | enabled: "false" 10 | }, 11 | confluence: { 12 | enabled: "false" 13 | }, 14 | jenkins: { 15 | enabled: "false" 16 | }, 17 | splunk: { 18 | enabled: "false" 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/anypoint-exchange-build-graphql-dependencies-query.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | "query Platform { asset(groupId:\"" ++ payload.groupId ++ "\",assetId:\"" ++ payload.assetId ++ "\",version:\"" ++ payload.version ++ "\") { organizationId, groupId, assetId, version, dependencies { groupId, assetId, version, type } } }" -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/coreservices-filter-environments.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | var ignoredEnvironments = Mule::p('secure::ignoreLists.environments') splitBy "," 4 | var filteredEnvironments = payload.data filter ((item, index) -> !(ignoredEnvironments contains item.id)) 5 | --- 6 | 7 | { 8 | "data": filteredEnvironments, 9 | "total": sizeOf(filteredEnvironments) 10 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-platform-metrics-call-attributes-collectors-ch.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | headers: { 6 | "x-anypnt-org-id": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 7 | "x-anypnt-username": "MaxTheMule", 8 | "x-anypnt-password": "VGhpc0lzQUJhc2U2NEVuY29kZWRWYWx1ZQ==" 9 | }, 10 | queryParams: { 11 | raw: false, 12 | collectors:"ch" 13 | } 14 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/mq/get-destinations-response.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "encrypted": false, 4 | "type": "queue", 5 | "queueId": "aQueueName1", 6 | "fifo": false, 7 | "defaultTtl": 120000, 8 | "defaultLockTtl": 10000 9 | }, 10 | { 11 | "encrypted": true, 12 | "type": "exchange", 13 | "exchangeId": "anExchangeName" 14 | } 15 | ] -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/mq/get-exchange-stats-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "destination": "anExchangeName", 3 | "messagesPublished": [ 4 | { 5 | "date": "2020-05-09T16:59:00.000+0000", 6 | "value": 48 7 | } 8 | ], 9 | "messagesDelivered": [ 10 | { 11 | "date": "2020-05-09T16:59:00.000+0000", 12 | "value": 96 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-strategy-payload-elk.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | loaderDetails: { 6 | strategy: "elk", 7 | rawData: "false", 8 | elk: { 9 | host: "https://myelk.com", 10 | port: "7000", 11 | user: "user", 12 | password: "123", 13 | platformMetricsIndex: "metrics", 14 | platformBenefitsIndex: "platform_benefits" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-call-attributes.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | headers: { 6 | "x-anypnt-org-id": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 7 | "x-anypnt-username": "mthemule", 8 | "x-anypnt-password": "ThisIsASuperSecureMockedPassword", 9 | "x-plaintext-password": true, 10 | "Authorization": "", 11 | 12 | }, 13 | queryParams: { 14 | raw: false 15 | } 16 | } -------------------------------------------------------------------------------- /src/main/resources/api/examples/collectors/responses/get-business-metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "date": "2021-02-20T20:57:35.395-08:00", 3 | "businessGroup": "Fantasy Company", 4 | "developerProductivity": 200.0, 5 | "savingFromAPIReuse": 0, 6 | "savingFromMaintenanceProductivity": 3200, 7 | "savingFromReuseInMaintenance": 0, 8 | "totalSavings": 3200, 9 | "errors": [ 10 | 11 | ] 12 | } -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/mq-stats-categorization-per-env.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | "queues": sizeOf((payload filter ($.fifo == false and $."type" == "queue")).queueId default []), 6 | "exchanges": sizeOf((payload filter ($."type" == "exchange")).exchangeId default []), 7 | "fifoQueues": sizeOf((payload filter ($.fifo == true and $."type" == "queue")).queueId default []) 8 | } -------------------------------------------------------------------------------- /src/main/resources/dw/sdlc/build-splunk-metrics-data-response.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | sizeOf((payload.feed.*entry map (v,k) -> { 5 | title: v.title, 6 | isDashboard : (v.content.dict.*key filter ($.@name == "isDashboard"))[0], 7 | isVisible : (v.content.dict.*key filter ($.@name == "isVisible"))[0] 8 | } ) filter ($.isDashboard == "1" and $.isVisible == "1")) default null -------------------------------------------------------------------------------- /src/test/resources/dw/add-jsonrpc-structure.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json indent = false 3 | --- 4 | { 5 | "jsonrpc": "2.0", 6 | "id": "158ed7b1-895a-410e-b5aa-92ade31c4e9f", 7 | "result": { 8 | "content": [ 9 | { 10 | "type": "text", 11 | "audience": [], 12 | "text": write(payload, "application/json") 13 | } 14 | ], 15 | "isError": false 16 | } 17 | } -------------------------------------------------------------------------------- /src/main/resources/api/examples/collectors/core-services/core-services-metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "users": { 3 | "total": 1, 4 | "activeMembers": 1, 5 | "inactiveMembers": 0, 6 | "activeMembersLast60Days": 0, 7 | "activeMembersLast30Days": 0 8 | }, 9 | "environments": { 10 | "total": 4, 11 | "production": 1, 12 | "sandbox": 3 13 | } 14 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-sdlc-call-attributes-raw.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | headers: { 6 | "x-anypnt-org-id": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 7 | "x-anypnt-username": "mthemule", 8 | "x-anypnt-password": "ThisIsASuperSecureMockedPassword", 9 | "x-plaintext-password": true, 10 | "Authorization": "", 11 | 12 | }, 13 | queryParams: { 14 | raw: true 15 | } 16 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/exchange/get-asset-dependencies-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "asset": { 4 | "dependencies": [ 5 | { 6 | "groupId": "a5ff6947-66ff-4292-a31d-51f322457ee6", 7 | "assetId": "automotive-data-model", 8 | "version": "1.0.0", 9 | "type": "raml-fragment" 10 | } 11 | ] 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/main/resources/api/examples/loaders/elk.json: -------------------------------------------------------------------------------- 1 | { 2 | "collectors": ["all"], 3 | "loaderDetails": { 4 | "strategy": "elk", 5 | "rawData": "false", 6 | "elk": { 7 | "host": "https://myelk.com", 8 | "port": "7000", 9 | "user": "user", 10 | "password": "123", 11 | "platformMetricsIndex": "metrics", 12 | "platformBenefitsIndex": "platform_benefits" 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-get-platform-benefits.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "date": "2021-02-20T20:57:35.395-08:00", 4 | "businessGroup": "Fantasy Company", 5 | "developerProductivity": 200.0, 6 | "savingFromAPIReuse": 0, 7 | "savingFromMaintenanceProductivity": 3200, 8 | "savingFromReuseInMaintenance": 0, 9 | "totalSavings": 3200, 10 | "errors": [ 11 | 12 | ] 13 | } 14 | ] -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-benefits-strategy-payload-am.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | event: { 6 | date: "2020-02-19T00:11:34.341-08:00", 7 | businessGroup: "Any", 8 | developAPIHistoricTime: 20, 9 | developAPICurrentTime: 4, 10 | maintainAPIHistoricTime: 20, 11 | maintainAPICurrentTime: 1, 12 | developerDayRate: 500 13 | }, 14 | loaderDetails: { 15 | strategy: 'am' 16 | } 17 | } -------------------------------------------------------------------------------- /src/main/resources/api/examples/loaders/post-platform-benefits.json: -------------------------------------------------------------------------------- 1 | { 2 | "event": { 3 | "date": "2020-02-19T00:11:34.341-08:00", 4 | "businessGroup": "Any", 5 | "developAPIHistoricTime": 20, 6 | "developAPICurrentTime": 4, 7 | "maintainAPIHistoricTime": 20, 8 | "maintainAPICurrentTime": 1, 9 | "developerDayRate": 500 10 | }, 11 | "loaderDetails": { 12 | "strategy": "json", 13 | "rawData": "false" 14 | } 15 | } -------------------------------------------------------------------------------- /src/main/resources/dw/sdlc/azure-aggregate-cicd-runs.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | vars.aggData default [] ++ 5 | 6 | if (payload.count == 0) 7 | [{"result":"no runs"}] 8 | else 9 | [(((payload.value map() -> { 10 | name: $.pipeline.name, 11 | state: $.state, 12 | result: $.result, 13 | createdDate: $.createdDate as LocalDateTime, 14 | }) orderBy $.createdDate)[-1 to 0])[0]] -------------------------------------------------------------------------------- /src/test/resources/dw/mock-platform-metrics-call-attributes-connected-app.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | headers: { 6 | "x-anypnt-org-id": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 7 | "x-anypnt-client-id": "12312321312321312312", 8 | "x-anypnt-client-secret": "3123123123123123123", 9 | "x-plaintext-password": true, 10 | "Authorization": "", 11 | 12 | }, 13 | queryParams: { 14 | raw: false 15 | } 16 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-platform-metrics-call-attributes-raw.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | headers: { 6 | "x-anypnt-org-id": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 7 | "x-anypnt-username": "mthemule", 8 | "x-anypnt-password": "ThisIsASuperSecureMockedPassword", 9 | "x-plaintext-password": true, 10 | "Authorization": "", 11 | 12 | }, 13 | queryParams: { 14 | raw: true, 15 | collectors:"dc" 16 | } 17 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-benefits-strategy-payload-csv.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | event: { 6 | date: "2020-02-19T00:11:34.341-08:00", 7 | businessGroup: "Any", 8 | developAPIHistoricTime: 20, 9 | developAPICurrentTime: 4, 10 | maintainAPIHistoricTime: 20, 11 | maintainAPICurrentTime: 1, 12 | developerDayRate: 500 13 | }, 14 | loaderDetails: { 15 | strategy: "csv", 16 | rawData: "false" 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-benefits-strategy-payload-json.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | event: { 6 | date: "2020-02-19T00:11:34.341-08:00", 7 | businessGroup: "Any", 8 | developAPIHistoricTime: 20, 9 | developAPICurrentTime: 4, 10 | maintainAPIHistoricTime: 20, 11 | maintainAPICurrentTime: 1, 12 | developerDayRate: 500 13 | }, 14 | loaderDetails: { 15 | strategy: "json", 16 | rawData: "false" 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-platform-metrics-call-attributes-collectors-dc.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | headers: { 6 | "x-anypnt-org-id": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 7 | "x-anypnt-username": "mthemule", 8 | "x-anypnt-password": "ThisIsASuperSecureMockedPassword", 9 | "x-plaintext-password": true, 10 | "Authorization": "", 11 | 12 | }, 13 | queryParams: { 14 | raw: false, 15 | collectors:"dc" 16 | } 17 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-benefits-strategy-payload-logger.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | event: { 6 | date: "2020-02-19T00:11:34.341-08:00", 7 | businessGroup: "Any", 8 | developAPIHistoricTime: 20, 9 | developAPICurrentTime: 4, 10 | maintainAPIHistoricTime: 20, 11 | maintainAPICurrentTime: 1, 12 | developerDayRate: 500 13 | }, 14 | loaderDetails: { 15 | strategy: "logger", 16 | rawData: "false" 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-benefits-strategy-payload-mongodb.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | event: { 6 | date: "2020-02-19T00:11:34.341-08:00", 7 | businessGroup: "Any", 8 | developAPIHistoricTime: 20, 9 | developAPICurrentTime: 4, 10 | maintainAPIHistoricTime: 20, 11 | maintainAPICurrentTime: 1, 12 | developerDayRate: 500 13 | }, 14 | loaderDetails: { 15 | strategy: "mongodb", 16 | rawData: "false" 17 | } 18 | } -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/runtime-manager/hybrid/hybrid.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | properties: 3 | production: 4 | type: !include environment.raml 5 | displayName: Production environments 6 | description: Provides details regarding environments of type 'Production' 7 | sandbox: 8 | type: !include environment.raml 9 | displayName: Sandbox environments 10 | description: Provides details regarding environments of type 'Sandbox' -------------------------------------------------------------------------------- /src/main/resources/api/examples/loaders/splunk.json: -------------------------------------------------------------------------------- 1 | { 2 | "collectors": ["all"], 3 | "loaderDetails": { 4 | "strategy": "splunk", 5 | "rawData": "false", 6 | "splunk": { 7 | "host": "localhost", 8 | "port": "8088", 9 | "protocol": "HTTP", 10 | "token": "***TOKEN***", 11 | "platformMetricsIndex": "metrics", 12 | "platformBenefitsIndex": "platform_benefits", 13 | "source": "metrics-source", 14 | "sourceType": "_json" 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/21d300fe-073c-43b1-ab0b-be95f80fb468/Input-Attributes.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_21d300fe_073c_43b1_ab0b_be95f80fb468_Input_Attributes = {| 4 | sessionId: String, 5 | requestId: String, 6 | additionalProperties: { _?: String } 7 | |} {"typeAlias": "RequestAttributes", 8 | "typeId": "com.mulesoft.connectors.mcp.api.server.RequestAttributes", 9 | "class": "com.mulesoft.connectors.mcp.api.server.RequestAttributes"} 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/21d300fe-073c-43b1-ab0b-be95f80fb468/Output-Attributes.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_21d300fe_073c_43b1_ab0b_be95f80fb468_Output_Attributes = {| 4 | sessionId: String, 5 | requestId: String, 6 | additionalProperties: { _?: String } 7 | |} {"typeAlias": "RequestAttributes", 8 | "typeId": "com.mulesoft.connectors.mcp.api.server.RequestAttributes", 9 | "class": "com.mulesoft.connectors.mcp.api.server.RequestAttributes"} 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/63fdfd27-b25c-4ca5-8b85-0a43af062510/Input-Attributes.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_63fdfd27_b25c_4ca5_8b85_0a43af062510_Input_Attributes = {| 4 | sessionId: String, 5 | requestId: String, 6 | additionalProperties: { _?: String } 7 | |} {"typeAlias": "RequestAttributes", 8 | "typeId": "com.mulesoft.connectors.mcp.api.server.RequestAttributes", 9 | "class": "com.mulesoft.connectors.mcp.api.server.RequestAttributes"} 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/63fdfd27-b25c-4ca5-8b85-0a43af062510/Output-Attributes.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_63fdfd27_b25c_4ca5_8b85_0a43af062510_Output_Attributes = {| 4 | sessionId: String, 5 | requestId: String, 6 | additionalProperties: { _?: String } 7 | |} {"typeAlias": "RequestAttributes", 8 | "typeId": "com.mulesoft.connectors.mcp.api.server.RequestAttributes", 9 | "class": "com.mulesoft.connectors.mcp.api.server.RequestAttributes"} 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/7aee42ef-0fc8-4057-89a3-2a2943b5c3b2/Input-Attributes.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_7aee42ef_0fc8_4057_89a3_2a2943b5c3b2_Input_Attributes = {| 4 | sessionId: String, 5 | requestId: String, 6 | additionalProperties: { _?: String } 7 | |} {"typeAlias": "RequestAttributes", 8 | "typeId": "com.mulesoft.connectors.mcp.api.server.RequestAttributes", 9 | "class": "com.mulesoft.connectors.mcp.api.server.RequestAttributes"} 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/7aee42ef-0fc8-4057-89a3-2a2943b5c3b2/Output-Attributes.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_7aee42ef_0fc8_4057_89a3_2a2943b5c3b2_Output_Attributes = {| 4 | sessionId: String, 5 | requestId: String, 6 | additionalProperties: { _?: String } 7 | |} {"typeAlias": "RequestAttributes", 8 | "typeId": "com.mulesoft.connectors.mcp.api.server.RequestAttributes", 9 | "class": "com.mulesoft.connectors.mcp.api.server.RequestAttributes"} 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/835da8bf-ff29-4b32-8975-a6caecd3d842/Output-Attributes.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_835da8bf_ff29_4b32_8975_a6caecd3d842_Output_Attributes = {| 4 | sessionId: String, 5 | requestId: String, 6 | additionalProperties: { _?: String } 7 | |} {"typeAlias": "RequestAttributes", 8 | "typeId": "com.mulesoft.connectors.mcp.api.server.RequestAttributes", 9 | "class": "com.mulesoft.connectors.mcp.api.server.RequestAttributes"} 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/a167ca75-a594-416a-b1f5-ec7ed7fb864a/Output-Attributes.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_a167ca75_a594_416a_b1f5_ec7ed7fb864a_Output_Attributes = {| 4 | sessionId: String, 5 | requestId: String, 6 | additionalProperties: { _?: String } 7 | |} {"typeAlias": "RequestAttributes", 8 | "typeId": "com.mulesoft.connectors.mcp.api.server.RequestAttributes", 9 | "class": "com.mulesoft.connectors.mcp.api.server.RequestAttributes"} 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/c56d6188-8c16-4217-8cca-3f3c0bb7a0d9/Input-Attributes.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_c56d6188_8c16_4217_8cca_3f3c0bb7a0d9_Input_Attributes = {| 4 | sessionId: String, 5 | requestId: String, 6 | additionalProperties: { _?: String } 7 | |} {"typeAlias": "RequestAttributes", 8 | "typeId": "com.mulesoft.connectors.mcp.api.server.RequestAttributes", 9 | "class": "com.mulesoft.connectors.mcp.api.server.RequestAttributes"} 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/c56d6188-8c16-4217-8cca-3f3c0bb7a0d9/Output-Attributes.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_c56d6188_8c16_4217_8cca_3f3c0bb7a0d9_Output_Attributes = {| 4 | sessionId: String, 5 | requestId: String, 6 | additionalProperties: { _?: String } 7 | |} {"typeAlias": "RequestAttributes", 8 | "typeId": "com.mulesoft.connectors.mcp.api.server.RequestAttributes", 9 | "class": "com.mulesoft.connectors.mcp.api.server.RequestAttributes"} 10 | 11 | -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-strategy-payload-sfdc.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | "loaderDetails": { 6 | "strategy": "sfdc", 7 | "rawData": "false", 8 | "sfdc": { 9 | "dataSetName" : "my_dataset", 10 | "appName": "my_data_app", 11 | "username": "test-user@salesforce.com", 12 | "password": "test-password123", 13 | "securityToken": "random-token-456" 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-strategy-payload-splunk.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | loaderDetails: { 6 | strategy: 'splunk', 7 | rawData: "false", 8 | splunk: { 9 | host: "http://mysplunk.com", 10 | port: "8088", 11 | protocol: "HTTP", 12 | token: "123", 13 | platformMetricsIndex: "metrics", 14 | platformBenefitsIndex: "platform_benefits", 15 | source: "metrics_source", 16 | sourceType: "_json" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-strategy-payload-splunk-https.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | loaderDetails: { 6 | strategy: 'splunk', 7 | rawData: "false", 8 | splunk: { 9 | host: "https://mysplunk.com", 10 | port: "8088", 11 | protocol: "HTTPS", 12 | token: "123", 13 | platformMetricsIndex: "metrics", 14 | platformBenefitsIndex: "platform_benefits", 15 | source: "metrics_source", 16 | sourceType: "_json" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/resources/dw/add-jsonrpc-structure-minus-date.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | var payloadSanitized = payload map (item) -> 4 | item - "date" 5 | --- 6 | { 7 | "jsonrpc": "2.0", 8 | "id": "158ed7b1-895a-410e-b5aa-92ade31c4e9f", 9 | "result": { 10 | "content": [ 11 | { 12 | "type": "text", 13 | "audience": [], 14 | "text": write(payloadSanitized, "application/json") 15 | } 16 | ], 17 | "isError": false 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/resources/dw/aggregation/build-platform-benefits-from-query-params.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | developAPIHistoricTime: attributes.queryParams.developAPIHistoricTime, 6 | developAPICurrentTime: attributes.queryParams.developAPICurrentTime, 7 | developerDayRate: attributes.queryParams.developerDayRate, 8 | maintainAPICurrentTime: attributes.queryParams.maintainAPICurrentTime, 9 | maintainAPIHistoricTime: attributes.queryParams.maintainAPIHistoricTime 10 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-mcp-tool-getAvailableCollectors.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "id": "158ed7b1-895a-410e-b5aa-92ade31c4e9f", 4 | "result": { 5 | "content": [ 6 | { 7 | "type": "text", 8 | "audience": [], 9 | "text": "[\n \"ap\",\n \"apc\",\n \"apm\",\n \"arm\",\n \"apma\",\n \"amq\",\n \"ch\",\n \"core\",\n \"dc\",\n \"ex\",\n \"osv2\",\n \"rtf\"\n]" 10 | } 11 | ], 12 | "isError": false 13 | } 14 | } -------------------------------------------------------------------------------- /src/main/resources/dw/loader/loader-sfdc-build-benefits-structure.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | import dw::loader::modules::loaderBenefitsBasicStructure 3 | output application/java 4 | --- 5 | loaderBenefitsBasicStructure::main(payload: payload) map ((pl01, idx) -> { 6 | businessGroup: pl01.businessGroup, 7 | date: pl01.date as LocalDateTime{format: "uuuu-MM-dd'T'HH:mm:ss.SSSXXX"}, 8 | name: pl01.name, 9 | value: pl01.value, 10 | group: pl01.group, 11 | environmentType: pl01.environmentType 12 | }) -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/analytics-query-request.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | "type": "enriched-http-event", 6 | "duration": p('anypoint.platform.apis.analytics.query.duration'), 7 | "aggregators": [ 8 | { 9 | "dimension": "api_id", 10 | "order": "descending" 11 | }, 12 | { 13 | "dimension": "client_id", 14 | "order": "descending" 15 | } 16 | ], 17 | "include_policy_violation": true 18 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-benefits-strategy-payload-tableau.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | event: { 6 | date: "2020-02-19T00:11:34.341-08:00", 7 | businessGroup: "Any", 8 | developAPIHistoricTime: 20, 9 | developAPICurrentTime: 4, 10 | maintainAPIHistoricTime: 20, 11 | maintainAPICurrentTime: 1, 12 | developerDayRate: 500 13 | }, 14 | loaderDetails: { 15 | strategy: "tableau", 16 | rawData: "false", 17 | tableau: { 18 | outputDir: "/tmp/test" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-sdlc-details-from-props-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | bitbucket: { 6 | enabled: p('sdlc.bitbucket.enabled') 7 | }, 8 | jira: { 9 | enabled: p('sdlc.jira.enabled') 10 | }, 11 | confluence: { 12 | enabled: p('sdlc.confluence.enabled') 13 | }, 14 | jenkins: { 15 | enabled: p('sdlc.jenkins.enabled') 16 | }, 17 | splunk: { 18 | enabled: p('sdlc.splunk.enabled') 19 | }, 20 | azuredevops: { 21 | enabled: p('sdlc.azuredevops.enabled') 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-collectors-from-payload-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | var collectors = if (isEmpty(payload.collectors)) ["all"] else payload.collectors 4 | --- 5 | (if (collectors contains "all") 6 | ["ap","apc","apm","arm","core","dc","ex","amq","apma","ch","rtf","osv2"] 7 | else 8 | collectors) 9 | -- (if (vars.isPCE) ["ch","rtf","apma","amq"] else []) 10 | -- (if (vars.isGovCloud) ["rtf","apma","arm"] else []) 11 | -- (if (vars.authMode == 'connected-app-credentials') ["apc", "amq", "osv2"] else []) -------------------------------------------------------------------------------- /src/main/resources/dw/loader/loader-sfdc-build-structure.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | import dw::loader::modules::loaderMetricsBasicStructure 3 | output application/java 4 | --- 5 | loaderMetricsBasicStructure::main(payload: payload) map ((pl01, idx) -> { 6 | businessGroup: pl01.businessGroup, 7 | date: pl01.date as LocalDateTime{format: "uuuu-MM-dd'T'HH:mm:ss.SSSXXX"}, 8 | name: pl01.name, 9 | value: pl01.value, 10 | group: pl01.group, 11 | environmentType: pl01.environmentType, 12 | environmentName: pl01.environmentName 13 | }) -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-mcp-tool-getPlatformMetricsByCollectorRtf.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "id": "158ed7b1-895a-410e-b5aa-92ade31c4e9f", 4 | "result": { 5 | "content": [ 6 | { 7 | "type": "text", 8 | "audience": [ 9 | 10 | ], 11 | "text": "[\n {\n \"businessGroup\": \"Fantasy Company\",\n \"businessGroupId\": \"877baaaa-36ba-4021-82d5-45bae78e0fe2\",\n \"rtf\": null\n }\n]" 12 | } 13 | ], 14 | "isError": false 15 | } 16 | } -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/build-mq-destination-metrics.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | messagesInFlight: sum(payload.inflightMessages.value default [0]), 6 | messagesSent: sum(payload.messagesSent.value default [0]), 7 | messagesReceived: sum(payload.messagesReceived.value default [0]), 8 | messagesAck: sum(payload.messagesAcked.value default [0]), 9 | messagesPublished: sum(payload.messagesPublished.value default [0]), 10 | messagesDelivered: sum(payload.messagesDelivered.value default [0]) 11 | } -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/anypoint-mq/details.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: AMQ Region Datatype 3 | description: Models Anypoint-MQ stats by environment (summary or region) 4 | properties: 5 | production: 6 | type: !include environment.raml 7 | displayName: Production 8 | description: Provides metrics aggregated by Production environments 9 | sandbox: 10 | type: !include environment.raml 11 | displayName: Sandbox 12 | description: Provides metrics aggregated by Sandbox environments 13 | -------------------------------------------------------------------------------- /src/main/resources/api/traits/connected-app-auth.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 Trait 2 | displayName: Connected App Authentication Headers 3 | description: Authentication headers used for connected apps. 4 | headers: 5 | X-ANYPNT-CLIENT-ID: 6 | description: | 7 | Receives the connected app client id used to login to Anypoint Platform. 8 | type: string 9 | required: false 10 | X-ANYPNT-CLIENT-SECRET: 11 | description: | 12 | Receives a connected app client secret to login to Anypoint Platform. 13 | type: string 14 | required: false 15 | -------------------------------------------------------------------------------- /src/test/resources/dw/mock-platform-benefits-call-attributes.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | { 5 | headers: { 6 | "x-anypnt-org-id": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 7 | "x-anypnt-username": "mthemule", 8 | "x-anypnt-password": "ThisIsASuperSecureMockedPassword", 9 | "x-plaintext-password": true, 10 | "Authorization": "", 11 | 12 | }, 13 | queryParams: { 14 | developAPIHistoricTime:20, 15 | developAPICurrentTime:10, 16 | maintainAPIHistoricTime:15, 17 | maintainAPICurrentTime:7, 18 | developerDayRate:200 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/resources/dw/aggregation/build-orgs-aggregation.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | 4 | var reducedOrg = (org) -> { 5 | id: org.id, 6 | name: org.name, 7 | entitlements: org.entitlements 8 | } 9 | 10 | var getOrgAndSubOrgs = (payload) -> ( 11 | [reducedOrg(payload)] ++ flatten(payload.subOrganizations map getOrgAndSubOrgs($)) 12 | ) 13 | 14 | var ignoredOrganizations = Mule::p('secure::ignoreLists.organizations') splitBy "," 15 | --- 16 | getOrgAndSubOrgs(payload) filter ((item, index) -> 17 | !(ignoredOrganizations contains item.id) 18 | ) -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/anypoint-mq/details-array.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: AMQ Region Datatype 3 | description: Models Anypoint-MQ stats by environment (summary or region) 4 | properties: 5 | production: 6 | type: array 7 | items: !include environment.raml 8 | displayName: Production 9 | description: Provides metrics aggregated by Production environments 10 | sandbox: 11 | type: array 12 | items: !include environment.raml 13 | displayName: Sandbox 14 | description: Provides metrics aggregated by Sandbox environments -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-post-platform-benefits-csv.csv: -------------------------------------------------------------------------------- 1 | name,value,businessGroup,date,group,environmentType 2 | Developers Productivity,500,Fantasy Company,2021-02-20T21:27:50.591-08:00,Platform Benefits,NA 3 | Savings from API Reuse,0,Fantasy Company,2021-02-20T21:27:50.591-08:00,Platform Benefits,NA 4 | Savings from Maintenance Productivity,19000,Fantasy Company,2021-02-20T21:27:50.591-08:00,Platform Benefits,NA 5 | Savings from Reuse in Maintenance,0,Fantasy Company,2021-02-20T21:27:50.591-08:00,Platform Benefits,NA 6 | Total Savings,19000,Fantasy Company,2021-02-20T21:27:50.591-08:00,Platform Benefits,NA -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/anypoint-mq/anypoint-mq.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: Anypoint MQ Datatype 3 | description: This datatype models the aggregated response with metrics from Anypoint MQ 4 | properties: 5 | stats: 6 | type: object 7 | properties: 8 | summary: 9 | type: !include details.raml 10 | displayName: Usage by type of environment 11 | description: Provides usage by type of environment 12 | byRegion: 13 | type: !include details-array.raml 14 | displayName: Usage by Region 15 | description: Provides usage information by Region -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-client-secret-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | import * from dw::core::Binaries 3 | output application/java 4 | 5 | var clientSecret = attributes.headers."x-anypnt-client-secret" 6 | var password = attributes.headers."x-anypnt-password" 7 | var passwordIsPlainText = attributes.headers."x-plaintext-password" default false 8 | 9 | fun isBase64(text) = text matches(/^([A-Za-z0-9+]{4})*([A-Za-z0-9+]{3}=|[A-Za-z0-9+]{2}==)?$/) 10 | fun getSecret(secret) = 11 | if (!passwordIsPlainText) fromBase64(secret) as String 12 | else secret 13 | --- 14 | if (!isEmpty(clientSecret)) 15 | clientSecret 16 | else 17 | getSecret(password) -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/anypoint-exchange-build-graphql-query.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | --- 4 | "query Platform { assets(organizationIds: [\"" ++ vars.orgId ++ "\"], types: [\"rest-api\", \"raml-fragment\", \"http-api\", \"soap-api\", \"policy\", \"connector\", \"extension\", \"app\", \"custom\"], latestVersionsOnly: true, limit:" ++ vars.limit ++ ", offset: " ++ vars.offset ++" ) { organizationId, groupId, assetId, version, minorVersion, versionGroup, description, name, type, status, isPublic, isLatestVersion, createdDate, updatedDate, originalFormat, minMuleVersion, isGenerated, isMozartTemplate, isSnapshot, rating, numberOfRates } }" -------------------------------------------------------------------------------- /src/main/resources/api/examples/collectors/exchange/exchange-metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "total": 3, 3 | "apiSpecs": 2, 4 | "fragments": 1, 5 | "proxies": 0, 6 | "soapApis": 0, 7 | "policies": 0, 8 | "mule3Connectors": 0, 9 | "extensions": 0, 10 | "applications": 0, 11 | "custom": 0, 12 | "overallSatisfaction": 0, 13 | "reuse": { 14 | "fragments": 2.0, 15 | "implementedApis": 0.0, 16 | "managedSboxApis": 0.0, 17 | "managedProdApis": 0.0, 18 | "extensions": 0, 19 | "appliedPoliciesSbox": 0, 20 | "appliedPoliciesProd": 0 21 | } 22 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-mcp-tool-getPlatformMetricsByCollectorDc.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "id": "158ed7b1-895a-410e-b5aa-92ade31c4e9f", 4 | "result": { 5 | "content": [ 6 | { 7 | "type": "text", 8 | "audience": [ 9 | 10 | ], 11 | "text": "[\n {\n \"businessGroup\": \"Fantasy Company\",\n \"businessGroupId\": \"877baaaa-36ba-4021-82d5-45bae78e0fe2\",\n \"designCenterMetrics\": {\n \"total\": 1,\n \"apiSpecs\": 1,\n \"fragments\": 0,\n \"flowDesignerApps\": 0\n }\n }\n]" 12 | } 13 | ], 14 | "isError": false 15 | } 16 | } -------------------------------------------------------------------------------- /src/main/resources/api/traits/business-metrics.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 Trait 2 | queryParameters: 3 | developAPIHistoricTime: 4 | description: "Historic average time to develop an API (days)" 5 | type: number 6 | developAPICurrentTime: 7 | description: "Current average time to develop an API (days)" 8 | type: number 9 | maintainAPIHistoricTime: 10 | description: "Historic average time to maintain an API (days)" 11 | type: number 12 | maintainAPICurrentTime: 13 | description: "Current average time to maintain an API (days)" 14 | type: number 15 | developerDayRate: 16 | description: "Average Developer's day rate " 17 | type: number -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/object-store-v2/object-store-v2.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: Object Store V2 Datatype 3 | description: Models the collected metrics for OSv2 4 | properties: 5 | stats: 6 | type: object 7 | properties: 8 | production: 9 | type: !include environment.raml 10 | displayName: Production Environment 11 | description: Provides details around how OSv2 was used in Production environments 12 | sandbox: 13 | type: !include environment.raml 14 | displayName: Sandbox Environment 15 | description: Provides details around how OSv2 was used in Sandbox environments -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-benefits-strategy-payload-elk.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | event: { 6 | date: "2020-02-19T00:11:34.341-08:00", 7 | businessGroup: "Any", 8 | developAPIHistoricTime: 20, 9 | developAPICurrentTime: 4, 10 | maintainAPIHistoricTime: 20, 11 | maintainAPICurrentTime: 1, 12 | developerDayRate: 500 13 | }, 14 | loaderDetails: { 15 | strategy: "elk", 16 | rawData: "false", 17 | elk: { 18 | host: "https://myelk.com", 19 | port: "7000", 20 | user: "user", 21 | password: "123", 22 | platformMetricsIndex: "metrics", 23 | platformBenefitsIndex: "platform_benefits" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-collectors-from-props-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | var collectors = if (isEmpty(Mule::p("collectors"))) ["all"] else (((Mule::p("collectors") as String) replace /[ ]*,[ ]*/ with ",") splitBy ",") 4 | --- 5 | (if (collectors contains "all") 6 | ["ap","apc","apm","arm","core","dc","ex","amq","apma","ch","rtf","osv2"] 7 | else 8 | collectors) 9 | -- (if (vars.isPCE) ["ch","rtf","apma","amq"] else []) 10 | -- (if (vars.isGovCloud) ["rtf","apma","arm"] else []) 11 | -- (if (vars.authMode == 'connected-app-credentials') ["apc", "osv2"] else []) 12 | //-- (if (vars.authMode == 'connected-app-credentials') ["apc", "amq", "osv2"] else []) -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/runtime-manager/runtime-manager.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: Anypoint Runtime Manager (ARM) Datatype 3 | description: Models collected metrics from Runtime Manager 4 | properties: 5 | cloudhub: 6 | type: !include cloudhub/cloudhub.raml 7 | displayName: CloudHub 8 | description: Provides CloudHub related metrics 9 | rtf: 10 | type: !include runtime-fabric/runtime-fabric.raml 11 | displayName: Runtime Fabric 12 | description: Provides Runtime Fabric related metrics 13 | hybrid: 14 | type: !include hybrid/hybrid.raml 15 | displayName: Hybrid 16 | description: Provides Hybrid related metrics 17 | -------------------------------------------------------------------------------- /src/main/resources/dw/aggregation/build-sdlc-raw-data-response.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | var bitbucketData = payload[0].payload 4 | var confluenceData = payload[1].payload 5 | var jenkinsData = payload[2].payload 6 | var jiraData = payload[3].payload 7 | var splunkData = payload[4].payload 8 | var azureDevOpsData = payload[5].payload 9 | --- 10 | { 11 | date: vars.date, 12 | sdlcData : { 13 | bitbucketData: bitbucketData, 14 | confluenceData: confluenceData, 15 | jenkinsData: jenkinsData, 16 | jiraData: jiraData, 17 | splunkData: splunkData, 18 | azureDevOpsData: azureDevOpsData, 19 | errors: vars.errors 20 | } filterObject (!isEmpty($)) 21 | } 22 | -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-collectors-from-query-params-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | var collectors = if (isEmpty(attributes.queryParams.collectors)) ["all"] else (((attributes.queryParams.collectors as String) replace /[ ]*,[ ]*/ with ',') splitBy ",") 4 | --- 5 | (if (collectors contains "all") 6 | ["ap","apc","apm","arm","core","dc","ex","amq","apma","ch","rtf","osv2"] 7 | else 8 | collectors) 9 | -- (if (vars.isPCE) ["ch","rtf","apma","amq"] else []) 10 | -- (if (vars.isGovCloud) ["rtf","apma","arm"] else []) 11 | -- (if (vars.authMode == 'connected-app-credentials') ["apc", "osv2"] else []) 12 | //-- (if (vars.authMode == 'connected-app-credentials') ["apc", "amq", "osv2"] else []) -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-benefits-strategy-payload-splunk.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | event: { 6 | date: "2020-02-19T00:11:34.341-08:00", 7 | businessGroup: "Any", 8 | developAPIHistoricTime: 20, 9 | developAPICurrentTime: 4, 10 | maintainAPIHistoricTime: 20, 11 | maintainAPICurrentTime: 1, 12 | developerDayRate: 500 13 | }, 14 | loaderDetails: { 15 | strategy: 'splunk', 16 | rawData: "false", 17 | splunk: { 18 | host: "http://mysplunk.com", 19 | port: "8088", 20 | protocol: "HTTP", 21 | token: "123", 22 | platformMetricsIndex: "metrics", 23 | platformBenefitsIndex: "platform_benefits", 24 | source: "metrics_source", 25 | sourceType: "_json" 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-benefits-strategy-payload-sfdc.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | event: { 6 | date: "2020-02-19T00:11:34.341-08:00", 7 | businessGroup: "Any", 8 | developAPIHistoricTime: 20, 9 | developAPICurrentTime: 4, 10 | maintainAPIHistoricTime: 20, 11 | maintainAPICurrentTime: 1, 12 | developerDayRate: 500 13 | }, 14 | "loaderDetails": { 15 | "strategy": "sfdc", 16 | "rawData": "false", 17 | "sfdc": { 18 | "dataSetName" : "my_dataset", 19 | "appName": "my_data_app", 20 | "username": "test-user@salesforce.com", 21 | "password": "test-password123", 22 | "securityToken": "random-token-456" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/test/resources/dw/mock-loader-benefits-strategy-payload-splunk-https.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | --- 4 | { 5 | event: { 6 | date: "2020-02-19T00:11:34.341-08:00", 7 | businessGroup: "Any", 8 | developAPIHistoricTime: 20, 9 | developAPICurrentTime: 4, 10 | maintainAPIHistoricTime: 20, 11 | maintainAPICurrentTime: 1, 12 | developerDayRate: 500 13 | }, 14 | loaderDetails: { 15 | strategy: 'splunk', 16 | rawData: "false", 17 | splunk: { 18 | host: "https://mysplunk.com", 19 | port: "8088", 20 | protocol: "HTTPS", 21 | token: "123", 22 | platformMetricsIndex: "metrics", 23 | platformBenefitsIndex: "platform_benefits", 24 | source: "metrics_source", 25 | sourceType: "_json" 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/design-center.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: Anypoint Design Center Datatype 3 | description: This datatype models the metrics obtained from Design Center 4 | properties: 5 | total: 6 | type: integer 7 | displayName: Assets Total 8 | description: Count of total assets per BG 9 | apiSpecs: 10 | type: integer 11 | displayName: API Specs Total 12 | description: Count of total API specs per BG 13 | fragments: 14 | type: integer 15 | displayName: Fragments Total 16 | description: Count of total RAML fragments per BG 17 | flowDesignerApps: 18 | type: integer 19 | displayName: Flow Designer Apps Total 20 | description: Count of total Flow Designer applications per BG 21 | -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/coreservices/get-members-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "id": "be67d1dc-ecc8-41b3-8a6c-b947fddec498", 5 | "username": "mthemule", 6 | "firstName": "Max", 7 | "lastName": "Themule", 8 | "email": "Max.Themule@mulesoft.com", 9 | "organizationId": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 10 | "enabled": true, 11 | "idprovider_id": "https://sts.windows.net/ce6ec000-1cfa-49c2-a24f-7db63c8a9a52/:example-company-with-sso.anypoint.mulesoft.com", 12 | "createdAt": "2019-07-15T13:06:23.780Z", 13 | "updatedAt": "2019-12-04T15:36:15.126Z", 14 | "lastLogin": "2019-12-04T15:36:00.000Z", 15 | "type": "host" 16 | } 17 | ], 18 | "total": 1 19 | } -------------------------------------------------------------------------------- /mule-artifact.json: -------------------------------------------------------------------------------- 1 | { 2 | "minMuleVersion": "4.9.3", 3 | "javaSpecificationVersions": ["17"], 4 | "secureProperties": [ 5 | "auth.orgId", 6 | "auth.username", 7 | "auth.password", 8 | "auth.clientId", 9 | "auth.clientSecret", 10 | "ignoreLists.organizations", 11 | "ignoreLists.environments", 12 | "splunk.token", 13 | "elk.user", 14 | "elk.password", 15 | "mongodb.username", 16 | "mongodb.password", 17 | "sdlc.confluence.user", 18 | "sdlc.confluence.token", 19 | "sdlc.bitbucket.user", 20 | "sdlc.bitbucket.token", 21 | "sdlc.jira.user", 22 | "sdlc.jira.token", 23 | "sdlc.jenkins.user", 24 | "sdlc.jenkins.token", 25 | "sdlc.splunk.user", 26 | "sdlc.splunk.password", 27 | "sfdc.username", 28 | "sfdc.password", 29 | "sfdc.securityToken" 30 | ] 31 | } -------------------------------------------------------------------------------- /src/main/resources/dw/anypoint/mq-aggregate-metrics-per-region.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | var regionPayload = payload.payload 4 | --- 5 | { 6 | id: vars.regionId, 7 | queues: { 8 | commonQueues: vars.mqDestinations.queues, 9 | fifoQueues: vars.mqDestinations.fifoQueues, 10 | messagesInFlight: sum(regionPayload.messagesInFlight default [0]), 11 | messagesSent: sum(regionPayload.messagesSent default [0]), 12 | messagesReceived: sum(regionPayload.messagesReceived default [0]), 13 | messagesAck: sum(regionPayload.messagesAck default [0]) 14 | }, 15 | exchanges: { 16 | exchangeQueues: vars.mqDestinations.exchanges, 17 | messagesPublished: sum(regionPayload.messagesPublished default [0]), 18 | messagesDelivered: sum(regionPayload.messageDelivered default [0]) 19 | } 20 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/apimanager/get-api-policies-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "policies":[ 3 | { 4 | "policyTemplateId":"2493", 5 | "order":1, 6 | "pointcutData":null, 7 | "type":"system", 8 | "policyId":489122, 9 | "configuration":{ 10 | "credentialsOriginHasHttpBasicAuthenticationHeader":"customExpression", 11 | "clientIdExpression":"#[attributes.headers['client_id']]", 12 | "clientSecretExpression":"#[attributes.headers['client_secret']]" 13 | }, 14 | "template":{ 15 | "groupId":"68ef9520-24e9-4cf2-b2f5-620025690913", 16 | "assetId":"client-id-enforcement", 17 | "assetVersion":"1.1.3" 18 | }, 19 | "version":1550696066519 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/designcenter/get-projects-response.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "createdBy":"db03bc38-164e-4786-8f6d-ac35e596610c", 4 | "createdDate":1535135653097, 5 | "deleted":false, 6 | "externalUri":"/var/lib/anypoint-vcs/projects/977baaaa-36ba-4021-84d5-45bae78e0ee2/raml/proc-test-api/08d04dc9-f9ed-44dd-8ac4-c20737123134", 7 | "externalUriSchema":"FILE", 8 | "id":"08d04dc9-f9ed-44dd-8ac4-c20737123134", 9 | "lastBackupDate":1566529353362, 10 | "lastUpdatedDate":1566529352363, 11 | "name":"proc-test-api", 12 | "organizationId":"977baaaa-36ba-4021-84d5-45bae78e0ee2", 13 | "product":"designcenter", 14 | "storageId":"08d04dc9-f9ed-44dd-8ac4-c20737123134", 15 | "type":"raml", 16 | "vcsStorageType":"GIT_INTERNAL", 17 | "vcsType":"GIT", 18 | "version":790 19 | } 20 | ] -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-mcp-tool-getPlatformMetricsByCollectorCore.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "id": "158ed7b1-895a-410e-b5aa-92ade31c4e9f", 4 | "result": { 5 | "content": [ 6 | { 7 | "type": "text", 8 | "audience": [ 9 | 10 | ], 11 | "text": "[\n {\n \"businessGroup\": \"Fantasy Company\",\n \"businessGroupId\": \"877baaaa-36ba-4021-82d5-45bae78e0fe2\",\n \"coreServicesMetrics\": {\n \"users\": {\n \"total\": 1,\n \"activeMembers\": 1,\n \"inactiveMembers\": 0,\n \"activeMembersLast60Days\": 0,\n \"activeMembersLast30Days\": 0\n },\n \"environments\": {\n \"total\": 4,\n \"production\": 1,\n \"sandbox\": 3\n }\n }\n }\n]" 12 | } 13 | ], 14 | "isError": false 15 | } 16 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-mcp-tool-getPlatformMetricsByKey.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "id": "158ed7b1-895a-410e-b5aa-92ade31c4e9f", 4 | "result": { 5 | "content": [ 6 | { 7 | "type": "text", 8 | "audience": [ 9 | 10 | ], 11 | "text": "[\n {\n \"businessGroup\": \"Fantasy Company\",\n \"businessGroupId\": \"877baaaa-36ba-4021-82d5-45bae78e0fe2\",\n \"cloudhub\": {\n \"networking\": {\n \"vpcsTotal\": 4,\n \"vpcsAvailable\": 4,\n \"vpcsUsed\": null,\n \"vpnsTotal\": 6,\n \"vpnsAvailable\": 6,\n \"vpnsUsed\": null,\n \"dlbsTotal\": 4,\n \"dlbsAvailable\": 4,\n \"dlbsUsed\": null,\n \"staticIPsTotal\": 26,\n \"staticIPsAvailable\": 26,\n \"staticIPsUsed\": null\n }\n }\n }\n]" 12 | } 13 | ], 14 | "isError": false 15 | } 16 | } -------------------------------------------------------------------------------- /src/test/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/resources/api/traits/platform-auth.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 Trait 2 | displayName: Platform User Authentication Headers 3 | description: Authentication headers for plaform users. If password contains special characters, use base64 encoding. 4 | headers: 5 | X-ANYPNT-USERNAME: 6 | description: | 7 | Receives the username used to login to Anypoint Platform. 8 | type: string 9 | required: false 10 | X-ANYPNT-PASSWORD: 11 | description: | 12 | Receives a plain text or Base64-encoded password used to login to Anypoint Platform. Use Base64-encoding if password contains special characters not allowed in headers. 13 | type: string 14 | required: false 15 | X-PLAINTEXT-PASSWORD: 16 | description: | 17 | Identifies if the password header is to be provided in plain text (true) or base64 encode (false). If not provided, base64 encoded is assumed. 18 | type: boolean 19 | required: false 20 | default: false 21 | -------------------------------------------------------------------------------- /src/main/resources/weave/autogenerated/8ed3bf31-4e7e-4247-81e3-b0810196b42c/Input-Attributes.wev: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | 3 | type auto_8ed3bf31_4e7e_4247_81e3_b0810196b42c_Input_Attributes = {| 4 | clientCertificate?: {| 5 | publicKey?: {| |}, 6 | "type"?: String, 7 | encoded?: Binary 8 | |}, 9 | headers: {| 10 | "X-ANYPNT-ORG-ID": String, 11 | "X-ANYPNT-CLIENT-ID"?: String, 12 | "X-ANYPNT-CLIENT-SECRET"?: String, 13 | "X-ANYPNT-USERNAME"?: String, 14 | "X-ANYPNT-PASSWORD"?: String, 15 | "X-PLAINTEXT-PASSWORD"?: Boolean 16 | |}, 17 | listenerPath: String, 18 | method: String, 19 | queryParams: {| 20 | collectors?: String, 21 | raw: Boolean 22 | |}, 23 | queryString: String, 24 | relativePath: String, 25 | remoteAddress: String, 26 | requestPath: String, 27 | requestUri: String, 28 | scheme: String, 29 | uriParams: {| |}, 30 | version: String, 31 | localAddress: String 32 | |} 33 | 34 | -------------------------------------------------------------------------------- /src/main/resources/dw/mcp/map-params-to-attributes.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | 4 | var mappings = [ 5 | { 6 | sourceField: "collector", 7 | targetField: "collectors", 8 | targetType: "queryParams" 9 | }, 10 | { 11 | sourceField: "bg", 12 | targetField: "x-anypnt-org-id", 13 | targetType: "headers" 14 | }, 15 | { 16 | sourceField: "raw", 17 | targetField: "raw", 18 | targetType: "queryParams" 19 | } 20 | ] 21 | 22 | fun buildMapFor(targetType: String) = 23 | ( 24 | ((mappings filter (m) -> m.targetType == targetType) filter (m) -> payload[m.sourceField] != null) 25 | map (m) -> { 26 | (m.targetField): payload[m.sourceField] 27 | } 28 | ) 29 | reduce (acc = {}, item) -> acc ++ item 30 | 31 | --- 32 | { 33 | headers: attributes.additionalProperties default {} ++ buildMapFor("headers"), 34 | queryParams: attributes.queryParams default {} ++ buildMapFor("queryParams") 35 | } 36 | -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-get-sdlc-metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "date": "2021-02-21T00:17:54.598-08:00", 3 | "sdlcMetrics": { 4 | "bitBucketMetrics": { 5 | "totalRepositories": 1 6 | }, 7 | "confluenceMetrics": { 8 | "totalPages": 0, 9 | "totalPagesCreatedInLast30Days": 0, 10 | "totalPagesUpdatedInLast30Days": 0, 11 | "topContributorsInLast30Days": { 12 | 13 | } 14 | }, 15 | "jenkinsMetrics": { 16 | "totalJobs": null, 17 | "totalFailedJobs": null, 18 | "totalSuccessJobs": null, 19 | "totalUnexecutedJobs": null 20 | }, 21 | "jiraMetrics": { 22 | "totalJiraTasksInBacklog": 6, 23 | "totalJiraTasksInSprint": 6, 24 | "totalJiraTasksByType": { 25 | "Sub-task": 1, 26 | "Task": 1 27 | }, 28 | "totalJiraTasksByStatus": null 29 | }, 30 | "splunkMetrics": { 31 | "totalDashboards": [ 32 | 33 | ] 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/resources/api/examples/collectors/responses/get-sdlc-metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "date": "2021-02-21T00:17:54.598-08:00", 3 | "sdlcMetrics": { 4 | "bitBucketMetrics": { 5 | "totalRepositories": 1 6 | }, 7 | "confluenceMetrics": { 8 | "totalPages": 0, 9 | "totalPagesCreatedInLast30Days": 0, 10 | "totalPagesUpdatedInLast30Days": 0, 11 | "topContributorsInLast30Days": { 12 | 13 | } 14 | }, 15 | "jenkinsMetrics": { 16 | "totalJobs": null, 17 | "totalFailedJobs": null, 18 | "totalSuccessJobs": null, 19 | "totalUnexecutedJobs": null 20 | }, 21 | "jiraMetrics": { 22 | "totalJiraTasksInBacklog": 6, 23 | "totalJiraTasksInSprint": 6, 24 | "totalJiraTasksByType": { 25 | "Task": 1, 26 | "Sub-task": 1 27 | }, 28 | "totalJiraTasksByStatus": null 29 | }, 30 | "splunkMetrics": { 31 | "totalDashboards": [ 32 | 33 | ] 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/resources/api/data-types/loaders/responses/platform-benefits.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: Platform Benefits Loader response Datatype 3 | description: Models the response when sending an event 4 | properties: 5 | message: 6 | displayName: Message 7 | description: Provides details of the execution 8 | errors: 9 | displayName: Errors Array 10 | description: Provides an array of errors captured during the loading 11 | type: array 12 | required: false 13 | items: 14 | properties: 15 | businessGroup: 16 | displayName: BusinessGroup Name 17 | description: Provides the BusinessGroup Name 18 | type: string 19 | errors: 20 | type: array 21 | displayName: Errors Array 22 | description: Provides an array of errors captured during the loading, by BG 23 | required: false 24 | items: string 25 | example: !include ../../../examples/loaders/responses/post-benefits-metrics.json 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/arm/get-deployments-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "total":2, 3 | "items":[ 4 | { 5 | "id":"3894758", 6 | "name":"proc-expense-management-api", 7 | "creationDate":1568826384055, 8 | "lastModifiedDate":1574816430736, 9 | "target":{ 10 | "provider":"RR", 11 | "targetId":"1734799" 12 | }, 13 | "status":"STOPPED", 14 | "application":{ 15 | "status":"NOT_RUNNING" 16 | } 17 | }, 18 | { 19 | "id":"da0c6a37-ebb7-11e9-9b0e-058ff88b1753", 20 | "name":"sys-journals-api", 21 | "creationDate":1570751048130, 22 | "lastModifiedDate":1575275404284, 23 | "target":{ 24 | "provider":"MC", 25 | "targetId":"ec9d123f-4587-4f07-bd90-5bcdf321135f" 26 | }, 27 | "status":"APPLIED", 28 | "application":{ 29 | "status":"RUNNING" 30 | } 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/object-store-v2/environment.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | 3 | properties: 4 | requestCount: 5 | type: integer 6 | displayName: Request Count 7 | description: Aggregated Request count by environment type 8 | details: 9 | type: array 10 | displayName: Details 11 | description: Detailed view of the requests performed 12 | items: 13 | properties: 14 | environmentName: 15 | type: string 16 | displayName: Environment Name 17 | description: Name of the environment as defined in Anypoint Platform 18 | environmentType: 19 | type: string 20 | enum: 21 | - Sandbox 22 | - Production 23 | - Design 24 | displayName: Environment Type 25 | description: Type of Anypoint Platform environment which the OSv2 was assocciated to 26 | requestCount: 27 | type: integer 28 | displayName: Request Count 29 | description: Request count by environment -------------------------------------------------------------------------------- /src/main/resources/api/examples/collectors/object-store-v2/object-store-v2-metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "stats": { 3 | "production": { 4 | "requestCount": 104027, 5 | "details": [ 6 | { 7 | "environmentName": "Production", 8 | "environmentType": "Production", 9 | "requestCount": 104027 10 | } 11 | ] 12 | }, 13 | "sandbox": { 14 | "requestCount": 312081, 15 | "details":[ 16 | { 17 | "environmentName": "Development", 18 | "environmentType": "Sandbox", 19 | "requestCount": 104027 20 | }, 21 | { 22 | "environmentName": "Staging", 23 | "environmentType": "Sandbox", 24 | "requestCount": 104027 25 | }, 26 | { 27 | "environmentName": "Test", 28 | "environmentType": "Sandbox", 29 | "requestCount": 104027 30 | } 31 | ] 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-mcp-tool-getPlatformMetricsByCollectorEx.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "id": "158ed7b1-895a-410e-b5aa-92ade31c4e9f", 4 | "result": { 5 | "content": [ 6 | { 7 | "type": "text", 8 | "audience": [ 9 | 10 | ], 11 | "text": "[\n {\n \"businessGroup\": \"Fantasy Company\",\n \"businessGroupId\": \"877baaaa-36ba-4021-82d5-45bae78e0fe2\",\n \"exchangeMetrics\": {\n \"total\": 3,\n \"apiSpecs\": 2,\n \"fragments\": 1,\n \"proxies\": 0,\n \"soapApis\": 0,\n \"policies\": 0,\n \"mule3Connectors\": 0,\n \"extensions\": 0,\n \"applications\": 0,\n \"custom\": 0,\n \"overallSatisfaction\": 0,\n \"reuse\": {\n \"fragments\": 2,\n \"implementedApis\": 0,\n \"managedSboxApis\": 0,\n \"managedProdApis\": 0,\n \"extensions\": 0,\n \"appliedPoliciesSbox\": 0,\n \"appliedPoliciesProd\": 0\n }\n }\n }\n]" 12 | } 13 | ], 14 | "isError": false 15 | } 16 | } -------------------------------------------------------------------------------- /src/main/resources/api/traits/collectors.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 Trait 2 | queryParameters: 3 | collectors: 4 | description: | 5 | Comma separated set of collectors that should be executed. Possible values are: 6 | 7 | Available for all deployment models: 8 | - ap: Automated Policies 9 | - apc: API Clients 10 | - apm: API Manager 11 | - arm: Runtime Manager 12 | - core: Core Services 13 | - dc: Design Center 14 | - ex: Exchange 15 | 16 | Not available for PCE deployment model: 17 | - amq: Anypoint MQ 18 | - apma: API Manager Analytics 19 | - ch: Cloudhub 20 | - rtf: Runtime Fabric 21 | default: all 22 | required: false 23 | type: string 24 | pattern: ^all|([ap|apc|apm|arm|core|dc|ex|amq|apma|ch|rtf]+([,[ap|apc|apm|arm|core|dc|ex|amq|apma|ch|rtf]])*)$ -------------------------------------------------------------------------------- /src/main/mule/collectors/anypoint/platform/collector-commons.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 10 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ # 2 | # Java defaults (https://github.com/github/gitignore/blob/master/Java.gitignore) # 3 | # ------------------------------------------------------------------------------ # 4 | *.class 5 | 6 | # Package Files # 7 | *.jar 8 | *.war 9 | *.ear 10 | 11 | # ------------------------------------------------------------------------------------------- # 12 | # Eclipse-specific (https://github.com/github/gitignore/blob/master/Global/Eclipse.gitignore) # 13 | # ------------------------------------------------------------------------------------------- # 14 | *.pydevproject 15 | .metadata 16 | bin/** 17 | tmp/** 18 | tmp/**/* 19 | *.tmp 20 | *.bak 21 | *.swp 22 | *~.nib 23 | *app-local.yaml 24 | .settings/ 25 | .loadpath 26 | .project 27 | .classpath 28 | reports/* 29 | 30 | # External tool builders 31 | .externalToolBuilders/ 32 | 33 | # Locally stored "Eclipse launch configurations" 34 | *.launch 35 | 36 | # CDT-specific 37 | .cproject 38 | 39 | # PDT-specific 40 | .buildpath 41 | 42 | # --------------- # 43 | # Studio-specific # 44 | # --------------- # 45 | target/ 46 | .mule/** 47 | .mule/**/* 48 | .DS_Store 49 | velocity.log -------------------------------------------------------------------------------- /src/main/mule/collectors/anypoint/platform/collector-runtime-fabric.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/api-manager/api-manager.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: Anypoint API Manager (APM) Datatype 3 | description: Models collected metrics from API Manager 4 | properties: 5 | clients: 6 | type: integer 7 | displayName: Clients total 8 | description: Numbers of total clients per BG and Environment type 9 | apis: 10 | type: object 11 | properties: 12 | production: 13 | type: !include environment.raml 14 | displayName: Production 15 | description: Provides information about Production environments 16 | properties: 17 | details: 18 | type: array 19 | items: !include environment.raml 20 | displayName: Details 21 | description: Provides details by specific Production environments 22 | sandbox: 23 | type: !include environment.raml 24 | displayName: Sandbox 25 | description: Provides information about Sanbox environments 26 | properties: 27 | details: 28 | type: array 29 | items: !include environment.raml 30 | displayName: Details 31 | description: Provides details by specific Sandbox environments -------------------------------------------------------------------------------- /src/main/mule/collectors/anypoint/platform/collector-design-center.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /postman/environment_template.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "895c16d3-7559-4c95-8cbb-727d7d104b23", 3 | "name": "Metrics Toolkit - Template", 4 | "values": [ 5 | { 6 | "key": "url", 7 | "value": "http://localhost:8081", 8 | "enabled": true 9 | }, 10 | { 11 | "key": "anypointOrg", 12 | "value": "", 13 | "type": "default", 14 | "enabled": true 15 | }, 16 | { 17 | "key": "credentialType", 18 | "value": "", 19 | "type": "default", 20 | "enabled": true 21 | }, 22 | { 23 | "key": "anypointUsername", 24 | "value": "", 25 | "type": "default", 26 | "enabled": true 27 | }, 28 | { 29 | "key": "anypointPassword", 30 | "value": "", 31 | "type": "default", 32 | "enabled": true 33 | }, 34 | { 35 | "key": "isPlaintextSecret", 36 | "value": "", 37 | "type": "default", 38 | "enabled": true 39 | }, 40 | { 41 | "key": "connectedAppId", 42 | "value": "", 43 | "type": "default", 44 | "enabled": true 45 | }, 46 | { 47 | "key": "connectedAppSecret", 48 | "value": "", 49 | "type": "default", 50 | "enabled": true 51 | } 52 | ], 53 | "_postman_variable_scope": "environment", 54 | "_postman_exported_at": "2022-01-28T15:48:03.890Z", 55 | "_postman_exported_using": "Postman/9.10.1" 56 | } -------------------------------------------------------------------------------- /src/main/mule/collectors/anypoint/platform/collector-api-platform.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/dw/loader/modules/loaderBenefitsBasicStructure.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | var benefits = "Platform Benefits" 3 | var envNA = "NA" 4 | --- 5 | flatten (payload map ((event, eventIndex) -> ([ 6 | 7 | { 8 | name: "Developers Productivity", value: event.developerProductivity, 9 | businessGroup: event.businessGroup, date: event.date, group: benefits, environmentType: envNA 10 | }, 11 | { 12 | name: "Savings from API Reuse", value: event.savingFromAPIReuse, 13 | businessGroup: event.businessGroup, date: event.date, group: benefits, environmentType: envNA 14 | }, 15 | { 16 | name: "Savings from Maintenance Productivity", value: event.savingFromMaintenanceProductivity, 17 | businessGroup: event.businessGroup, date: event.date, group: benefits, environmentType: envNA 18 | }, 19 | { 20 | name: "Savings from Reuse in Maintenance", value: event.savingFromReuseInMaintenance, 21 | businessGroup: event.businessGroup, date: event.date, group: benefits, environmentType: envNA 22 | }, 23 | { 24 | name: "Total Savings", value: event.totalSavings, 25 | businessGroup: event.businessGroup, date: event.date, group: benefits, environmentType: envNA 26 | } 27 | ]) 28 | )) -------------------------------------------------------------------------------- /UNLICENSE.md: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | Anyone is free to copy, modify, publish, use, compile, sell, or 3 | distribute this software, either in source code form or as a compiled 4 | binary, for any purpose, commercial or non-commercial, and by any 5 | means. 6 | 7 | In jurisdictions that recognize copyright laws, the author or authors 8 | of this software dedicate any and all copyright interest in the 9 | software to the public domain. We make this dedication for the benefit 10 | of the public at large and to the detriment of our heirs and 11 | successors. We intend this dedication to be an overt act of 12 | relinquishment in perpetuity of all present and future rights to this 13 | software under copyright law. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 19 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21 | OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | For more information, please refer to http://unlicense.org/ -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-post-platform-benefits-json.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Developers Productivity", 4 | "value": 500.0, 5 | "businessGroup": "Fantasy Company", 6 | "date": "2021-02-20T21:27:52.892-08:00", 7 | "group": "Platform Benefits", 8 | "environmentType": "NA" 9 | }, 10 | { 11 | "name": "Savings from API Reuse", 12 | "value": 0, 13 | "businessGroup": "Fantasy Company", 14 | "date": "2021-02-20T21:27:52.892-08:00", 15 | "group": "Platform Benefits", 16 | "environmentType": "NA" 17 | }, 18 | { 19 | "name": "Savings from Maintenance Productivity", 20 | "value": 19000, 21 | "businessGroup": "Fantasy Company", 22 | "date": "2021-02-20T21:27:52.892-08:00", 23 | "group": "Platform Benefits", 24 | "environmentType": "NA" 25 | }, 26 | { 27 | "name": "Savings from Reuse in Maintenance", 28 | "value": 0, 29 | "businessGroup": "Fantasy Company", 30 | "date": "2021-02-20T21:27:52.892-08:00", 31 | "group": "Platform Benefits", 32 | "environmentType": "NA" 33 | }, 34 | { 35 | "name": "Total Savings", 36 | "value": 19000, 37 | "businessGroup": "Fantasy Company", 38 | "date": "2021-02-20T21:27:52.892-08:00", 39 | "group": "Platform Benefits", 40 | "environmentType": "NA" 41 | } 42 | ] -------------------------------------------------------------------------------- /src/main/resources/api/data-types/loaders/tableau.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: Tableau Loader Strategy 3 | description: Models a Tableau Loader Strategy 4 | properties: 5 | collectors: 6 | description: | 7 | Comma separated set of collectors that should be executed. Possible values are: 8 | 9 | Available for all deployment models: 10 | - ap: Automated Policies 11 | - apc: API Clients 12 | - apm: API Manager 13 | - arm: Runtime Manager 14 | - core: Core Services 15 | - dc: Design Center 16 | - ex: Exchange 17 | 18 | Not available for PCE deployment model: 19 | - amq: Anypoint MQ 20 | - apma: API Manager Analytics 21 | - ch: Cloudhub 22 | - rtf: Runtime Fabric 23 | type: array 24 | items: string 25 | default: ["all"] 26 | required: false 27 | loaderDetails: 28 | type: object 29 | properties: 30 | strategy: 31 | type: string 32 | rawData: 33 | type: string 34 | outputDir: 35 | type: string 36 | example: !include ../../examples/loaders/tableau.json -------------------------------------------------------------------------------- /src/main/resources/dw/mcp/response-filter-metrics-by-collector.dwl: -------------------------------------------------------------------------------- 1 | output json indent=false 2 | --- 3 | payload map ((item, index) -> 4 | { 5 | "date": item.date, 6 | "businessGroup": item.businessGroup, 7 | "businessGroupId": item.businessGroupId, 8 | (mqMetrics: item.mqMetrics) if(vars.rpcCollector == "amq"), 9 | (apiManagerMetrics: item.apiManagerMetrics) if(vars.rpcCollector == "apm"), 10 | (apiManagerMetrics: { clients: item.apiManagerMetrics.clients}) if(vars.rpcCollector == "apc"), 11 | (runtimeManagerMetrics: item.runtimeManagerMetrics) if(vars.rpcCollector == "arm"), 12 | (runtimeManagerMetrics: { cloudhub: item.runtimeManagerMetrics.cloudhub }) if(vars.rpcCollector == "ch"), 13 | (coreServicesMetrics: item.coreServicesMetrics) if(vars.rpcCollector == "core"), 14 | (designCenterMetrics: item.designCenterMetrics) if(vars.rpcCollector == "dc"), 15 | (exchangeMetrics: item.exchangeMetrics) if(vars.rpcCollector == "ex"), 16 | (osV2Metrics: item.osV2Metrics) if(vars.rpcCollector == "osv2"), 17 | (rtf: item.rtf) if(vars.rpcCollector == "rtf"), 18 | (notImplemented: "Collector Not Implemented") if(vars.rpcCollector == "ap"), 19 | (notImplemented: "Collector Not Implemented") if(vars.rpcCollector == "apma") 20 | }) -------------------------------------------------------------------------------- /src/test/resources/examples/responses/response-get-sdlc-metrics-errors.json: -------------------------------------------------------------------------------- 1 | { 2 | "date": "2021-02-21T01:50:30.776-08:00", 3 | "sdlcMetrics": { 4 | "bitBucketMetrics": { 5 | "totalRepositories": null 6 | }, 7 | "confluenceMetrics": { 8 | "totalPages": null, 9 | "totalPagesCreatedInLast30Days": null, 10 | "totalPagesUpdatedInLast30Days": null, 11 | "topContributorsInLast30Days": null 12 | }, 13 | "jenkinsMetrics": { 14 | "totalJobs": null, 15 | "totalFailedJobs": null, 16 | "totalSuccessJobs": null, 17 | "totalUnexecutedJobs": null 18 | }, 19 | "jiraMetrics": { 20 | "totalJiraTasksInBacklog": null, 21 | "totalJiraTasksInSprint": null, 22 | "totalJiraTasksByType": null, 23 | "totalJiraTasksByStatus": null 24 | }, 25 | "splunkMetrics": { 26 | "totalDashboards": [ 27 | 28 | ] 29 | }, 30 | "errors": [ 31 | "", 32 | [ 33 | "" 34 | ], 35 | [ 36 | "" 37 | ], 38 | [ 39 | "Error(s) were found for route(s):\n\tRoute 0: org.mule.runtime.core.internal.processor.interceptor.InterceptionException: \n\tRoute 1: org.mule.runtime.core.internal.processor.interceptor.InterceptionException: " 40 | ], 41 | [ 42 | "" 43 | ] 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /src/main/mule/sources/external/systems/apis/api-call-jenkins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/mule/sources/external/systems/apis/api-call-bitbucket.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.github/app-dev.yaml: -------------------------------------------------------------------------------- 1 | auth: 2 | 3 | orgId: "[ENTER ORG ID]" 4 | 5 | # If auth mode = platform-credentials (ignored, otherwise): 6 | username: "[ENTER USERNAME]" 7 | password: "[ENTER PASSWORD]" 8 | 9 | # If auth mode = connected-app-credentials (ignored, otherwise): 10 | clientId: "[ENTER CLIENT ID]" 11 | clientSecret: "[ENTER SECRET]" 12 | 13 | ignoreLists: 14 | organizations: "" #Array: comma-separated values 'orgId1,orgId2' 15 | environments: "" #Array: comma-separated values 'envId1,envId2' 16 | 17 | splunk: 18 | token: "[ENTER SPLUNK TOKEN]" 19 | 20 | elk: 21 | user: "[ENTER USERNAME]" 22 | password: "[ENTER PASSWORD]" 23 | 24 | mongodb: 25 | username: "[ENTER USERNAME]" 26 | password: "[ENTER PASSWORD]" 27 | 28 | # SDLC Metrics 29 | sdlc: 30 | confluence: 31 | user: "[ENTER USER]" 32 | token: "[ENTER TOKEN]" 33 | bitbucket: 34 | user: "[ENTER USER]" 35 | token: "[ENTER TOKEN]" 36 | jira: 37 | user: "[ENTER USER]" 38 | token: "[ENTER TOKEN]" 39 | jenkins: 40 | user: "[ENTER USER]" 41 | token: "[ENTER TOKEN]" 42 | splunk: 43 | user: "[ENTER USER]" 44 | password: "[ENTER PASSWORD]" 45 | azuredevops: 46 | token: "[ENTER TOKEN]" 47 | 48 | sfdc: 49 | username : "[ENTER USER]" 50 | password : "[ENTER PASSWORD]" 51 | securityToken : "[ENTER TOKEN]" 52 | # authUrl : "" 53 | -------------------------------------------------------------------------------- /src/main/resources/properties/secure/_template.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # IMPORTANT! 3 | # Copy this file and rename it according to your environment: e.g. for the 'dev' environment copy this to `app-dev.yaml`. 4 | # Provide values as secure properties eg: "![abcacbabcabc]" 5 | # https://docs.mulesoft.com/mule-runtime/latest/secure-configuration-properties 6 | # 7 | 8 | 9 | auth: 10 | orgId: "" 11 | 12 | # If auth mode = platform-credentials (ignored, otherwise): 13 | username: "" 14 | password: "" 15 | 16 | # If auth mode = connected-app-credentials (ignored, otherwise): 17 | clientId: "" 18 | clientSecret: "" 19 | 20 | ignoreLists: 21 | organizations: "" #Array: comma-separated values 'orgId1,orgId2' 22 | environments: "" #Array: comma-separated values 'envId1,envId2' 23 | 24 | splunk: 25 | token: "" 26 | 27 | elk: 28 | user: "" 29 | password: "" 30 | 31 | mongodb: 32 | username: "" 33 | password: "" 34 | 35 | # SDLC Metrics 36 | sdlc: 37 | confluence: 38 | user: "" 39 | token: "" 40 | bitbucket: 41 | user: "" 42 | token: "" 43 | jira: 44 | user: "" 45 | token: "" 46 | jenkins: 47 | user: "" 48 | token: "" 49 | splunk: 50 | user: "" 51 | password: "" 52 | azuredevops: 53 | token: "" 54 | 55 | sfdc: 56 | username : "" 57 | password : "" 58 | securityToken : "" 59 | # authUrl : "" 60 | -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/runtime-manager/cloudhub/environment.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | properties: 3 | vcoresTotal: 4 | type: integer 5 | displayName: vCores Total 6 | description: Total vCores per BG and Environment 7 | vcoresAvailable: 8 | type: number 9 | displayName: vCores Available Total 10 | description: Total available vCores per BG and Environment 11 | vcoresUsed: 12 | type: number 13 | displayName: vCores Used Total 14 | description: Total used vCores per BG and Environment 15 | applicationsTotal: 16 | type: integer 17 | displayName: Applications Total 18 | description: Total applications deployed per BG and Environment 19 | applicationsStarted: 20 | type: integer 21 | displayName: Applications Started Total 22 | description: Total applications with 'Started' status per BG and Environment 23 | applicationsStopped: 24 | type: integer 25 | displayName: Applications Stopped Total 26 | description: Total applications with 'Stopped' status per BG and Environment 27 | runtimesUsed: 28 | type: array 29 | items: string 30 | displayName: Runtime Versions Used 31 | description: List of Runtime versions used per BG and Environment 32 | runtimesUsedTotal: 33 | type: integer 34 | displayName: Runtime Versions Used Total 35 | description: Count of Runtime versions used per BG and Environment -------------------------------------------------------------------------------- /src/main/resources/api/data-types/loaders/common.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: Common Loader Strategy 3 | description: Models a Common Loader Strategy, like json or csv 4 | properties: 5 | collectors: 6 | description: | 7 | Comma separated set of collectors that should be executed. Possible values are: 8 | 9 | Available for all deployment models: 10 | - ap: Automated Policies 11 | - apc: API Clients 12 | - apm: API Manager 13 | - arm: Runtime Manager 14 | - core: Core Services 15 | - dc: Design Center 16 | - ex: Exchange 17 | 18 | Not available for PCE deployment model: 19 | - amq: Anypoint MQ 20 | - apma: API Manager Analytics 21 | - ch: Cloudhub 22 | - rtf: Runtime Fabric 23 | type: array 24 | items: string 25 | default: ["all"] 26 | required: false 27 | loaderDetails: 28 | type: object 29 | properties: 30 | strategy: 31 | type: string 32 | rawData: 33 | type: string 34 | required: false 35 | examples: 36 | json: !include ../../examples/loaders/json.json 37 | csv: !include ../../examples/loaders/csv.json 38 | am: !include ../../examples/loaders/am.json 39 | mongodb: !include ../../examples/loaders/mongodb.json -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/mq/get-regions-response.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "regionId": "us-east-1", 4 | "regionName": "US East (N. Virginia)", 5 | "serviceUrl": "https://mq-us-east-1.anypoint.mulesoft.com/api/v1", 6 | "fifoAvailable": true 7 | }, 8 | { 9 | "regionId": "us-west-2", 10 | "regionName": "US West (Oregon)", 11 | "serviceUrl": "https://mq-us-west-2.anypoint.mulesoft.com/api/v1", 12 | "fifoAvailable": true 13 | }, 14 | { 15 | "regionId": "ca-central-1", 16 | "regionName": "Canada (Central)", 17 | "serviceUrl": "https://mq-ca-central-1.anypoint.mulesoft.com/api/v1", 18 | "fifoAvailable": true 19 | }, 20 | { 21 | "regionId": "eu-west-1", 22 | "regionName": "EU (Ireland)", 23 | "serviceUrl": "https://mq-eu-west-1.anypoint.mulesoft.com/api/v1", 24 | "fifoAvailable": true 25 | }, 26 | { 27 | "regionId": "eu-west-2", 28 | "regionName": "EU (London)", 29 | "serviceUrl": "https://mq-eu-west-2.anypoint.mulesoft.com/api/v1", 30 | "fifoAvailable": true 31 | }, 32 | { 33 | "regionId": "ap-southeast-1", 34 | "regionName": "Asia Pacific (Singapore)", 35 | "serviceUrl": "https://mq-ap-southeast-1.anypoint.mulesoft.com/api/v1", 36 | "fifoAvailable": true 37 | }, 38 | { 39 | "regionId": "ap-southeast-2", 40 | "regionName": "Asia Pacific (Sydney)", 41 | "serviceUrl": "https://mq-ap-southeast-2.anypoint.mulesoft.com/api/v1", 42 | "fifoAvailable": true 43 | } 44 | ] -------------------------------------------------------------------------------- /src/main/resources/dw/common/set-loader-details-from-props-var.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/java 3 | var strategy = p('loader.strategy') 4 | --- 5 | { 6 | strategy: strategy, 7 | rawData: p('aggregation.raw'), 8 | (strategy match { 9 | case "splunk" -> splunk: { 10 | host: p('splunk.host'), 11 | port: p('splunk.port'), 12 | protocol: p('splunk.protocol'), 13 | token: p('secure::splunk.token'), 14 | platformMetricsIndex: p('splunk.index.metrics'), 15 | platformBenefitsIndex: p('splunk.index.benefits'), 16 | source: p('splunk.source'), 17 | sourceType: p('splunk.source.type') 18 | } 19 | case "tableau" -> tableau: { 20 | outputDir: p('tableau.outputDir') 21 | } 22 | case "elk" -> elk: { 23 | host: p('elk.host'), 24 | port: p('elk.port'), 25 | user: p('secure::elk.user'), 26 | password: p('secure::elk.password'), 27 | platformMetricsIndex: p('elk.index.metrics'), 28 | platformBenefitsIndex: p('elk.index.benefits'), 29 | } 30 | case "sfdc" -> sfdc: { 31 | username: p('secure::sfdc.username'), 32 | password: p('secure::sfdc.password'), 33 | securityToken: p('secure::sfdc.securityToken'), 34 | authUrl: p('sfdc.authUrl') default "https://login.salesforce.com/services/Soap/u/50.0", 35 | dataSetName: p('sfdc.dataSetName'), 36 | appName: p('sfdc.appName'), 37 | sendNotification: p('sfdc.sendNotification'), 38 | notificationEmail: p('sfdc.notificationEmail') 39 | } 40 | else -> {} 41 | }) 42 | } -------------------------------------------------------------------------------- /src/main/resources/sfdc/sfdc_sdlc_metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileFormat": { 3 | "charsetName": "UTF-8", 4 | "fieldsDelimitedBy": ",", 5 | "linesTerminatedBy": "\n" 6 | }, 7 | "objects": [ 8 | { 9 | "connector": "CSV", 10 | "fullyQualifiedName": "sfdc_metrics", 11 | "label": "sfdc_metrics.csv", 12 | "name": "sfdc_metrics_csv", 13 | "fields": [ 14 | { 15 | "fullyQualifiedName": "name", 16 | "name": "name", 17 | "type": "Text", 18 | "label": "name" 19 | }, 20 | { 21 | "fullyQualifiedName": "value", 22 | "name": "value", 23 | "type": "Text", 24 | "label": "value" 25 | }, 26 | { 27 | "fullyQualifiedName": "businessGroup", 28 | "name": "businessGroup", 29 | "type": "Text", 30 | "label": "businessGroup" 31 | }, 32 | { 33 | "fullyQualifiedName": "date", 34 | "name": "date", 35 | "type": "Date", 36 | "label": "date", 37 | "format": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" 38 | }, 39 | { 40 | "fullyQualifiedName": "group", 41 | "name": "group", 42 | "type": "Text", 43 | "label": "group" 44 | }, 45 | { 46 | "fullyQualifiedName": "environmentType", 47 | "name": "environmentType", 48 | "type": "Text", 49 | "label": "environmentType" 50 | } 51 | ] 52 | } 53 | ] 54 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/coreservices/get-environments-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "id": "e527a61c-d9f4-4502-ad8d-a71b87fa353f", 5 | "name": "Design", 6 | "organizationId": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 7 | "isProduction": false, 8 | "type": "design", 9 | "clientId": "***REMOVED***" 10 | }, 11 | { 12 | "id": "7e1c7d31-80a2-46ee-9118-fae5f3ed0d79", 13 | "name": "Development", 14 | "organizationId": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 15 | "isProduction": false, 16 | "type": "sandbox", 17 | "clientId": "***REMOVED***" 18 | }, 19 | { 20 | "id": "0629ce85-4ba2-49ca-b487-28f4db3d37bb", 21 | "name": "Production", 22 | "organizationId": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 23 | "isProduction": true, 24 | "type": "production", 25 | "clientId": "***REMOVED***" 26 | }, 27 | { 28 | "id": "ea57c23e-bfc6-469d-9713-657120452f6b", 29 | "name": "Staging", 30 | "organizationId": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 31 | "isProduction": false, 32 | "type": "sandbox", 33 | "clientId": "***REMOVED***" 34 | }, 35 | { 36 | "id": "fef8f989-845d-4ebf-bf84-4bc2518f4650", 37 | "name": "Test", 38 | "organizationId": "877baaaa-36ba-4021-82d5-45bae78e0fe2", 39 | "isProduction": false, 40 | "type": "sandbox", 41 | "clientId": "***REMOVED***" 42 | } 43 | ], 44 | "total": 5 45 | } 46 | -------------------------------------------------------------------------------- /src/main/mule/sources/external/systems/apis/api-call-splunk.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/test/resources/examples/responses/external/get-bitbucket-repositories.json: -------------------------------------------------------------------------------- 1 | { 2 | "size": 1, 3 | "limit": 25, 4 | "isLastPage": true, 5 | "values": [ 6 | { 7 | "slug": "my-repo", 8 | "id": 1, 9 | "name": "My repo", 10 | "scmId": "git", 11 | "state": "AVAILABLE", 12 | "statusMessage": "Available", 13 | "forkable": true, 14 | "project": { 15 | "key": "PRJ", 16 | "id": 1, 17 | "name": "My Cool Project", 18 | "description": "The description for my cool project.", 19 | "public": true, 20 | "type": "NORMAL", 21 | "links": { 22 | "self": [ 23 | { 24 | "href": "http://link/to/project" 25 | } 26 | ] 27 | } 28 | }, 29 | "public": true, 30 | "links": { 31 | "clone": [ 32 | { 33 | "href": "ssh://git@/PRJ/my-repo.git", 34 | "name": "ssh" 35 | }, 36 | { 37 | "href": "https:///scm/PRJ/my-repo.git", 38 | "name": "http" 39 | } 40 | ], 41 | "self": [ 42 | { 43 | "href": "http://link/to/repository" 44 | } 45 | ] 46 | } 47 | } 48 | ], 49 | "start": 0 50 | } -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/core-services.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: Anypoint Core Services Datatype 3 | description: This datatype models the metrics obtained from the core services 4 | properties: 5 | users: 6 | type: object 7 | properties: 8 | total: 9 | type: integer 10 | displayName: Users Total 11 | description: Counts the total users, by BG 12 | activeMembers: 13 | type: integer 14 | displayName: Active Users 15 | description: Counts the total active users, by BG 16 | inactiveMembers: 17 | type: integer 18 | displayName: Inactive Users 19 | description: Counts the total inactive users, by BG 20 | activeMembersLast60Days: 21 | type: integer 22 | displayName: Active Users Last 60 days 23 | description: Counts the total active users in the last 60 days, by BG 24 | activeMembersLast30Days: 25 | type: integer 26 | displayName: Active Users Last 30 days 27 | description: Counts the total active users in the last 30 days, by BG 28 | environments: 29 | type: object 30 | properties: 31 | total: 32 | type: integer 33 | displayName: Environments Total 34 | description: Counts the total environements, by BG 35 | production: 36 | type: integer 37 | displayName: Environments Production Total 38 | description: Counts the total production environements, by BG 39 | sandbox: 40 | type: integer 41 | displayName: Environments Sandbox Total 42 | description: Counts the total sandboxes environements, by BG 43 | -------------------------------------------------------------------------------- /src/main/mule/sources/anypoint/platform/apis/api-call-design-center.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/resources/api/data-types/loaders/elk.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: ELK Loader Strategy 3 | description: Models a ELK Loader Strategy 4 | properties: 5 | collectors: 6 | description: | 7 | Comma separated set of collectors that should be executed. Possible values are: 8 | 9 | Available for all deployment models: 10 | - ap: Automated Policies 11 | - apc: API Clients 12 | - apm: API Manager 13 | - arm: Runtime Manager 14 | - core: Core Services 15 | - dc: Design Center 16 | - ex: Exchange 17 | 18 | Not available for PCE deployment model: 19 | - amq: Anypoint MQ 20 | - apma: API Manager Analytics 21 | - ch: Cloudhub 22 | - rtf: Runtime Fabric 23 | type: array 24 | items: string 25 | default: ["all"] 26 | required: false 27 | loaderDetails: 28 | type: object 29 | properties: 30 | strategy: 31 | type: string 32 | rawData: 33 | type: string 34 | elk: 35 | type: object 36 | properties: 37 | host: 38 | type: string 39 | port: 40 | type: string 41 | user: 42 | type: string 43 | password: 44 | type: string 45 | platformMetricsIndex: 46 | type: string 47 | platformBenefitsIndex: 48 | type: string 49 | example: !include ../../examples/loaders/elk.json -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/runtime-manager/hybrid/environment.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: ARM Hybrid Environment Datatype 3 | description: Models collected metrics for an environment from Runtime Manager for Hybrid 4 | properties: 5 | servers: 6 | type: integer 7 | displayName: Mule Servers Total 8 | description: Count of Mule Standalone servers installed per BG and Environment 9 | clusters: 10 | type: integer 11 | displayName: Mule Clusters Total 12 | description: Count of Mule Clusters installed per BG and Environment 13 | serverGroups: 14 | type: integer 15 | displayName: Mule Server Groups Total 16 | description: Count of Mule Server Groups installed per BG and Environment 17 | applicationsTotal: 18 | type: integer 19 | displayName: Mule Applications Total 20 | description: Count of applications deployed in targets per BG and Environment 21 | applicationsStarted: 22 | type: integer 23 | displayName: Mule Applications Started Total 24 | description: Count of applications deployed in targets with status 'Started' per BG and Environment 25 | applicationsStopped: 26 | type: integer 27 | displayName: Mule Applications Stopped Total 28 | description: Count of applications deployed in targets with status 'Stopped' per BG and Environment 29 | runtimesUsed: 30 | type: array 31 | items: string 32 | displayName: Runtime Versions Used 33 | description: List of Runtime versions used per BG and Environment 34 | runtimesUsedTotal: 35 | type: integer 36 | displayName: Runtime Versions Used Total 37 | description: Count of Runtime versions used per BG and Environment -------------------------------------------------------------------------------- /src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/mule/sources/anypoint/platform/apis/api-call-runtime-fabric.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 13 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/resources/sfdc/sfdc_platform_metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileFormat": { 3 | "charsetName": "UTF-8", 4 | "fieldsDelimitedBy": ",", 5 | "linesTerminatedBy": "\n" 6 | }, 7 | "objects": [ 8 | { 9 | "connector": "CSV", 10 | "fullyQualifiedName": "sfdc_metrics", 11 | "label": "sfdc_metrics.csv", 12 | "name": "sfdc_metrics_csv", 13 | "fields": [ 14 | { 15 | "fullyQualifiedName": "name", 16 | "name": "name", 17 | "type": "Text", 18 | "label": "name" 19 | }, 20 | { 21 | "fullyQualifiedName": "value", 22 | "name": "value", 23 | "type": "Text", 24 | "label": "value" 25 | }, 26 | { 27 | "fullyQualifiedName": "businessGroup", 28 | "name": "businessGroup", 29 | "type": "Text", 30 | "label": "businessGroup" 31 | }, 32 | { 33 | "fullyQualifiedName": "date", 34 | "name": "date", 35 | "type": "Date", 36 | "label": "date", 37 | "format": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" 38 | }, 39 | { 40 | "fullyQualifiedName": "group", 41 | "name": "group", 42 | "type": "Text", 43 | "label": "group" 44 | }, 45 | { 46 | "fullyQualifiedName": "environmentType", 47 | "name": "environmentType", 48 | "type": "Text", 49 | "label": "environmentType" 50 | }, 51 | { 52 | "fullyQualifiedName": "environmentName", 53 | "name": "environmentName", 54 | "type": "Text", 55 | "label": "environmentName" 56 | } 57 | ] 58 | } 59 | ] 60 | } -------------------------------------------------------------------------------- /src/main/mule/sources/anypoint/platform/apis/api-call-cloudhub.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 13 | 19 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/resources/api/data-types/loaders/splunk.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: Splunk Loader Strategy 3 | description: Models a Splunk Loader Strategy 4 | properties: 5 | collectors: 6 | description: | 7 | Comma separated set of collectors that should be executed. Possible values are: 8 | 9 | Available for all deployment models: 10 | - ap: Automated Policies 11 | - apc: API Clients 12 | - apm: API Manager 13 | - arm: Runtime Manager 14 | - core: Core Services 15 | - dc: Design Center 16 | - ex: Exchange 17 | 18 | Not available for PCE deployment model: 19 | - amq: Anypoint MQ 20 | - apma: API Manager Analytics 21 | - ch: Cloudhub 22 | - rtf: Runtime Fabric 23 | type: array 24 | items: string 25 | default: ["all"] 26 | required: false 27 | loaderDetails: 28 | type: object 29 | properties: 30 | strategy: 31 | type: string 32 | rawData: 33 | type: string 34 | splunk: 35 | type: object 36 | properties: 37 | host: 38 | type: string 39 | port: 40 | type: string 41 | protocol: 42 | type: string 43 | token: 44 | type: string 45 | platformMetricsIndex: 46 | type: string 47 | platformBenefitsIndex: 48 | type: string 49 | source: 50 | type: string 51 | sourceType: 52 | type: string 53 | example: !include ../../examples/loaders/splunk.json -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/get-business-metrics.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: Business Metrics Datatype 3 | description: Models the Business Metrics for a BG 4 | properties: 5 | date: 6 | displayName: Date 7 | description: Date when the request was sent and the metrics were collected 8 | type: datetime 9 | businessGroup: 10 | displayName: BusinessGroup Name 11 | description: Name of the BusinessGroup 12 | type: string 13 | developerProductivity: 14 | displayName: Developer Productivity 15 | description: Percentage calculated as developAPIHistoricTime/developAPICurrentTime 16 | type: number 17 | savingFromAPIReuse: 18 | displayName: Savings From API Reuse 19 | description: Total calculated as # of API with more than one consumer * developAPIHistoricTime * developerDayRate 20 | type: number 21 | savingFromMaintenanceProductivity: 22 | displayName: Savings From Maintenance Productivity 23 | description: Total calculated as (maintainAPIHistoricTime - maintainAPICurrentTime) * totalApps * developerDayRate 24 | type: number 25 | savingFromReuseInMaintenance: 26 | displayName: Savings From Reuse in Maintenance 27 | description: Total calculated as totalApisReuse * maintainAPIHistoricTime * developerDayRate 28 | type: number 29 | totalSavings: 30 | displayName: Total Savings 31 | description: Total calculated as savingFromAPIReuse + savingFromMaintenanceProductivity + savingFromReuseInMaintenance 32 | type: number 33 | errors: 34 | type: array 35 | displayName: Errors Array 36 | description: Provides an array of errors captured during the collection 37 | required: false 38 | items: string 39 | example: !include ../../examples/collectors/responses/get-business-metrics.json 40 | -------------------------------------------------------------------------------- /src/main/resources/dw/mcp/response-getPlatformMetricsByKey.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json indent=false 3 | 4 | fun filterTree(obj) = 5 | if (obj is Object) do { 6 | var children = 7 | obj 8 | mapObject ((value, key) -> (key): filterTree(value)) 9 | filterObject ((value, key) -> !(isEmpty(value) or value == null)) 10 | var includeSelf = (obj[vars.rpcMetricKey] default null) != null 11 | --- 12 | if (!isEmpty(children) or includeSelf) 13 | (if (includeSelf) children ++ {(vars.rpcMetricKey): obj[vars.rpcMetricKey]} else children) 14 | else null 15 | } 16 | else if (obj is Array) do { 17 | var filtered = obj map (item) -> filterTree(item) 18 | var nonEmpty = filtered filter (item) -> !(isEmpty(item) or item == null) 19 | --- 20 | if (!isEmpty(nonEmpty)) nonEmpty else null 21 | } 22 | else null 23 | 24 | --- 25 | payload map (item) -> { 26 | businessGroup: item.businessGroup, 27 | businessGroupId: item.businessGroupId, 28 | (runtimeManagerMetrics: filterTree(item.runtimeManagerMetrics)) if(vars.rpcCollector == "arm"), 29 | (cloudhub: filterTree(item.runtimeManagerMetrics.cloudhub)) if(vars.rpcCollector == "ch"), 30 | (mqMetrics: filterTree(item.mqMetrics)) if(vars.rpcCollector == "amq"), 31 | (apiManagerMetrics: filterTree(item.apiManagerMetrics)) if(vars.rpcCollector == "apm"), 32 | (clients: filterTree(item.apiManagerMetrics.clients)) if(vars.rpcCollector == "apc"), 33 | (coreServicesMetrics: filterTree(item.coreServicesMetrics)) if(vars.rpcCollector == "core"), 34 | (designCenterMetrics: filterTree(item.designCenterMetrics)) if(vars.rpcCollector == "dc"), 35 | (exchangeMetrics: filterTree(item.exchangeMetrics)) if(vars.rpcCollector == "ex"), 36 | (osV2Metrics: filterTree(item.osV2Metrics)) if(vars.rpcCollector == "osv2"), 37 | (rtf: filterTree(item.rtf)) if(vars.rpcCollector == "rtf") 38 | } 39 | -------------------------------------------------------------------------------- /src/main/mule/collectors/anypoint/platform/collector-cloudhub.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/test/resources/examples/responses/external/get-jira-stories.json: -------------------------------------------------------------------------------- 1 | { 2 | "expand": "schema,names", 3 | "startAt": 0, 4 | "maxResults": 50, 5 | "total": 6, 6 | "issues": [ 7 | { 8 | "expand": "html", 9 | "id": "10230", 10 | "self": "http://localhost:8080/rest/api/2/issue/BULK-62", 11 | "key": "BULK-62", 12 | "fields": { 13 | "summary": "testing", 14 | "timetracking": null, 15 | "issuetype": { 16 | "self": "http://localhost:8080/rest/api/2/issuetype/5", 17 | "id": "5", 18 | "description": "The sub-task of the issue", 19 | "iconUrl": "http://localhost:8080/images/icons/issue_subtask.gif", 20 | "name": "Sub-task", 21 | "subtask": true 22 | }, 23 | "customfield_10071": null 24 | }, 25 | "transitions": "http://localhost:8080/rest/api/2/issue/BULK-62/transitions" 26 | }, 27 | { 28 | "expand": "html", 29 | "id": "10004", 30 | "self": "http://localhost:8080/rest/api/2/issue/BULK-47", 31 | "key": "BULK-47", 32 | "fields": { 33 | "summary": "Cheese v1 2.0 issue", 34 | "timetracking": null, 35 | "issuetype": { 36 | "self": "http://localhost:8080/rest/api/2/issuetype/3", 37 | "id": "3", 38 | "description": "A task that needs to be done.", 39 | "iconUrl": "http://localhost:8080/images/icons/task.gif", 40 | "name": "Task", 41 | "subtask": false 42 | }, 43 | "transitions": "http://localhost:8080/rest/api/2/issue/BULK-47/transitions" 44 | } 45 | } 46 | ] 47 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/external/get-jira-backlog-items.json: -------------------------------------------------------------------------------- 1 | { 2 | "expand": "schema,names", 3 | "startAt": 0, 4 | "maxResults": 50, 5 | "total": 6, 6 | "issues": [ 7 | { 8 | "expand": "html", 9 | "id": "10230", 10 | "self": "http://localhost:8080/rest/api/2/issue/BULK-62", 11 | "key": "BULK-62", 12 | "fields": { 13 | "summary": "testing", 14 | "timetracking": null, 15 | "issuetype": { 16 | "self": "http://localhost:8080/rest/api/2/issuetype/5", 17 | "id": "5", 18 | "description": "The sub-task of the issue", 19 | "iconUrl": "http://localhost:8080/images/icons/issue_subtask.gif", 20 | "name": "Sub-task", 21 | "subtask": true 22 | }, 23 | "customfield_10071": null 24 | }, 25 | "transitions": "http://localhost:8080/rest/api/2/issue/BULK-62/transitions" 26 | }, 27 | { 28 | "expand": "html", 29 | "id": "10004", 30 | "self": "http://localhost:8080/rest/api/2/issue/BULK-47", 31 | "key": "BULK-47", 32 | "fields": { 33 | "summary": "Cheese v1 2.0 issue", 34 | "timetracking": null, 35 | "issuetype": { 36 | "self": "http://localhost:8080/rest/api/2/issuetype/3", 37 | "id": "3", 38 | "description": "A task that needs to be done.", 39 | "iconUrl": "http://localhost:8080/images/icons/task.gif", 40 | "name": "Task", 41 | "subtask": false 42 | }, 43 | "transitions": "http://localhost:8080/rest/api/2/issue/BULK-47/transitions" 44 | } 45 | } 46 | ] 47 | } -------------------------------------------------------------------------------- /src/main/mule/loaders/loader-csv.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/runtime-manager/runtime-fabric/runtime-fabric.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: ARM RTF Datatype 3 | description: Models collected metrics from Runtime Manager for RTF deployments 4 | properties: 5 | capacity: 6 | type: object 7 | properties: 8 | fabrics: 9 | type: integer 10 | displayName: Fabrics Total 11 | description: Count of total fabrics created per BG 12 | workers: 13 | type: integer 14 | displayName: Workers Total 15 | description: Count of total workers installed in Fabrics per BG 16 | controllers: 17 | type: integer 18 | displayName: Controllers Total 19 | description: Count of total controllers installed in Fabrics per BG 20 | coresTotal: 21 | type: number 22 | displayName: Cores Allocated Total 23 | description: Count of total cores allocated to Fabrics per BG 24 | memoryTotal: 25 | type: number 26 | displayName: Memory Allocated Total 27 | description: Count of total memory allocated to Fabrics per BG 28 | coresPerFabric: 29 | type: number 30 | displayName: Cores Allocated Per Fabric Average 31 | description: Averageg of total cores per Fabric and BG 32 | memoryPerFabric: 33 | type: number 34 | displayName: Memory Allocated Per Fabric Average 35 | description: Average of total memory per Fabric and BG 36 | applications: 37 | type: object 38 | properties: 39 | production: 40 | type: !include environment.raml 41 | displayName: Applications - Production environments 42 | description: Provides detailed application's metrics for Production environments 43 | sandbox: 44 | type: !include environment.raml 45 | displayName: Applications - Sandbox environments 46 | description: Provides detailed application's metrics for Sandbox environments -------------------------------------------------------------------------------- /src/main/mule/collectors/anypoint/platform/collector-osv2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 10 | 12 | 13 | 16 | 17 | 18 | 20 | 22 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/mule/loaders/loader-json-standard-format.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/mule/sources/anypoint/platform/apis/api-call-osv2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 9 | 10 | 12 | 18 | 24 | 31 | 32 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/main/resources/web/index.html: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 19 | 23 | 28 | 29 | Metrics Toolkit 30 | 31 | 35 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/get-sdlc-metrics.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: SDLC Metrics Datatype 3 | description: Models the metrics extracted from SDLC systems 4 | properties: 5 | date: 6 | type: datetime 7 | sdlcMetrics: 8 | type: object 9 | properties: 10 | bitBucketMetrics: 11 | type: object 12 | properties: 13 | totalRepositories: 14 | type: integer 15 | confluenceMetrics: 16 | type: object 17 | properties: 18 | totalPages: 19 | type: integer 20 | totalPagesCreatedInLast30Days: 21 | type: integer 22 | totalPagesUpdatedInLast30Days: 23 | type: integer 24 | topContributorsInLast30Days: 25 | type: object 26 | jenkinsMetrics: 27 | type: object 28 | properties: 29 | totalJobs?: 30 | type: string 31 | required: false 32 | totalFailedJobs?: 33 | type: string 34 | required: false 35 | totalSuccessJobs?: 36 | type: integer 37 | required: false 38 | totalUnexecutedJobs?: 39 | type: integer 40 | required: false 41 | jiraMetrics: 42 | type: object 43 | properties: 44 | totalJiraTasksInBacklog: 45 | type: integer 46 | totalJiraTasksInSprint: 47 | type: integer 48 | totalJiraTasksByType: 49 | type: object 50 | properties: 51 | Task: 52 | type: integer 53 | Sub-task: 54 | type: integer 55 | totalJiraTasksByStatus?: 56 | type: string 57 | required: false 58 | splunkMetrics: 59 | type: object 60 | properties: 61 | totalDashboards: 62 | type: array 63 | items: string 64 | example: !include ../../examples/collectors/responses/get-sdlc-metrics.json 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/main/mule/collectors/anypoint/platform/collector-analytics.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/anypoint-mq/environment.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: AMQ Environment Datatype 3 | description: Models an Anypoint-MQ Environment 4 | properties: 5 | id: 6 | required: false 7 | queues: 8 | type: object 9 | displayName: Queues 10 | description: Provides information about Anypoint MQ queues 11 | properties: 12 | commonQueues: 13 | type: integer 14 | displayName: "Common Queues #" 15 | description: Count the number of provisioned common queues 16 | fifoQueues: 17 | type: integer 18 | displayName: "FIFO Queues #" 19 | description: Count the number of provisioned FIFO queues 20 | messagesInFlight: 21 | type: integer 22 | displayName: "Messages In Flight #" 23 | description: Count the number of messages that are In Flight (all queues types) 24 | messagesSent: 25 | type: integer 26 | displayName: "Messages Sent #" 27 | description: Count the number of sent messages (all queues types) 28 | messagesReceived: 29 | type: integer 30 | displayName: "Messages Received #" 31 | description: Count the number of messages received (all queues types) 32 | messagesAck: 33 | type: integer 34 | displayName: "Messages ACK received #" 35 | description: Count the number of ACKs received for messages 36 | exchanges: 37 | type: object 38 | displayName: Exchanges 39 | description: Provides information about Anypoint MQ Exchanges 40 | properties: 41 | exchangeQueues: 42 | type: integer 43 | displayName: "Exchange Queues #" 44 | description: Count the number of provisioned Exchange queues 45 | messagesPublished: 46 | type: integer 47 | displayName: "Messages Published #" 48 | description: Count the number of published messages into the Exchanges 49 | messagesDelivered: 50 | type: integer 51 | displayName: "Messages Delivered #" 52 | description: Count the number of delivered messages -------------------------------------------------------------------------------- /src/main/resources/dw/aggregation/build-platform-raw-data-response.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json 3 | var environments = vars.environments 4 | var entitlements = vars.entitlements 5 | var errors = vars.errors 6 | 7 | var date = vars.date 8 | var orgName = vars.orgName 9 | var orgId = vars.orgId 10 | 11 | var cloudHubApps = payload[0].payload.payload 12 | var exchangeAssets = payload[1].payload 13 | var apiManagerApis = payload[2].payload[0].payload 14 | var apiClients = payload[2].payload[1].applications 15 | var apiAutomatedPolicies = payload[2].payload[2].payload 16 | var members = payload[3].payload[0].payload 17 | //var rolegroups = payload[3].payload[2].payload.data 18 | var usage = payload[3].payload[1].payload 19 | var designCenterProjects = payload[4].payload 20 | var armDeployments = payload[5].payload[0].payload.payload 21 | var armServers = payload[5].payload[1].payload.payload 22 | var armClusters = payload[5].payload[2].payload.payload 23 | var armServerGroups = payload[5].payload[3].payload.payload 24 | //var armApps = payload[7].payload[4].payload.payload 25 | var rtf = payload[6].payload 26 | var analyticsQueryResult = payload[7].payload.payload 27 | var mq = payload[8].payload.payload 28 | var osv2 = payload[9].payload.payload 29 | --- 30 | { 31 | date: date, 32 | businessGroup: orgName, 33 | businessGroupId: orgId, 34 | coreServicesData: { 35 | entitlements: entitlements, 36 | users: members.data, 37 | // rolegroups: rolegroups, 38 | usage: usage, 39 | environments: environments 40 | }, 41 | designCenterData: designCenterProjects, 42 | exchangeData: exchangeAssets, 43 | apiManagerData: { 44 | clients: apiClients, 45 | apis: apiManagerApis, 46 | apiAutomatedPolicies: apiAutomatedPolicies, 47 | anaytics: analyticsQueryResult 48 | }, 49 | runtimeManagerData: { 50 | cloudHubApps: cloudHubApps, 51 | rtf: rtf, 52 | armDeployments: armDeployments, 53 | // armApps: armApps, 54 | armServers: armServers, 55 | armClusters: armClusters, 56 | armServerGroups: armServerGroups 57 | }, 58 | mqMetrics: mq, 59 | osV2Metrics: osv2, 60 | errors: errors 61 | } 62 | -------------------------------------------------------------------------------- /src/main/resources/dw/mcp/response-getCapabilities.dwl: -------------------------------------------------------------------------------- 1 | %dw 2.0 2 | output application/json indent=false 3 | --- 4 | { 5 | "description": "This capability manifest describes the tools (methods) exposed by this agent. Each tool includes a name, description, and an input schema that defines the parameters required to invoke it. Agents can use this manifest to dynamically plan their next actions without hardcoding tool knowledge. The tools listed here follow the JSON-RPC 2.0 specification and must be invoked via POST requests to the MCP endpoint. Agents should first inspect this manifest to determine which tools are available and how to use them, then construct a valid request matching the tool’s input schema.", 6 | "tools": [ 7 | { 8 | "name": "getAvailableCollectors", 9 | "description": "Returns all collector identifiers supported by the agent.", 10 | "inputSchema": { 11 | "type": "object", 12 | "properties": {} 13 | } 14 | }, 15 | { 16 | "name": "getPlatformMetricsByCollector", 17 | "description": "Retrieves metrics from a specific Anypoint collector with optional filters", 18 | "inputSchema": { 19 | "type": "object", 20 | "properties": { 21 | "collectorId": { "type": "string" }, 22 | "bg": { "type": "string" }, 23 | "filters": { 24 | "type": "object", 25 | "properties": { 26 | "environment": { "type": "string" }, 27 | "region": { "type": "string" } 28 | } 29 | } 30 | }, 31 | "required": ["collectorId", "bg"] 32 | } 33 | }, 34 | { 35 | "name": "getPlatformMetricByKey", 36 | "description": "Fetches a single metric value by key and collector. Useful for atomic, low-latency reads.", 37 | "inputSchema": { 38 | "type": "object", 39 | "properties": { 40 | "collector": { "type": "string" }, 41 | "metricKey": { "type": "string" }, 42 | "bg": { "type": "string" }, 43 | "environment": { "type": "string" } 44 | }, 45 | "required": ["collector", "metricKey", "bg"] 46 | } 47 | } 48 | ] 49 | } -------------------------------------------------------------------------------- /src/main/resources/api/data-types/collectors/runtime-manager/cloudhub/cloudhub.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: ARM CH Environment Datatype 3 | description: Models collected metrics for an environment from Runtime Manager for CloudHub 4 | properties: 5 | networking: 6 | type: object 7 | properties: 8 | vpcsTotal: 9 | type: integer 10 | displayName: VPCs Total 11 | description: Total VPCs per BG 12 | vpcsAvailable: 13 | type: integer 14 | displayName: VPCs Available Total 15 | description: Total available VPCs per BG 16 | vpcsUsed: 17 | type: integer 18 | displayName: VPCs Used Total 19 | description: Total used VPCs per BG 20 | vpnsTotal: 21 | type: integer 22 | displayName: VPNs Total 23 | description: Total VPNs per BG 24 | vpnsAvailable: 25 | type: integer 26 | displayName: VPNs Available Total 27 | description: Total available VPNs per BG 28 | vpnsUsed: 29 | type: integer 30 | displayName: VPNs Used Total 31 | description: Total used VPNs per BG 32 | dlbsTotal: 33 | type: integer 34 | displayName: DLBs Total 35 | description: Total DLBs per BG 36 | dlbsAvailable: 37 | type: integer 38 | displayName: DLBs Available Total 39 | description: Total available DLBs per BG 40 | dlbsUsed: 41 | type: integer 42 | displayName: DLBs Used Total 43 | description: Total used DLBs per BG 44 | staticIPsTotal: 45 | type: integer 46 | displayName: Static IPs Total 47 | description: Total static IPs per BG 48 | staticIPsAvailable: 49 | type: integer 50 | displayName: Static IPs Available Total 51 | description: Total available static IPs per BG 52 | staticIPsUsed: 53 | type: integer 54 | displayName: Static IPs Used Total 55 | description: Total used static IPs per BG 56 | applications: 57 | type: object 58 | properties: 59 | production: 60 | type: !include environment.raml 61 | sandbox: 62 | type: !include environment.raml -------------------------------------------------------------------------------- /src/main/mule/collectors/anypoint/platform/collector-exchange.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/resources/api/data-types/loaders/post-benefits-metrics.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 DataType 2 | displayName: 3 | description: 4 | properties: 5 | event: 6 | displayName: Event 7 | description: Models an event to be loaded following the strategy detailed 8 | type: object 9 | properties: 10 | date: 11 | displayName: Date 12 | description: Data of the event to be loaded 13 | type: datetime 14 | businessGroup: 15 | displayName: BusinessGroup Name 16 | description: Name of the BusinessGroup related to the event 17 | type: string 18 | developAPIHistoricTime: 19 | displayName: Development API Historic Time 20 | description: Historic Time used to develop an API 21 | type: number 22 | developAPICurrentTime: 23 | displayName: Development API Current Time 24 | description: Current Time used to develop an API 25 | type: number 26 | maintainAPIHistoricTime: 27 | displayName: Maintain API Historic Time 28 | description: Historic Time used to maintain an API 29 | type: number 30 | maintainAPICurrentTime: 31 | displayName: Maintain API Current Time 32 | description: Current Time used to maintain an API 33 | type: number 34 | developerDayRate: 35 | displayName: Developer Rate 36 | description: Developer Rate per day 37 | type: number 38 | loaderDetails: 39 | displayName: Loader Configuration 40 | description: Describes the Loader configuration 41 | type: object 42 | properties: 43 | strategy: 44 | displayName: Loader Strategy 45 | description: The strategy used as a loader 46 | type: string 47 | enum: 48 | - json 49 | - csv 50 | - splunk 51 | - tableau 52 | - sfdc 53 | rawData: 54 | displayName: Raw data 55 | description: Enable or disable the raw data print 56 | type: string 57 | enum: 58 | - "false" 59 | - "true" 60 | example: !include ../../examples/loaders/post-platform-benefits.json 61 | -------------------------------------------------------------------------------- /src/main/resources/web/runtime.2636733e998c14a784cc.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=r[2],p=0,s=[];p 1) default []), 16 | apisWithOneOrMoreConsumers: sizeOf(prodApiInstances.activeContractsCount filter ($ > 0) default []), 17 | cloudHubApplicationsStarted: sizeOf(flatten(getProdData(cloudHubApps) default []) filter ($.status == "STARTED") default []), 18 | rtfApplicationsStarted: sizeOf(flatten(getProdData(armApps).items default []) filter($.target.provider == 'MC') default [] filter ($.application.status == 'RUNNING') default []), 19 | hybridApplicationsStarted: sizeOf(flatten(getProdData(armApps).items default []) filter($.target.provider == 'RR') default [] filter ($.status == 'STARTED') default []) 20 | } 21 | 22 | var totalApisReuse = platformMetrics.apisWithMoreThanOneConsumer 23 | var totalApps = platformMetrics.cloudHubApplicationsStarted + platformMetrics.rtfApplicationsStarted + platformMetrics.hybridApplicationsStarted 24 | var inputs=vars.benefitsInputs 25 | 26 | var developerProductivity = (inputs.developAPIHistoricTime/inputs.developAPICurrentTime) * 100 27 | var savingFromAPIReuse = totalApisReuse * inputs.developAPIHistoricTime * inputs.developerDayRate 28 | var savingFromMaintenanceProductivity = (inputs.maintainAPIHistoricTime - inputs.maintainAPICurrentTime) * totalApps * inputs.developerDayRate 29 | var savingFromReuseInMaintenance = totalApisReuse * inputs.maintainAPIHistoricTime * inputs.developerDayRate 30 | --- 31 | { 32 | date: vars.date, 33 | businessGroup: vars.orgName, 34 | developerProductivity: developerProductivity, 35 | savingFromAPIReuse: savingFromAPIReuse, 36 | savingFromMaintenanceProductivity: savingFromMaintenanceProductivity, 37 | savingFromReuseInMaintenance: savingFromReuseInMaintenance, 38 | totalSavings: savingFromAPIReuse + savingFromMaintenanceProductivity + savingFromReuseInMaintenance, 39 | errors: vars.errors 40 | } -------------------------------------------------------------------------------- /src/test/resources/examples/responses/anypoint/platform/arm/get-deployment-details-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"da0c6a37-ebb7-11e9-9b0e-058ff88b1753", 3 | "name":"sys-journals-api", 4 | "creationDate":1575576711998, 5 | "lastModifiedDate":1575593662095, 6 | "target":{ 7 | "provider":"MC", 8 | "targetId":"ec9d123f-4587-4f07-bd90-5bcdf321135f", 9 | "deploymentSettings":{ 10 | "cpuMax":"200m", 11 | "sidecars":{ 12 | "anypoint-monitoring":{ 13 | "image":"auto", 14 | "resources":{ 15 | "cpu":{ 16 | "limit":"50m", 17 | "reserved":"0m" 18 | }, 19 | "memory":{ 20 | "limit":"50Mi", 21 | "reserved":"50Mi" 22 | } 23 | } 24 | } 25 | }, 26 | "memoryMax":"1000Mi", 27 | "publicUrl":"https://sys-journals-api.dev-fantasy-company.com", 28 | "cpuReserved":"200m", 29 | "memoryReserved":"1000Mi", 30 | "runtimeVersion":"4.2.1:v1.2.19", 31 | "lastMileSecurity":false, 32 | "clusteringEnabled":false, 33 | "replicationFactor":1 34 | }, 35 | "replicas":1 36 | }, 37 | "status":"APPLIED", 38 | "application":{ 39 | "status":"RUNNING", 40 | "desiredState":"STARTED", 41 | "ref":{ 42 | "groupId":"877baaaa-36ba-4021-82d5-45bae78e0fe2", 43 | "artifactId":"sys-journals-api", 44 | "version":"1.0.13383", 45 | "packaging":"jar" 46 | }, 47 | "configuration":{ 48 | "mule.agent.application.properties.service":{ 49 | "properties":{ 50 | "anypoint.platform.client_id":"***REMOVED***", 51 | "anypoint.platform.client_secret":"***REMOVED***" 52 | }, 53 | "applicationName":"sys-journals-api" 54 | } 55 | } 56 | }, 57 | "desiredVersion":"f0e6725d-17c2-11ea-8dda-2dd7fc8f3e7b", 58 | "replicas":[ 59 | { 60 | "state":"STARTED", 61 | "deploymentLocation":"71262c5f-bae3-455c-bc25-4cfa2549bd2a", 62 | "currentDeploymentVersion":"f0e6725d-17c2-11ea-8dda-2dd7fc8f3e7b", 63 | "reason":"" 64 | } 65 | ], 66 | "lastSuccessfulVersion":"f0e6725d-17c2-11ea-8dda-2dd7fc8f3e7b" 67 | } 68 | -------------------------------------------------------------------------------- /src/main/mule/collectors/external/systems/collector-bitbucket.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/main/mule/collectors/external/systems/collector-confluence.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/mule/collectors/external/systems/collector-splunk.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/mule/collectors/external/systems/collector-jenkins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/mule/collectors/external/systems/collector-azuredevops.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | --------------------------------------------------------------------------------