Options
All
  • Public
  • Public/Protected
  • All
Menu

Module AlertManager

Index

References

IAlertManagerContext

Re-exports IAlertManagerContext

alertManagerComposer

Re-exports alertManagerComposer

setupAlertManagerContext

Re-exports setupAlertManagerContext

Type aliases

AlertsDBKey

AlertsDBKey: string

AlertsDBLevelDown

AlertsDBLevelDown: AbstractLevelDOWN<AlertsDBKey, AlertsDBValue>

AlertsDBLevelIterator

AlertsDBLevelIterator: AbstractIterator<string, string>

AlertsDBLevelUp

AlertsDBLevelUp: LevelUp<AlertsDBLevelDown, AlertsDBLevelIterator>

AlertsDBValue

AlertsDBValue: IAlert

BaseDBKey

BaseDBLevelDown

BaseDBLevelDown: AbstractLevelDOWN<BaseDBKey, BaseDBValue>

BaseDBLevelIterator

BaseDBLevelIterator: AbstractIterator<string, string>

BaseDBLevelUp

BaseDBLevelUp: LevelUp<BaseDBLevelDown, BaseDBLevelIterator>

BaseDBValue

BaseDBValue: string

IAlertMessageFilterFn

IAlertMessageFilterFn: (triple: ITriple<IAlertManagerPredicates>) => boolean
param

database record to filter

returns

true if the record is expected on the walk result

Type declaration

ILabels

ILabels: {}

Type declaration

  • [label: string]: string

Variables

Const alertManagerComposer

alertManagerComposer: Composer<IAlertManagerContext> = new Composer<IAlertManagerContext>()

Const alertManagerDbPath

alertManagerDbPath: undefined | string = process.env.ALERTMANAGER_DB_PATH

Const alertsDbPath

alertsDbPath: undefined | string = process.env.ALERTS_DB_PATH

Const externalUrl

externalUrl: URL = new URL(process.env.EXTERNAL_URL ||"http://127.0.0.1:9093")

Const internalUrl

internalUrl: undefined | string = process.env.INTERNAL_URL

Const templatePath

templatePath: string = process.env.TEMPLATE_FILE ||"default.tmpl"

Functions

Const alertManagerCBMiddleware

Const alertManagerMiddleware

  • processes updates sent from AlertManager to the bot webhook

    Parameters

    • ctx: IAlertManagerContext

      bot context containing AlertManager instance

    • next: () => Promise<void>

      continues middleware callback chain

        • (): Promise<void>
        • Returns Promise<void>

    Returns Promise<void>

    callback chain result

Const decodeFromString

  • decodeFromString<T>(str: string): T
  • decodes a messagepack string into an object

    Type parameters

    • T

    Parameters

    • str: string

      encoded string

    Returns T

    object with decoded data

Const encodeToString

  • encodeToString(obj: Record<string, unknown>): string
  • encodes an object into a messagepack string

    Parameters

    • obj: Record<string, unknown>

      object to encode

    Returns string

    encoded string

Const setupAlertManagerContext

Generated using TypeDoc