OpenCost

../../../_images/opencost.png

OpenCost is a vendor-neutral, open-source project that provides cost monitoring and allocation for Kubernetes and cloud-native environments. It’s designed to give teams real-time visibility into their cloud spending, enabling them to track and optimize resource usage and reduce overspending.

Our OpenCost integrates with Grafana to view your multi-cloud FinOps in one place.

Features

  1. Real-time Cost Allocation OpenCost provides detailed cost breakdowns for Kubernetes resources, including clusters, nodes, namespaces, controllers, and pods.

  2. Multi-cloud Support It supports cost monitoring across AWS, Azure, and GCP, as well as on-premises clusters.

  3. Dynamic Pricing OpenCost leverages cloud provider billing APIs to provide real-time pricing for on-demand resources.

  4. Customizable Pricing It allows users to define custom pricing for on-premises resources.

  5. Open Source and Extensible OpenCost is free to use and allows for customization to fit specific FinOps needs.

  6. Integration with Prometheus OpenCost can export cost data to Prometheus for further analysis and visualization.

Quickstart

  1. Start an instance with 1-Click, or optionally using your cloud provider’s web/console

  2. Have just a little patience: it does take a couple of minutes for all the background services to start up in your instance. If you get connection refused or site error messages - just wait a moment

  3. Access the product via web browser at https://<your IP/public DNS> with user-name admin, and the instance id as password.

Operations

To configure your providers, you need to edit /var/lib/opencost/cloud-configuration.json. See below.

To integrate with your grafana, you need to include the opencost metrics endpoint in your prometheus configuration. Our Grafana already supports this; but you might need something like:

extraScrapeConfigs: |
   - job_name: opencost
     honor_labels: true
     scrape_interval: 1m
     scrape_timeout: 10s
     metrics_path: /metrics
     scheme: http
     dns_sd_configs:
     - names:
         - opencost.opencost
       type: 'A'
       port: 9003

The dashboard you should install is 22208 <https://grafana.com/grafana/dashboards/22208-opencost-overview/>.

Cloud Setup

Each cloud vendor (and on-premises) is a little different to configure. Various setups are explained here.

Amazon Web Services

OpenCost/AWS uses Athena on top of a S3 bucket to store and analyse your costs. As such you need to set up and permission these services.

See also

opencost

RPM Package

Grafana

Our Grafana

EULA

Software License