Commit Graph

27 Commits

Author SHA1 Message Date
Karsten Weiss
ed46efa081 Use sort.Strings() (gosimple)
This fixes:
pkg/tsdb/cloudwatch/metric_find_query.go:257:2: should use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) (S1032)
pkg/tsdb/cloudwatch/metric_find_query.go:286:2: should use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) (S1032)
pkg/tsdb/cloudwatch/metric_find_query.go:315:2: should use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) (S1032)
2018-04-16 21:04:57 +02:00
Karsten Weiss
be2d635078 Simplify error returns (gosimple)
This fixes:
pkg/api/avatar/avatar.go:261:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/log/file.go:102:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/metrics/graphitebridge/graphite.go:298:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/provisioning/provisioning.go:23:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/alert_notification.go:27:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/alert_notification.go:27:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/annotation.go:105:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/annotation.go:105:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard.go:351:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard.go:435:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard_acl.go:38:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard_acl.go:38:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/stats.go:22:2: 'if err != nil { return err }; return err' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/team.go:213:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:256:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:256:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:274:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:274:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:482:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:482:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
2018-04-16 21:04:57 +02:00
Karsten Weiss
c5a09a3dc1 Remove redundant break statements (gosimple)
This fixes:
pkg/components/dynmap/dynmap.go:588:3: redundant break statement (S1023)
pkg/components/dynmap/dynmap.go:610:3: redundant break statement (S1023)
pkg/components/dynmap/dynmap.go:641:3: redundant break statement (S1023)
pkg/components/dynmap/dynmap.go:690:3: redundant break statement (S1023)
pkg/components/dynmap/dynmap.go:712:3: redundant break statement (S1023)
pkg/components/dynmap/dynmap.go:749:3: redundant break statement (S1023)
pkg/components/dynmap/dynmap.go:785:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/cloudwatch.go:74:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/cloudwatch.go:77:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/cloudwatch.go:82:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:178:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:181:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:184:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:187:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:190:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:193:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:196:3: redundant break statement (S1023)
2018-04-16 21:04:57 +02:00
Mitsuhiro Tanda
60b30d3e9a add AWS/States Rekognition (#10890)
* added AWS/States

* added Rekognition
2018-02-14 15:14:38 +01:00
hannes
43e6ea95e0 Cloudwatch: add support for multi instances (#10570)
* cloudwatch: fix ebs_volume_ids by create a client-session before call ec2:DescribeInstances.

* cloudwatch: add support for multi instanceIds on call ebs_volume_ids.
2018-01-24 15:41:42 +01:00
hannes
d82af23f1c cloudwatch: fix ebs_volume_ids by create a client-session before call ec2:DescribeInstances. (#10566) 2018-01-23 12:57:05 +01:00
Torkel Ödegaard
4f59d229fe fix: cloudwatch corrected error handling so original error is not thrown away 2018-01-19 09:24:44 +01:00
Oleksandr Kushchenko
5c94daa011 Add AWS/AmazonMQ namespace metrics to CloudWatch tsdb (#10407) 2018-01-03 11:11:31 +01:00
Scott Ernst
fcf1ff10d2 Kinesis Metric Capitalization
Fixes the capitalization of the AWS/Kinesis ShardId metric, which
was incorrectly specified as "ShardID" instead of "ShardId" as
specified in the AWS documentation:

http://docs.aws.amazon.com/streams/latest/dev/monitoring-with-cloudwatch.html
2017-12-15 12:44:13 -06:00
Mitsuhiro Tanda
52e1c4113b fix cloudwatch ec2_instance_attribute (#9718)
* fix cloudwatch ec2_instance_attribute

* add test

* minor fix
2017-11-13 13:07:46 +01:00
Scott Nelson Windels
343143e95f Add AWS/NetworkELB to cloudwatch definitions 2017-11-10 15:13:09 -08:00
Eric Dahl
888d608090 CloudWatch: Add ALB RequestCountPerTarget metric
This commit adds the new ALB metric `RequestCountPerTarget` which was
released in July 2017.
2017-10-14 21:50:23 -07:00
Mitsuhiro Tanda
f3a2dc7c5f improve cloudwatch tsdb 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda
a21f53cf82 refactor cloudwatch code 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda
fe9fca381c move cloudwatch crendential related code 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda
d98d8a404f fix dimension convertion 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda
8f3b060946 fix parameter format 2017-09-29 13:44:01 +09:00
bergquist
fe1d395d79 refactor cloudwatch to support new tsdb interface 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
1dcc51adce re-implement dimension_values() 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
ec632bb9ed fix error message 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
8fba6dcb0d re-implement ec2_instance_attribute() 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
cf23734d7d re-implement ebs_volume_ids() 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
36a537a3ce fix conflict 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
1d265e05c9 fix conflict 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
fe3d3bc384 porting other suggestion 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
feed90c0e2 re-implement get regions 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
0c95148486 move the metric find query code 2017-09-29 13:44:01 +09:00