Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = &Config{}
A configuration with default values.
Functions ¶
func RunCollector ¶
Types ¶
type Config ¶
type Config struct {
// InfluxDb host:port pair.
// Default is "localhost:8086".
Host string
// Database to write points to.
// Default is "stats" and is auto created
Database string
// Username with privileges on provided database.
Username string
// Password for provided user.
Password string
// Measurement to write points to.
// Default is "go.runtime.<hostname>".
Measurement string
// Measurement to write points to.
RetentionPolicy string
// Interval at which to write batched points to InfluxDB.
// Default is 60 seconds
BatchInterval time.Duration
// Precision in time to write your points in.
// Default is nanoseconds
Precision string
// Interval at which to collect points.
// Default is 10 seconds
CollectionInterval time.Duration
// Disable collecting CPU Statistics. cpu.*
// Default is false
DisableCpu bool
// Disable collecting Memory Statistics. mem.*
DisableMem bool
// Disable collecting GC Statistics (requires Memory be not be disabled). mem.gc.*
DisableGc bool
// Default is DefaultLogger which exits when the library encounters a fatal error.
Logger Logger
Tags map[string]string
}
type DefaultLogger ¶
type DefaultLogger struct{}
func (*DefaultLogger) Fatalln ¶
func (*DefaultLogger) Fatalln(v ...interface{})
func (*DefaultLogger) Println ¶
func (*DefaultLogger) Println(v ...interface{})
Click to show internal directories.
Click to hide internal directories.
