soreana commented on a change in pull request #4438:
URL: https://github.com/apache/cloudstack/pull/4438#discussion_r714636652
##########
File path:
plugins/integrations/prometheus/src/main/java/org/apache/cloudstack/metrics/PrometheusExporterImpl.java
##########
@@ -423,17 +524,23 @@ public String toMetricsString() {
String zoneUuid;
String state;
int total;
+ String hosttags;
- public ItemHost(final String zn, final String zu, final String st, int
cnt) {
+ public ItemHost(final String zn, final String zu, final String st, int
cnt, final String tags) {
super("cloudstack_hosts_total");
zoneName = zn;
zoneUuid = zu;
state = st;
total = cnt;
+ hosttags = tags;
}
@Override
public String toMetricsString() {
+ if (! Strings.isNullOrEmpty(hosttags)) {
Review comment:
@GutoVeronezi and @nvazquez thanks!
I have refactored the code and used `commons.lang3` in [this
commit](https://github.com/apache/cloudstack/pull/4438/commits/aaa1bcfa12732bd7069c31119b709a7b3416e931).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]