Documentation ¶
Overview ¶
Provides a server type for starting and configuring a Kapacitor server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { HTTP httpd.Config `toml:"http"` Replay replay.Config `toml:"replay"` Storage storage.Config `toml:"storage"` Task task_store.Config `toml:"task"` InfluxDB []influxdb.Config `toml:"influxdb" override:"influxdb,element-key=name"` Logging logging.Config `toml:"logging"` ConfigOverride config.Config `toml:"config-override"` // Input services Graphites []graphite.Config `toml:"graphite"` Collectd collectd.Config `toml:"collectd"` OpenTSDB opentsdb.Config `toml:"opentsdb"` UDPs []udp.Config `toml:"udp"` // Alert handlers Alerta alerta.Config `toml:"alerta" override:"alerta"` HipChat hipchat.Config `toml:"hipchat" override:"hipchat"` OpsGenie opsgenie.Config `toml:"opsgenie" override:"opsgenie"` PagerDuty pagerduty.Config `toml:"pagerduty" override:"pagerduty"` 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.Config `toml:"slack" override:"slack"` Talk talk.Config `toml:"talk" override:"talk"` Telegram telegram.Config `toml:"telegram" override:"telegram"` VictorOps victorops.Config `toml:"victorops" override:"victorops"` // Discovery for scraping Scrapers []scraper.Config `toml:"scrapers" override:"scrapers,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"` Files []file.Config `toml:"files-discovery" override:"files-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"` Static []static.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"` 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 Queryexecutor ¶
type Queryexecutor struct{}
func (*Queryexecutor) ExecuteQuery ¶
type Server ¶
type Server struct { Commander command.Commander TaskMaster *kapacitor.TaskMaster TaskMasterLookup *kapacitor.TaskMasterLookup AuthService auth.Interface HTTPDService *httpd.Service StorageService *storage.Service AlertService *alert.Service TaskStore *task_store.Service ReplayService *replay.Service InfluxDBService *influxdb.Service ConfigOverrideService *config.Service TesterService *servicetest.Service StatsService *stats.Service ScraperService *scraper.Service AzureService *azure.Service ConsulService *consul.Service DNSService *dns.Service EC2Service *ec2.Service FileService *file.Service GCEService *gce.Service MarathonService *marathon.Service NerveService *nerve.Service ServersetService *serverset.Service StaticService *static.Service TritonService *triton.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 LogService logging.Interface Logger *log.Logger // 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) SetClusterID ¶ added in v1.3.0
func (*Server) SetDynamicService ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.