sabanote

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do()

Types

type AlertCmd

type AlertCmd struct {
	CommonCmd
	Title string `arg:"--title" help:"annotation title" default:"[Host <HOST> status at <TIME>]" placeholder:"TITLE"`
}

type AnnotationCmd

type AnnotationCmd struct {
	CommonCmd
	Title   string   `arg:"--title" help:"annotation title" default:"Host <HOST> status when <ALERT> is alerted (<TIME>)" placeholder:"TITLE"`
	Service string   `arg:"-s,--service,required" help:"target service" placeholder:"SERVICE"`
	Roles   []string `arg:"-r,--role,separate,required" help:"target role (accept multiple)" placeholder:"ROLE"`
	After   int      `arg:"--after" help:"post the report N times after the alert occured (0-5)" default:"1" placeholder:"MINUTES"`
}

type CommonCmd

type CommonCmd struct {
	Monitors   []string `arg:"-m,--monitor,separate,required" help:"monitor ID (accept multiple)" placeholder:"MONITOR_ID"`
	Host       string   `arg:"-H,--host" help:"host ID" placeholder:"HOST_ID"`
	MemorySort bool     `arg:"--mem" help:"sort by memory size (sort by CPU% by default)"`
	Cmd        string   `arg:"-c,--cmd" help:"custom command path" placeholder:"CMD_PATH"`
	StateDir   string   `arg:"--state" help:"state file folder" placeholder:"DIR"`
	Before     int      `arg:"--before" help:"post the report N times before the alert occured (0-5)" default:"3" placeholder:"MINUTES"`
	AlertFreq  int      `` /* 142-byte string literal not displayed */
	Delay      int      `arg:"--delay" help:"delay seconds before running command (0-29)" default:"0" placeholder:"SECONDS"`
	Verbose    bool     `arg:"--verbose" help:"print steps to stderr (for debug)"`
}

Jump to

Keyboard shortcuts

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