Merge pull request #10051 from influxdata/ga-config

Update example config with UDP precision option
pull/10062/head
Gunnar 2018-07-10 08:16:28 -07:00 committed by GitHub
commit e9f0dc48ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View File

@ -487,6 +487,9 @@
# bind-address = ":8089"
# database = "udp"
# retention-policy = ""
# InfluxDB precision for timestamps on received points ("" or "n", "u", "ms", "s", "m", "h")
# precision = ""
# These next lines control how batching works. You should have this enabled
# otherwise you could get dropped metrics or poor performance. Batching

View File

@ -100,7 +100,7 @@ type Configs []Config
// Diagnostics returns one set of diagnostics for all of the Configs.
func (c Configs) Diagnostics() (*diagnostics.Diagnostics, error) {
d := &diagnostics.Diagnostics{
Columns: []string{"enabled", "bind-address", "database", "retention-policy", "batch-size", "batch-pending", "batch-timeout"},
Columns: []string{"enabled", "bind-address", "database", "retention-policy", "batch-size", "batch-pending", "batch-timeout", "precision"},
}
for _, cc := range c {
@ -109,7 +109,7 @@ func (c Configs) Diagnostics() (*diagnostics.Diagnostics, error) {
continue
}
r := []interface{}{true, cc.BindAddress, cc.Database, cc.RetentionPolicy, cc.BatchSize, cc.BatchPending, cc.BatchTimeout}
r := []interface{}{true, cc.BindAddress, cc.Database, cc.RetentionPolicy, cc.BatchSize, cc.BatchPending, cc.BatchTimeout, cc.Precision}
d.AddRow(r)
}

View File

@ -16,6 +16,7 @@ enabled = true
bind-address = ":4444"
database = "awesomedb"
retention-policy = "awesomerp"
precision = "s"
batch-size = 100
batch-pending = 9
batch-timeout = "10ms"
@ -33,6 +34,8 @@ udp-payload-size = 1500
t.Fatalf("unexpected database: %s", c.Database)
} else if c.RetentionPolicy != "awesomerp" {
t.Fatalf("unexpected retention policy: %s", c.RetentionPolicy)
} else if c.Precision != "s" {
t.Fatalf("unexpected precision: %s", c.Precision)
} else if c.BatchSize != 100 {
t.Fatalf("unexpected batch size: %d", c.BatchSize)
} else if c.BatchPending != 9 {