Documentation ¶
Overview ¶
Copyright © 2023 David Aparicio [email protected]
Index ¶
- Constants
- Variables
- func CloseAlert(ctx context.Context, ambariAlert types.Alert, c *util.Config) (err error)
- func CommentAlert(ctx context.Context, ambariAlert types.Alert, c *util.Config) (err error)
- func CreateAlert(ctx context.Context, ambariAlert types.Alert, c *util.Config) (err error)
- func CurrentVersion() string
- func GetAmbariAlert(ctx context.Context, c *util.Config) (alert []types.Item, err error)
- func OperationNotPossibleError(op string) error
- func OperationUnknownError(op string) error
- func SendHearbeat(ctx context.Context, c *util.Config)
Constants ¶
View Source
const ERROR_STATUS_CODE = 299
Variables ¶
View Source
var BuildDate = "Thu Jan 1 01:00:00 CET 1970" // date -r 0 (Mac), date -d @0 (Linux)
View Source
var ErrOperationNotPermit = errors.New("can't create an Opsgenie alert for OK status")
View Source
var ErrOperationUnknown = errors.New("can't create an Opsgenie alert for an unknown status")
View Source
var ErrStatusCode = errors.New("HTTP Error")
View Source
var GitCommit = "54a8d74ea3cf6fdcadfac10ee4a4f2553d4562f6q"
View Source
var Version = "v0.0.1-SNAPSHOT"
Version GitCommit BuiltDate are set at build-time
Functions ¶
func CloseAlert ¶
CloseAlert closes an Opsgenie alert and remove it from the AmbariOpgenieMapping map, using the Opsgenie Go SDK.
func CommentAlert ¶
CommentAlert comments an Opsgenie alert, using the Opsgenie Go SDK.
func CreateAlert ¶
CreateAlert creates a new Opsgenie alert and save it into the AmbariOpgenieMapping map, using the Opsgenie Go SDK.
func CurrentVersion ¶
func CurrentVersion() string
func GetAmbariAlert ¶
GetAmbariAlert calls the Ambari API to retrieve all alerts of a Hadoop cluster
func OperationUnknownError ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.