Merge pull request #10051 from influxdata/ga-config
Update example config with UDP precision optionpull/10062/head
commit
e9f0dc48ca
|
@ -487,6 +487,9 @@
|
||||||
# bind-address = ":8089"
|
# bind-address = ":8089"
|
||||||
# database = "udp"
|
# database = "udp"
|
||||||
# retention-policy = ""
|
# 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
|
# These next lines control how batching works. You should have this enabled
|
||||||
# otherwise you could get dropped metrics or poor performance. Batching
|
# otherwise you could get dropped metrics or poor performance. Batching
|
||||||
|
|
|
@ -100,7 +100,7 @@ type Configs []Config
|
||||||
// Diagnostics returns one set of diagnostics for all of the Configs.
|
// Diagnostics returns one set of diagnostics for all of the Configs.
|
||||||
func (c Configs) Diagnostics() (*diagnostics.Diagnostics, error) {
|
func (c Configs) Diagnostics() (*diagnostics.Diagnostics, error) {
|
||||||
d := &diagnostics.Diagnostics{
|
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 {
|
for _, cc := range c {
|
||||||
|
@ -109,7 +109,7 @@ func (c Configs) Diagnostics() (*diagnostics.Diagnostics, error) {
|
||||||
continue
|
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)
|
d.AddRow(r)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ enabled = true
|
||||||
bind-address = ":4444"
|
bind-address = ":4444"
|
||||||
database = "awesomedb"
|
database = "awesomedb"
|
||||||
retention-policy = "awesomerp"
|
retention-policy = "awesomerp"
|
||||||
|
precision = "s"
|
||||||
batch-size = 100
|
batch-size = 100
|
||||||
batch-pending = 9
|
batch-pending = 9
|
||||||
batch-timeout = "10ms"
|
batch-timeout = "10ms"
|
||||||
|
@ -33,6 +34,8 @@ udp-payload-size = 1500
|
||||||
t.Fatalf("unexpected database: %s", c.Database)
|
t.Fatalf("unexpected database: %s", c.Database)
|
||||||
} else if c.RetentionPolicy != "awesomerp" {
|
} else if c.RetentionPolicy != "awesomerp" {
|
||||||
t.Fatalf("unexpected retention policy: %s", c.RetentionPolicy)
|
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 {
|
} else if c.BatchSize != 100 {
|
||||||
t.Fatalf("unexpected batch size: %d", c.BatchSize)
|
t.Fatalf("unexpected batch size: %d", c.BatchSize)
|
||||||
} else if c.BatchPending != 9 {
|
} else if c.BatchPending != 9 {
|
||||||
|
|
Loading…
Reference in New Issue