Documentation
¶
Index ¶
- func CreateMetricsAndLogsRhobsFetchers(ctx context.Context, clusterKey string, hiveOcmUrl string) (*RhobsFetcher, *RhobsFetcher, error)
- func GetAllowedGrafanaDashboardsShortNames() []string
- func GetGrafanaDashboardUrl(metricsFetcher, logsFetcher *RhobsFetcher, grafanaDashboard *GrafanaDashboard) (string, error)
- func NewCmdRhobs() *cobra.Command
- type AlertsFormat
- type GrafanaDashboard
- type LogsFormat
- type MetricsFormat
- type MetricsTimeRange
- type RhobsFetchUsage
- type RhobsFetcher
- func (f *RhobsFetcher) DeleteSilence(ctx context.Context, silenceId uuid.UUID) error
- func (f *RhobsFetcher) GetGrafanaLogsUrl(lokiExpr string, startTime, endTime time.Time, isGoingForward bool) (string, error)
- func (f *RhobsFetcher) GetGrafanaMetricsUrl(promExpr string, startTime, endTime time.Time) (string, error)
- func (f *RhobsFetcher) PrintAlerts(ctx context.Context, format AlertsFormat, isPrintingClusterResultsOnly bool) error
- func (f *RhobsFetcher) PrintInstantMetrics(ctx context.Context, promExpr string, evalTime time.Time, format MetricsFormat, ...) error
- func (f *RhobsFetcher) PrintLogs(ctx context.Context, lokiExpr string, startTime, endTime time.Time, ...) error
- func (f *RhobsFetcher) PrintRangeMetrics(ctx context.Context, promExpr string, timeRange MetricsTimeRange, ...) error
- func (f *RhobsFetcher) QueryRules(ctx context.Context, ruleType string) (json.RawMessage, error)
- func (f *RhobsFetcher) QuerySilences(ctx context.Context) (json.RawMessage, error)
- func (f *RhobsFetcher) StreamLogs(lokiExpr string, format LogsFormat, isPrintingTimeValue bool, ...) error
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 ¶
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 (*RhobsFetcher) GetGrafanaLogsUrl ¶ added in v0.61.0
func (*RhobsFetcher) GetGrafanaMetricsUrl ¶ added in v0.61.0
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) 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
Click to show internal directories.
Click to hide internal directories.