Commit Graph
3958 Commits
Author SHA1 Message Date
Marcus Efraimsson eeb4d08031 mysql: fix timeFilter macro should respect local time zone
(cherry picked from commit 97b22aa5a9)
2018-11-06 15:06:05 +01:00
bergquist f7092fa6b0 delete provisioning meta data when deleting folder
prior to this fix Grafana didnt delete meta data
about the provisioned dashboard in `dashboard_provisioning`
which means that the dashboard wasn't inserted into
Grafana again if the folder was delete within Grafana.

closes #13280

(cherry picked from commit 0a9bfc5529)
2018-10-24 13:57:19 +02:00
Erik Sundell d20c7260b3 Resource type filter (#13784)
* stackdriver: add resource type to filter and group bys

* stackdriver: remove not used param

* stackdriver: refactor filter and group by code

* stackdriver: remove resource type if its already in filter list

* stackdriver: remove debug logging

* stackdriver: remove more debug logging

* stackdriver: append resource type to legend name if there are more than one type present in the response

* stackdriver: only make new request if filter has real value

* stackdriver: format legend support for resource type

* stackdriver: add resource type to documentation

* stackdriver: not returning promise from query function

* stackdriver: fix refactoring bug

* stackdriver: remove not used import

(cherry picked from commit c5af0bf1c5)
2018-10-24 13:26:14 +02:00
Marcus Efraimsson 5daf842431 add debug logging of folder/dashbord permission checks
(cherry picked from commit b371f2d91f)
2018-10-23 11:51:05 +02:00
Adrien Fillon e8e8b014f6 fix LDAP Grafana admin logic
Co-authored-by: Adrien Fillon <adrien.fillon@cdiscount.com>
Co-authored-by: Remi Buisson <remi.buisson@cdiscount.com>
(cherry picked from commit 781e66ba3c)
2018-10-23 11:18:04 +02:00
Mitsuhiro Tanda 02a3e11708 fix concurrent map writes
(cherry picked from commit 48aef0c50e)
2018-10-23 11:17:39 +02:00
Yuan Liu c507319f75 add test for es alert when group by has no limit
(cherry picked from commit 18dfdc4f0d)
2018-10-16 01:20:23 +02:00
Yuan Liu 5c38d3e9b0 remove tab
(cherry picked from commit f8a8b213f9)
2018-10-16 01:20:13 +02:00
Yuan Liu 1bc344447c bug fix
bug fix
(cherry picked from commit 567db87c3a)
2018-10-16 01:19:59 +02:00
Yuan Liu ac6bd22fd4 Update time_series_query.go
fix alert no data when elasticsearch group by terms size is set to no limit
(cherry picked from commit 3b9ab6e204)
2018-10-16 01:19:41 +02:00
Marcus Efraimsson 183bb1785b fix /api/org/users so that query and limit querystrings works
(cherry picked from commit c0b7ca3902)
2018-10-15 13:49:19 +02:00
Marcus Efraimsson 04ba06ccad cloudwatch: return early if execute query returns error
This will stop a segfault from happening

(cherry picked from commit 0612ce9b75)
2018-10-10 10:50:16 +02:00
Mitsuhiro Tanda 002da27e98 add test for automatically unit set
(cherry picked from commit f0fb8123ae)
2018-10-10 10:50:16 +02:00
Mitsuhiro Tanda 55712d61f4 fix crach bug
(cherry picked from commit 37e749f6da)
2018-10-10 10:50:16 +02:00
Mitsuhiro Tanda cc57377f03 set unit for CloudWatch GetMetricStatistics result
(cherry picked from commit 6ed1cbd5bb)
2018-10-10 10:50:16 +02:00
Erik Sundell 0d0df00b8e stackdriver: always use regex full match for =~ and !=~operator
(cherry picked from commit 8d53799bcd)
2018-10-10 10:39:07 +02:00
Erik Sundell 25f255f560 stackdriver: add tests from regex matching
(cherry picked from commit 7e6a5c0a74)
2018-10-10 10:39:07 +02:00
Erik Sundell 322535a2b7 stackdriver: test build filter string
(cherry picked from commit a3122a4b85)
2018-10-10 10:39:07 +02:00
Erik Sundell 93fb427310 stackdriver: test that no interpolation is done when there are no wildcards
(cherry picked from commit 5f7795aa1f)
2018-10-10 10:39:07 +02:00
Erik Sundell 84094b5051 stackdriver: remove debug logging
(cherry picked from commit 2a0d7a8803)
2018-10-10 10:39:06 +02:00
Erik Sundell 0ef06d467a stackdriver: add more tests
(cherry picked from commit 035be6cbbe)
2018-10-10 10:39:06 +02:00
Erik Sundell dee26f3d2f stackdriver: fix broken substring. also adds tests
(cherry picked from commit 68332c5951)
2018-10-10 10:39:06 +02:00
Erik Sundell 897cf51e75 stackdriver: remove not necessary helper functions
(cherry picked from commit 2e665fba0f)
2018-10-10 10:39:06 +02:00
Erik Sundell a4e148e300 stackdriver: interpolate stackdriver filter wildcards when asterix is used in filter
(cherry picked from commit 4d8f594d31)
2018-10-10 10:39:06 +02:00
Mitsuhiro Tanda 221341b3e8 add test
(cherry picked from commit c2c0cdb49c)
2018-10-10 10:33:25 +02:00
Mitsuhiro Tanda 464e0cf540 stackdriver heatmap support
(cherry picked from commit 6770f2e940)
2018-10-10 10:33:14 +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
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
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
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