aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/swarm/swarm-smoke
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/swarm/swarm-smoke')
-rw-r--r--cmd/swarm/swarm-smoke/main.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/cmd/swarm/swarm-smoke/main.go b/cmd/swarm/swarm-smoke/main.go
index 4f28e86b1..43d2c1ff5 100644
--- a/cmd/swarm/swarm-smoke/main.go
+++ b/cmd/swarm/swarm-smoke/main.go
@@ -117,7 +117,7 @@ func main() {
swarmmetrics.MetricsInfluxDBDatabaseFlag,
swarmmetrics.MetricsInfluxDBUsernameFlag,
swarmmetrics.MetricsInfluxDBPasswordFlag,
- swarmmetrics.MetricsInfluxDBHostTagFlag,
+ swarmmetrics.MetricsInfluxDBTagsFlag,
}...)
app.Flags = append(app.Flags, tracing.Flags...)
@@ -176,13 +176,14 @@ func emitMetrics(ctx *cli.Context) error {
database = ctx.GlobalString(swarmmetrics.MetricsInfluxDBDatabaseFlag.Name)
username = ctx.GlobalString(swarmmetrics.MetricsInfluxDBUsernameFlag.Name)
password = ctx.GlobalString(swarmmetrics.MetricsInfluxDBPasswordFlag.Name)
- hosttag = ctx.GlobalString(swarmmetrics.MetricsInfluxDBHostTagFlag.Name)
+ tags = ctx.GlobalString(swarmmetrics.MetricsInfluxDBTagsFlag.Name)
)
- return influxdb.InfluxDBWithTagsOnce(gethmetrics.DefaultRegistry, endpoint, database, username, password, "swarm-smoke.", map[string]string{
- "host": hosttag,
- "version": gitCommit,
- "filesize": fmt.Sprintf("%v", filesize),
- })
+
+ tagsMap := utils.SplitTagsFlag(tags)
+ tagsMap["version"] = gitCommit
+ tagsMap["filesize"] = fmt.Sprintf("%v", filesize)
+
+ return influxdb.InfluxDBWithTagsOnce(gethmetrics.DefaultRegistry, endpoint, database, username, password, "swarm-smoke.", tagsMap)
}
return nil