Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultDataDir = "/data/exporter_dsc"
View Source
const DefaultInterval = 5 * time.Second
View Source
const DefaultLogLevel = slog.LevelInfo
View Source
const DefaultPrometheusPort = 2112
View Source
const DefaultRemoveReadFiles = false
View Source
const DefaultTimestamps = true
View Source
const DefaultWindowSize = 5
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
func CheckError(err error)
func GetLastFullMin ¶
func GetLogLevel ¶
Types ¶
type Aggregation ¶
type BucketParams ¶
func (*BucketParams) Buckets ¶
func (b *BucketParams) Buckets() []float64
type Config ¶
type Config struct {
RemoveReadFiles bool `yaml:"remove"`
DataDir string `yaml:"data"`
Interval time.Duration `yaml:"interval"`
Prometheus PrometheusConfig `yaml:"prometheus"`
LogLevel slog.Level `yaml:"loglevel"`
}
func ParseConfig ¶
func ParseConfigText ¶
type MaxCellsParams ¶
type MaxCellsParams struct {
X int
}
type MetricConfig ¶
type MetricConfig struct {
Aggregations map[string]Aggregation `yaml:"aggregations"`
}
func (*MetricConfig) IsBucket ¶
func (mC *MetricConfig) IsBucket(label string) (bool, BucketParams)
func (*MetricConfig) IsEliminateDimension ¶
func (mC *MetricConfig) IsEliminateDimension(label string) bool
func (*MetricConfig) IsMaxCells ¶
func (mC *MetricConfig) IsMaxCells(label string) (bool, MaxCellsParams)
type PrometheusConfig ¶
type PrometheusConfig struct {
Metrics map[string]MetricConfig `yaml:"metrics"`
Port int `yaml:"port"`
Timestamps bool `yaml:"timestamps"`
WindowSize int `yaml:"windowsize"`
}
func (*PrometheusConfig) IsInTimeWindow ¶
func (p *PrometheusConfig) IsInTimeWindow(timestamp time.Time) bool
Click to show internal directories.
Click to hide internal directories.