rhobs

package
v0.61.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMetricsAndLogsRhobsFetchers added in v0.61.0

func CreateMetricsAndLogsRhobsFetchers(ctx context.Context, clusterKey string, hiveOcmUrl string) (*RhobsFetcher, *RhobsFetcher, error)

func GetAllowedGrafanaDashboardsShortNames added in v0.61.0

func GetAllowedGrafanaDashboardsShortNames() []string

func GetGrafanaDashboardUrl added in v0.61.0

func GetGrafanaDashboardUrl(metricsFetcher, logsFetcher *RhobsFetcher, grafanaDashboard *GrafanaDashboard) (string, error)

func NewCmdRhobs

func NewCmdRhobs() *cobra.Command

Types

type AlertsFormat added in v0.61.0

type AlertsFormat string
const (
	AlertsFormatText AlertsFormat = "text"
	AlertsFormatCsv  AlertsFormat = "csv"
	AlertsFormatJson AlertsFormat = "json"
)

func GetAlertsFormatFromString added in v0.61.0

func GetAlertsFormatFromString(formatStr string) (AlertsFormat, error)

type GrafanaDashboard added in v0.61.0

type GrafanaDashboard struct {
	// contains filtered or unexported fields
}

func GetGrafanaDashboardForShortName added in v0.61.0

func GetGrafanaDashboardForShortName(shortName string) *GrafanaDashboard

type LogsFormat

type LogsFormat string
const (
	LogsFormatText LogsFormat = "text"
	LogsFormatCsv  LogsFormat = "csv"
	LogsFormatJson LogsFormat = "json"
)

func GetLogsFormatFromString

func GetLogsFormatFromString(formatStr string) (LogsFormat, error)

type MetricsFormat

type MetricsFormat string
const (
	MetricsFormatTable MetricsFormat = "table"
	MetricsFormatCsv   MetricsFormat = "csv"
	MetricsFormatJson  MetricsFormat = "json"
)

func GetMetricsFormatFromString

func GetMetricsFormatFromString(formatStr string) (MetricsFormat, error)

type MetricsTimeRange added in v0.61.0

type MetricsTimeRange struct {
	// contains filtered or unexported fields
}

func NewMetricsTimeRange added in v0.61.0

func NewMetricsTimeRange(startTime, endTime time.Time, stepDuration time.Duration) MetricsTimeRange

func (*MetricsTimeRange) Log added in v0.61.0

func (tr *MetricsTimeRange) Log()

type RhobsFetchUsage

type RhobsFetchUsage string
const (
	RhobsFetchForMetrics RhobsFetchUsage = "metrics"
	RhobsFetchForLogs    RhobsFetchUsage = "logs"
)

type RhobsFetcher

type RhobsFetcher struct {
	IsHostedCluster bool

	RhobsCell string
	// contains filtered or unexported fields
}

func CreateRhobsFetcher

func CreateRhobsFetcher(ctx context.Context, clusterKey string, usage RhobsFetchUsage, hiveOcmUrl string) (*RhobsFetcher, error)

func CreateRhobsFetcherFromCell added in v0.61.0

func CreateRhobsFetcherFromCell(rhobsCell string) (*RhobsFetcher, error)

func (*RhobsFetcher) DeleteSilence added in v0.61.0

func (f *RhobsFetcher) DeleteSilence(ctx context.Context, silenceId uuid.UUID) error

func (*RhobsFetcher) GetGrafanaLogsUrl added in v0.61.0

func (f *RhobsFetcher) GetGrafanaLogsUrl(lokiExpr string, startTime, endTime time.Time, isGoingForward bool) (string, error)

func (*RhobsFetcher) GetGrafanaMetricsUrl added in v0.61.0

func (f *RhobsFetcher) GetGrafanaMetricsUrl(promExpr string, startTime, endTime time.Time) (string, error)

func (*RhobsFetcher) PrintAlerts added in v0.61.0

func (f *RhobsFetcher) PrintAlerts(ctx context.Context, format AlertsFormat, isPrintingClusterResultsOnly bool) error

func (*RhobsFetcher) PrintInstantMetrics added in v0.61.0

func (f *RhobsFetcher) PrintInstantMetrics(ctx context.Context, promExpr string, evalTime time.Time, format MetricsFormat, isPrintingClusterResultsOnly bool) error

func (*RhobsFetcher) PrintLogs

func (f *RhobsFetcher) PrintLogs(ctx context.Context, lokiExpr string, startTime, endTime time.Time, logsCount int, isGoingForward bool, format LogsFormat, isPrintingTimeValue bool, fieldNames []string) error

func (*RhobsFetcher) PrintRangeMetrics added in v0.61.0

func (f *RhobsFetcher) PrintRangeMetrics(ctx context.Context, promExpr string, timeRange MetricsTimeRange, format MetricsFormat, isPrintingClusterResultsOnly bool) error

func (*RhobsFetcher) QueryRules added in v0.58.0

func (f *RhobsFetcher) QueryRules(ctx context.Context, ruleType string) (json.RawMessage, error)

func (*RhobsFetcher) QuerySilences added in v0.61.0

func (f *RhobsFetcher) QuerySilences(ctx context.Context) (json.RawMessage, error)

func (*RhobsFetcher) StreamLogs

func (f *RhobsFetcher) StreamLogs(lokiExpr string, format LogsFormat, isPrintingTimeValue bool, fieldNames []string) error

Jump to

Keyboard shortcuts

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