Sven Klemm
af22213462
remove generic macros from macros_test and add integration test for generic macros
2018-10-03 09:46:17 +02:00
Sven Klemm
744e8617ff
add postgres test for global macros
2018-10-03 09:35:42 +02:00
Mitsuhiro Tanda
c2c0cdb49c
add test
2018-10-03 16:27:11 +09:00
Mitsuhiro Tanda
6770f2e940
stackdriver heatmap support
2018-10-03 16:27:04 +09:00
Torkel Ödegaard
ed0c2296b6
added slow queries scenario to test data source, added new panel test dashboard with slow queries
2018-10-02 13:00:54 -07:00
Sven Klemm
94d6d51726
move timeFrom, timeTo, unixEpochFrom and unixEpochTo macros to sql_engine
2018-10-02 20:19:34 +02:00
Torkel Ödegaard
9e72588cec
wip: began work on support for testdata tables & annotations support
2018-10-02 18:50:30 +02:00
Marcus Efraimsson
3932e4db5a
Merge remote-tracking branch 'origin/master' into concurrent-sql
2018-10-02 17:44:33 +02:00
Torkel Ödegaard
6c41cfb72c
wip: made sqlstore dialect accessable from outside
2018-10-02 16:14:29 +02:00
Marcus Efraimsson
9af809ff8a
Merge pull request #13440 from grafana/reminder_refactoring
...
Transaction issues for alert reminder
2018-10-02 15:55:18 +02:00
Marcus Efraimsson
0e0901874b
better comment about state changes
2018-10-02 15:11:33 +02:00
Marcus Efraimsson
418f77e70e
get or create alert notification should use transaction
2018-10-02 15:07:44 +02:00
bergquist
7b781e4c3c
use notification state id instead of notifier id
2018-10-02 14:53:39 +02:00
bergquist
9289cba625
merges defaultShouldNotify and ShouldNotify
2018-10-02 14:28:48 +02:00
bergquist
67e5f62514
move version conflict logging for mark as complete to sqlstore package
2018-10-02 14:23:18 +02:00
bergquist
9d3659d30d
improve local variable name
2018-10-02 14:04:50 +02:00
bergquist
b45a1bd45c
avoid exporting notificationState and notificationStateSlice
2018-10-02 14:03:30 +02:00
bergquist
9022e871e3
avoid sending full notification state to pending/complete
2018-10-02 13:57:41 +02:00
Axel Pirek
dd09ece8c9
Make max open, max idle connections and connection max life time configurable
2018-10-02 13:42:06 +02:00
bergquist
341d8af637
rename GetNotificationStateQuery to GetOrCreateNotificationStateQuery
2018-10-02 11:23:40 +02:00
bergquist
7f1d7cefc0
reminder: uses UpdatedAt to track state changes.
2018-10-02 11:19:09 +02:00
Torkel Ödegaard
162a95bff9
wip: going in circles
2018-10-01 19:31:03 +02:00
Mario Trangoni
6c190ab713
pkg/tsdb/cloudwatch/credentials.go: Remove unnecessary variable assignment
...
See,
pkg/tsdb/cloudwatch/credentials.go:45:2⚠️ should merge variable declaration with assignment on next line (S1021) (megacheck)
2018-10-01 18:24:00 +02:00
Mario Trangoni
236e0b3814
pkg/cmd/grafana-server/main.go: '_ = <-ch' simplified to '<-ch'
...
See,
pkg/cmd/grafana-server/main.go:107:8⚠️ '_ = <-ch' can be simplified to '<-ch' (S1005) (megacheck)
2018-10-01 18:24:00 +02:00
Mario Trangoni
ec4139d56b
pkg/tsdb/stackdriver/stackdriver_test.go: return simplified
...
See,
pkg/tsdb/stackdriver/stackdriver_test.go:356:2⚠️ 'if err != nil { return data, err }; return data, nil' can be simplified to 'return data, err'
2018-10-01 18:24:00 +02:00
Mario Trangoni
dde650905d
Fix megacheck issue unused code.
...
I removed some code, and commented out other one.
See,
$ gometalinter --vendor --disable-all --disable=gotype --enable=megacheck --deadline 6m ./... | grep unused
pkg/api/avatar/avatar.go:100:26⚠️ func (*CacheServer).mustInt is unused (U1000) (megacheck)
pkg/api/folder_test.go:136:6⚠️ func callGetFolderByUID is unused (U1000) (megacheck)
pkg/api/folder_test.go:141:6⚠️ func callDeleteFolder is unused (U1000) (megacheck)
pkg/api/live/hub.go:40:15⚠️ func (*hub).removeConnection is unused (U1000) (megacheck)
pkg/components/imguploader/azureblobuploader.go:130:5⚠️ var client is unused (U1000) (megacheck)
pkg/middleware/middleware_test.go:438:28⚠️ func (*scenarioContext).withInvalidApiKey is unused (U1000) (megacheck)
pkg/services/alerting/ticker.go:40:18⚠️ func (*Ticker).updateOffset is unused (U1000) (megacheck)
pkg/services/notifications/notifications_test.go:12:6⚠️ type testTriggeredAlert is unused (U1000) (megacheck)
pkg/services/sqlstore/dashboard_service_integration_test.go:935:6⚠️ type scenarioContext is unused (U1000) (megacheck)
pkg/services/sqlstore/dashboard_service_integration_test.go:939:6⚠️ type scenarioFunc is unused (U1000) (megacheck)
pkg/services/sqlstore/dashboard_service_integration_test.go:941:6⚠️ func dashboardGuardianScenario is unused (U1000) (megacheck)
pkg/services/sqlstore/transactions_test.go:13:6⚠️ type testQuery is unused (U1000) (megacheck)
2018-10-01 18:23:59 +02:00
Marcus Efraimsson
a4f5aafe22
Merge pull request #13422 from grafana/1815_admin_reset
...
cli: fix reset-admin-password
2018-10-01 16:48:32 +02:00
bergquist
75f832cda8
use alert state changes counter as secondary version
2018-10-01 15:58:30 +02:00
Torkel Ödegaard
b3c78f1265
wip: data source permissions hooks
2018-10-01 15:38:55 +02:00
Marcus Efraimsson
1be8fb76b8
cleanup alert_notification_state when deleting alert rules and channels
2018-09-30 21:57:15 +02:00
Marcus Efraimsson
5ec086dc56
don't notify if notification state pending
...
If notification state is pending and last update of state was made
less than a minute ago. In the case of a grafana instance is shut down/crashes
between setting pending state and before sending the notification/marks as complete
this logic should allow the notification to be sent after some time instead of
being left in an inconsistent state where no notifications are being sent.
2018-09-30 21:52:50 +02:00
Marcus Efraimsson
d412aafb7e
remove unused code
2018-09-30 20:16:01 +02:00
Daniel Lee
bf2abc6940
stackdriver: set default view parameter to FULL
2018-09-29 23:45:28 +02:00
Marcus Efraimsson
8551ffa0b0
alert -> ok with reminders enabled should send
2018-09-28 18:34:20 +02:00
Daniel Lee
399e83f91b
stackdriver: remove metric.category alias pattern
...
After discussions with the Stackdriver team, they did not think this was
needed.
2018-09-28 17:16:35 +02:00
Daniel Lee
9b90b835b2
Merge remote-tracking branch 'origin/master' into stackdriver-plugin
2018-09-28 16:20:40 +02:00
Daniel Lee
d11f67eb25
stackdriver: change info logging to debug logging
2018-09-28 16:16:27 +02:00
Daniel Lee
41060d24d5
stackdriver: change pattern for annotation to metric.value
2018-09-28 16:16:27 +02:00
Erik Sundell
189f89a9e4
stackdriver: add support for bool values
2018-09-28 15:42:02 +02:00
Erik Sundell
220f479ff8
stackdriver: add support for int64 values
2018-09-28 15:27:28 +02:00
Marcus Efraimsson
a0e1a1a1f9
Merge remote-tracking branch 'origin/master' into reminder_refactoring
2018-09-28 15:17:30 +02:00
Marcus Efraimsson
67c58fa5e4
fix set sent_at on complete
2018-09-28 15:11:03 +02:00
Torkel Ödegaard
d2464812eb
noop services poc
2018-09-28 14:52:12 +02:00
Marcus Efraimsson
c1763508e0
handle pending and completed state for alert notifications
2018-09-28 14:22:03 +02:00
Erik Sundell
2aae7e0c87
stackdriver: fix froamt annotation text for value
2018-09-28 13:50:10 +02:00
Erik Sundell
ca50e315fa
stackdriver: make it possible to use point values of type string
2018-09-28 13:41:28 +02:00
Marcus Efraimsson
2bf399d3c8
No need to get alert notification state in ShouldNotify
2018-09-28 12:59:35 +02:00
Marcus Efraimsson
69cc24ea3f
wip: test get alert notification state
2018-09-28 11:17:03 +02:00
Marcus Efraimsson
88bbc452a7
wip: send and mark as complete
2018-09-28 11:14:36 +02:00
Leonard Gram
1a75aa54de
wip: impl so that get alertstate also creates it if it does not exist
2018-09-28 10:48:08 +02:00