This commit is contained in:
megao 2024-11-21 00:10:01 +01:00 committed by GitHub
commit 07dba5d787
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -9,12 +9,18 @@ namespace DB
ColumnsDescription StorageSystemAsynchronousMetrics::getColumnsDescription() ColumnsDescription StorageSystemAsynchronousMetrics::getColumnsDescription()
{ {
return ColumnsDescription auto description = ColumnsDescription
{ {
{"metric", std::make_shared<DataTypeString>(), "Metric name."}, {"metric", std::make_shared<DataTypeString>(), "Metric name."},
{"value", std::make_shared<DataTypeFloat64>(), "Metric value."}, {"value", std::make_shared<DataTypeFloat64>(), "Metric value."},
{"description", std::make_shared<DataTypeString>(), "Metric description."}, {"description", std::make_shared<DataTypeString>(), "Metric description."},
}; };
description.setAliases({
{"name", std::make_shared<DataTypeString>(), "metric"}
});
return description;
} }

View File

@ -22,7 +22,8 @@ CREATE TABLE system.asynchronous_metrics
( (
`metric` String, `metric` String,
`value` Float64, `value` Float64,
`description` String `description` String,
`name` String ALIAS metric
) )
ENGINE = SystemAsynchronousMetrics ENGINE = SystemAsynchronousMetrics
COMMENT 'Contains metrics that are calculated periodically in the background. For example, the amount of RAM in use.' COMMENT 'Contains metrics that are calculated periodically in the background. For example, the amount of RAM in use.'