collector

package
v0.0.0-...-7a19a46 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HanaInfoLabelNames  = []string{"sid", "db_name", "db_version"}
	HanaInfoLabelValues = make([]string, 3, 3)
)

Metric descriptors.

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

Exporter collects HANA metrics. It implements prometheus.Collector.

func New

func New(host string, user string, password string, scrapers []Scraper) *Exporter

New returns a new HANA exporter for the provided DSN.

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector.

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector.

type ScrapeCsLoads

type ScrapeCsLoads struct{}

Scrapedisks collects from `M_CS_LOADS;`.

func (ScrapeCsLoads) Help

func (ScrapeCsLoads) Help() string

Help describes the role of the Scraper.

func (ScrapeCsLoads) Name

func (ScrapeCsLoads) Name() string

Name of the Scraper. Should be unique.

func (ScrapeCsLoads) Scrape

func (ScrapeCsLoads) Scrape(db *sql.DB, ch chan<- prometheus.Metric) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

type ScrapeCsTables

type ScrapeCsTables struct{}

Scrapedisks collects from `SYS.M_CS_TABLES;`.

func (ScrapeCsTables) Help

func (ScrapeCsTables) Help() string

Help describes the role of the Scraper.

func (ScrapeCsTables) Name

func (ScrapeCsTables) Name() string

Name of the Scraper. Should be unique.

func (ScrapeCsTables) Scrape

func (ScrapeCsTables) Scrape(db *sql.DB, ch chan<- prometheus.Metric) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

type ScrapeCsUnloads

type ScrapeCsUnloads struct{}

Scrapedisks collects from `M_CS_UNLOADS;`.

func (ScrapeCsUnloads) Help

func (ScrapeCsUnloads) Help() string

Help describes the role of the Scraper.

func (ScrapeCsUnloads) Name

func (ScrapeCsUnloads) Name() string

Name of the Scraper. Should be unique.

func (ScrapeCsUnloads) Scrape

func (ScrapeCsUnloads) Scrape(db *sql.DB, ch chan<- prometheus.Metric) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

type ScrapeDisks

type ScrapeDisks struct{}

Scrapedisks collects from `SYS.M_DISKS;`.

func (ScrapeDisks) Help

func (ScrapeDisks) Help() string

Help describes the role of the Scraper.

func (ScrapeDisks) Name

func (ScrapeDisks) Name() string

Name of the Scraper. Should be unique.

func (ScrapeDisks) Scrape

func (ScrapeDisks) Scrape(db *sql.DB, ch chan<- prometheus.Metric) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

type ScrapeHostResourceUtilization

type ScrapeHostResourceUtilization struct{}

ScrapeHostResourceUtilization collects from `SYS.M_HOST_RESOURCE_UTILIZATION`.

func (ScrapeHostResourceUtilization) Help

Help describes the role of the Scraper.

func (ScrapeHostResourceUtilization) Name

Name of the Scraper. Should be unique.

func (ScrapeHostResourceUtilization) Scrape

func (ScrapeHostResourceUtilization) Scrape(db *sql.DB, ch chan<- prometheus.Metric) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

type ScrapeLicenseStatus

type ScrapeLicenseStatus struct{}

ScrapeserviceStatistics collects from `sys.m_service_statistics`.

func (ScrapeLicenseStatus) Help

func (ScrapeLicenseStatus) Help() string

Help describes the role of the Scraper.

func (ScrapeLicenseStatus) Name

func (ScrapeLicenseStatus) Name() string

Name of the Scraper. Should be unique.

func (ScrapeLicenseStatus) Scrape

func (ScrapeLicenseStatus) Scrape(db *sql.DB, ch chan<- prometheus.Metric) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

type ScrapeRsTables

type ScrapeRsTables struct{}

Scrapedisks collects from `SYS.M_RS_TABLES;`.

func (ScrapeRsTables) Help

func (ScrapeRsTables) Help() string

Help describes the role of the Scraper.

func (ScrapeRsTables) Name

func (ScrapeRsTables) Name() string

Name of the Scraper. Should be unique.

func (ScrapeRsTables) Scrape

func (ScrapeRsTables) Scrape(db *sql.DB, ch chan<- prometheus.Metric) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

type ScrapeServiceReplication

type ScrapeServiceReplication struct{}

Scrapedisks collects from `M_SERVICE_REPLICATION;`.

func (ScrapeServiceReplication) Help

Help describes the role of the Scraper.

func (ScrapeServiceReplication) Name

Name of the Scraper. Should be unique.

func (ScrapeServiceReplication) Scrape

func (ScrapeServiceReplication) Scrape(db *sql.DB, ch chan<- prometheus.Metric) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

type ScrapeServiceStatistics

type ScrapeServiceStatistics struct{}

ScrapeserviceStatistics collects from `SYS.M_SERVICE_STATISTICS`.

func (ScrapeServiceStatistics) Help

Help describes the role of the Scraper.

func (ScrapeServiceStatistics) Name

Name of the Scraper. Should be unique.

func (ScrapeServiceStatistics) Scrape

func (ScrapeServiceStatistics) Scrape(db *sql.DB, ch chan<- prometheus.Metric) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

type ScrapeSharedMemory

type ScrapeSharedMemory struct{}

Scrapedisks collects from `SYS.M_SHARED_MEMORY;`.

func (ScrapeSharedMemory) Help

func (ScrapeSharedMemory) Help() string

Help describes the role of the Scraper.

func (ScrapeSharedMemory) Name

func (ScrapeSharedMemory) Name() string

Name of the Scraper. Should be unique.

func (ScrapeSharedMemory) Scrape

func (ScrapeSharedMemory) Scrape(db *sql.DB, ch chan<- prometheus.Metric) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

type ScrapeSystemConfig

type ScrapeSystemConfig struct{}

ScrapeSystemConfig collects from `SYS.M_CS_TABLES;`.

func (ScrapeSystemConfig) Help

func (ScrapeSystemConfig) Help() string

Help describes the role of the Scraper.

func (ScrapeSystemConfig) Name

func (ScrapeSystemConfig) Name() string

Name of the Scraper. Should be unique.

func (ScrapeSystemConfig) Scrape

func (ScrapeSystemConfig) Scrape(db *sql.DB, ch chan<- prometheus.Metric) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

type ScrapeSystemReplication

type ScrapeSystemReplication struct{}

Scrapedisks collects from `M_SYSTEM_REPLICATION;`.

func (ScrapeSystemReplication) Help

Help describes the role of the Scraper.

func (ScrapeSystemReplication) Name

Name of the Scraper. Should be unique.

func (ScrapeSystemReplication) Scrape

func (ScrapeSystemReplication) Scrape(db *sql.DB, ch chan<- prometheus.Metric) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

type Scraper

type Scraper interface {
	// Name of the Scraper. Should be unique.
	Name() string
	// Help describes the role of the Scraper.
	// Example: "Collect from SHOW ENGINE INNODB STATUS"
	Help() string
	// Scrape collects data from database connection and sends it over channel as prometheus metric.
	Scrape(db *sql.DB, ch chan<- prometheus.Metric) error
}

Scraper is minimal interface that let's you add new prometheus metrics to hana_exporter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL