Documentation ¶
Index ¶
- func ConvertMetricsToDashboard(input *DashboardOptions) ([]byte, error)
- func ParseMetricsFile(filePath string) (map[string]*dto.MetricFamily, error)
- type DashboardOptions
- type DataDogDashboard
- type DataDogFormula
- type DataDogLayout
- type DataDogQuery
- type DataDogRequest
- type DataDogTemplateVariables
- type DataDogWidget
- func NewDataDogCounterWidget(dopts *DashboardOptions, mf *dto.MetricFamily) *DataDogWidget
- func NewDataDogGaugeWidget(dopts *DashboardOptions, mf *dto.MetricFamily) *DataDogWidget
- func NewDataDogGroupWidget(dopts *DashboardOptions, title, color string) *DataDogWidget
- func NewDataDogHistogramWidget(dopts *DashboardOptions, mf *dto.MetricFamily) *DataDogWidget
- func NewDataDogNoteWidget(dopts *DashboardOptions, text string) *DataDogWidget
- func NewDataDogTextWidget(dopts *DashboardOptions, text string) *DataDogWidget
- type DataDogWidgets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertMetricsToDashboard ¶
func ConvertMetricsToDashboard(input *DashboardOptions) ([]byte, error)
func ParseMetricsFile ¶
func ParseMetricsFile(filePath string) (map[string]*dto.MetricFamily, error)
Types ¶
type DashboardOptions ¶
type DataDogDashboard ¶
type DataDogDashboard struct { Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Widgets []DataDogWidget `json:"widgets,omitempty"` TemplateVariables []DataDogTemplateVariables `json:"template_variables,omitempty"` LayoutType string `json:"layout_type,omitempty"` IsReadOnly bool `json:"is_read_only,omitempty"` NotifyList []interface{} `json:"notify_list,omitempty"` ReflowType string `json:"reflow_type,omitempty"` ID string `json:"id,omitempty"` }
func MetricsToDataDog ¶
func MetricsToDataDog(dopts *DashboardOptions, metrics map[string]*dto.MetricFamily) (*DataDogDashboard, error)
type DataDogFormula ¶
type DataDogFormula struct { Alias string `json:"alias,omitempty"` ConditionalFormats []interface{} `json:"conditional_formats,omitempty"` Limit struct { Count int `json:"count,omitempty"` Order string `json:"order,omitempty"` } `json:"limit,omitempty"` CellDisplayMode string `json:"cell_display_mode,omitempty"` Formula string `json:"formula,omitempty"` }
type DataDogLayout ¶
type DataDogQuery ¶
type DataDogRequest ¶
type DataDogRequest struct { Formulas []DataDogFormula `json:"formulas,omitempty"` ResponseFormat string `json:"response_format,omitempty"` Queries []DataDogQuery `json:"queries,omitempty"` Style struct { Palette string `json:"palette"` LineType string `json:"line_type"` LineWidth string `json:"line_width"` } `json:"style"` }
type DataDogWidget ¶
type DataDogWidget struct { ID int64 `json:"id"` Definition struct { Title string `json:"title,omitempty"` TitleSize string `json:"title_size,omitempty"` TitleAlign string `json:"title_align,omitempty"` Type string `json:"type,omitempty"` Requests []DataDogRequest `json:"requests,omitempty"` HasSearchBar string `json:"has_search_bar,omitempty"` ShowLegend bool `json:"show_legend,omitempty"` LegendLayout string `json:"legend_layout,omitempty"` LegendColumns []string `json:"legend_columns,omitempty"` Text string `json:"text,omitempty"` FontSize string `json:"font_size,omitempty"` Content string `json:"content,omitempty"` Widgets DataDogWidgets `json:"widgets,omitempty"` BackgroundColor string `json:"background_color,omitempty"` LayoutType string `json:"layout_type,omitempty"` // contains filtered or unexported fields } `json:"definition"` Layout *DataDogLayout `json:"layout,omitempty"` }
func NewDataDogCounterWidget ¶
func NewDataDogCounterWidget(dopts *DashboardOptions, mf *dto.MetricFamily) *DataDogWidget
func NewDataDogGaugeWidget ¶
func NewDataDogGaugeWidget(dopts *DashboardOptions, mf *dto.MetricFamily) *DataDogWidget
func NewDataDogGroupWidget ¶
func NewDataDogGroupWidget(dopts *DashboardOptions, title, color string) *DataDogWidget
func NewDataDogHistogramWidget ¶
func NewDataDogHistogramWidget(dopts *DashboardOptions, mf *dto.MetricFamily) *DataDogWidget
func NewDataDogNoteWidget ¶
func NewDataDogNoteWidget(dopts *DashboardOptions, text string) *DataDogWidget
func NewDataDogTextWidget ¶
func NewDataDogTextWidget(dopts *DashboardOptions, text string) *DataDogWidget
type DataDogWidgets ¶
type DataDogWidgets []DataDogWidget
func (DataDogWidgets) Len ¶
func (a DataDogWidgets) Len() int
func (DataDogWidgets) Less ¶
func (a DataDogWidgets) Less(i, j int) bool
func (DataDogWidgets) Swap ¶
func (a DataDogWidgets) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.