OpenCost integration

Use the OpenCost Advanced Integration to connect Yarken to an OpenCost API service and retrieve supported OpenCost data through a Yarken-managed integration.

OpenCost uses its own data schema in Yarken. This integration is separate from the SaaS and AI usage integrations and does not load into AI Usage Data or Analytics > AI Consumption.

Yarken deploys and maintains the Advanced Integration for your environment. Your organization provides an accessible OpenCost API URL, authorizes the connection, and validates the resulting integration runs and data.


Supported data source

This integration connects to an OpenCost API service. OpenCost provides APIs for reporting Kubernetes resource allocation and infrastructure costs. The exact data sets, attributes, and aggregation rules ingested by Yarken depend on the supported Yarken OpenCost integration configuration.

For background about OpenCost's upstream APIs, see OpenCost API documentation.


What the integration provides

  • An Advanced Connection to the OpenCost API service.

  • A Yarken-managed integration that retrieves the OpenCost data supported by your deployment.

  • An Advanced pipeline for running and monitoring the integration.

  • OpenCost data handled through its own Yarken schema rather than the AI Consumption schema.


Where the data appears

After the OpenCost Advanced pipeline loads data, use Analytics > Consumption Data and the Kubernetes Consumption field group to report on Kubernetes cost and resource consumption. This data is separate from AI Usage Data and Analytics > AI Consumption.

To create a Kubernetes Consumption report:

  1. Go to Analytics > Consumption Data.

  2. Expand Kubernetes Consumption in the Fields panel.

    Screenshot 2026-10-13 at 2.18.56 PM-20261013-084913.png
    Kubernetes Consumption reporting in Analytics > Consumption Data
  3. Select or drag the required fields into the Data Table visualization.

  4. Apply a Timeline filter, such as Month, when required.

  5. Select Run Report to display the results.

Kubernetes Consumption fields available for reporting

Category

Fields visible in the current Yarken UI

Reporting period

Window Start, Window End

Kubernetes dimensions

Namespace, Pod, Container, Controller, Controller Kind, Node, Service, Provider, Is Idle

Cost metrics

Total Cost, Workload Cost, Idle Cost, CPU Cost, RAM Cost, GPU Cost, PV Cost, Network Cost, Load Balancer Cost

Resource consumption

CPU Core Hours, RAM Byte Hours, GPU Hours, Network Transfer Bytes

These are the fields visible in the supplied Yarken screenshot. The 34-field OpenCost connector output is not identical to the fields available for reporting. For example, Workload Cost and Idle Cost are reporting measures rather than fields with those names in the connector output.

Kubernetes Consumption reporting limitations:

  • You cannot combine Kubernetes Consumption fields with separate metric or attribute categories such as External Metrics, External Attributes, or Providers. Timeline filters are supported.

  • The Provider field within Kubernetes Consumption is distinct from the separate Providers category.

  • OpenCost ingestion does not currently provide a user-facing uploaded-files view like AI Usage or Cloud Usage Data.


Roles and responsibilities

Activity

Responsibility

Deploy and maintain the Advanced Integration

Yarken

Maintain data retrieval and transformation logic

Yarken

Provide the OpenCost API service and its reachable URL

Your organization, with its OpenCost or infrastructure administrator

Authorize the OpenCost Advanced Connection

Yarken administrator

Run and monitor the Advanced pipeline

Admin or Cost Model Manager

Validate source values and imported results

Your organization, with its infrastructure or reporting team


Before you begin

Requirement

Details

OpenCost deployment

Have an OpenCost API service available for the data you want Yarken to retrieve.

API URL

Obtain the full URL of the OpenCost API service. Use the API endpoint, not the OpenCost UI address.

Network access

Confirm that the OpenCost API service can be reached from the integration environment through your organization's approved network configuration.

Yarken access

Use a Yarken administrator account to authorize the Advanced Connection.

Integration availability

Confirm that Yarken has enabled the OpenCost Advanced Integration for your environment.

Do not enter the OpenCost UI address in API URL. The connection requires the URL of the API service.


Prepare the OpenCost API endpoint

Your Kubernetes or platform administrator must supply one API URL per cluster. OpenCost must be running with Prometheus (or a compatible metrics store) and a configured cloud-billing or custom pricing source. The connection uses the API service, not the dashboard UI.

  • Find the API service (for example, kubectl get svc -n opencost). The API normally listens on port 9003; the dashboard commonly uses 9090.

  • Expose the API service over HTTPS and preserve its full base path (for example, https://opencost.example.com/api). Both GET /allocation (required) and GET /assets (enrichment) should be reachable.

  • Allowlist the integration platform's Workato outbound IP addresses, as advised for your deployment. No API key, token, basic auth, or SSO credential is sent by this connector; do not put an authentication/login proxy in front of the endpoint.

  • Ensure the proxy supports large JSON responses and requests lasting at least a minute for busy clusters.

  • Confirm metrics retention covers the historical dates you need, then verify the endpoint from outside your network, not only from inside the Kubernetes cluster.

  • Send Yarken the URL and associated cluster name, pricing source, Prometheus retention period, and endpoint-test results securely. Cluster identity is not included in the connector output rows.

Connection check — expect HTTP 200 and Content-Type: application/json:

Bash
curl -i "https://opencost.example.com/api/allocation?window=1d"
curl -i "https://opencost.example.com/api/assets?window=1d"

The OpenCost UI can return HTTP 200 with HTML. If the response is HTML instead of JSON, use the API service address. A 401/403 or login page indicates unsupported proxy authentication.


Authorize the OpenCost connection

  1. Sign in to Yarken as an administrator.

  2. Go to Admin > Pipelines > Connections.

  3. Select the ADVANCED tab.

  4. Open the OpenCost connection provided for your environment.

    Screenshot 2026-10-13 at 2.25.06 PM-20261013-085548.png
    OpenCost Advanced Connection
  5. Enter the full OpenCost API service address in API URL.

  6. Select Connect if the connection has not yet been authorized.

  7. Confirm that the connection displays Connected.

Field

Requirement

Value or guidance

API URL

Required

Enter the full OpenCost API service URL, for example https://your-opencost-host/api. The address must point to the API service, not the web UI.

OpenCost Advanced Connection: The UI displays a masked API URL and a Connected status once the connection is authorized.

When the connection is already established, Yarken displays Connected and provides a Disconnect action. Do not disconnect an active integration unless you intend to interrupt its access.

For the general authorization procedure, see Authorize Advanced Connections.


How the integration works

  1. The OpenCost API service provides source data.

  2. The OpenCost Advanced Connection allows Yarken to reach the configured API service.

  3. The Yarken-managed Advanced Integration retrieves and processes the supported source data.

  4. The Advanced pipeline runs the integration and records execution activity.

  5. The data is processed using the OpenCost-specific Yarken schema.

You do not configure the underlying integration logic or define an Advanced Integration recipe yourself.


Source APIs and processing behavior

API

Purpose

Failure behavior

GET /allocation

Required cost and resource allocations

No records; integration stops if it fails

GET /assets

Optional provider, provider ID, and project enrichment from Node assets

Allocation rows still returned; assets_error reported, enrichment fields may be null

The connector requires window_start and window_end in RFC3339 UTC (end exclusive). It calls /allocation with the following fixed parameters. Idle allocations are not spread across workloads.

aggregate=namespace,pod,container,controller,controllerKind,node,service
step=1d
resolution=1h
includeIdle=true
idle=true
shareIdle=false
accumulate=false

The connector flattens every allocation entry in every daily step into an output row. It does not aggregate, deduplicate, or filter these rows. /assets is used only to look up Node provider information. The connector tries the root endpoint first, then /model if the root returns 404 or HTML, but does not retry other API failures.


Data available and ingested

The OpenCost connector returns records[] containing 34 flat output fields. The expandable tables below describe the confirmed OpenCost source-to-connector mappings. They do not establish that every connector field is available as an individual field in Analytics. See the Kubernetes Consumption reporting table above for the fields confirmed in the current user interface.

Reporting window (2 fields)

Connector output field

OpenCost source

Behavior

window_start

window.start

RFC3339 UTC start

window_end

window.end

RFC3339 UTC, exclusive end

Kubernetes dimensions (7 fields)

Connector output field

OpenCost source

Behavior

namespace

properties.namespace

Defaults to __idle__ for unnamed idle allocation

pod_name

properties.pod

Pod name

container_name

properties.container

Container name

controller

properties.controller

Controller

controller_kind

properties.controllerKind / controller_kind

Fallback name supported

node

properties.node

Joins /assets Node details

service

properties.service or first properties.services

May be unavailable

Cloud provider enrichment (3 fields)

Connector output field

OpenCost source

Behavior

provider_id

allocation providerID/providerId/provider_id, else Node providerID

Prefers allocation value

provider

/assets Node properties.provider

Null when node unmatched

project

/assets Node properties.project

Typically GCP, otherwise null

Idle (1 fields)

Connector output field

OpenCost source

Behavior

is_idle

Derived from allocation name or namespace

True for __idle__; idle costs remain separate

Usage (10 fields)

Connector output field

OpenCost source

Behavior

cpu_cores

cpuCores or cpuCoreUsageAverage

Fallback may be usage instead of allocation

cpu_core_hours

cpuCoreHours

Core-hours

cpu_efficiency

cpuEfficiency

Ratio 0–1

ram_bytes

ramBytes or ramByteUsageAverage

Fallback may be usage instead of allocation

ram_byte_hours

ramByteHours

Byte-hours

ram_efficiency

ramEfficiency

Ratio 0–1

gpu_count

gpuCount

GPU count

gpu_hours

gpuHours or GPUHours

GPU hours

pv_bytes

pvBytes

Persistent volume bytes

network_transfer_bytes

networkTransferBytes

Network bytes

Costs and efficiency (10 fields)

Connector output field

OpenCost source

Behavior

cpu_cost

cpuCost

CPU allocation cost

ram_cost

ramCost

RAM allocation cost

gpu_cost

gpuCost

GPU allocation cost

pv_cost

pvCost

Persistent volume cost

network_cost

networkCost

Network allocation cost

load_balancer_cost

loadBalancerCost

Load balancer cost

shared_cost

sharedCost

Shared cost

external_cost

externalCost

External cost

total_cost

totalCost

Defaults to 0.0 if absent/non-numeric

total_efficiency

totalEfficiency

Ratio 0–1

Labels (1 fields)

Connector output field

OpenCost source

Behavior

labels

properties.labels

JSON string, null if empty/invalid


Data interpretation and limitations

  • OpenCost cost values depend on configured pricing. Without cloud billing or custom pricing, they may be zero or estimates.

  • Idle cost remains a separate __idle__ row; include idle allocation when reconciling total cost.

  • Missing or nonnumeric usage and cost values become null, except total_cost, which defaults to 0.0. Empty labels become null; present labels are serialized JSON text.

  • The connector output does not contain a cluster field. Identify clusters separately by connection or another implementation-approved method.

  • No raw asset costs, asset_type, or asset_key are returned; /assets enriches allocation rows with matching Node identity only.

  • Provider and project may be null when /assets fails or an allocation does not match a Node. Idle rows commonly have no node.

  • Fixed aggregation does not include label:<key> groupings; labels may therefore be missing.

  • History is limited by metrics retention. The connector does not implement paging or automatic retries for timeouts/5xx; use shorter requested windows for large clusters.


Run and monitor the Advanced pipeline

After the OpenCost connection shows Connected:

  1. Go to Admin > Pipelines > Pipelines.

  2. Select the ADVANCED tab.

  3. Locate the OpenCost pipeline enabled for your environment.

  4. Select Run when you need to start an immediate execution.

  5. Open the pipeline to review its latest status, run history, and any available error details.

For activation and other supported controls, see Manage Advanced pipelines.


Validate the integration

After the first successful run:

  • Confirm the OpenCost Advanced Connection shows Connected.

  • Confirm the configured API URL points to the OpenCost API service.

  • Verify that the corresponding Advanced pipeline completed successfully.

  • Review the run history for reported errors or missing source data.

  • Go to Analytics > Consumption Data, expand Kubernetes Consumption, choose relevant fields such as Namespace, Pod, Total Cost, Is Idle, and Window Start, then select Run Report. Compare records with OpenCost for the same UTC reporting period.

A Connected status confirms that the connection has been established; it does not, by itself, confirm that the expected data has been loaded. Check the pipeline execution and destination records separately.


Troubleshooting

Issue

What to check

What to do

Connection remains Access requested

The connection has not completed authorization or the configured API URL is incorrect.

Confirm the full OpenCost API service URL and complete the connection process.

Connection cannot reach the OpenCost source

API URL, service availability, or network connectivity.

Verify that the API service is running and reachable from the integration environment. Use the API service URL rather than the UI URL.

Connection is Connected, but data is missing

Advanced pipeline execution, source availability, or configured data period.

Review the Advanced pipeline status, errors, and requested period. Then run a Kubernetes Consumption report in Analytics > Consumption Data, using the appropriate Timeline filter.

The Advanced pipeline fails

Error details and OpenCost API availability.

Open the failed run, review the error, correct the source issue where possible, and use Run to validate the result.

OpenCost data is missing from AI Consumption

Incorrect destination expectation.

OpenCost is reported in Analytics > Consumption Data > Kubernetes Consumption, not AI Consumption. Select the Kubernetes fields and run a report.

HTML instead of JSON

OpenCost dashboard URL

Use the API service URL and verify JSON Content-Type

404 from root and /model

Wrong path prefix / ingress routing

Correct the full API path and ingress rules

401 / 403 / login page

Authentication proxy

Use network IP allowlisting instead

Timeout / connection refused

Firewall, DNS, TLS or proxy limits

Check Workato outbound IP allowlist, TLS and proxy timeouts

Empty or invalid JSON

Truncated response or upstream error

Review proxy response buffering and OpenCost API

Successful response but all cost fields are zero

OpenCost pricing missing

Configure cloud billing or custom pricing

Provider/project fields empty

/assets unavailable or no Node match

Expose /assets and verify Node entries

Historical period empty

Beyond Prometheus retention

Query dates with retained metrics

Cluster identity unclear

Not included in 34-field output

Maintain URL-to-cluster inventory and confirm Yarken attribution


Security and access considerations

  • Use an OpenCost API endpoint approved for your organization's integration and network-access policies.

  • Do not expose sensitive internal hostnames, network details, or credentials in public screenshots or support messages.

  • Coordinate endpoint changes with your OpenCost administrator and update the Advanced Connection when necessary.

  • After changing the API URL, validate the connection and run the Advanced pipeline again.


Related content