Mario Trangoni
556219b192
pkg/tsdb: fix ineffassign isues
2018-04-22 20:51:58 +02:00
Carl Bergquist
8367199a2d
Merge pull request #11613 from knweiss/gosimple
...
Code simplification (gosimple)
2018-04-17 22:40:40 +02:00
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
5d95601720
Merge variable declaration with assignment (gosimple)
...
This fixes:
pkg/cmd/grafana-cli/commands/upgrade_all_command.go:56:3: should merge variable declaration with assignment on next line (S1021)
pkg/login/ldap.go:406:4: should merge variable declaration with assignment on next line (S1021)
pkg/services/sqlstore/migrator/dialect.go:87:2: should merge variable declaration with assignment on next line (S1021)
pkg/services/sqlstore/migrator/dialect.go:165:2: should merge variable declaration with assignment on next line (S1021)
pkg/tsdb/cloudwatch/metric_find_query_test.go:185:2: should merge variable declaration with assignment on next line (S1021)
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
Mario Trangoni
ce941a004d
fix unconvert issues
2018-04-16 20:04:58 +02:00
Mitsuhiro Tanda
eecbdc89eb
fix, set default highResolution setting
2018-03-08 01:18:11 +09:00
Mitsuhiro Tanda
18c54a9341
support cloudwatch high resolution query
2018-02-15 23:35:01 +09: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
Carl Bergquist
ea2f65b4c3
Merge pull request #10110 from bwhaley/master
...
Fixes bug in cloudwatch regarding credentials
2017-12-12 10:16:53 +01:00
Mikael Olenfalk
8e7166b5c4
Explicitly specify default region in CloudWatch datasource ( #9440 )
...
The datasource uses the default region in the query if the region
is "" in the settings. However setting the region to an empty string
is almost impossible and rendered incorrectly.
This commit introduces a special value "default" for region which
is shown in the drop down and is translated to the default region
of the data source when performing queries.
2017-12-11 09:37:27 +01:00
Ben Whaley
51854ff4fa
Fix go fmt
2017-12-07 16:10:13 +00:00
Ben Whaley
fe88658bdd
Resolves grafana/grafana:#9309
2017-12-07 03:43:32 +00: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
Carl Bergquist
c44f6e2ec2
Merge pull request #9854 from drenalin23/drenalin-add-networkelb-cloudwatch
...
Add AWS/NetworkELB to cloudwatch definitions
2017-11-13 07:50:45 +01:00
Mitsuhiro Tanda
6488ccd113
return empty array for no datapoints
2017-11-12 00:48:54 +09:00
Scott Nelson Windels
343143e95f
Add AWS/NetworkELB to cloudwatch definitions
2017-11-10 15:13:09 -08:00
Carl Bergquist
17492c091a
Merge pull request #9752 from mtanda/cw_alias_fix
...
[bug fix] (cloudwatch) fix default alias format
2017-11-02 07:45:26 +01:00
Mitsuhiro Tanda
4a63d696ff
fix default alias
2017-11-01 18:48:30 +09:00
Mitsuhiro Tanda
ebcb8be19a
add period alias
2017-11-01 18:47:21 +09: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
8d6513a564
fix cloudwatch alert bug
2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda
5e88177f28
add debug log
2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda
468e8c13ee
move extend statistics handling code to backend
2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda
6c375ed2cb
fix assume role
2017-09-29 13:45:11 +09: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
59cdd4d8d2
remove obsolete 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
e1fe15e094
fix annotation query
2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda
d98d8a404f
fix dimension convertion
2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda
c140d7aa06
re-implement annotation query
2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda
8f3b060946
fix parameter format
2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
17445e0c98
fix alert feature
2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
8243ac39c2
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
e588b682fb
import the change, https://github.com/grafana/grafana/pull/9268
2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
36a537a3ce
fix conflict
2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
fa074249e4
fix test
2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
f590db1b78
move test code
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
Mitsuhiro Tanda
62d84c1e14
(cloudwatch) move query parameter to 'parameters'
2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
110f157621
parse duration
2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
c6607f3fa7
remove offset for startTime
2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda
dcb5ea58ce
count up metrics
2017-09-29 13:44:00 +09:00
Mitsuhiro Tanda
39607d09d7
(cloudwatch) alerting
2017-09-29 13:44:00 +09:00