Skip to content

Commit 5e8fda1

Browse files
committed
Reduce logging and use the fix for boolean yaml options in all collectors
1 parent 0d34ba3 commit 5e8fda1

File tree

12 files changed

+15
-21
lines changed

12 files changed

+15
-21
lines changed

cmd/mq_aws/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ func initConfig() error {
6767

6868
if err == nil {
6969
if config.cf.ConfigFile != "" {
70-
// Set defaults
71-
cfy.Global.UsePublications = true
7270
err = cf.ReadConfigFile(config.cf.ConfigFile, &cfy)
7371
if err == nil {
7472
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects)

cmd/mq_aws/exporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ data
6262
func Collect() error {
6363
var err error
6464
var series string
65-
log.Infof("IBM MQ AWS collection started")
65+
log.Debugf("IBM MQ AWS collection started")
6666
collectStartTime := time.Now()
6767

6868
if platformString == "" {

cmd/mq_coll/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ func initConfig() error {
6060

6161
if err == nil {
6262
if config.cf.ConfigFile != "" {
63-
// Set defaults
64-
cfy.Global.UsePublications = true
6563
err = cf.ReadConfigFile(config.cf.ConfigFile, &cfy)
6664
if err == nil {
6765
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects)

cmd/mq_coll/exporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ data
5151
func Collect() error {
5252
var err error
5353
series := ""
54-
log.Infof("IBM MQ stdout collector started")
54+
log.Debugf("IBM MQ stdout collector started")
5555
if platformString == "" {
5656
platformString = strings.Replace(ibmmq.MQItoString("PL", int(mqmetric.GetPlatform())), "MQPL_", "", -1)
5757
}

cmd/mq_influx/config.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ func initConfig() error {
7878

7979
if err == nil {
8080
if config.cf.ConfigFile != "" {
81-
// Set defaults
82-
cfy.Global.UsePublications = true
8381
err = cf.ReadConfigFile(config.cf.ConfigFile, &cfy)
8482
if err == nil {
8583
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects)
@@ -94,7 +92,6 @@ func initConfig() error {
9492
config.ci.ApiToken = cf.CopyParmIfNotSetStr("influx", "apiToken", cfy.Influx.ApiToken)
9593
config.ci.ApiTokenFile = cf.CopyParmIfNotSetStr("influx", "apiTokenFile", cfy.Influx.ApiTokenFile)
9694
config.ci.Org = cf.CopyParmIfNotSetStr("influx", "org", cfy.Influx.Org)
97-
9895
}
9996
}
10097
}

cmd/mq_influx/exporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func Collect(c client.Client) error {
5454
var err error
5555
var series string
5656

57-
log.Infof("IBMMQ InfluxDB collection started")
57+
log.Debugf("IBMMQ InfluxDB collection started")
5858
collectStartTime := time.Now()
5959
atomic.StoreInt64(&loopErrorCount, 0)
6060
bp := c.WriteAPI(config.ci.Org, config.ci.BucketName)

cmd/mq_json/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ func initConfig() error {
5555

5656
if err == nil {
5757
if config.cf.ConfigFile != "" {
58-
// Set defaults
59-
cfy.Global.UsePublications = true
6058
err = cf.ReadConfigFile(config.cf.ConfigFile, &cfy)
6159
if err == nil {
6260
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects)

cmd/mq_json/exporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func Collect() error {
7070
var err error
7171
var j jsonReportStruct
7272

73-
log.Infof("IBM MQ JSON collector started")
73+
log.Debugf("IBM MQ JSON collector started")
7474
collectStartTime := time.Now()
7575

7676
if platformString == "" {

cmd/mq_opentsdb/config.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ func initConfig() error {
6767

6868
if err == nil {
6969
if config.cf.ConfigFile != "" {
70-
// Set defaults
71-
cfy.Global.UsePublications = true
7270
err = cf.ReadConfigFile(config.cf.ConfigFile, &cfy)
7371
if err == nil {
7472
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects)
@@ -77,7 +75,6 @@ func initConfig() error {
7775
config.ci.MaxErrors = cf.CopyParmIfNotSetInt("opentsdb", "maxErrors", cfy.OpenTSDB.MaxErrors)
7876
config.ci.MaxPoints = cf.CopyParmIfNotSetInt("opentsdb", "maxPoints", cfy.OpenTSDB.MaxPoints)
7977
config.ci.MetricPrefix = cf.CopyParmIfNotSetStr("opentsdb", "seriesPrefix", cfy.OpenTSDB.MetricPrefix)
80-
8178
}
8279
}
8380
}

cmd/mq_opentsdb/exporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ data
6262
func Collect() error {
6363
var err error
6464
var series string
65-
log.Infof("IBM MQ OpenTSDB collection started")
65+
log.Debugf("IBM MQ OpenTSDB collection started")
6666

6767
if platformString == "" {
6868
platformString = strings.Replace(ibmmq.MQItoString("PL", int(mqmetric.GetPlatform())), "MQPL_", "", -1)

0 commit comments

Comments
 (0)