models

package
v0.0.0-...-e8cbd8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Type             string `json:"type"`
	Host             string `json:"host"`
	HostAlias        string `json:"hostalias"`
	Service          string `json:"service"`
	ServiceAlias     string `json:"servicealias"`
	Notify           string `json:"notify"`
	ActifId          string `json:"actifid"`
	InfoCompl        string `json:"infocompl"`
	Ressource        string `json:"ressource"`
	Env              string `json:"env"`
	Severity         string `json:"severity"`
	DateTime         string `json:"datetime"`
	NotificationType string `json:"notification-type"`
	State            string `json:"state"`
	Message          string `json:"message"`
	Note             string `json:"note"`
}

Alert represents a Nagios alert that is to be converted to a Prometheus alert

Type: host or service Host: hostname Service: servicename Notify: notify string ** overwriten by notifyLabel if present ** Notification types:

PROBLEM / ACKNOWLEDGEMENT / RECOVERY

State:

Host states:
  UP / DOWN
Service states:
  CRITICAL / WARNING / UNKNOWN / OK

Message: Optional message Note: Reference URL

type AlertMetadata

type AlertMetadata struct {
	LastUpdate time.Time
}

type InternalAlert

type InternalAlert struct {
	PrometheusAlert prometheus.Alert
	Metadata        AlertMetadata
}

type NotificationSender

type NotificationSender interface {
	Send([]prometheus.Alert)
}

A function type sent to export function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL