// To speed up querying on templatized dashboards.
var getAllHostData = function (target) {
var instanceId = typeof target.templatedCluster == 'undefined' ? '' : '&instanceId=' + target.templatedCluster;
+ var appId = target.app;
+ if ((appId === 'nifi' || appId === 'druid') && !instanceId) {
+ instanceId = "%"
+ }
var precision = target.precision === 'default' || typeof target.precision == 'undefined' ? '' : '&precision='
+ target.precision;
var metricAggregator = target.aggregator === "none" ? '' : '._' + target.aggregator;
}
String instanceId = getInstanceId();
- if (StringUtils.isNotEmpty(instanceId)) {
+ if (StringUtils.isNotEmpty(instanceId) && !"%".equals(instanceId)) {
if (instanceId.contains("%")) {
appendConjunction = append(sb, appendConjunction, instanceId, " INSTANCE_ID LIKE ?");
} else {
return sb;
}
+ @Override
+ public String getInstanceId() {
+ return instanceId == null || "%".equals(instanceId) || instanceId.isEmpty() ? null : instanceId;
+ }
+
public boolean isMetricMetadataCondition() {
return isMetricMetadataCondition;
}
uuids = metadataManager.getUuidsForGetMetricQuery(Collections.singletonList("%"),
Collections.singletonList("%"), "%", "%");
- Assert.assertTrue(uuids.size() == 6);
+ Assert.assertTrue(uuids.size() == 9);
}
@Test