Help us shape the future of Go! Take the 2026 Go Developer Survey

metricstodash

package
v0.1.121 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MetricsToDashCmd = &cobra.Command{
	Use:     "metrics-to-dash",
	Aliases: []string{"metricstodash", "metricsToDash"},
	Short:   "Create a dashboard from an Openmetrics / Prometheus response.",
	Long:    usage,
	RunE: func(cmd *cobra.Command, args []string) error {
		do := dashboard.DashboardOptions{
			File:                inputMetricsToDashFile,
			Title:               inputMetricsToDashTitle,
			Prefix:              inputMetricsToDashPrefix,
			Description:         inputMetricsToDashDesc,
			WidgetHeight:        inputMetricsToDashHeight,
			WidgetWidth:         inputMetricsToDashWidth,
			TemplateVars:        inputMetricsToDashTemplateVars,
			TemplateVarDefaults: inputMetricsToDashTemplateVarDefaults,
			StripPrefixes:       inputMetricsToDashStripPrefixes,
			Pretty:              inputMetricsToDashPretty,
			ShowHelp:            inputMetricsToDashShowHelp,
		}
		data, err := dashboard.ConvertMetricsToDashboard(&do)
		if err != nil {
			return err
		}
		fmt.Println(string(data))
		return nil
	},
}

MetricsToDashCmd represents the metricsToDash command

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