clickhouse table add hostname column
This commit is contained in:
parent
04fe1eb704
commit
e9918290b0
|
@ -125,6 +125,7 @@ func (mh *MetricsHouseType) post(conn driver.Conn, series []*types.Sample) error
|
|||
e.Timestamp, //会自动转换时间格式
|
||||
e.Timestamp, //会自动转换时间格式
|
||||
e.Metric,
|
||||
config.Config.GetHostname(),
|
||||
convertTags(e),
|
||||
e.Value,
|
||||
)
|
||||
|
@ -147,6 +148,7 @@ CREATE TABLE IF NOT EXISTS %s (
|
|||
event_time DateTime
|
||||
, event_date Date
|
||||
, metric LowCardinality(String)
|
||||
, hostname LowCardinality(String)
|
||||
, tags String
|
||||
, value Float64
|
||||
) ENGINE = MergeTree
|
||||
|
|
Loading…
Reference in New Issue