diff --git a/Makefile b/Makefile index b010cd8..8b62dab 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,6 @@ DEB: scripts/cc-metric-collector.deb.control $(APP) @VERS=$$(git describe --tags --abbrev=0 $${COMMITISH}) @if [ -z "$${VERS}" ]; then VERS=${GITHUB_REF_NAME}; fi @VERS=$${VERS#v} - @VERS=$$(echo $${VERS} | sed -e s+'-'+'_'+g) @ARCH=$$(uname -m) @ARCH=$$(echo $${ARCH} | sed -e s+'_'+'-'+g) @if [ "$${ARCH}" = "x86-64" ]; then ARCH=amd64; fi diff --git a/collectors/customCmdMetric.go b/collectors/customCmdMetric.go index e150014..e89ea54 100644 --- a/collectors/customCmdMetric.go +++ b/collectors/customCmdMetric.go @@ -48,7 +48,7 @@ func (m *CustomCmdCollector) Init(config json.RawMessage) error { command := exec.Command(cmdfields[0], strings.Join(cmdfields[1:], " ")) command.Wait() _, err = command.Output() - if err != nil { + if err == nil { m.commands = append(m.commands, c) } } diff --git a/go.mod b/go.mod index 9a9bf4b..3908213 100644 --- a/go.mod +++ b/go.mod @@ -10,14 +10,15 @@ require ( github.com/gorilla/mux v1.8.0 github.com/influxdata/influxdb-client-go/v2 v2.12.1 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/stmcginnis/gofish v0.13.0 github.com/tklauser/go-sysconf v0.3.11 + golang.design/x/thread v0.0.0-20210122121316-335e9adffdf1 golang.org/x/sys v0.3.0 + gopkg.in/fsnotify.v0 v0.9.3 ) - require ( github.com/apapsch/go-jsonmerge/v2 v2.0.0 // 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/pkg/errors v0.9.1 // indirect github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/common v0.39.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/tklauser/numcpus v0.6.0 // indirect - golang.org/x/crypto v0.3.0 // indirect - golang.org/x/net v0.3.0 // indirect + golang.org/x/crypto v0.4.0 // indirect + golang.org/x/net v0.4.0 // indirect google.golang.org/protobuf v1.28.1 // indirect ) diff --git a/scripts/cc-metric-collector.service b/scripts/cc-metric-collector.service index d40580c..9c2fd1e 100644 --- a/scripts/cc-metric-collector.service +++ b/scripts/cc-metric-collector.service @@ -3,7 +3,6 @@ Description=ClusterCockpit metric collector Documentation=https://github.com/ClusterCockpit/cc-metric-collector Wants=network-online.target After=network-online.target -After=postgresql.service mariadb.service mysql.service [Service] EnvironmentFile=/etc/default/cc-metric-collector