Documentation
¶
Index ¶
Constants ¶
View Source
const ( V3ioConfigEnvironmentVariable = "V3IO_TSDB_CONFIG" DefaultConfigurationFileName = "v3io-tsdb-config.yaml" SchemaConfigFileName = ".schema" DefaultShardingBucketsCount = 8 DefaultStorageClass = "local" DefaultIngestionRate = "" DefaultAggregates = "" // no aggregates by default DefaultAggregationGranularity = "1h" DefaultLayerRetentionTime = "1y" DefaultSampleRetentionTime = 0 DefaultLogLevel = "info" DefaultVerboseLevel = "debug" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MetricConfig ¶
type MetricsReporterConfig ¶ added in v0.0.12
type MetricsReporterConfig struct { // Report on shutdown (Boolean) ReportOnShutdown bool `json:"reportOnShutdown,omitempty"` // Output destination - "stdout" or "stderr" Output string `json:"output"` // Report periodically (Boolean) ReportPeriodically bool `json:"reportPeriodically,omitempty"` // Interval between consequence reports (in seconds) RepotInterval int `json:"reportInterval"` }
type Partition ¶ added in v0.0.3
type Partition struct { StartTime int64 `json:"startTime"` SchemaInfo PartitionSchema `json:"schemaInfo"` }
type PartitionSchema ¶ added in v0.0.3
type PartitionSchema struct { Version int `json:"version"` Aggregates []string `json:"aggregates"` AggregationGranularity string `json:"aggregationGranularity"` StorageClass string `json:"storageClass"` SampleRetention int `json:"sampleRetention"` PartitionerInterval string `json:"partitionerInterval"` ChunckerInterval string `json:"chunckerInterval"` }
type Rollup ¶ added in v0.0.3
type Rollup struct { Aggregates []string `json:"aggregates"` AggregationGranularity string `json:"aggregationGranularity"` // Storage class for the aggregates and sample chunks - "cloud" | "local" StorageClass string `json:"storageClass"` // [FUTURE] Sample retention period, in hours. 0 means no need to save samples. SampleRetention int `json:"sampleRetention"` // Layer retention time, in months ('m'), days ('d'), or hours ('h'). // Format: "[0-9]+[hmd]". For example: "3h", "7d", "1m" LayerRetentionTime string `json:"layerRetentionTime"` }
type Schema ¶ added in v0.0.3
type Schema struct { TableSchemaInfo TableSchema `json:"tableSchemaInfo"` PartitionSchemaInfo PartitionSchema `json:"partitionSchemaInfo"` Partitions []*Partition `json:"partitions"` Fields []SchemaField `json:"fields"` }
type SchemaField ¶ added in v0.0.3
type TableSchema ¶ added in v0.0.3
type V3ioConfig ¶
type V3ioConfig struct { // V3IO TSDB connection information - web-gateway service endpoint, // TSDB data container, relative TSDB table path within the container, and // authentication credentials for the web-gateway service WebApiEndpoint string `json:"webApiEndpoint"` Container string `json:"container"` TablePath string `json:"tablePath"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` HttpTimeout string `json:"httpTimeout,omitempty"` // Disabled = true disables the V3IO TSDB configuration in Prometheus and // enables the internal Prometheus TSDB instead Disabled bool `json:"disabled,omitempty"` // Log level - "debug" | "info" | "warn" | "error" LogLevel string `json:"logLevel,omitempty"` // Number of parallel V3IO worker routines Workers int `json:"workers"` // Number of parallel V3IO worker routines for queries; // default = the minimum value between 8 and Workers QryWorkers int `json:"qryWorkers"` // Max uncommitted (delayed) samples allowed per metric MaxBehind int `json:"maxBehind"` // Override last chunk; by default, an append from the last point is attempted upon restart OverrideOld bool `json:"overrideOld"` // Default timeout duration, in seconds; default = 3,600 seconds (1 hour) DefaultTimeoutInSeconds int `json:"timeout,omitempty"` // Size of the samples batch to use during ingestion BatchSize int `json:"batchSize,omitempty"` // Maximum sample size, in bytes (for the worst compression scenario) MaximumSampleSize int `json:"maximumSampleSize,omitempty"` // Maximum size of a partition object MaximumPartitionSize int `json:"maximumPartitionSize,omitempty"` // Minimum chunk size, in bytes (for the best compression scenario) MinimumChunkSize int `json:"minimumChunkSize,omitempty"` // Maximum chunk size, in bytes (for the worst compression scenario) MaximumChunkSize int `json:"maximumChunkSize,omitempty"` // Number of sharding buckets ShardingBucketsCount int `json:"shardingBucketsCount,omitempty"` // Metrics-reporter configuration MetricsReporter MetricsReporterConfig `json:"performance,omitempty"` // Don't aggregate from raw chunks, for use when working as a Prometheus // TSDB library DisableClientAggr bool `json:"disableClientAggr,omitempty"` }
func GetOrDefaultConfig ¶ added in v0.0.12
func GetOrDefaultConfig() (*V3ioConfig, error)
func GetOrLoadFromData ¶ added in v0.0.12
func GetOrLoadFromData(data []byte) (*V3ioConfig, error)
func GetOrLoadFromFile ¶ added in v0.0.12
func GetOrLoadFromFile(path string) (*V3ioConfig, error)
func GetOrLoadFromStruct ¶ added in v0.0.12
func GetOrLoadFromStruct(cfg *V3ioConfig) (*V3ioConfig, error)
Update the defaults when using a configuration structure
Click to show internal directories.
Click to hide internal directories.