models

package
v0.0.0-...-defd7d8 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 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"`
	Service          string `json:"service"`
	Notify           string `json:"notify"`
	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