mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +01:00
Adjust ganglia sink to CCMetric
This commit is contained in:
parent
d915bcc02d
commit
011218ab80
@ -2,11 +2,13 @@ package sinks
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
// "time"
|
||||
lp "github.com/influxdata/line-protocol"
|
||||
"os/exec"
|
||||
|
||||
lp "github.com/ClusterCockpit/cc-metric-collector/internal/ccMetric"
|
||||
)
|
||||
|
||||
const GMETRIC_EXEC = `gmetric`
|
||||
@ -16,7 +18,7 @@ type GangliaSink struct {
|
||||
gmetric_path string
|
||||
}
|
||||
|
||||
func (s *GangliaSink) Init(config SinkConfig) error {
|
||||
func (s *GangliaSink) Init(config sinkConfig) error {
|
||||
p, err := exec.LookPath(string(GMETRIC_EXEC))
|
||||
if err == nil {
|
||||
s.gmetric_path = p
|
||||
@ -24,7 +26,7 @@ func (s *GangliaSink) Init(config SinkConfig) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *GangliaSink) Write(point lp.MutableMetric) error {
|
||||
func (s *GangliaSink) Write(point lp.CCMetric) error {
|
||||
var err error = nil
|
||||
var tagsstr []string
|
||||
var argstr []string
|
||||
@ -77,5 +79,4 @@ func (s *GangliaSink) Flush() error {
|
||||
}
|
||||
|
||||
func (s *GangliaSink) Close() {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user