events

package
v1.0.0-beta7 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CliCommand = cli.Command{
	Name:  "events",
	Usage: "Manage events",
	Subcommands: []cli.Command{
		{
			Name:      "send",
			Usage:     "Sends an event to OpenNMS",
			ArgsUsage: "<uei>",
			Action:    sendEvent,
			Flags: []cli.Flag{
				cli.StringFlag{
					Name:  "host, H",
					Usage: "IP address or FQDN of the host that sends the event",
				},
				cli.Int64Flag{
					Name:  "nodeid, n",
					Usage: "The numeric node identifier",
				},
				cli.StringFlag{
					Name:  "interface, i",
					Usage: "IP address of the interface",
				},
				cli.StringFlag{
					Name:  "service, s",
					Usage: "Service name",
				},
				cli.IntFlag{
					Name:  "ifindex, f",
					Usage: "ifIndex of the interface",
				},
				cli.StringFlag{
					Name:  "descr, d",
					Usage: "A description for the event",
				},

				cli.GenericFlag{
					Name:  "severity, x",
					Value: severities,
					Usage: "The severity of the event: " + severities.EnumAsString(),
				},
				cli.StringSliceFlag{
					Name:  "parm, p",
					Usage: "An event parameter (e.x. --parm 'url=http://www.google.com/')",
				},
			},
		},
		{
			Name:      "apply",
			Usage:     "Sends an event to OpenNMS in YAML format",
			Action:    applyEvent,
			ArgsUsage: "<yaml>",
			Flags: []cli.Flag{
				cli.StringFlag{
					Name:  "file, f",
					Usage: "External YAML file (use '-' for STDIN Pipe)",
				},
			},
		},
	},
}

CliCommand the CLI command to manage events

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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