Documentation ¶
Index ¶
- type PrometheusConfig
- func (c *PrometheusConfig) AddAlertmanager(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddGrafana(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddMasterAddrs(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddWorkerAddrs(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) Config() ([]byte, error)
- func (c *PrometheusConfig) ConfigToFile(file string) error
- func (c *PrometheusConfig) ConfigWithTemplate(tpl string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrometheusConfig ¶
type PrometheusConfig struct { ClusterName string AlertmanagerAddrs []string GrafanaAddr string MasterAddrs []string WorkerAddrs []string }
PrometheusConfig represents the data to generate Prometheus config You may need to update the template file if change this struct.
func NewPrometheusConfig ¶
func NewPrometheusConfig(cluster string) *PrometheusConfig
NewPrometheusConfig returns a PrometheusConfig
func (*PrometheusConfig) AddAlertmanager ¶
func (c *PrometheusConfig) AddAlertmanager(ip string, port uint64) *PrometheusConfig
AddAlertmanager add an alertmanager address
func (*PrometheusConfig) AddGrafana ¶
func (c *PrometheusConfig) AddGrafana(ip string, port uint64) *PrometheusConfig
AddGrafana adds an kafka exporter address
func (*PrometheusConfig) AddMasterAddrs ¶
func (c *PrometheusConfig) AddMasterAddrs(ip string, port uint64) *PrometheusConfig
AddMasterAddrs add an dm-master address
func (*PrometheusConfig) AddWorkerAddrs ¶
func (c *PrometheusConfig) AddWorkerAddrs(ip string, port uint64) *PrometheusConfig
AddWorkerAddrs add an dm-worker address
func (*PrometheusConfig) Config ¶
func (c *PrometheusConfig) Config() ([]byte, error)
Config generate the config file data.
func (*PrometheusConfig) ConfigToFile ¶
func (c *PrometheusConfig) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*PrometheusConfig) ConfigWithTemplate ¶
func (c *PrometheusConfig) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the Prometheus config content by tpl
Click to show internal directories.
Click to hide internal directories.