diff --git a/_data/nav.yml b/_data/nav.yml index 7df633e40..f48a5c5a2 100644 --- a/_data/nav.yml +++ b/_data/nav.yml @@ -28,17 +28,17 @@ - title: Creating products and applications url: "/create-app-ui" - title: Creating environments - url: "/quick-start-gitops-environments" - - title: Simple promotion with drag-and-drop - url: "/drag-and-drop" + url: "/quick-start-gitops-environments" + - title: Simple promotion with drag-and-drop + url: "/drag-and-drop" - title: Simple Promotion Flow with multiple environments - url: "/multi-env-sequential-flow.md" + url: "/multi-env-sequential-flow.md" - title: Creating Promotion Workflows - url: "/quick-start-promotion-workflow" + url: "/quick-start-promotion-workflow" - title: Advanced Promotion Flow with Promotion Workflows - url: "/policy-multi-env-promotion" + url: "/policy-multi-env-promotion" - title: Advanced Promotion Flow with environment dependencies - url: "/dependency-multi-env-promotion" + url: "/dependency-multi-env-promotion" - title: CI/CD quick starts url: "/ci-quick-start" @@ -228,7 +228,7 @@ - title: Git Providers url: "/git-providers" - title: OpenID Connect - url: "/oidc-pipelines" + url: "/oidc-pipelines" - title: Kubernetes url: "/kubernetes" - title: Amazon Web Services @@ -238,7 +238,7 @@ - title: Google Cloud url: "/google-cloud" - title: Octopus Deploy - url: "/octopus-deploy" + url: "/octopus-deploy" - title: Docker registries url: "/docker-registries" sub-pages: @@ -394,10 +394,10 @@ - title: About environments url: "/environments-overview" - title: Create and manage environments - url: "/create-manage-environments" + url: "/create-manage-environments" - title: Manage Products and applications in environments - url: "/manage-apps-in-environments" - + url: "/manage-apps-in-environments" + - title: Products url: "/products" pages: @@ -408,7 +408,7 @@ - title: Configure Product Settings url: "/configure-product-settings" - title: Assigning applications - url: "/assign-applications" + url: "/assign-applications" - title: Configuring version and promotable properties url: "/promotion-version-properties" - title: Configuring promotion concurrency @@ -426,28 +426,28 @@ - title: About promotions url: "/promotions-overview" - title: Getting started - url: "/getting-started" + url: "/getting-started" - title: Promotion building blocks url: "/promotion-components" - title: Promotion setup guidelines url: "/create-promotion-sequence" - title: Promotion limitations - url: "/promotion-limitations" + url: "/promotion-limitations" - title: Promotion Flows - url: "/promotion-flow" + url: "/promotion-flow" - title: Promotion Policies - url: "/promotion-policy" + url: "/promotion-policy" - title: Promotion Workflows - url: "/promotion-workflow" + url: "/promotion-workflow" - title: Promotion hooks - url: "/promotion-hooks" + url: "/promotion-hooks" - title: Service accounts for Promotion Workflows - url: "/service-accounts-promotion-workflows" + url: "/service-accounts-promotion-workflows" - title: Promotion contexts in promotion hooks - url: "/promotion-context-promotion-workflows" + url: "/promotion-context-promotion-workflows" - title: Product promotion settings - url: "/product-promotion-props" - - title: Promotion entity YAMLs + url: "/product-promotion-props" + - title: Promotion entity YAMLs url: "/yaml" sub-pages: - title: Product YAML @@ -459,9 +459,9 @@ - title: Promotion Policy YAML url: "/promotion-policy-crd" - title: Trigger promotions - url: "/trigger-promotions" + url: "/trigger-promotions" - title: Tracking releases for Products - url: "/product-releases" + url: "/product-releases" @@ -501,7 +501,7 @@ - title: Deploy url: "/deploy" - title: Approval - url: "/approval" + url: "/approval" - title: Triggers in pipelines url: "/triggers" sub-pages: @@ -588,7 +588,7 @@ - title: Upgrade url: "/codefresh-on-prem-upgrade" - title: Account and user setup - url: "/on-prem-configuration" + url: "/on-prem-configuration" - title: Feature management url: "/on-prem-feature-management" - title: Runner for pipelines @@ -602,35 +602,37 @@ url: "/arm-support" - title: Runner installation behind firewalls url: "/behind-the-firewall" + - title: Monitoring Classic Runtime + url: "/classic-runtime-monitoring" - title: GitOps Runtimes url: "/gitops" - sub-pages: + sub-pages: - title: GitOps Runtime architecture url: "/runtime-architecture" - title: Runtime concepts url: "/runtime-concepts" - title: System requirements - url: "/runtime-system-requirements" + url: "/runtime-system-requirements" - title: Prerequisites url: "/runtime-prerequisites" - title: Argo CD Admin API token - url: "/runtime-argocd-admin-api-token" + url: "/runtime-argocd-admin-api-token" - title: Install GitOps Runtime with existing Argo CD - url: "/runtime-install-with-existing-argo-cd" + url: "/runtime-install-with-existing-argo-cd" - title: Install GitOps Runtime with new Argo CD - url: "/runtime-install-with-new-argo-cd" + url: "/runtime-install-with-new-argo-cd" - title: Troubleshoot installation - url: "/runtime-troubleshooting" + url: "/runtime-troubleshooting" - title: On-premises GitOps Runtime url: "/on-prem-gitops-runtime-install" - title: Runtime values file validation - url: "/gitops-values-yaml-validation" - - title: Configure GitOps Runtime - url: "/runtime-configuration" + url: "/gitops-values-yaml-validation" + - title: Configure GitOps Runtime + url: "/runtime-configuration" - title: Ingress and service-mesh access modes - url: "/runtime-install-ingress-service-mesh-access-mode" + url: "/runtime-install-ingress-service-mesh-access-mode" - title: Ingress configuration - url: "/runtime-ingress-configuration" + url: "/runtime-ingress-configuration" - title: Shared Configuration Repository url: "/shared-configuration" - title: Configuration Runtimes @@ -644,9 +646,9 @@ - title: Managing Git Sources in GitOps Runtimes url: "/git-sources" - title: Download/upgrade GitOps CLI - url: "/upgrade-gitops-cli" + url: "/upgrade-gitops-cli" - title: Migrating GitOps Runtimes from CLI to Helm - url: "/migrate-cli-runtimes-helm" + url: "/migrate-cli-runtimes-helm" @@ -728,7 +730,7 @@ - title: Verify authenticity of Codefresh artifacts in GitOps url: "/codefresh-signed-artifacts" - title: Verify authenticity of artifacts signed with Codefresh pipelines - url: "/pipelines-verify-cf-artifacts" + url: "/pipelines-verify-cf-artifacts" - title: What's new url: "/whats-new" @@ -765,13 +767,13 @@ - title: Privacy Policy url: "/privacy-policy" - title: Acceptable Use Policy - url: "/acceptable-use-policy" + url: "/acceptable-use-policy" - title: Support Service Objectives url: "/sla" - title: Previous Service Commitment url: "/previous" - title: Support Triage Definitions - url: "/support-triage-definitions" + url: "/support-triage-definitions" - title: Cloud Credits url: "/cloud-credits" - title: Legacy Codefresh Terms of Service diff --git a/_docs/installation/runner/classic-runtime-monitoring.md b/_docs/installation/runner/classic-runtime-monitoring.md new file mode 100644 index 000000000..d507e2914 --- /dev/null +++ b/_docs/installation/runner/classic-runtime-monitoring.md @@ -0,0 +1,555 @@ +--- +title: "Monitoring Classic Runtime" +description: "How to monitor the Codefresh Classic Runtime" +group: installation +redirect_from: + - /docs/kb/articles/enable-engine-pod-metrics/ +toc: true +--- + +## `engine` component + +Modern versions of the Codefresh Classic Runtime ([`cf-runtime` chart >=8.2.0](https://artifacthub.io/packages/helm/codefresh-runner/cf-runtime/){:target="\_blank"}, `engine` >=1.179.1) provide the `engine` component metrics in OpenTelemetry format, with the preferable *push* model. + +You can still use the *pull* model by switching to the Prometheus Metrics Exporter, which is fully compatible with Prometheus. However, we recommend using the default configuration, as it is better suited for the short-lived nature of Classic Builds and provides more precise and complete metrics. + +Please refer to the `cf-runtime` Chart default values on [Artifact Hub](https://artifacthub.io/packages/helm/codefresh-runner/cf-runtime?modal=values&path=runtime.engine.env){:target="\_blank"} for configuration options. + +### Resource attributes + +By default, the `engine` resource has the following attributes: + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`service.name`** | string | The name of the `engine` component. | `cf-classic-engine` | +| **`service.namespace`** | string | The namespace of the `engine` component. | `cf-classic-runtime` | +| **`service.version`** | string | The version of the `engine` component; in format `@` | `1.179.1@sha256:37caef1e58f8d07ed76da753fb46eb59224e723495c1b9081d3ef7e0bc9449f9` | +| **`cf.classic.runtime.name`** | string | The name of the runtime of which this `engine` component is a part. | `my-runtime` | +| **`cf.classic.runtime.version`** | string | The version of the runtime chart. | `8.2.0` | + + +### Metrics + +#### Default attributes + +Attributes below are added to all metrics described in this section. + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.id`** | string | The ID of the build. | `6898c4e4bc5ecdb9f1f95c0c` | +| **`cf.classic.pipeline.id`** | string | The ID of the pipeline to which the build belongs. | `6898c4ea6f064e824a33edc3` | +| **`cf.classic.pipeline.name`** | string | The name of the pipeline to which the build belongs; in format `/`. | `my-project/my-pipeline` | +| **`cf.classic.account.id`** | string | The ID of the Codefresh account in which the build is running. | `6898c4df2d142ffac1720fbf` | +| **`cf.classic.account.name`** | string | The name of the Codefresh account in which the build is running. | `my-account` | + + +#### `codefresh.classic.build.info` + +The metric is always emitted. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.info`** | Gauge | — | Contains information about the classic build. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.phase`** | string enum | The phase of the build. | `preparing` \| `running` \| `finalizing` \| `failed` \| `succeeded` \| `terminated` | +| **`cf.classic.build.volume`** | string enum | Indicates whether the new or reused volume has been assigned to the build. | `new` \| `reused` | + + +#### `codefresh.classic.build.start.timestamp` + +The metric is always emitted. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.start.timestamp`** | Gauge | `s` | Start time in unix timestamp for a build. | + + +#### `codefresh.classic.build.completion.timestamp` + +The metric is always emitted. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.completion.timestamp`** | Gauge | `s` | Completion time in unix timestamp for a build. | + + +#### `codefresh.classic.build.phase.start.timestamp` + +The metric is always emitted for every build phase. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.phase.start.timestamp`** | Gauge | `s` | Start time in unix timestamp for a build phase. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.phase`** | string enum | The phase of the build. | `preparing` \| `running` \| `finalizing` \| `failed` \| `succeeded` \| `terminated` | + + +#### `codefresh.classic.build.phase.completion.timestamp` + +The metric is always emitted for every build phase. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.phase.completion.timestamp`** | Gauge | `s` | Completion time in unix timestamp for a build phase. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.phase`** | string enum | The phase of the build. | `preparing` \| `running` \| `finalizing` \| `failed` \| `succeeded` \| `terminated` | + + +#### `codefresh.classic.build.step.info` + +The metric is always emitted for every build step. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.step.info`** | Gauge | — | Contains information about the classic build step. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.step.name`** | string | The name of the step as defined in the pipeline YAML. Unique per build. | `my-clone` | +| **`cf.classic.build.step.type`** | string | The type of the step. | `cf-internal` (for internal steps); `freestyle`; `build` | +| **`cf.classic.build.step.version`** | string | The version of the step. | `1.0.0`; `latest` | +| **`cf.classic.build.step.phase`** | string enum | The phase of the build step. | `preparing` \| `running` \| `finalizing` \| `failed` \| `succeeded` \| `terminated` \| `finished` | + + +#### `codefresh.classic.build.step.start.timestamp` + +The metric is always emitted for every build step. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.step.start.timestamp`** | Gauge | `s` | Start time in unix timestamp for a build step. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.step.name`** | string | The name of the step as defined in the pipeline YAML. Unique per build. | `my-clone` | + + +#### `codefresh.classic.build.step.completion.timestamp` + +The metric is always emitted for every build step. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.step.completion.timestamp`** | Gauge | `s` | Completion time in unix timestamp for a build step. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.step.name`** | string | The name of the step as defined in the pipeline YAML. Unique per build. | `my-clone` | + + +#### `codefresh.classic.build.step.phase.start.timestamp` + +The metric is always emitted for every build step phase. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.step.phase.start.timestamp`** | Gauge | `s` | Start time in unix timestamp for a build step phase. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.step.name`** | string | The name of the step as defined in the pipeline YAML. Unique per build. | `my-clone` | +| **`cf.classic.build.step.phase`** | string enum | The phase of the build step. | `preparing` \| `running` \| `finalizing` \| `failed` \| `succeeded` \| `terminated` \| `finished` | + + +#### `codefresh.classic.build.step.phase.completion.timestamp` + +The metric is always emitted for every build step phase. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.step.phase.completion.timestamp`** | Gauge | `s` | Completion time in unix timestamp for a build step phase. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.step.name`** | string | The name of the step as defined in the pipeline YAML. Unique per build. | `my-clone` | +| **`cf.classic.build.step.phase`** | string enum | The phase of the build step. | `preparing` \| `running` \| `finalizing` \| `failed` \| `succeeded` \| `terminated` \| `finished` | + + +#### `codefresh.classic.build.step.cpu.time` + +The metric is always emitted for every build step, unless the step was too short to collect Docker metrics. + +For steps of type `build` that are not using `buildx` with `docker-container` driver, this metric may be underreported. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.step.cpu.time`** | Counter | `s` | Cumulative cpu time consumed by step in seconds. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.step.name`** | string | The name of the step as defined in the pipeline YAML. Unique per build. | `my-clone` | + + + + + +#### `codefresh.classic.build.step.memory.usage` + +The metric is always emitted for every build step, unless the step was too short to collect Docker metrics. + +For steps of type `build` that are not using `buildx` with `docker-container` driver, this metric may be underreported. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.step.memory.usage`** | Gauge | `By` | Current memory usage for step, including all memory regardless of when it was accessed. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.step.name`** | string | The name of the step as defined in the pipeline YAML. Unique per build. | `my-clone` | + + +#### `codefresh.classic.build.step.memory.working_set` + +The metric is always emitted for every build step, unless the step was too short to collect Docker metrics. + +For steps of type `build` that are not using `buildx` with `docker-container` driver, this metric may be underreported. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.step.memory.working_set`** | Gauge | `By` | Current working set for step. Calculated as the current memory usage minus `inactive_file`. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.step.name`** | string | The name of the step as defined in the pipeline YAML. Unique per build. | `my-clone` | + + +#### `codefresh.classic.build.composition.info` + +The metric is emitted if the composition is present in build. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.composition.info`** | Gauge | — | Contains information about the classic build composition. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.composition.name`** | string | The name of the build composition. Unique per build. | `my-services` | +| **`cf.classic.build.composition.phase`** | string enum | The phase of the build composition. | `preparing` \| `running` \| `finalizing` \| `finished` | + + +#### `codefresh.classic.build.composition.start.timestamp` + +The metric is emitted if the composition is present in build. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.composition.start.timestamp`** | Gauge | `s` | Start time in unix timestamp for a build composition. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.composition.name`** | string | The name of the build composition. Unique per build. | `my-services` | + + +#### `codefresh.classic.build.composition.completion.timestamp` + +The metric is emitted if the composition is present in build. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.composition.completion.timestamp`** | Gauge | `s` | Completion time in unix timestamp for a build composition. | + + + +#### `codefresh.classic.build.composition.phase.start.timestamp` + +The metric is emitted if the composition is present in build. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.composition.phase.start.timestamp`** | Gauge | `s` | Start time in unix timestamp for a build composition phase. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.composition.name`** | string | The name of the build composition. Unique per build. | `my-services` | +| **`cf.classic.build.composition.phase`** | string enum | The phase of the build composition. | `preparing` \| `running` \| `finalizing` \| `finished` | + + +#### `codefresh.classic.build.composition.phase.completion.timestamp` + +The metric is emitted if the composition is present in build. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.composition.phase.completion.timestamp`** | Gauge | `s` | Completion time in unix timestamp for a build composition phase. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.composition.name`** | string | The name of the build composition. Unique per build. | `my-services` | +| **`cf.classic.build.composition.phase`** | string enum | The phase of the build composition. | `preparing` \| `running` \| `finalizing` \| `finished` | + + +#### `codefresh.classic.build.composition.task.info` + +The metric is emitted if the composition is present in build. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.composition.task.info`** | Gauge | — | Contains information about the classic build composition task. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.composition.name`** | string | The name of the build composition. Unique per build. | `my-services` | +| **`cf.classic.build.composition.task.name`** | string | The name of the build composition task. Unique per build composition. | `publishServicePorts`; `start`; `pullAll` | +| **`cf.classic.build.composition.task.phase`** | string enum | The phase of the build composition task. | `running` \| `failed` \| `succeeded` | + + +#### `codefresh.classic.build.composition.task.start.timestamp` + +The metric is emitted if the composition is present in build. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.composition.task.start.timestamp`** | Gauge | `s` | Start time in unix timestamp for a build composition task. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.composition.name`** | string | The name of the build composition. Unique per build. | `my-services` | +| **`cf.classic.build.composition.task.name`** | string | The name of the build composition task. Unique per build composition. | `publishServicePorts`; `start`; `pullAll` | + + +#### `codefresh.classic.build.composition.task.completion.timestamp` + +The metric is emitted if the composition is present in build. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.composition.task.completion.timestamp`** | Gauge | `s` | Completion time in unix timestamp for a build composition task. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`cf.classic.build.composition.name`** | string | The name of the build composition. Unique per build. | `my-services` | +| **`cf.classic.build.composition.task.name`** | string | The name of the build composition task. Unique per build composition. | `publishServicePorts`; `start`; `pullAll` | + + +#### `codefresh.classic.engine.docker.request_retries` + +The metric is emitted when the `engine` retries a request to the Docker daemon. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.engine.docker.request_retries`** | Counter | `{request_retry}` | Total number of retries when making requests to the Docker daemon. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`docker.operation.name`** | string | The name of the Docker operation under retry. | `pull`; `listContainers` | +| **`docker.operation.error`** | string | The error encountered during the Docker operation and caused retry. | `ENOTFOUND`; `ECONNRESET` | + + +#### `codefresh.classic.engine.docker.request_retries.delay.time` + +The metric is emitted when the `engine` retries a request to the Docker daemon. + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.engine.docker.request_retries.delay.time`** | Counter | `s` | Total delay in seconds caused by retries when making requests to the Docker daemon. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`docker.operation.name`** | string | The name of the Docker operation under retry. | `pull`; `listContainers` | +| **`docker.operation.error`** | string | The error encountered during the Docker operation and caused retry. | `ENOTFOUND`; `ECONNRESET` | + + +#### `codefresh.classic.build.deprecated_images.pulled` + +The metric is emitted when the `engine` pulls a deprecated "Docker Image Format v1" or "Docker Image manifest version 2, schema 1" image ([Docker docs](https://docs.docker.com/engine/deprecated/#pushing-and-pulling-with-image-manifest-v2-schema-1){:target="\_blank"}). + +{: .table .table-bordered .table-hover} +| Name | Instrument Type | Unit | Description | +| ---- | --------------- | ---- | ----------- | +| **`codefresh.classic.build.deprecated_images.pulled`** | Counter | `{pull}` | Total number of deprecated "Docker Image Format v1" or "Docker Image manifest version 2, schema 1" image pulls. | + +{: .table .table-bordered .table-hover} +| Attribute | Type | Description | Examples | +| --------- | ---- | ----------- | -------- | +| **`docker.image.name`** | string | The name of the Docker image. | `alpine:latest` | + +--- + +### Metrics for debugging + +If needed, you can also collect various process metrics from the `engine`. These Prometheus metrics are available on port `9100` and controlled by the `cf-runtime` chart values `runtime.engine.env.CF_TELEMETRY_PROMETHEUS_ENABLE` and `runtime.engine.env.CF_TELEMETRY_PROMETHEUS_ENABLE_PROCESS_METRICS`. + +These metrics are not needed for most users and disabled by default. + +--- + +### Deprecated metrics + +{{site.data.callout.callout_tip}} +Older versions of the Classic Runtime (`cf-runtime` chart <8.2.0, `engine` <1.179.0) provided the following Prometheus metrics on port `9100` of the `engine` pod. +{{site.data.callout.end}} + +{{site.data.callout.callout_warning}} +**Deprecated** +These metrics are deprecated and will be removed in future releases. We recommend migrating to the modern metrics described above as soon as possible. +{{site.data.callout.end}} + +Each of the metrics below has the following additional labels: `account_name`, `docker_node_address`, `pipeline_id`, `repo_branch`, `workflow` + +* `codefresh_engine_deprecated_images_pulled_total` [since engine:1.177.1] +
Total number of deprecated Schema 1 images pulls +
Type: Counter +
Labels: `image_name` + +* `codefresh_engine_docker_daemon_requests_retries_delay_seconds_total` +
Total delay in seconds for retry requests to Docker daemon +
Type: Counter +
Labels: `error`, `operation` [since engine:1.177.0] + +* `codefresh_engine_docker_daemon_requests_retries_total` +
Total number of retry requests to Docker daemon +
Type: Counter +
Labels: `error`, `operation` [since engine:1.177.0] + +* `codefresh_workflow_composition_duration_seconds` +
Composition duration in seconds +
Type: Gauge +
Labels: `composition_name`, `phase` + +* `codefresh_workflow_composition_phase_status` +
Composition phase status: 1 for current status, 0 otherwise +
Type: Gauge +
Labels: `composition_name`, `phase`, `status` + +* `codefresh_workflow_composition_status` +
Composition status: 1 for current status, 0 otherwise +
Type: Gauge +
Labels: `composition_name`, `status` + +* `codefresh_workflow_duration_seconds` +
Workflow duration in seconds +
Type: Gauge +
Labels: `phase` + +* `codefresh_workflow_internal_images_reused` +
1 if internal images were reused from cache by workflow, 0 otherwise +
Type: Gauge +
Labels: — + +* `codefresh_workflow_phase_status` +
Workflow phase status: 1 for current status, 0 otherwise +
Type: Gauge +
Labels: `phase`, `status` + +* `codefresh_workflow_status` +
Workflow status: 1 for current status, 0 otherwise +
Type: Gauge +
Labels: `status` + +* `codefresh_workflow_step_duration_seconds` +
Workflow step duration in seconds +
Type: Gauge +
Labels: `phase`, `step_name`, `step_type` + +* `codefresh_workflow_step_status` +
Workflow step status: 1 for current status, 0 otherwise +
Type: Gauge +
Labels: `phase`, `status`, `step_name`, `step_type` + +* `codefresh_workflow_volume_reused` +
1 if the volume was reused by workflow, 0 otherwise +
Type: Gauge +
Labels: — diff --git a/_docs/kb/articles/enable-engine-pod-metrics.md b/_docs/kb/articles/enable-engine-pod-metrics.md deleted file mode 100644 index c859109f5..000000000 --- a/_docs/kb/articles/enable-engine-pod-metrics.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: "Codefresh runner: Enabling engine pod metrics" -description: -group: kb -sub-group: articles -toc: true -kb: true -ht: false -common: false -categories: [Runtimes] -support-reviewed: 2023-04-18 LG ---- - - -## Overview - -To scrape the metrics from the Codefresh Runner to your existing Prometheus/Grafana stack, you must enable the metrics in the Runner's engine pod. - -## Details - -### How to enable - -1. In the Codefresh Runner Helm chart values file, go to `runtime.engine.env.` -1. Add the `METRICS_PROMETHEUS_ENABLED` environment variable for the engine pod. - -##### Scrape timeout -During normal shutdown, the engine performs a final scrape of metrics before the terminating the engine pod. -The timeout is controlled by the `METRICS_PROMETHEUS_SCRAPE_TIMEOUT` engine variable. If you want to include the most recent metrics, we recommend setting this variable to 4 times your scrape interval. - -##### Documentation -Complete documentation on all the environment variables available in the engine, including their default values, is on [Artifact Hub](https://artifacthub.io/packages/helm/codefresh-runner/cf-runtime?modal=values&path=runtime.engine.env){:target="\_blank"}. - - -### Available metrics - -Each of the metrics below has the following additional labels: `account_name`, `docker_node_address`, `pipeline_id`, `repo_branch`, `workflow` - -* `codefresh_engine_deprecated_images_pulled_total` [since engine:1.177.1] -
Total number of deprecated Schema 1 images pulls -
Type: Counter -
Labels: `image_name` - -* `codefresh_engine_docker_daemon_requests_retries_delay_seconds_total` -
Total delay in seconds for retry requests to Docker daemon -
Type: Counter -
Labels: `error`, `operation` [since engine:1.177.0] - -* `codefresh_engine_docker_daemon_requests_retries_total` -
Total number of retry requests to Docker daemon -
Type: Counter -
Labels: `error`, `operation` [since engine:1.177.0] - -* `codefresh_workflow_composition_duration_seconds` -
Composition duration in seconds -
Type: Gauge -
Labels: `composition_name`, `phase` - -* `codefresh_workflow_composition_phase_status` -
Composition phase status: 1 for current status, 0 otherwise -
Type: Gauge -
Labels: `composition_name`, `phase`, `status` - -* `codefresh_workflow_composition_status` -
Composition status: 1 for current status, 0 otherwise -
Type: Gauge -
Labels: `composition_name`, `status` - -* `codefresh_workflow_duration_seconds` -
Workflow duration in seconds -
Type: Gauge -
Labels: `phase` - -* `codefresh_workflow_internal_images_reused` -
1 if internal images were reused from cache by workflow, 0 otherwise -
Type: Gauge -
Labels: — - -* `codefresh_workflow_phase_status` -
Workflow phase status: 1 for current status, 0 otherwise -
Type: Gauge -
Labels: `phase`, `status` - -* `codefresh_workflow_status` -
Workflow status: 1 for current status, 0 otherwise -
Type: Gauge -
Labels: `status` - -* `codefresh_workflow_step_duration_seconds` -
Workflow step duration in seconds -
Type: Gauge -
Labels: `phase`, `step_name`, `step_type` - -* `codefresh_workflow_step_status` -
Workflow step status: 1 for current status, 0 otherwise -
Type: Gauge -
Labels: `phase`, `status`, `step_name`, `step_type` - -* `codefresh_workflow_volume_reused` -
1 if the volume was reused by workflow, 0 otherwise -
Type: Gauge -
Labels: —