Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocRequest ¶
type AllocRequest struct { Job struct { Region string `json:"Region"` Name string `json:"Name"` } `json:"Job"` }
AllocRequest is the structure that matches the response for an allocation query to nomad in order to get the JobName and JobRegion
type JobStruct ¶
type JobStruct struct { JobName string Region string ScaleMin int ScaleMax int ScaleCountUp int ScaleCountDown int ScaleCooldown time.Time ScaleCooldownUp time.Time ScaleCooldownDown time.Time LastRun time.Time Count int Group int NoGo bool EndValue int GroupName string TaskName string }
JobStruct is where the meta data extracted from each nomad job is keept.
type PostRequest ¶
type PostRequest struct { Receiver string `json:"receiver"` Status string `json:"status"` Alerts []struct { Status string `json:"status"` Labels struct { Alertname string `json:"alertname"` Region string `json:"region"` Client string `json:"client"` Instance string `json:"instance"` Job string `json:"job"` JobName string `json:"exported_job"` AllocID string `json:"alloc_id"` Monitor string `json:"monitor"` Rt string `json:"rt"` Severity string `json:"severity"` } `json:"labels"` Annotations struct { Description string `json:"description"` Summary string `json:"summary"` } `json:"annotations"` StartsAt time.Time `json:"startsAt"` EndsAt time.Time `json:"endsAt"` GeneratorURL string `json:"generatorURL"` } `json:"alerts"` GroupLabels struct { Alertname string `json:"alertname"` } `json:"groupLabels"` CommonLabels struct { Alertname string `json:"alertname"` Job string `json:"job"` Monitor string `json:"monitor"` Severity string `json:"severity"` } `json:"commonLabels"` CommonAnnotations struct { } `json:"commonAnnotations"` ExternalURL string `json:"externalURL"` Version string `json:"version"` Time time.Time }
PostRequest is the struct where the alert coming from alert manager would be stored.
type Prometheus ¶
type TrigeredAction ¶
Click to show internal directories.
Click to hide internal directories.