mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-11-04 02:35:07 +01:00 
			
		
		
		
	Change to ccMessage from cc-lib
This commit is contained in:
		@@ -4,7 +4,7 @@ import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-energy-manager/pkg/cc-message"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-lib/ccMessage"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func GangliaMetricName(point lp.CCMessage) string {
 | 
			
		||||
 
 | 
			
		||||
@@ -10,9 +10,9 @@ import (
 | 
			
		||||
	//	"time"
 | 
			
		||||
	"os/exec"
 | 
			
		||||
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-energy-manager/pkg/cc-message"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-lib/ccMessage"
 | 
			
		||||
	cclog "github.com/ClusterCockpit/cc-metric-collector/pkg/ccLogger"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-metric-collector/pkg/messageProcessor"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-lib/messageProcessor"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
const GMETRIC_EXEC = `gmetric`
 | 
			
		||||
 
 | 
			
		||||
@@ -9,9 +9,9 @@ import (
 | 
			
		||||
	"sync"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-energy-manager/pkg/cc-message"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-lib/ccMessage"
 | 
			
		||||
	cclog "github.com/ClusterCockpit/cc-metric-collector/pkg/ccLogger"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-metric-collector/pkg/messageProcessor"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-lib/messageProcessor"
 | 
			
		||||
	influx "github.com/influxdata/line-protocol/v2/lineprotocol"
 | 
			
		||||
	"golang.org/x/exp/slices"
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -10,9 +10,9 @@ import (
 | 
			
		||||
	"strings"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-energy-manager/pkg/cc-message"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-lib/ccMessage"
 | 
			
		||||
	cclog "github.com/ClusterCockpit/cc-metric-collector/pkg/ccLogger"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-metric-collector/pkg/messageProcessor"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-lib/messageProcessor"
 | 
			
		||||
	influxdb2 "github.com/influxdata/influxdb-client-go/v2"
 | 
			
		||||
	influxdb2Api "github.com/influxdata/influxdb-client-go/v2/api"
 | 
			
		||||
	influxdb2ApiHttp "github.com/influxdata/influxdb-client-go/v2/api/http"
 | 
			
		||||
 
 | 
			
		||||
@@ -10,9 +10,9 @@ import (
 | 
			
		||||
	"sync"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-energy-manager/pkg/cc-message"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-lib/ccMessage"
 | 
			
		||||
	cclog "github.com/ClusterCockpit/cc-metric-collector/pkg/ccLogger"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-metric-collector/pkg/messageProcessor"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-lib/messageProcessor"
 | 
			
		||||
	influxdb2 "github.com/influxdata/influxdb-client-go/v2"
 | 
			
		||||
	influxdb2Api "github.com/influxdata/influxdb-client-go/v2/api"
 | 
			
		||||
	influx "github.com/influxdata/line-protocol/v2/lineprotocol"
 | 
			
		||||
 
 | 
			
		||||
@@ -72,9 +72,9 @@ import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-energy-manager/pkg/cc-message"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-lib/ccMessage"
 | 
			
		||||
	cclog "github.com/ClusterCockpit/cc-metric-collector/pkg/ccLogger"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-metric-collector/pkg/messageProcessor"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-lib/messageProcessor"
 | 
			
		||||
	"github.com/NVIDIA/go-nvml/pkg/dl"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,8 +3,8 @@ package sinks
 | 
			
		||||
import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-energy-manager/pkg/cc-message"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-metric-collector/pkg/messageProcessor"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-lib/ccMessage"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-lib/messageProcessor"
 | 
			
		||||
	influx "github.com/influxdata/line-protocol/v2/lineprotocol"
 | 
			
		||||
	"golang.org/x/exp/slices"
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -9,9 +9,9 @@ import (
 | 
			
		||||
	"sync"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-energy-manager/pkg/cc-message"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-lib/ccMessage"
 | 
			
		||||
	cclog "github.com/ClusterCockpit/cc-metric-collector/pkg/ccLogger"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-metric-collector/pkg/messageProcessor"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-lib/messageProcessor"
 | 
			
		||||
	influx "github.com/influxdata/line-protocol/v2/lineprotocol"
 | 
			
		||||
	nats "github.com/nats-io/nats.go"
 | 
			
		||||
	"golang.org/x/exp/slices"
 | 
			
		||||
 
 | 
			
		||||
@@ -10,9 +10,9 @@ import (
 | 
			
		||||
	"strings"
 | 
			
		||||
	"sync"
 | 
			
		||||
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-energy-manager/pkg/cc-message"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-lib/ccMessage"
 | 
			
		||||
	cclog "github.com/ClusterCockpit/cc-metric-collector/pkg/ccLogger"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-metric-collector/pkg/messageProcessor"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-lib/messageProcessor"
 | 
			
		||||
	"github.com/gorilla/mux"
 | 
			
		||||
	"github.com/prometheus/client_golang/prometheus"
 | 
			
		||||
	"github.com/prometheus/client_golang/prometheus/promhttp"
 | 
			
		||||
 
 | 
			
		||||
@@ -6,9 +6,9 @@ import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"log"
 | 
			
		||||
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-energy-manager/pkg/cc-message"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-lib/ccMessage"
 | 
			
		||||
	cclog "github.com/ClusterCockpit/cc-metric-collector/pkg/ccLogger"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-metric-collector/pkg/messageProcessor"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-lib/messageProcessor"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type SampleSinkConfig struct {
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ import (
 | 
			
		||||
	"sync"
 | 
			
		||||
 | 
			
		||||
	cclog "github.com/ClusterCockpit/cc-metric-collector/pkg/ccLogger"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-energy-manager/pkg/cc-message"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-lib/ccMessage"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
const SINK_MAX_FORWARD = 50
 | 
			
		||||
 
 | 
			
		||||
@@ -8,9 +8,9 @@ import (
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	//	"time"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-energy-manager/pkg/cc-message"
 | 
			
		||||
	lp "github.com/ClusterCockpit/cc-lib/ccMessage"
 | 
			
		||||
	cclog "github.com/ClusterCockpit/cc-metric-collector/pkg/ccLogger"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-metric-collector/pkg/messageProcessor"
 | 
			
		||||
	mp "github.com/ClusterCockpit/cc-lib/messageProcessor"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type StdoutSink struct {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user