Documentation
¶
Index ¶
- type AlertManagerConfig
- type BlackboxConfig
- type DashboardConfig
- type DatasourceConfig
- type GrafanaConfig
- type PrometheusConfig
- func (c *PrometheusConfig) AddAlertmanager(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddBlackbox(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddBlackboxExporter(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddCDC(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddDrainer(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddGrafana(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddKafka(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddKafkaExporter(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddLightning(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddMonitoredServer(ip string) *PrometheusConfig
- func (c *PrometheusConfig) AddNodeExpoertor(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddPD(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddPump(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddPushgateway(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddTiDB(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddTiFlash(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddTiFlashLearner(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddTiKV(ip string, port uint64) *PrometheusConfig
- func (c *PrometheusConfig) AddZooKeeper(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 AlertManagerConfig ¶
type AlertManagerConfig struct{}
AlertManagerConfig represent the data to generate AlertManager config
func NewAlertManagerConfig ¶
func NewAlertManagerConfig() *AlertManagerConfig
NewAlertManagerConfig returns a AlertManagerConfig
func (*AlertManagerConfig) Config ¶
func (c *AlertManagerConfig) Config() ([]byte, error)
Config generate the config file data.
func (*AlertManagerConfig) ConfigToFile ¶
func (c *AlertManagerConfig) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*AlertManagerConfig) ConfigWithTemplate ¶
func (c *AlertManagerConfig) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the AlertManager config content by tpl
type BlackboxConfig ¶
type BlackboxConfig struct{}
BlackboxConfig represent the data to generate AlertManager config
func NewBlackboxConfig ¶
func NewBlackboxConfig() *BlackboxConfig
NewBlackboxConfig returns a BlackboxConfig
func (*BlackboxConfig) Config ¶
func (c *BlackboxConfig) Config() ([]byte, error)
Config generate the config file data.
func (*BlackboxConfig) ConfigToFile ¶
func (c *BlackboxConfig) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*BlackboxConfig) ConfigWithTemplate ¶
func (c *BlackboxConfig) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the AlertManager config content by tpl
type DashboardConfig ¶
DashboardConfig represent the data to generate Dashboard config
func NewDashboardConfig ¶
func NewDashboardConfig(cluster, deployDir string) *DashboardConfig
NewDashboardConfig returns a DashboardConfig
func (*DashboardConfig) Config ¶
func (c *DashboardConfig) Config() ([]byte, error)
Config generate the config file data.
func (*DashboardConfig) ConfigToFile ¶
func (c *DashboardConfig) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*DashboardConfig) ConfigWithTemplate ¶
func (c *DashboardConfig) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the Dashboard config content by tpl
type DatasourceConfig ¶
DatasourceConfig represent the data to generate Datasource config
func NewDatasourceConfig ¶
func NewDatasourceConfig(cluster, ip string) *DatasourceConfig
NewDatasourceConfig returns a DatasourceConfig
func (*DatasourceConfig) Config ¶
func (c *DatasourceConfig) Config() ([]byte, error)
Config generate the config file data.
func (*DatasourceConfig) ConfigToFile ¶
func (c *DatasourceConfig) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*DatasourceConfig) ConfigWithTemplate ¶
func (c *DatasourceConfig) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the Datasource config content by tpl
func (*DatasourceConfig) WithPort ¶
func (c *DatasourceConfig) WithPort(port uint64) *DatasourceConfig
WithPort set Port field of DatasourceConfig
type GrafanaConfig ¶
GrafanaConfig represent the data to generate Grafana config
func NewGrafanaConfig ¶
func NewGrafanaConfig(ip, deployDir string) *GrafanaConfig
NewGrafanaConfig returns a GrafanaConfig
func (*GrafanaConfig) Config ¶
func (c *GrafanaConfig) Config() ([]byte, error)
Config generate the config file data.
func (*GrafanaConfig) ConfigToFile ¶
func (c *GrafanaConfig) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*GrafanaConfig) ConfigWithTemplate ¶
func (c *GrafanaConfig) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the Grafana config content by tpl
func (*GrafanaConfig) WithPort ¶
func (c *GrafanaConfig) WithPort(port uint64) *GrafanaConfig
WithPort set Port field of GrafanaConfig
type PrometheusConfig ¶
type PrometheusConfig struct { ClusterName string KafkaAddrs []string NodeExporterAddrs []string TiDBStatusAddrs []string TiKVStatusAddrs []string PDAddrs []string TiFlashStatusAddrs []string TiFlashLearnerStatusAddrs []string PumpAddrs []string DrainerAddrs []string CDCAddrs []string ZookeeperAddrs []string BlackboxExporterAddrs []string LightningAddrs []string MonitoredServers []string AlertmanagerAddrs []string PushgatewayAddr string BlackboxAddr string KafkaExporterAddr string GrafanaAddr string }
PrometheusConfig represent the data to generate Prometheus config
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) AddBlackbox ¶
func (c *PrometheusConfig) AddBlackbox(ip string, port uint64) *PrometheusConfig
AddBlackbox add an blackbox address
func (*PrometheusConfig) AddBlackboxExporter ¶
func (c *PrometheusConfig) AddBlackboxExporter(ip string, port uint64) *PrometheusConfig
AddBlackboxExporter add a BlackboxExporter address
func (*PrometheusConfig) AddCDC ¶
func (c *PrometheusConfig) AddCDC(ip string, port uint64) *PrometheusConfig
AddCDC add a cdc address
func (*PrometheusConfig) AddDrainer ¶
func (c *PrometheusConfig) AddDrainer(ip string, port uint64) *PrometheusConfig
AddDrainer add a drainer address
func (*PrometheusConfig) AddGrafana ¶
func (c *PrometheusConfig) AddGrafana(ip string, port uint64) *PrometheusConfig
AddGrafana add an kafka exporter address
func (*PrometheusConfig) AddKafka ¶
func (c *PrometheusConfig) AddKafka(ip string, port uint64) *PrometheusConfig
AddKafka add a kafka address
func (*PrometheusConfig) AddKafkaExporter ¶
func (c *PrometheusConfig) AddKafkaExporter(ip string, port uint64) *PrometheusConfig
AddKafkaExporter add an kafka exporter address
func (*PrometheusConfig) AddLightning ¶
func (c *PrometheusConfig) AddLightning(ip string, port uint64) *PrometheusConfig
AddLightning add a lightning address
func (*PrometheusConfig) AddMonitoredServer ¶
func (c *PrometheusConfig) AddMonitoredServer(ip string) *PrometheusConfig
AddMonitoredServer add a MonitoredServer address
func (*PrometheusConfig) AddNodeExpoertor ¶
func (c *PrometheusConfig) AddNodeExpoertor(ip string, port uint64) *PrometheusConfig
AddNodeExpoertor add a node expoter address
func (*PrometheusConfig) AddPD ¶
func (c *PrometheusConfig) AddPD(ip string, port uint64) *PrometheusConfig
AddPD add a PD address
func (*PrometheusConfig) AddPump ¶
func (c *PrometheusConfig) AddPump(ip string, port uint64) *PrometheusConfig
AddPump add a pump address
func (*PrometheusConfig) AddPushgateway ¶
func (c *PrometheusConfig) AddPushgateway(ip string, port uint64) *PrometheusConfig
AddPushgateway add an pushgateway address
func (*PrometheusConfig) AddTiDB ¶
func (c *PrometheusConfig) AddTiDB(ip string, port uint64) *PrometheusConfig
AddTiDB add a TiDB address
func (*PrometheusConfig) AddTiFlash ¶
func (c *PrometheusConfig) AddTiFlash(ip string, port uint64) *PrometheusConfig
AddTiFlash add a TiFlash address
func (*PrometheusConfig) AddTiFlashLearner ¶
func (c *PrometheusConfig) AddTiFlashLearner(ip string, port uint64) *PrometheusConfig
AddTiFlashLearner add a TiFlash learner address
func (*PrometheusConfig) AddTiKV ¶
func (c *PrometheusConfig) AddTiKV(ip string, port uint64) *PrometheusConfig
AddTiKV add a TiKV address
func (*PrometheusConfig) AddZooKeeper ¶
func (c *PrometheusConfig) AddZooKeeper(ip string, port uint64) *PrometheusConfig
AddZooKeeper add a zookeeper 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