if (GMetric.VALUE_TYPE_INT.equals(type)) {
gmetric = new GMetricInteger(host, name, type, units, slope, clearValues);
} else if (GMetric.VALUE_TYPE_STRING.equals(type)) {
gmetric = new GMetricString(host, name, type, units, slope, clearValues);
} else if (GMetric.VALUE_TYPE_FLOAT.equals(type)) {
gmetric = new GMetricFloat(host, name, type, units, slope, clearValues);
} else if (GMetric.VALUE_TYPE_DOUBLE.equals(type)) {
gmetric = new GMetricDouble(host, name, type, units, slope, clearValues);
} else {
throw new IllegalArgumentException("unknown metric type");
}