mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-27 07:39:05 +01:00
d98076c792
* DiskstatCollector: cast part_max_used metric to int * Add uint types to GangliaSink and LibgangliaSink * Use new sink instances to allow multiple of same sink type * Update sink README and SampleSink * Use new receiver instances to allow multiple of same receiver type * Fix metric scope in likwid configuration script * Mention likwid config script in LikwidCollector README * Refactor: Embed Init() into New() function * Refactor: Embed Init() into New() function * Fix: MetricReceiver uses uninitialized values, when initialization fails * Use Ganglia configuration (#44) * Copy all metric configurations from original Ganglia code * Use metric configurations from Ganglia for some metrics * Format value string also for known metrics * Numa-aware memstat collector (#45) * Add samples for collectors, sinks and receivers * Ping InfluxDB server after connecting to recognize faulty connections * Add sink for Prometheus monitoring system (#46) * Add sink for Prometheus monitoring system * Add prometheus sink to README * Add scraper for Prometheus clients (#47) Co-authored-by: Holger Obermaier <holgerob@gmx.de> Co-authored-by: Holger Obermaier <40787752+ho-ob@users.noreply.github.com>
27 lines
422 B
Go
27 lines
422 B
Go
package sinks
|
|
|
|
import (
|
|
lp "github.com/ClusterCockpit/cc-metric-collector/internal/ccMetric"
|
|
)
|
|
|
|
type defaultSinkConfig struct {
|
|
MetaAsTags bool `json:"meta_as_tags,omitempty"`
|
|
Type string `json:"type"`
|
|
}
|
|
|
|
type sink struct {
|
|
meta_as_tags bool
|
|
name string
|
|
}
|
|
|
|
type Sink interface {
|
|
Write(point lp.CCMetric) error
|
|
Flush() error
|
|
Close()
|
|
Name() string
|
|
}
|
|
|
|
func (s *sink) Name() string {
|
|
return s.name
|
|
}
|