Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alertmanager ¶
type Alertmanager struct {
// contains filtered or unexported fields
}
An Alertmanager manages the alerts for one user.
func (*Alertmanager) ApplyConfig ¶
func (am *Alertmanager) ApplyConfig(userID string, conf *config.Config) error
ApplyConfig applies a new configuration to an Alertmanager.
type Config ¶
type Config struct { UserID string // Used to persist notification logs and silences on disk. DataDir string Logger log.Logger Peer *cluster.Peer PeerTimeout time.Duration Retention time.Duration ExternalURL *url.URL }
Config configures an Alertmanager.
type MultitenantAlertmanager ¶
type MultitenantAlertmanager struct {
// contains filtered or unexported fields
}
A MultitenantAlertmanager manages Alertmanager instances for multiple organizations.
func NewMultitenantAlertmanager ¶
func NewMultitenantAlertmanager(cfg *MultitenantAlertmanagerConfig, cfgCfg configs_client.Config) (*MultitenantAlertmanager, error)
NewMultitenantAlertmanager creates a new MultitenantAlertmanager.
func (*MultitenantAlertmanager) GetStatusHandler ¶
func (am *MultitenantAlertmanager) GetStatusHandler() StatusHandler
GetStatusHandler returns the status handler for this multi-tenant alertmanager.
func (*MultitenantAlertmanager) Run ¶
func (am *MultitenantAlertmanager) Run()
Run the MultitenantAlertmanager.
func (*MultitenantAlertmanager) ServeHTTP ¶
func (am *MultitenantAlertmanager) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP serves the Alertmanager's web UI and API.
func (*MultitenantAlertmanager) Stop ¶
func (am *MultitenantAlertmanager) Stop()
Stop stops the MultitenantAlertmanager.
type MultitenantAlertmanagerConfig ¶
type MultitenantAlertmanagerConfig struct { DataDir string Retention time.Duration ExternalURL flagext.URLValue PollInterval time.Duration FallbackConfigFile string AutoWebhookRoot string // contains filtered or unexported fields }
MultitenantAlertmanagerConfig is the configuration for a multitenant Alertmanager.
func (*MultitenantAlertmanagerConfig) RegisterFlags ¶
func (cfg *MultitenantAlertmanagerConfig) RegisterFlags(f *flag.FlagSet)
RegisterFlags adds the flags required to config this to the given FlagSet.
type StatusHandler ¶
type StatusHandler struct {
// contains filtered or unexported fields
}
StatusHandler shows the status of the alertmanager.
func (StatusHandler) ServeHTTP ¶
func (s StatusHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP serves the status of the alertmanager.