Documentation ¶
Index ¶
- type Config
- type Exporter
- func (e *Exporter) Collect(ch chan<- prometheus.Metric)
- func (e *Exporter) DefaultMetrics() Metrics
- func (e *Exporter) Describe(ch chan<- *prometheus.Desc)
- func (e *Exporter) RunScheduledScrapes(ctx context.Context, si time.Duration)
- func (e *Exporter) ScrapeMetric(db *sql.DB, ch chan<- prometheus.Metric, metricDefinition Metric) error
- type Metric
- type Metrics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DSN string MaxIdleConns int MaxOpenConns int CustomMetrics string QueryTimeout int DefaultMetricsFile string }
Config is the configuration of the exporter
func CreateDefaultConfig ¶
func CreateDefaultConfig() *Config
CreateDefaultConfig returns the default configuration of the Exporter it is to be of note that the DNS will be empty when
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter collects Oracle DB metrics. It implements prometheus.Collector.
func NewExporter ¶
NewExporter creates a new Exporter instance
func (*Exporter) Collect ¶
func (e *Exporter) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector.
func (*Exporter) DefaultMetrics ¶
DefaultMetrics is a somewhat hacky way to load the default metrics
func (*Exporter) Describe ¶
func (e *Exporter) Describe(ch chan<- *prometheus.Desc)
Describe describes all the metrics exported by the Oracle DB exporter.
func (*Exporter) RunScheduledScrapes ¶
RunScheduledScrapes is only relevant for users of this package that want to set the scrape on a timer rather than letting it be per Collect call
func (*Exporter) ScrapeMetric ¶
func (e *Exporter) ScrapeMetric(db *sql.DB, ch chan<- prometheus.Metric, metricDefinition Metric) error
ScrapeMetric is an interface method to call scrapeGenericValues using Metric struct values