Documentation ¶
Overview ¶
Package AppInsightsMonitor adds Azure AppInsights webtest support in IngressMonitorController
Index ¶
- Constants
- type Annotation
- type AppinsightsMonitorService
- func (aiService *AppinsightsMonitorService) Add(monitor models.Monitor)
- func (aiService *AppinsightsMonitorService) GetAll() []models.Monitor
- func (aiService *AppinsightsMonitorService) GetByName(monitorName string) (*models.Monitor, error)
- func (aiService *AppinsightsMonitorService) Remove(monitor models.Monitor)
- func (aiService *AppinsightsMonitorService) Setup(provider config.Provider)
- func (aiService *AppinsightsMonitorService) Update(monitor models.Monitor)
- type AzureConfig
- type WebTest
Constants ¶
const ( AppInsightsStatusCodeAnnotation = "appinsights.monitor.stakater.com/statuscode" // Allowed httpStatusCodes, AppInsightsRetryEnabledAnnotation = "appinsights.monitor.stakater.com/retryenable" // Only Boolen values AppInsightsFrequency = "appinsights.monitor.stakater.com/frequency" // Allowed Values 300,600,900, // Default value for annotations AppInsightsStatusCodeAnnotationDefaultValue = http.StatusOK AppInsightsRetryEnabledAnnotationDefaultValue = true AppInsightsFrequencyDefaultValue = 300 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct {
// contains filtered or unexported fields
}
Annotation holds appinsights specific annotations provided from ingress object
type AppinsightsMonitorService ¶
type AppinsightsMonitorService struct {
// contains filtered or unexported fields
}
AppinsightsMonitorService struct contains parameters required by appinsights go client
func (*AppinsightsMonitorService) Add ¶
func (aiService *AppinsightsMonitorService) Add(monitor models.Monitor)
Add function method will add a monitor
func (*AppinsightsMonitorService) GetAll ¶
func (aiService *AppinsightsMonitorService) GetAll() []models.Monitor
GetAll function will return all monitors (appinsights webtest) object in an array GetAll for AppInsights returns all webtest for specific component in a resource group.
func (*AppinsightsMonitorService) GetByName ¶
func (aiService *AppinsightsMonitorService) GetByName(monitorName string) (*models.Monitor, error)
GetByName function will return a monitors (appinsights webtest) object based on the name provided GetAll for AppInsights returns a webtest for specific resource group.
func (*AppinsightsMonitorService) Remove ¶
func (aiService *AppinsightsMonitorService) Remove(monitor models.Monitor)
Remove method will remove a monitor
func (*AppinsightsMonitorService) Setup ¶
func (aiService *AppinsightsMonitorService) Setup(provider config.Provider)
Setup method will initialize a appinsights's go client
func (*AppinsightsMonitorService) Update ¶
func (aiService *AppinsightsMonitorService) Update(monitor models.Monitor)
Update method will update a monitor
type AzureConfig ¶
type AzureConfig struct { Subscription_ID string Client_ID string Client_Secret string Tenant_ID string }
AzureConfig holds service principle credentials required of auth
type WebTest ¶
type WebTest struct { XMLName xml.Name `xml:"WebTest"` Xmlns string `xml:"xmlns,attr"` Name string `xml:"Name,attr"` Enabled bool `xml:"Enabled,attr"` Timeout string `xml:"Timeout,attr"` Description string `xml:"Description,attr"` StopOnError bool `xml:"StopOnError,attr"` Items struct { Request struct { Method string `xml:"Method,attr"` Version string `xml:"Version,attr"` URL string `xml:"Url,attr"` ThinkTime string `xml:"ThinkTime,attr"` Timeout int `xml:"Timeout,attr"` Encoding string `xml:"Encoding,attr"` ExpectedHttpStatusCode int `xml:"ExpectedHttpStatusCode,attr"` ExpectedResponseUrl string `xml:"ExpectedResponseUrl,attr"` IgnoreHttpStatusCode bool `xml:"IgnoreHttpStatusCode,attr"` } `xml:"Request"` } `xml:"Items"` }