Versions in this module Expand all Collapse all v0 v0.0.1 Jun 24, 2019 Changes in this version + func AddDatasource(configDir string, filename string, datasource Datasource) error + func AddSender(configDir string, filename string, s sender.Sender) error + func InitConfig(configDir string) error + func IsCronValid(spec string) bool + func ParseSender(args []string) (*sender.Sender, error) + func ReadConfig(dir string) (*Config, *ConfigError) + func SetCollectorCron(configDir string, filename string, typ string, cron string) error + func SetCollectorEnabled(configDir string, filename string, typ string, enabled bool) error + type Config struct + Datasources []Datasource + Http []sender.Http + Postgres *Postgres + Sout *sender.Sout + System *System + func (c *Config) SendersToInterface() []sender.Sender + type ConfigError struct + func (ce ConfigError) Print() error + type Datasource struct + DbName string + Host string + Password string + Port int + SslCert *string + SslKey *string + SslMode *string + SslRootCert *string + Tags map[string]string + Username string + func ParseDSN(dsn string, tags []string) (*Datasource, error) + type Postgres struct + PgLocks *collector.PgLocks + PgStatActivity *collector.PgStatActivity + PgStatArchiver *collector.PgStatArchiver + PgStatStatements *collector.PgStatStatements + PgStatUserIndexes *collector.PgStatUserIndexes + PgStatUserTables *collector.PgStatUserTables + func (p *Postgres) ToInterface() []collector.Collector + type System struct + Cpu *collector.Cpu + Disk *collector.Disk + Load *collector.Load + Net *collector.Net + SwapMem *collector.SwapMem + VirtMem *collector.VirtMem + func (s *System) ToInterface() []collector.Collector