Documentation ¶
Overview ¶
Package v04 package implements support for interacting with Alertmanager 0.4 Collected data will be mapped to karma internal schema defined the karma/models package This file defines Alertmanager alerts mapping
Package v04 package implements support for interacting with Alertmanager 0.4 Collected data will be mapped to karma internal schema defined the karma/models package This file defines Alertmanager silences mapping
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertMapper ¶
type AlertMapper struct {
mapper.AlertMapper
}
AlertMapper implements Alertmanager API schema
func (AlertMapper) AbsoluteURL ¶ added in v0.9.0
func (m AlertMapper) AbsoluteURL(baseURI string) (string, error)
AbsoluteURL for alerts API endpoint this mapper supports
func (AlertMapper) Decode ¶ added in v0.9.0
func (m AlertMapper) Decode(source io.ReadCloser) ([]models.AlertGroup, error)
Decode Alertmanager API response body and return karma model instances
func (AlertMapper) IsOpenAPI ¶ added in v0.48.1
func (m AlertMapper) IsOpenAPI() bool
IsOpenAPI returns true is remote Alertmanager uses OpenAPI
func (AlertMapper) IsSupported ¶
func (m AlertMapper) IsSupported(version string) bool
IsSupported returns true if given version string is supported
func (AlertMapper) QueryArgs ¶ added in v0.9.0
func (m AlertMapper) QueryArgs() string
QueryArgs for HTTP requests send to the Alertmanager API endpoint
type SilenceMapper ¶
type SilenceMapper struct {
mapper.SilenceMapper
}
SilenceMapper implements Alertmanager 0.4 API schema
func (SilenceMapper) AbsoluteURL ¶ added in v0.9.0
func (m SilenceMapper) AbsoluteURL(baseURI string) (string, error)
AbsoluteURL for silences API endpoint this mapper supports
func (SilenceMapper) Decode ¶ added in v0.9.0
func (m SilenceMapper) Decode(source io.ReadCloser) ([]models.Silence, error)
Decode Alertmanager API response body and return karma model instances
func (SilenceMapper) IsOpenAPI ¶ added in v0.48.1
func (m SilenceMapper) IsOpenAPI() bool
IsOpenAPI returns true is remote Alertmanager uses OpenAPI
func (SilenceMapper) IsSupported ¶
func (m SilenceMapper) IsSupported(version string) bool
IsSupported returns true if given version string is supported
func (SilenceMapper) QueryArgs ¶ added in v0.9.0
func (m SilenceMapper) QueryArgs() string
QueryArgs for HTTP requests send to the Alertmanager API endpoint
type StatusMapper ¶ added in v0.48.1
type StatusMapper struct {
mapper.StatusMapper
}
StatusMapper implements Alertmanager API schema
func (StatusMapper) AbsoluteURL ¶ added in v0.48.1
func (s StatusMapper) AbsoluteURL(baseURI string) (string, error)
AbsoluteURL for status API endpoint this mapper supports
func (StatusMapper) Decode ¶ added in v0.48.1
func (s StatusMapper) Decode(source io.ReadCloser) (models.AlertmanagerStatus, error)
Decode Alertmanager API response body and return karma model instances
func (StatusMapper) IsOpenAPI ¶ added in v0.48.1
func (s StatusMapper) IsOpenAPI() bool
IsOpenAPI returns true is remote Alertmanager uses OpenAPI
func (StatusMapper) IsSupported ¶ added in v0.48.1
func (s StatusMapper) IsSupported(version string) bool
IsSupported returns true if given version string is supported
func (StatusMapper) QueryArgs ¶ added in v0.48.1
func (s StatusMapper) QueryArgs() string
QueryArgs for HTTP requests send to the Alertmanager API endpoint