diff --git a/src/system_metrics/mongoose_system_metrics_collector.erl b/src/system_metrics/mongoose_system_metrics_collector.erl index b827121dfd..b401330db8 100644 --- a/src/system_metrics/mongoose_system_metrics_collector.erl +++ b/src/system_metrics/mongoose_system_metrics_collector.erl @@ -38,7 +38,9 @@ report_getters() -> ]. get_hosts_count() -> - Hosts = ejabberd_config:get_global_option(hosts), + HostTypes = ejabberd_config:get_global_option_or_default(host_types, []), + Domains = lists:flatten([mongoose_domain_core:get_domains_by_host_type(HT) || HT <- HostTypes]), + Hosts = ejabberd_config:get_global_option_or_default(hosts, []) ++ Domains, NumberOfHosts = length(Hosts), [#{report_name => hosts, key => count, value => NumberOfHosts}].