Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DatabaseTotal = prometheus.NewGauge( prometheus.GaugeOpts{ Name: "database_total", Help: "Total number of items in the database", }) DatabaseFiring = prometheus.NewGauge( prometheus.GaugeOpts{ Name: "database_firing", Help: "Total number of firing alerts in the database", }) DatabaseResolved = prometheus.NewGauge( prometheus.GaugeOpts{ Name: "database_resolved", Help: "Total number of resolved alerts in the database", }) DatabasePruned = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "database_pruned", Help: "Total number of alerts pruned", }, []string{"reason"}, ) Operations = prometheus.NewSummaryVec( prometheus.SummaryOpts{ Name: "database_operation_duration_microseconds", Help: "Total duration and counts of database methods", }, []string{"type"}, ) )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Import(*models.Alert) Export(models.NotificationSender) Prune() CalculateLastAlert() float64 DebugHandler(w http.ResponseWriter, r *http.Request) }
type BasicBackend ¶
type BasicBackend struct {
// contains filtered or unexported fields
}
func NewBasicBackend ¶
func NewBasicBackend() *BasicBackend
func (*BasicBackend) CalculateLastAlert ¶
func (set *BasicBackend) CalculateLastAlert() float64
func (*BasicBackend) DebugHandler ¶
func (set *BasicBackend) DebugHandler(w http.ResponseWriter, r *http.Request)
func (*BasicBackend) Export ¶
func (set *BasicBackend) Export(notifier models.NotificationSender)
Build list of alerts to send to alertmanager Pass the send function here so that we can manage locks from this
func (*BasicBackend) Import ¶
func (set *BasicBackend) Import(alert *models.Alert)
Add a Nagios Alert
func (*BasicBackend) Prune ¶
func (set *BasicBackend) Prune()
Click to show internal directories.
Click to hide internal directories.