Documentation ¶
Index ¶
- func ParseLevel(s string) slog.Level
- func SetUpSlog(wr io.Writer, level slog.Level)
- type Board
- type DashboardsExportConfig
- type DashboardsExporter
- type DashboardsIdler
- type Datasource
- type ExportConfig
- type GrafanaConfig
- type IdleDashboard
- type IdleDashboardsResult
- type IdleMetricsResult
- type IdlerConfig
- type MetricName
- type MetricNames
- type MetricUsageInBoard
- type MetricsExporter
- type MetricsExporterConfig
- type MetricsIdler
- type Panel
- type PromRulesIdler
- type PromRulesSlowest
- type Rule
- type RuleMissingMetrics
- type RuleName
- type RulesExporter
- type SlowRule
- type SlowestConfig
- type SlowestRulesResult
- type Target
- type TopListerConfig
- type TopUsedListerInGrafana
- type TopUsedResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseLevel ¶
Types ¶
type Board ¶
type Board struct { ID uint `mapstructure:"id,omitempty"` UID string `mapstructure:"uid,omitempty"` Title string `mapstructure:"title"` Tags []string `mapstructure:"tags"` Panels []*Panel `mapstructure:"panels"` }
Board represents Grafana dashboard.
type DashboardsExportConfig ¶
type DashboardsExportConfig struct { *ExportConfig SvcToken string }
type DashboardsExporter ¶
type DashboardsExporter struct {
// contains filtered or unexported fields
}
func NewDashboardsExporter ¶
func NewDashboardsExporter(cfg *DashboardsExportConfig) (*DashboardsExporter, error)
type DashboardsIdler ¶
type DashboardsIdler struct {
// contains filtered or unexported fields
}
func NewDashboardsIdler ¶
func NewDashboardsIdler(cfg *IdlerConfig) *DashboardsIdler
func (*DashboardsIdler) List ¶
func (dsi *DashboardsIdler) List(ctx context.Context) (*IdleDashboardsResult, error)
type Datasource ¶
type ExportConfig ¶
type GrafanaConfig ¶
type IdleDashboard ¶
type IdleDashboard struct { Board Board Missings map[MetricName]struct{} }
type IdleDashboardsResult ¶
type IdleDashboardsResult struct { IdleDashboards []IdleDashboard ParseErrs []error }
type IdleMetricsResult ¶
type IdleMetricsResult struct { IdleMetrics []MetricName ParseErrs []error }
type IdlerConfig ¶
type MetricName ¶
type MetricName string
type MetricNames ¶
type MetricNames []MetricName
type MetricUsageInBoard ¶
type MetricUsageInBoard struct { Metric MetricName Used uint32 }
type MetricsExporter ¶
type MetricsExporter struct {
// contains filtered or unexported fields
}
func NewMetricsExporter ¶
func NewMetricsExporter(cfg *MetricsExporterConfig) (*MetricsExporter, error)
type MetricsExporterConfig ¶
type MetricsExporterConfig struct { *ExportConfig Since string }
type MetricsIdler ¶
type MetricsIdler struct {
// contains filtered or unexported fields
}
func NewMetricsIdler ¶
func NewMetricsIdler(cfg *IdlerConfig) *MetricsIdler
func (*MetricsIdler) List ¶
func (mi *MetricsIdler) List(ctx context.Context) (*IdleMetricsResult, error)
type PromRulesIdler ¶
type PromRulesIdler struct {
// contains filtered or unexported fields
}
func NewPromRulesIdler ¶
func NewPromRulesIdler(cfg *IdlerConfig) *PromRulesIdler
func (*PromRulesIdler) List ¶
func (pri *PromRulesIdler) List(ctx context.Context) ([]RuleMissingMetrics, error)
type PromRulesSlowest ¶
type PromRulesSlowest struct {
// contains filtered or unexported fields
}
func NewPromRulesSlowest ¶
func NewPromRulesSlowest(cfg *SlowestConfig) *PromRulesSlowest
func (*PromRulesSlowest) Get ¶
func (prs *PromRulesSlowest) Get(ctx context.Context) (*SlowestRulesResult, error)
type RuleMissingMetrics ¶
type RuleMissingMetrics struct { Rule Rule Metrics MetricNames }
type RulesExporter ¶
type RulesExporter struct {
// contains filtered or unexported fields
}
func NewRulesExporter ¶
func NewRulesExporter(cfg *ExportConfig) (*RulesExporter, error)
type SlowestConfig ¶
type SlowestRulesResult ¶
type TopListerConfig ¶
type TopUsedListerInGrafana ¶
type TopUsedListerInGrafana struct {
// contains filtered or unexported fields
}
func NewTopUsedListerInGrafana ¶
func NewTopUsedListerInGrafana(cfg *TopListerConfig) *TopUsedListerInGrafana
func (*TopUsedListerInGrafana) List ¶
func (tl *TopUsedListerInGrafana) List(ctx context.Context) (*TopUsedResult, error)
type TopUsedResult ¶
type TopUsedResult struct { Usages []MetricUsageInBoard ParseErrs []error }
Click to show internal directories.
Click to hide internal directories.