Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clickhouse table add hostname column #63

Merged
merged 1 commit into from
Jun 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions house/house.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -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
Expand Down