Documentation ¶
Index ¶
- Variables
- func CommandWrapper(command func(*cobra.Command, []string) error) func(*cobra.Command, []string)
- func Execute()
- func GetAlertmanagerURL() (*url.URL, error)
- func TypeMatcher(matcher labels.Matcher) (types.Matcher, error)
- func TypeMatchers(matchers []labels.Matcher) (types.Matchers, error)
- type ByAlphabetical
- type Config
- type MeshStatus
- type PeerStatus
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{
Use: "amtool",
Short: "Alertmanager CLI",
Long: `View and modify the current Alertmanager state.
[Config File]
The alertmanger tool will read a config file from the --config cli argument, AMTOOL_CONFIG environment variable,
$HOME/.amtool.yml or /etc/amtool.yml the options are as follows
alertmanager.url
Set a default alertmanager url for each request
author
Set a default author value for new silences. If this argument is not specified then the username will be used
comment_required
Require a comment on silence creation
output
Set a default output type. Options are (simple, extended, json)
`,
}
RootCmd represents the base command when called without any subcommands
Functions ¶
func CommandWrapper ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GetAlertmanagerURL ¶
func TypeMatcher ¶
Only valid for when you are going to add a silence Doesn't allow negative operators
Types ¶
type ByAlphabetical ¶
func (ByAlphabetical) Len ¶
func (s ByAlphabetical) Len() int
func (ByAlphabetical) Less ¶
func (s ByAlphabetical) Less(i, j int) bool
func (ByAlphabetical) Swap ¶
func (s ByAlphabetical) Swap(i, j int)
type Config ¶
type Config struct { Config string `json:"config"` ConfigJSON config.Config `json:configJSON` MeshStatus map[string]interface{} `json:"meshStatus"` VersionInfo map[string]string `json:"versionInfo"` Uptime time.Time `json:"uptime"` }
Config is the response type of alertmanager config endpoint Duped in cli/format needs to be moved to common/model
type MeshStatus ¶
type MeshStatus struct { Name string `json:"name"` NickName string `json:"nickName"` Peers []PeerStatus `json:"peerStatus"` }
type PeerStatus ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.