Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateReports ¶
func GenerateReports(kmCfg *kokumetricscfgv1beta1.KokuMetricsConfig, dirCfg *dirconfig.DirectoryConfig, c *PromCollector) error
GenerateReports is responsible for querying prometheus and writing to report files
Types ¶
type PromCollector ¶
type PromCollector struct { PromConn prometheusConnection PromCfg *PrometheusConfig TimeSeries *promv1.Range ContextTimeout *int64 Log logr.Logger InCluster bool }
func (*PromCollector) GetPromConn ¶
func (c *PromCollector) GetPromConn(kmCfg *kokumetricscfgv1beta1.KokuMetricsConfig) error
GetPromConn returns the prometheus connection
type PrometheusConfig ¶
type PrometheusConfig struct { // Address is the URL to reach Prometheus. Address string // BearerToken is the user auth token BearerToken config.Secret // CAFile is the ca file CAFile string // SkipTLS skips cert verification SkipTLS bool }
PrometheusConfig provides the configuration options to set up a Prometheus connections from a URL.
Click to show internal directories.
Click to hide internal directories.