1 | initial version |
To convert a wavefront query into a Prometheus query, follow these steps:
Understand the metric syntax: The metric syntax for both Wavefront and Prometheus is different. Wavefront uses a dotted notation, whereas Prometheus uses a forward slash notation. For example, aws.ec2.cpu.utilization
in Wavefront would be aws_ec2_cpu_utilization
in Prometheus.
Identify the aggregation functions: Wavefront supports a variety of aggregation functions, such as mean
, max
, min
, sum
, etc. Prometheus also has similar aggregation functions, such as avg
, max_over_time
, min_over_time
, sum_over_time
, etc.
Convert time windows: Wavefront supports different time windows, such as 1h
, 1d
, 1w
, etc. In Prometheus, you can convert time windows using the time()
function, such as 1h
would be time() - 1h
.
Add labels: Prometheus requires labels to identify the different dimensions of the data. You can add labels to a Prometheus query using the label_replace()
function.
Overall, the process of converting a wavefront query into a Prometheus query depends on the specific metric and data you are working with.