Skip to content

Commit f72021b

Browse files
authored
Merge pull request ceph#57497 from rhcs-dashboard/fix-66058-main
mgr/dashboard: Fix host count per cluster and total hosts count on multi-cluster overview page Reviewed-by: Nizamudeen A <[email protected]>
2 parents c38bb1b + b72a683 commit f72021b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ <h3 *ngIf="queriesResults['HEALTH_ERROR_COUNT'][0][1] === '0' && queriesResults[
113113
i18n-title
114114
class="col-sm-6 m-0 p-0 ps-2 pe-2"
115115
aria-label="Alerts"
116+
[fullHeight]="true"
116117
*ngIf="queriesResults['ALERTS_COUNT'] && queriesResults['ALERTS_COUNT'][0]">
117118
<span class="text-center">
118119
<h3 *ngIf="queriesResults['CRITICAL_ALERTS_COUNT'][0][1] === '0' && queriesResults['WARNING_ALERTS_COUNT'][0][1] === '0'">

src/pybind/mgr/dashboard/frontend/src/app/shared/enum/dashboard-promqls.enum.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export enum MultiClusterPromqls {
3434
CRITICAL_ALERTS_COUNT = 'count(ALERTS{alertstate="firing",severity="critical"}) or vector(0)',
3535
WARNING_ALERTS_COUNT = 'count(ALERTS{alertstate="firing",severity="warning"}) or vector(0)',
3636
ALERTS = 'ALERTS{alertstate="firing"}',
37-
HOSTS = 'sum by (hostname, cluster) (group by (hostname, cluster) (ceph_osd_metadata)) or vector(0)',
38-
TOTAL_HOSTS = 'count by (cluster) (ceph_osd_metadata) or vector(0)',
37+
HOSTS = 'count_values("hostname", ceph_mon_metadata) by (cluster) or vector (0)',
38+
TOTAL_HOSTS = 'count(sum by (hostname) (ceph_osd_metadata)) or vector(0)',
3939
CLUSTER_ALERTS = 'count by (cluster) (ALERTS{alertstate="firing"}) or vector(0)'
4040
}
4141

0 commit comments

Comments
 (0)