Documentation ¶
Overview ¶
Provides a server type for starting and configuring a Kapacitor server.
Index ¶
- type BuildInfo
- type Config
- type Diagnostic
- type Queryexecutor
- type Server
- func (s *Server) AppendService(name string, srv Service)
- func (s *Server) Close() error
- func (s *Server) Err() <-chan error
- func (s *Server) Open() error
- func (s *Server) Reload()
- func (s *Server) SetClusterID(clusterID uuid.UUID) error
- func (s *Server) SetDynamicService(name string, srv dynamicService)
- type Service
- type Updater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Alert alert.Config `toml:"alert"` HTTP httpd.Config `toml:"http"` Replay replay.Config `toml:"replay"` Storage storage.Config `toml:"storage"` Task task_store.Config `toml:"task"` Load load.Config `toml:"load"` InfluxDB []influxdb.Config `toml:"influxdb" override:"influxdb,element-key=name"` Logging diagnostic.Config `toml:"logging"` ConfigOverride config.Config `toml:"config-override"` TLS tlsconfig.Config `toml:"tls"` // Input services Graphite []graphite.Config `toml:"graphite"` Collectd collectd.Config `toml:"collectd"` OpenTSDB opentsdb.Config `toml:"opentsdb"` UDP []udp.Config `toml:"udp"` // Alert handlers Alertmanager alertmanager.Config `toml:"alertmanager" override:"alertmanager"` HipChat hipchat.Config `toml:"hipchat" override:"hipchat"` Kafka kafka.Configs `toml:"kafka" override:"kafka,element-key=id"` MQTT mqtt.Configs `toml:"mqtt" override:"mqtt,element-key=name"` OpsGenie opsgenie.Config `toml:"opsgenie" override:"opsgenie"` OpsGenie2 opsgenie2.Config `toml:"opsgenie2" override:"opsgenie2"` PagerDuty pagerduty.Config `toml:"pagerduty" override:"pagerduty"` PagerDuty2 pagerduty2.Config `toml:"pagerduty2" override:"pagerduty2"` Pushover pushover.Config `toml:"pushover" override:"pushover"` HTTPPost httppost.Configs `toml:"httppost" override:"httppost,element-key=endpoint"` SMTP smtp.Config `toml:"smtp" override:"smtp"` SNMPTrap snmptrap.Config `toml:"snmptrap" override:"snmptrap"` Sensu sensu.Config `toml:"sensu" override:"sensu"` Slack slack.Configs `toml:"slack" override:"slack,element-key=workspace"` Talk talk.Config `toml:"talk" override:"talk"` Telegram telegram.Config `toml:"telegram" override:"telegram"` VictorOps victorops.Config `toml:"victorops" override:"victorops"` // Discovery for scraping Scraper []scraper.Config `toml:"scraper" override:"scraper,element-key=name"` Azure []azure.Config `toml:"azure" override:"azure,element-key=id"` Consul []consul.Config `toml:"consul" override:"consul,element-key=id"` DNS []dns.Config `toml:"dns" override:"dns,element-key=id"` EC2 []ec2.Config `toml:"ec2" override:"ec2,element-key=id"` FileDiscovery []file_discovery.Config `toml:"file-discovery" override:"file-discovery,element-key=id"` GCE []gce.Config `toml:"gce" override:"gce,element-key=id"` Marathon []marathon.Config `toml:"marathon" override:"marathon,element-key=id"` Nerve []nerve.Config `toml:"nerve" override:"nerve,element-key=id"` Serverset []serverset.Config `toml:"serverset" override:"serverset,element-key=id"` StaticDiscovery []static_discovery.Config `toml:"static-discovery" override:"static-discovery,element-key=id"` Triton []triton.Config `toml:"triton" override:"triton,element-key=id"` // Third-party integrations Kubernetes k8s.Configs `toml:"kubernetes" override:"kubernetes,element-key=id" env-config:"implicit-index"` Swarm swarm.Configs `toml:"swarm" override:"swarm,element-key=id"` Reporting reporting.Config `toml:"reporting"` Stats stats.Config `toml:"stats"` UDF udf.Config `toml:"udf"` Deadman deadman.Config `toml:"deadman"` Hostname string `toml:"hostname"` DataDir string `toml:"data_dir"` SkipConfigOverrides bool `toml:"skip-config-overrides"` DefaultRetentionPolicy string `toml:"default-retention-policy"` Commander command.Commander `toml:"-"` }
Config represents the configuration format for the kapacitord binary.
func NewConfig ¶
func NewConfig() *Config
NewConfig returns an instance of Config with reasonable defaults.
func NewDemoConfig ¶
NewDemoConfig returns the config that runs when no config is specified.
func (*Config) ApplyEnvOverrides ¶
type Diagnostic ¶
type Queryexecutor ¶
type Queryexecutor struct{}
func (*Queryexecutor) ExecuteQuery ¶
type Server ¶
type Server struct { Commander command.Commander TaskMaster *kapacitor.TaskMaster TaskMasterLookup *kapacitor.TaskMasterLookup LoadService *load.Service SideloadService *sideload.Service AuthService auth.Interface HTTPDService *httpd.Service StorageService *storage.Service AlertService *alert.Service TaskStore *task_store.Service ReplayService *replay.Service SessionService *diagnostic.SessionService InfluxDBService *influxdb.Service ConfigOverrideService *config.Service TesterService *servicetest.Service StatsService *stats.Service ScraperService *scraper.Service MetaClient *kapacitor.NoopMetaClient QueryExecutor *Queryexecutor // List of services in startup order Services []Service // Map of service name to index in Services list ServicesByName map[string]int // Map of services capable of receiving dynamic configuration updates. DynamicServices map[string]Updater BuildInfo BuildInfo ClusterID uuid.UUID ServerID uuid.UUID // Profiling CPUProfile string MemProfile string DiagService *diagnostic.Service Diag Diagnostic // contains filtered or unexported fields }
Server represents a container for the metadata and storage data and services. It is built using a Config and it manages the startup and shutdown of all services in the proper order.
func (*Server) AppendService ¶
func (*Server) Err ¶
Err returns an error channel that multiplexes all out of band errors received from all services.
func (*Server) SetDynamicService ¶
Click to show internal directories.
Click to hide internal directories.