Skip to content

Commit 92f4c8a

Browse files
lgmusni
authored andcommitted
fix service_health calculation to match host_health
1 parent 6fd9600 commit 92f4c8a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/main.tt

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ function initGraphs() {
447447
[% IF empty_services || (service_stats.total-service_stats.pending) == 0 %]
448448
[% service_health = 0 %]
449449
[% ELSE %]
450-
[% service_health = (service_stats.ok + service_stats.warning + service_stats.unknown) / ((service_stats.total-service_stats.pending)) * 100 %]
450+
[% service_health = service_stats.ok / (service_stats.total-service_stats.pending) * 100 %]
451451
[% END %]
452452
var services = bb.generate({
453453
data: {

templates/tac.tt

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
[% IF empty || (service_stats.total-service_stats.pending) == 0 %]
103103
[% service_health = 0 %]
104104
[% ELSE %]
105-
[% service_health = (service_stats.ok + service_stats.warning + service_stats.unknown) / ((service_stats.total-service_stats.pending)) * 100 %]
105+
[% service_health = service_stats.ok / (service_stats.total-service_stats.pending) * 100 %]
106106
[% END %]
107107
[% service_health = sprintf('%i', service_health) %]
108108
[% service_perc = service_health %]

0 commit comments

Comments
 (0)