rhobs

package
v0.58.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdRhobs

func NewCmdRhobs() *cobra.Command

Types

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 RhobsFetchUsage

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

type RhobsFetcher

type RhobsFetcher struct {
	RhobsCell string
	// contains filtered or unexported fields
}

func CreateRhobsFetcher

func CreateRhobsFetcher(clusterKey string, rhobsFetchUse RhobsFetchUsage, hiveOcmUrl string) (*RhobsFetcher, error)

func (*RhobsFetcher) PrintLogs

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

func (*RhobsFetcher) PrintMetrics

func (q *RhobsFetcher) PrintMetrics(promExpr string, format MetricsFormat, isPrintingClusterResultsOnly bool) error

func (*RhobsFetcher) QueryAlerts added in v0.58.0

func (q *RhobsFetcher) QueryAlerts(ctx context.Context) (json.RawMessage, error)

func (*RhobsFetcher) QueryInstantMetrics added in v0.58.0

func (q *RhobsFetcher) QueryInstantMetrics(ctx context.Context, promExpr string, filterCluster bool) ([]instantMetricResult, error)

func (*RhobsFetcher) QueryLogs added in v0.58.0

func (q *RhobsFetcher) QueryLogs(ctx context.Context, lokiExpr string, startTime, endTime time.Time, logsCount int) ([]mcpLogEntry, error)

func (*RhobsFetcher) QueryRangeMetrics added in v0.58.0

func (q *RhobsFetcher) QueryRangeMetrics(ctx context.Context, promExpr, start, end, step string) (json.RawMessage, error)

func (*RhobsFetcher) QueryRules added in v0.58.0

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

func (*RhobsFetcher) StreamLogs

func (q *RhobsFetcher) StreamLogs(lokiExpr string, startTime time.Time, 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