Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
use instance-id for statsd metrics. fix #361
Browse files Browse the repository at this point in the history
  • Loading branch information
Dieterbe committed Nov 3, 2016
1 parent f135742 commit 958233b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions metrictank.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,10 @@ func main() {
log.Fatal(4, "you should enable at least 1 input plugin")
}

hostname, err := os.Hostname()
if err != nil {
log.Fatal(4, "failed to lookup hostname. %s", err)
}

if !*statsdEnabled {
log.Warn("running metrictank without statsd instrumentation.")
}
stats, err := helper.New(*statsdEnabled, *statsdAddr, *statsdType, "metrictank", strings.Replace(hostname, ".", "_", -1))
stats, err := helper.New(*statsdEnabled, *statsdAddr, *statsdType, "metrictank", *instance)
if err != nil {
log.Fatal(4, "failed to initialize statsd. %s", err)
}
Expand Down

0 comments on commit 958233b

Please sign in to comment.