Documentation ¶
Index ¶
- Variables
- func CreateInsightsAdvisorLink(clusterID v1.ClusterID, ruleID, errorKey string) (string, error)
- func IncrementCounterRequestSend(status int)
- func MustRegisterMetrics(registrables ...metrics.Registerable)
- type Collector
- func (c *Collector) ClearState()
- func (c *Collector) ClusterID() v1.ClusterID
- func (c *Collector) Collect(ch chan<- prometheus.Metric)
- func (c *Collector) Create(_ *semver.Version) bool
- func (c *Collector) Describe(ch chan<- *prometheus.Desc)
- func (c *Collector) FQName() string
- func (c *Collector) SetActiveRecommendations(activeRecommendations []types.InsightsRecommendation)
- func (c *Collector) SetClusterID(clusterID v1.ClusterID)
- type PrometheusRulesController
Constants ¶
This section is empty.
Variables ¶
View Source
var (
RecommendationCollector = &Collector{
metricName: "insights_recommendation_active",
}
)
Functions ¶
func CreateInsightsAdvisorLink ¶
createURL parses, creates and encodes all the necessary parameters for the Insights recommendation link to the Insights advisor
func IncrementCounterRequestSend ¶
func IncrementCounterRequestSend(status int)
func MustRegisterMetrics ¶
func MustRegisterMetrics(registrables ...metrics.Registerable)
MustRegisterMetrics registers provided registrables in the Insights metrics registry. This function should be called from init() functions only, because it uses the MustRegister method, and therefore panics in case of an error.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector collects insights recommendations
func (*Collector) ClearState ¶
func (c *Collector) ClearState()
func (*Collector) Collect ¶
func (c *Collector) Collect(ch chan<- prometheus.Metric)
func (*Collector) Describe ¶
func (c *Collector) Describe(ch chan<- *prometheus.Desc)
func (*Collector) SetActiveRecommendations ¶
func (c *Collector) SetActiveRecommendations(activeRecommendations []types.InsightsRecommendation)
func (*Collector) SetClusterID ¶
type PrometheusRulesController ¶
type PrometheusRulesController struct {
// contains filtered or unexported fields
}
PrometheusRulesController listens to the configuration observer and creates or removes the Insights Prometheus Rules definitions accordingly
func NewPrometheusRulesController ¶
func NewPrometheusRulesController(configurator configobserver.Interface, kubeConfig *rest.Config) PrometheusRulesController
func (*PrometheusRulesController) Start ¶
func (p *PrometheusRulesController) Start(ctx context.Context)
Start starts listening to the configuration observer
Click to show internal directories.
Click to hide internal directories.