Based on feedback, we propose a more generic approach for supporting multiple resources with shared attributes in MetricsHub. Instead of introducing specific properties like host.names (plural) that map artificially to multiple host.name (singular) attributes, we can use host.name (singular) and check if it is an array. If it is an array, this resource will be treated as a "multiple-resource" resource, with all attributes defined as arrays split accordingly.
Proposed Enhancement
Support array syntax for host.name and other attributes without needing new pluralized properties.
If an attribute (e.g., host.name) is detected as an array, MetricsHub will treat it as a "multiple-resource" configuration.
This approach remains generic and allows any attribute to support multiple-resource configurations.
Manage consolidation between multiple array attributes for example (host.name: [host1, host2] and host.id: [host_id1, host_id2]
Issue Description:
Based on feedback, we propose a more generic approach for supporting multiple resources with shared attributes in MetricsHub. Instead of introducing specific properties like
host.names
(plural) that map artificially to multiplehost.name
(singular) attributes, we can usehost.name
(singular) and check if it is an array. If it is an array, this resource will be treated as a "multiple-resource" resource, with all attributes defined as arrays split accordingly.Proposed Enhancement
host.name
and other attributes without needing new pluralized properties.host.name
) is detected as an array, MetricsHub will treat it as a "multiple-resource" configuration.host.name: [host1, host2] and host.id: [host_id1, host_id2]
Example Configuration: