mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-07-21 12:21:41 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
94b086acf0 | ||
|
abd49a377c |
1
Makefile
1
Makefile
@@ -113,7 +113,6 @@ DEB: scripts/cc-metric-collector.deb.control $(APP)
|
|||||||
@VERS=$$(git describe --tags --abbrev=0 $${COMMITISH})
|
@VERS=$$(git describe --tags --abbrev=0 $${COMMITISH})
|
||||||
@if [ -z "$${VERS}" ]; then VERS=${GITHUB_REF_NAME}; fi
|
@if [ -z "$${VERS}" ]; then VERS=${GITHUB_REF_NAME}; fi
|
||||||
@VERS=$${VERS#v}
|
@VERS=$${VERS#v}
|
||||||
@VERS=$$(echo $${VERS} | sed -e s+'-'+'_'+g)
|
|
||||||
@ARCH=$$(uname -m)
|
@ARCH=$$(uname -m)
|
||||||
@ARCH=$$(echo $${ARCH} | sed -e s+'_'+'-'+g)
|
@ARCH=$$(echo $${ARCH} | sed -e s+'_'+'-'+g)
|
||||||
@if [ "$${ARCH}" = "x86-64" ]; then ARCH=amd64; fi
|
@if [ "$${ARCH}" = "x86-64" ]; then ARCH=amd64; fi
|
||||||
|
@@ -48,7 +48,7 @@ func (m *CustomCmdCollector) Init(config json.RawMessage) error {
|
|||||||
command := exec.Command(cmdfields[0], strings.Join(cmdfields[1:], " "))
|
command := exec.Command(cmdfields[0], strings.Join(cmdfields[1:], " "))
|
||||||
command.Wait()
|
command.Wait()
|
||||||
_, err = command.Output()
|
_, err = command.Output()
|
||||||
if err != nil {
|
if err == nil {
|
||||||
m.commands = append(m.commands, c)
|
m.commands = append(m.commands, c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
13
go.mod
13
go.mod
@@ -10,14 +10,15 @@ require (
|
|||||||
github.com/gorilla/mux v1.8.0
|
github.com/gorilla/mux v1.8.0
|
||||||
github.com/influxdata/influxdb-client-go/v2 v2.12.1
|
github.com/influxdata/influxdb-client-go/v2 v2.12.1
|
||||||
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf
|
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf
|
||||||
github.com/nats-io/nats.go v1.21.0
|
github.com/nats-io/nats.go v1.22.1
|
||||||
github.com/prometheus/client_golang v1.14.0
|
github.com/prometheus/client_golang v1.14.0
|
||||||
github.com/stmcginnis/gofish v0.13.0
|
github.com/stmcginnis/gofish v0.13.0
|
||||||
github.com/tklauser/go-sysconf v0.3.11
|
github.com/tklauser/go-sysconf v0.3.11
|
||||||
|
golang.design/x/thread v0.0.0-20210122121316-335e9adffdf1
|
||||||
golang.org/x/sys v0.3.0
|
golang.org/x/sys v0.3.0
|
||||||
|
gopkg.in/fsnotify.v0 v0.9.3
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
|
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
@@ -31,11 +32,11 @@ require (
|
|||||||
github.com/nats-io/nuid v1.0.1 // indirect
|
github.com/nats-io/nuid v1.0.1 // indirect
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
github.com/prometheus/client_model v0.3.0 // indirect
|
github.com/prometheus/client_model v0.3.0 // indirect
|
||||||
github.com/prometheus/common v0.37.0 // indirect
|
github.com/prometheus/common v0.39.0 // indirect
|
||||||
github.com/prometheus/procfs v0.8.0 // indirect
|
github.com/prometheus/procfs v0.9.0 // indirect
|
||||||
github.com/shopspring/decimal v1.3.1 // indirect
|
github.com/shopspring/decimal v1.3.1 // indirect
|
||||||
github.com/tklauser/numcpus v0.6.0 // indirect
|
github.com/tklauser/numcpus v0.6.0 // indirect
|
||||||
golang.org/x/crypto v0.3.0 // indirect
|
golang.org/x/crypto v0.4.0 // indirect
|
||||||
golang.org/x/net v0.3.0 // indirect
|
golang.org/x/net v0.4.0 // indirect
|
||||||
google.golang.org/protobuf v1.28.1 // indirect
|
google.golang.org/protobuf v1.28.1 // indirect
|
||||||
)
|
)
|
||||||
|
@@ -3,7 +3,6 @@ Description=ClusterCockpit metric collector
|
|||||||
Documentation=https://github.com/ClusterCockpit/cc-metric-collector
|
Documentation=https://github.com/ClusterCockpit/cc-metric-collector
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
After=postgresql.service mariadb.service mysql.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=/etc/default/cc-metric-collector
|
EnvironmentFile=/etc/default/cc-metric-collector
|
||||||
|
@@ -45,7 +45,7 @@ def group_to_json(groupfile):
|
|||||||
if "PWR" in calc:
|
if "PWR" in calc:
|
||||||
scope = "socket"
|
scope = "socket"
|
||||||
|
|
||||||
m = {"name" : metric, "calc": calc, "scope" : scope, "publish" : True}
|
m = {"name" : metric, "calc": calc, "type" : scope, "publish" : True}
|
||||||
metrics.append(m)
|
metrics.append(m)
|
||||||
return {"events" : events, "metrics" : metrics}
|
return {"events" : events, "metrics" : metrics}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user