Skip to content

Commit

Permalink
Merge pull request ceph#60976 from rhcs-dashboard/fix-69144-main
Browse files Browse the repository at this point in the history
mgr/dashboard: Fix Latency chart data units in rgw overview page

Reviewed-by: Afreen Misbah <[email protected]>
Reviewed-by: Pedro Gonzalez Gomez <[email protected]>
  • Loading branch information
Pegonzal authored Dec 18, 2024
2 parents 2ce9ed6 + d9aa164 commit ffde19a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
</cd-dashboard-area-chart>
<cd-dashboard-area-chart chartTitle="Latency"
dataUnits="ms"
decimals="2"
[labelsArray]="['GET', 'PUT']"
[dataArray]="[queriesResults.AVG_GET_LATENCY, queriesResults.AVG_PUT_LATENCY]">
</cd-dashboard-area-chart>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,9 @@ export class PrometheusService {
checkNan
) {
queriesResults[queryName].forEach((valueArray: any[]) => {
valueArray.forEach((val, index) => {
if (isNaN(parseFloat(val[1]))) {
valueArray[index][1] = '0';
}
});
if (isNaN(parseFloat(valueArray[1]))) {
valueArray[1] = '0';
}
});
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export enum Promqls {

export enum RgwPromqls {
RGW_REQUEST_PER_SECOND = 'sum(rate(ceph_rgw_req[1m]))',
AVG_GET_LATENCY = 'sum(rate(ceph_rgw_op_get_obj_lat_sum[1m])) / sum(rate(ceph_rgw_op_get_obj_lat_count[1m]))',
AVG_PUT_LATENCY = 'sum(rate(ceph_rgw_op_put_obj_lat_sum[1m])) / sum(rate(ceph_rgw_op_put_obj_lat_count[1m]))',
AVG_GET_LATENCY = '(sum(rate(ceph_rgw_op_get_obj_lat_sum[1m])) / sum(rate(ceph_rgw_op_get_obj_lat_count[1m]))) * 1000',
AVG_PUT_LATENCY = '(sum(rate(ceph_rgw_op_put_obj_lat_sum[1m])) / sum(rate(ceph_rgw_op_put_obj_lat_count[1m]))) * 1000',
GET_BANDWIDTH = 'sum(rate(ceph_rgw_op_get_obj_bytes[1m]))',
PUT_BANDWIDTH = 'sum(rate(ceph_rgw_op_put_obj_bytes[1m]))'
}
Expand Down

0 comments on commit ffde19a

Please sign in to comment.