The second version of the cost management metrics operator—a certified container image that runs on Red Hat OpenShift—builds on existing features, captures more historical data and includes new optimization metrics. Paired with properly specified container requests and limits, these new features can help you better understand the costs of your container environments. 

Red Hat cost management operator details screenshot

Building on existing features

This second version of the cost management metrics operator can speed up configuration by automatically creating its associated source in console.redhat.com. These metrics are sent every six hours by default but can be configured to be sent more often. More frequent metrics can bring faster visibility to on-premise clusters that depend on cost models for defined rates (compared to those running on cloud providers that wait on cost exports before anything can be allocated). 

The operator also supports a restricted network mode, which collects payloads within the cluster that can be uploaded through a network-connected system. The new metrics collected by the operator in this version can also be accessed in the same payload through a restricted flow. This version can also disable metrics to support customers who only want access to specific functions.

Red Hat cost management config creation screenshot

Capturing existing metrics

This new version of the cost management metrics operator now gathers existing Prometheus metrics as soon as it's installed and configured on OpenShift—giving you access to more historical data. That historical data can help you:

  • Better understand trends and patterns across the resources your cluster uses
  • Improve forecasting and capacity planning
  • Better manage resources and optimize costs

By default, the OpenShift cluster monitoring operator retains metrics data for 15 days, but the cost management metrics operator can collect up to 90 days of retained metrics data. This is a significant improvement that can help you better understand the performance of your cluster over time. 

With more historical data, you can identify trends and patterns on the first day the operator runs—helping you make better decisions about your cluster's capacity needs while optimizing your costs accordingly. 

Red Hat cost management cluster-monitoring-config YAML screenshot

Metrics for optimizations

In addition to the new historical data capabilities, the cost management metrics operator version 2.0 also calculates minimums, maximums, averages and sums of CPU/memory use, requests and limits—every 15 minutes. These new metrics can inform resource optimization recommendations like container requests and limits, which can better manage cluster capacity. 

With optimized workloads, you can create cost-saving environments that reduce excess workload capacity and shrink the number of nodes in OpenShift clusters.

Red Hat cost management metrics screenshot

Properly specifying container requests and limits is a crucial part of managing cluster capacity. Overestimating resource needs means potentially paying for more resources than you actually use. And if you underestimate resource needs, you may end up with degraded performance—or even out-of-memory errors. By making more informed resource allocation decisions, you can reduce unnecessary expenses by running OpenShift clusters more efficiently. 

Version 2.0 of the cost management metrics operator collects the data that will enable you to make these informed decisions. The new metrics gathered by the operator can increase your understanding of resources used and optimize your container requests and limits accordingly.

Red Hat cost management optimizations screenshot

Installing the operator

Version 2.0 of the cost management metrics operator includes a range of exciting new features that can help you optimize OpenShift clusters and save money in the process. 

With the ability to gather more historical data and provide recommendations for resource optimization, this version is a valuable tool for any organization using OpenShift. By properly specifying container requests and limits, you can reduce unnecessary expenses, run your clusters more efficiently, and have a positive impact on the environment.


About the authors

Chris Hambridge started his software engineering career in 2006 and joined Red Hat in 2017. He has a Masters in Computer Science from the Georgia Institute of Technology, and is passionate about cloud-native development and DevOps with a focus on pragmatic solutions to everyday problems.

Read full bio