Documentation
¶
Index ¶
- func ConvertBrowserMonitorConfigToGeneric(config BrowserMonitorConfig) map[string]interface{}
- func ConvertHTTPMonitorConfigToGeneric(config HTTPMonitorConfig) map[string]interface{}
- type AlertChannelEmailConfig
- type AlertChannelModel
- type AlertChannelPagerDutyConfig
- type AlertChannelSlackConfig
- type AlertChannelWebhookConfig
- type BaseSink
- type BrowserMonitorConfig
- type CloudWatchSinkConfig
- type CreateAlertChannelInput
- type CreateMonitorInput
- type CreateSecretInput
- type CreateSinkInput
- type CreateUserRequest
- type CreateUserResponse
- type ErrorResponse
- type HTTPMonitorConfig
- type InfluxDBV1SinkConfig
- type MonitorModel
- type NewServerInput
- type PingMonitorConfig
- type SecretModel
- type Server
- type TimeStreamSinkConfig
- type UpdateAlertChannelInput
- type UpdateMonitorInput
- type UpdateSecretInput
- type UpdateSinkInput
- type UpdateUserRequest
- type UserModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertBrowserMonitorConfigToGeneric ¶
func ConvertBrowserMonitorConfigToGeneric(config BrowserMonitorConfig) map[string]interface{}
func ConvertHTTPMonitorConfigToGeneric ¶
func ConvertHTTPMonitorConfigToGeneric(config HTTPMonitorConfig) map[string]interface{}
Types ¶
type AlertChannelEmailConfig ¶
type AlertChannelModel ¶
type AlertChannelModel struct {
Name string `json:"name"`
AlertChannelType string `json:"alert_channel_type"`
Config map[string]interface{} `json:"config"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Monitors []string `json:"monitors"`
}
func (*AlertChannelModel) SendDown ¶
func (a *AlertChannelModel) SendDown(monitorName string, message string, dbConn *db.DatabaseConnection) error
func (*AlertChannelModel) SendUp ¶
func (a *AlertChannelModel) SendUp(monitorName string, message string, dbConn *db.DatabaseConnection) error
type AlertChannelPagerDutyConfig ¶
type AlertChannelPagerDutyConfig struct {
ServiceKey string `json:"service_key"`
}
type AlertChannelSlackConfig ¶
type AlertChannelSlackConfig struct {
WebhookURL string `json:"webhook_url"`
}
type BrowserMonitorConfig ¶
type CloudWatchSinkConfig ¶
type CreateAlertChannelInput ¶
type CreateMonitorInput ¶
type CreateMonitorInput struct {
Name string `json:"name"`
Description string `json:"description"`
IntervalSeconds int `json:"interval_seconds"`
MonitorType string `json:"monitor_type"`
Config map[string]interface{} `json:"config"`
SuccessThreshold int `json:"success_threshold"`
FailureThreshold int `json:"failure_threshold"`
Tags []string `json:"tags"`
AlertChannels []string `json:"alert_channels"`
Silenced bool `json:"silenced"`
}
func (*CreateMonitorInput) Validate ¶
func (c *CreateMonitorInput) Validate() error
type CreateSecretInput ¶
type CreateSinkInput ¶
type CreateSinkInput struct {
Name string `json:"name"`
SinkType string `json:"sink_type"`
Config map[string]interface{} `json:"config"`
}
func (*CreateSinkInput) Validate ¶
func (c *CreateSinkInput) Validate() error
type CreateUserRequest ¶
type CreateUserResponse ¶
type CreateUserResponse struct {
APIKey string `json:"api_key"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type HTTPMonitorConfig ¶
type HTTPMonitorConfig struct {
URL string `json:"url"`
Method string `json:"method"`
BodyContains string `json:"expected_body_contains"`
TimeoutMS int `json:"timeout_ms"`
ExpectResponseCode int `json:"expect_response_code"`
SkipTLSValidation bool `json:"skip_tls_validation"`
RequestBody string `json:"request_body"`
Headers map[string]string `json:"headers"`
}
type InfluxDBV1SinkConfig ¶
type MonitorModel ¶
type MonitorModel struct {
Name string `json:"name"`
Description string `json:"description"`
CurrentOutageReason string `json:"current_outage_reason"`
IntervalSeconds int `json:"interval_seconds"`
Status string `json:"status"`
LastCheckedAt *time.Time `json:"last_checked_at"`
LastCheckedFriendly string `json:"last_checked_friendly"`
StatusLastChangedAt time.Time `json:"status_last_changed_at"`
StatusLastChangedFriendly string `json:"status_last_changed_friendly"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
MonitorType string `json:"monitor_type"`
Config map[string]interface{} `json:"config"`
Paused bool `json:"paused"`
FailureCount int `json:"failure_count"`
SuccessCount int `json:"success_count"`
SuccessThreshold int `json:"success_threshold"`
FailureThreshold int `json:"failure_threshold"`
Tags []string `json:"tags"`
AlertChannels []string `json:"alert_channels"`
Silenced bool `json:"silenced"`
}
type NewServerInput ¶
type NewServerInput struct {
Port int // Port to listen on
AutoTLS bool // If true, use Let's Encrypt to automatically get a TLS certificate
Hostname string // Hostname must be set if using AutoTLS, also used when sending email alerts for callback URLs
Logger *logrus.Logger // Logger to use for logging
DBConnection *db.DatabaseConnection
BrowserMonitoringEnabled bool // If true, browser monitoring will be enabled
}
NewServerInput is the input for creating a Server.
type PingMonitorConfig ¶
type SecretModel ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(input NewServerInput) (*Server, error)
NewServer creates a new api server.
type TimeStreamSinkConfig ¶
type UpdateAlertChannelInput ¶
type UpdateAlertChannelInput struct {
Config map[string]interface{} `json:"config"`
}
type UpdateMonitorInput ¶
type UpdateMonitorInput struct {
IntervalSeconds *int `json:"interval_seconds"`
Paused *bool `json:"paused"`
Config map[string]interface{} `json:"config"`
Description *string `json:"description"`
SuccessThreshold *int `json:"success_threshold"`
FailureThreshold *int `json:"failure_threshold"`
Tags *[]string `json:"tags"`
AlertChannels *[]string `json:"alert_channels"`
Silenced *bool `json:"silenced"`
}
func (*UpdateMonitorInput) Validate ¶
func (c *UpdateMonitorInput) Validate() error
type UpdateSecretInput ¶
type UpdateSecretInput struct {
Value string `json:"value"`
}
type UpdateSinkInput ¶
type UpdateSinkInput struct {
Config map[string]interface{} `json:"config"`
}
func (*UpdateSinkInput) Validate ¶
func (u *UpdateSinkInput) Validate() error
type UpdateUserRequest ¶
Click to show internal directories.
Click to hide internal directories.