dashboards

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cli.Command{
	Name:  "dashboards",
	Usage: "Manipulate custom dashboards",
	Description: `
    Manipulate custom dashboards. With no subcommand specified, this will show all dashboards. See https://mackerel.io/docs/entry/advanced/cli
`,
	Action: doListDashboards,
	Commands: []*cli.Command{
		{
			Name:      "pull",
			Usage:     "Pull custom dashboards",
			ArgsUsage: "--id <id>",
			Description: `
	Pull custom dashboards from Mackerel server and output these to local files.
`,
			Action: doPullDashboard,
			Flags: []cli.Flag{
				&cli.StringFlag{
					Name:  "id",
					Usage: "dashboard ID to pull (optional, if not specified, pulls all dashboards)",
				},
			},
		},
		{
			Name:      "push",
			Usage:     "Push custom dashboard",
			ArgsUsage: "--file-path | F <file>",
			Description: `
	Push custom dashboards to Mackerel server from a specified file.
	When "id" is defined in the file, updates the dashboard.
	Otherwise creates a new dashboard.
`,
			Action: doPushDashboard,
			Flags: []cli.Flag{
				&cli.StringFlag{
					Name:    "file-path",
					Aliases: []string{"F"},
					Usage:   "read dashboard from the file",
				},
			},
		},

		{
			Name:   "generate",
			Hidden: true,
			Action: func(_ context.Context, c *cli.Command) error {
				logger.Log("error", "`mkr dashboards generate` command has been obsolete")
				os.Exit(1)
				return nil
			},
		},
	},
}

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