Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExporterConf ¶
type ExporterConf struct { PrometheusURL string OpentsdbURL string BulkSize uint ThreadCount uint PushTimeout string LoggingLevel string }
ExporterConf modelize an exporter configuration
func GetExporterConf ¶
func GetExporterConf(f string) (ExporterConf, error)
GetExporterConf loads an exporter configuration
type Opentsdb ¶
type Opentsdb struct {
// contains filtered or unexported fields
}
Opentsdb is an Opentsdb connector
func NewOpentsdb ¶
func NewOpentsdb(c ExporterConf) (Opentsdb, error)
NewOpentsdb instanciates an Opentsdb connector
type OpentsdbMetric ¶
type OpentsdbMetric struct { // Metric is the metric name Metric string `json:"metric"` // Timestamp is the metric timestamp (UTC timestamp) Timestamp uint64 `json:"timestamp"` // Value is the value of the Metric Value float32 `json:"value"` // Tags describes the metric tags Tags map[string]string `json:"tags"` }
OpentsdbMetric describes a metric based on Opentsdb specifications
type Prometheus ¶
type Prometheus struct {
// contains filtered or unexported fields
}
Prometheus is a Prometheus connector
func NewPrometheus ¶
func NewPrometheus(c ExporterConf) (Prometheus, error)
NewPrometheus instanciates a Prometheus connector
func (Prometheus) Query ¶
func (p Prometheus) Query(ctx context.Context, c QueryConf) ([]OpentsdbMetric, error)
Query executes the query
type QueryConf ¶
type QueryConf struct { // Output metric name MetricName string // Query to execute in Prometheus Query string // Step of the query Step string // Start time Start time.Time // End time End time.Time // Tags to add AddTags map[string]string // Tags to remove RemoveTags []string // Tags to rename RenameTags map[string]string }
QueryConf modelize a query configuration
func GetQueryConf ¶
GetQueryConf loads a query configuration
Click to show internal directories.
Click to hide internal directories.