Commit Graph

1969 Commits

Author SHA1 Message Date
Maddin-619
09cd173e92 updates all cols except created so user and password
of the database can be chaned to no user and password
2019-02-22 14:19:15 +01:00
bergquist
7754c37a1f reduce loglevel to debug 2019-02-19 08:22:33 +01:00
Torkel Ödegaard
1adc1a6097
Merge pull request #15455 from grafana/fixed-handling-of-alert-urls
Fixed handling of alert urls with true flags
2019-02-15 16:27:23 +01:00
Torkel Ödegaard
4c28ec83b3
Merge pull request #15444 from max-neverov/percent_diff_null
Fix percent_diff calculation when points are nulls
2019-02-15 13:03:19 +01:00
Torkel Ödegaard
7699706e65 fixed handling of alert urls with true flags, fixes #15454 2019-02-15 11:23:31 +01:00
Maxim Neverov
28eaac3a9c Extracted common code for diff calculation 2019-02-14 21:52:59 +01:00
Torkel Ödegaard
cd8f5835ec
Merge pull request #15395 from briangann/20190212_adjust_notifier_render_timeout
allow 90 percent of alertTimeout for rendering to complete vs 50 percent
2019-02-14 17:21:40 +01:00
Maxim Neverov
3c2f6094b2 Fix percent_diff calculation when points are nulls 2019-02-14 16:31:15 +01:00
Brian Gann
c98b00c302 allow 90 percent of alertTimeout for rendering to complete vs 50 percent 2019-02-13 09:56:37 -06:00
Carl Bergquist
dcec61e1b4
Merge pull request #15378 from grafana/auth_token_quotas
use authTokenService for session quotas restrictions
2019-02-12 15:38:57 +01:00
bergquist
e163aadfe4 use authtoken for session quota restrictions
closes #15360
2019-02-12 15:10:55 +01:00
bergquist
1310d356fc removes unused session code 2019-02-12 12:33:54 +01:00
Carl Bergquist
1f7a1f807e
Merge pull request #15299 from grafana/15295_fux
Make sure alert notifier provisioning directory are created for deb and rpm packages
2019-02-11 13:31:51 +01:00
bergquist
3ce99bca66 renames usage state name for auth token
as noted, sessions might not be a good name for this metrics.
while devices would be a better name for users I think we should
align the name with the code as much as possible. The ui listing
all auth_tokens per user should probarbly say "devices" instead
2019-02-11 11:08:31 +01:00
bergquist
2be60887ca adds usage stats for sessions 2019-02-07 16:27:40 +01:00
Marcus Efraimsson
b4267eafb8
log root cause error when reading from provisioning directories 2019-02-07 15:46:57 +01:00
bergquist
170783c292 make hourly cleanup the default behavior 2019-02-07 10:51:35 +01:00
Marcus Efraimsson
1a140ee199
run token cleanup job when grafana starts, then each hour 2019-02-06 22:27:08 +01:00
Marcus Efraimsson
8ae066ab5d
move authtoken package into auth package 2019-02-06 17:02:57 +01:00
Marcus Efraimsson
8678620730
move UserToken and UserTokenService to models package 2019-02-06 16:55:12 +01:00
Marcus Efraimsson
a60124a88c
change UserToken from interface to struct 2019-02-06 16:30:50 +01:00
Marcus Efraimsson
d8658a765c
enhanced expiration logic for lookup token
tokens are not expired if created_at > now - LoginMaxLifetimeDays and
rotated_at > now - LoginMaxInactiveLifetimeDays
2019-02-06 08:30:14 +01:00
Marcus Efraimsson
9483506590
auth token clean up job now runs on schedule and deletes all expired tokens
delete tokens having created_at <= LoginMaxLifetimeDays or
rotated_at <= LoginMaxInactiveLifetimeDays
2019-02-05 21:20:11 +01:00
Marcus Efraimsson
0915f931ae
change configuration settings in auth package 2019-02-05 21:12:30 +01:00
Marcus Efraimsson
7cd3cd6cd4
auth package refactoring
moving middleware/hooks away from package
exposing public struct UserToken accessible from other packages
fix debug log lines so the same order and naming are used
2019-02-05 00:10:56 +01:00
Marcus Efraimsson
fb3c510178
Merge branch 'master' into delete_session_on_logout 2019-02-04 20:23:05 +01:00
Marcus Efraimsson
d433ca7d40
fix util for splitting host and port
Now you can provide both a default host and a default port
2019-02-04 13:10:32 +01:00
Sean Lafferty
fa22311a95 base64 encode encrypted oauth token fields 2019-02-02 09:03:04 -05:00
Athurg Feng
70b23ab73b Add string quote func 2019-02-02 13:36:10 +08:00
Athurg Feng
bba92c0746 Remove option used to control within browser 2019-02-02 13:35:17 +08:00
Sean Lafferty
4a7cf82f5f Remove length from text columns 2019-02-01 19:45:27 -05:00
Sean Lafferty
5a59cdf0ef Add oauth pass-thru option for datasources 2019-02-01 19:40:57 -05:00
bergquist
a6bd2c73a0 introduce samesite setting for login cookie
ref #15067
2019-02-01 11:47:21 +01:00
bergquist
a1b3986532 always delete session cookie even if db delete fails 2019-02-01 09:59:53 +01:00
bergquist
91bd908e03 adds more tests signing out session 2019-01-31 22:24:04 +01:00
bergquist
11c4967bdc changes some info logging to debug 2019-01-31 21:51:14 +01:00
bergquist
88ca54eba9 renames signout function 2019-01-31 16:26:36 +01:00
bergquist
43ac79685a delete auth token on signout 2019-01-31 16:13:35 +01:00
Carl Bergquist
e2c2b70a61
Merge pull request #14852 from jpenalbae/pushover-attach
pushover: add support for attaching images (closes #10780)
2019-01-31 11:18:08 +01:00
Torkel Ödegaard
9a598be4f7 Fixed failing unit test 2019-01-29 21:17:56 +01:00
Torkel Ödegaard
416562bd90
Merge pull request #15102 from mjtrangoni/fix-golint-issues
Fix golint issues
2019-01-29 21:12:34 +01:00
Torkel Ödegaard
a2dd6f378f fixed sqlite issue introduced by #14709 2019-01-29 20:27:01 +01:00
Marcus Efraimsson
a067862a0a
Merge pull request #14709 from tpetr/extra-connection-string-args
add support for defining additonal database connection string args
2019-01-29 20:13:17 +01:00
Carl Bergquist
c6f80ecec2
Merge pull request #14229 from pbakulev/configurable-alert-notification
Configurable alert notification
2019-01-28 22:47:12 +01:00
Mario Trangoni
b7628f2060 pkg/util/{filepath.go,shortid_generator.go}: Fix golint issues
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=golint  ./...
filepath.go:12:5⚠️ error var WalkSkipDir should have name of the form ErrFoo (golint)
shortid_generator.go:11:5⚠️ var validUidPattern should be validUIDPattern (golint)
shortid_generator.go:19:6⚠️ func IsValidShortUid should be IsValidShortUID (golint)
shortid_generator.go:24:6⚠️ func GenerateShortUid should be GenerateShortUID (golint)
2019-01-28 22:37:44 +01:00
Mario Trangoni
8261613b51 pkg/util/{ip.go,url.go}: Fix some golint issues
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=golint  ./...
ip.go:8:6⚠️ func SplitIpPort should be SplitIPPort (golint)
url.go:14:6⚠️ func NewUrlQueryReader should be NewURLQueryReader (golint)
url.go:9:6⚠️ type UrlQueryReader should be URLQueryReader (golint)
url.go:37:6⚠️ func JoinUrlFragments should be JoinURLFragments (golint)
2019-01-28 22:29:20 +01:00
bergquist
e218cc7637 docs: updates docs to refer to using uid 2019-01-28 22:03:16 +01:00
bergquist
7c93335d28 gofmt issue 2019-01-28 21:04:08 +01:00
bergquist
809019d4ee moves test files into testdata folder 2019-01-28 20:44:10 +01:00
bergquist
8f0e65a150 renames alert_notifications -> notifiers 2019-01-28 20:39:09 +01:00
Marcus Efraimsson
ed6cca61c9
Merge pull request #15051 from ellisvlad/13711_parse_database_config_ipv6_host
Parse database host correctly when using IPv6
2019-01-28 18:32:09 +01:00
bergquist
21fff415ed removes unnessecary db request 2019-01-28 15:37:52 +01:00
bergquist
935da14f7d tab/spaces formatting 2019-01-28 15:27:02 +01:00
bergquist
6a8643b3d1 Merge branch 'master' into configurable-alert-notification
* master: (250 commits)
  Firing off an action instead of listening to location changes
  Changes after PR Comments
  Made ExplorerToolbar connected and refactored away responsabilities from Explore
  Removed some split complexity
  Fixed some more styling
  Fixed close split look and feel
  Fixed position of Closesplit
  Fixed small issue with TimePicker dropdown position
  Simplified some styles and dom elements
  Fixed some more with the sidemenu open and smaller screens
  Fixed so heading looks good with closed sidemenu
  Restructure of component and styling
  Refactored out ExploreToolbar from Explore
  Fixed reinitialise of Explore
  changelog: add notes about closing #13929
  changelog: add notes about closing #14558
  changelog: add notes about closing #14484
  changelog: add notes about closing #13765
  changelog: add notes about closing #11503
  changelog: add notes about closing #4075
  ...
2019-01-28 14:16:43 +01:00
bergquist
0cbc89b063 Merge branch 'master' into 14701-fix-alert-context
* master: (262 commits)
  pkg/services/dashboards/dashboard_service.go: simplify return
  Updated url query param encoding to exctly match angular encoding
  Updated snapshot
  Added missing props not being passed to scrollbar component, fixes #15058
  Document /api/health
  changelog: adds note for #15062
  change default rotate_token_minutes to 10 minutes
  fix
  load test/ha fixes
  set low login cookie rotate time in ha mode
  fix multiple piechart instances bug
  scripts/build/*: Fix some golint issues
  scripts/build/*: Fix golint issues Url => URL
  build: fixes building grafana completely within docker.
  dont specify domain for auth cookies
  New snapshot reflecting changes
  Makes the clickable side menu header look great in light theme again
  org id fix for load test
  user auth token load tests using k6.io
  moves cookie https setting to [security]
  ...
2019-01-28 08:09:52 +01:00
bergquist
364154d81f moves timeout tests to an integration test 2019-01-28 07:56:31 +01:00
Vlad Ellis
9692955d4f
Correct formatting of sqlstore_test.go 2019-01-27 16:28:02 +00:00
Mario Trangoni
bf90ff87cf pkg/services/dashboards/dashboard_service.go: simplify return
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck  ./...
pkg/services/dashboards/dashboard_service.go:167:2⚠️ 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013) (megacheck)
2019-01-26 14:23:10 +01:00
Vlad Ellis
c208186f26 Parse database host correctly when using IPv6 2019-01-25 21:56:19 +00:00
bergquist
75760aa892 dont specify domain for auth cookies 2019-01-25 10:40:50 +01:00
bergquist
d6edaa1328 moves cookie https setting to [security] 2019-01-24 19:04:58 +01:00
bergquist
516037fbdd makes sure rotation is always higher than urgent rotation 2019-01-24 13:54:45 +01:00
bergquist
fd0f9f2dd2 fixes broken test 2019-01-24 12:06:44 +01:00
bergquist
ff483f3782 removes old cookie auth configuration 2019-01-24 10:55:10 +01:00
bergquist
56a521b264 makes auth token rotation time configurable 2019-01-24 10:50:18 +01:00
bergquist
5998646da5 restrict session usage to auth_proxy 2019-01-23 14:56:48 +01:00
Carl Bergquist
766122856b
Merge pull request #14995 from bergquist/token_oauth
Stores hashed state code in cookie for OAuth logins.
2019-01-23 10:39:12 +01:00
bergquist
c3ff3d644c fixes nil ref in tests 2019-01-22 16:16:32 +01:00
bergquist
31b5db06f1 Merge branch 'master' into poc_token_auth
* master: (156 commits)
  Fixed issues with the sanitizie input in text panels, added docs, renamed config option
  build: removes arm32v6 docker image.
  Updated version in package.json to 6.0.0-pre1
  Update CHANGELOG.md
  build: armv6 docker image.
  build: skips building rpm for armv6.
  build: builds for armv6.
  Explore: mini styling fix for angular query editors
  Removed unused props & state in PromQueryField
  chore: Remove logging and use the updated config param
  chore: Reverse sanitize variable so it defaults to false
  feat: wip: Sanitize user input on text panel
  fix: Text panel should re-render when panel mode is changed #14922
  Minor rename of LogsProps and LogsState
  Splitted up LogLabels into LogLabelStats and LogLabel
  Refactored out LogRow to a separate file
  Removed strange edit
  Added link to side menu header and fixed styling
  Moved ValueMapping logic and tests to separate files
  Fixed data source selection in explore
  ...
2019-01-22 15:39:54 +01:00
bergquist
64124b5042 add setting for how to long we should keep expired tokens 2019-01-22 15:31:43 +01:00
bergquist
12f8338977 stores hashed state code in cookie 2019-01-22 15:22:24 +01:00
bergquist
d3ec8e1ccb creates new config section for login settings 2019-01-22 15:22:11 +01:00
Marcus Efraimsson
4096449aec
extract auth token interface and remove auth token from context 2019-01-22 12:00:33 +01:00
Marcus Efraimsson
366e356e08
more auth token tests 2019-01-21 21:48:18 +01:00
bergquist
777bd9ea18 adds cleanup job for old session tokens 2019-01-21 19:03:32 +01:00
Marcus Efraimsson
f040f9a400
fix tests after renaming now 2019-01-21 16:53:00 +01:00
Marcus Efraimsson
38efc1d7d2
s/print/log 2019-01-21 15:53:40 +01:00
bergquist
92620af75f avoid calling now() multiple times 2019-01-21 15:48:17 +01:00
Marcus Efraimsson
dd8476d81a
passing auth token tests 2019-01-21 15:06:33 +01:00
Marcus Efraimsson
565408194a
handle expired tokens 2019-01-21 13:22:20 +01:00
bergquist
697ddccd8e set userToken on request when logging in 2019-01-21 11:42:10 +01:00
bergquist
55b3013eb3 moves initWithToken to auth package 2019-01-21 11:37:44 +01:00
Marcus Efraimsson
734a7d38b2
set cookie name from configuration 2019-01-21 11:21:43 +01:00
Marcus Efraimsson
766cfab374
change rotate time 2019-01-21 10:22:18 +01:00
Marcus Efraimsson
0d1e3759eb
mixor fixes 2019-01-21 10:20:23 +01:00
bergquist
2e97d39abe removes commented code 2019-01-21 10:01:48 +01:00
bergquist
47a7d93fd9 moves rotation into auth since both happens before c.Next() 2019-01-21 08:59:01 +01:00
sharkpc0813
35013a28cd add timeout test for alert handling. 2019-01-18 11:23:00 +09:00
bergquist
fd937e3d95 remove maxage from session token 2019-01-17 21:03:27 +01:00
bergquist
c2accfa4c0 inital code for rotate 2019-01-17 17:11:52 +01:00
bergquist
aba6148c43 login users based on token cookie 2019-01-16 16:44:40 +01:00
Pavel Bakulev
f461d52004 Converted notification id to uid via fmt for old alert notification settings 2019-01-16 16:52:00 +02:00
Pavel Bakulev
2de32756c2 Returned id for alert notifications which were created without uid 2019-01-16 16:52:00 +02:00
Pavel Bakulev
4bcace567b Formatted errors to err 2019-01-16 16:50:00 +02:00
Pavel Bakulev
d0370ea7ad Using func InitNotifier for verifying notification settings 2019-01-16 16:50:00 +02:00
Pavel Bakulev
f132e929ce Added uid for alert notifications 2019-01-16 16:50:00 +02:00
Pavel Bakulev
6d1ec19fe9 Renamed validation funcs for alert notification 2019-01-16 16:45:42 +02:00
Pavel Bakulev
5c10a897f8 Instantiating notifiers from config before using 2019-01-16 16:45:42 +02:00
Pavel Bakulev
4fa45253cf Added orgName parameter for alert_notifications 2019-01-16 16:45:42 +02:00
Pavel Bakulev
6e3e9a337d Added alert_notification configuration 2019-01-16 16:45:42 +02:00
Marcus Efraimsson
b0df7280be
begin user auth token implementation 2019-01-15 15:16:20 +01:00
bergquist
1b6203e430 removes error2 logger 2019-01-15 11:49:18 +01:00
Carl Bergquist
1a7eb2f462
Merge pull request #14868 from bergquist/provisioning_inifinite_loop
Avoid infinite loop in the dashboard provisioner
2019-01-15 10:34:18 +01:00
sharkpc0813
e172bade40 fix that alert context and result handle context do not use the same derived context. 2019-01-15 17:51:50 +09:00
bergquist
8880829eda avoid infinite loop in the dashboard provisioner
if one dashboard with an uid is refered to by two
provsioners each provsioner overwrite each other.
filling up dashboard_versions quite fast if using
default settings.

ref #12864
2019-01-14 16:38:39 +01:00
fredbcode
110ffb69de Fix bug tls renegociation problem in Notification channel (webhook) #14800 2019-01-13 21:42:33 +01:00
NighterMan
ec0fe11939 pushover: add support for attaching images (closes #10780)
Use native pushover native attachment support to deliver images
2019-01-13 04:09:51 +01:00
bergquist
fbb3ad5fc4 make sure frequency cannot be zero
frequency set to zero causes division by zero
panics in the alert schedular.

closes #14810
2019-01-10 14:17:10 +01:00
Torkel Ödegaard
0a936a55b4 Fixed new gometalinter issues 2019-01-07 11:01:31 +01:00
tpetr
db61fc1dd1 EqualFold() 2019-01-05 00:17:31 -05:00
tpetr
32dfc4e8b1 forgot go fmt 2019-01-05 00:02:15 -05:00
tpetr
5bc8d50864 pull connection string args from url instead 2019-01-04 23:52:36 -05:00
Torkel Ödegaard
3e873a2500
Merge pull request #14710 from grafana/fixed-gometalinter
Fixed new gotmetalinter warning
2019-01-03 07:23:45 +01:00
Torkel Ödegaard
80e441f48b Fixed new gotmetalinter warning 2019-01-02 19:17:35 +01:00
tpetr
a693d42e31 add support for defining additonal database connection string args via extra_connection_string_args 2019-01-02 13:02:40 -05:00
Dan Cech
efa738ddf6
Merge pull request #14540 from grafana/session-skip-update
only update session in mysql database when required
2018-12-31 11:54:04 -05:00
Torkel Ödegaard
22399b336f
Merge pull request #14577 from marefr/14351_db_migration
fix only create/drop database indices if not exists/exists
2018-12-31 16:20:07 +01:00
Torkel Ödegaard
983b85139c
Merge pull request #14665 from bergquist/sqlite_cache_mode_setting
WIP: makes cache mode configurable
2018-12-31 08:35:27 +01:00
bergquist
9895b1e6d0 adds orgId to user dto for provisioned dashboards 2018-12-28 10:49:00 +01:00
bergquist
24636da800 closes the body properly on successful webhooks
this commit also adds a test docker container
for receiving alerting web hook requests
2018-12-27 16:08:13 +01:00
bergquist
74124ec8ed makes cache mode configurable
this makes the cache mode in the sqlite connection
string configurable. the default also changed from
shared to private to solve #107272 but allow the user
to use shared if performance is more important.

ref #10727
2018-12-27 10:48:11 +01:00
Carl Bergquist
52ccb49167
Merge pull request #14593 from bergquist/export_create_notifier_func
export init notifier func
2018-12-19 13:51:40 +01:00
bergquist
69489993c3 export init notifier func
makes it possible to validate that an notifier can be
initialzed from the provisioning package
2018-12-19 13:38:49 +01:00
Torkel Ödegaard
cbeefcd376
Merge pull request #14574 from grafana/14543_org_redirect
fix signed in user for orgId=0 result should return active org id
2018-12-19 11:31:06 +01:00
Torkel Ödegaard
36154e59b0
Merge pull request #14571 from oiooj/pr-ds-limit
Raise datasources number to 5000
2018-12-19 11:26:16 +01:00
Marcus Efraimsson
12f3c8f9d6
fix only add column if not exists for mysql 2018-12-18 23:02:08 +01:00
Carl Bergquist
854487acab
Merge pull request #14441 from cinaglia/delete-external-snapshot
Add support for deleting external snapshots from Snapshots List
2018-12-18 22:43:12 +01:00
Marcus Efraimsson
a451c20129
fix handling of indices with multiple columns (mysql) 2018-12-18 22:28:27 +01:00
Marcus Efraimsson
09b3014683
fix only create/drop database indices if not exists/exists 2018-12-18 21:47:45 +01:00
Marcus Efraimsson
e82b3632f6
fix signed in user for orgId=0 result should return active org id 2018-12-18 20:02:27 +01:00
Dan Cech
3f85901c4a
only update session in mysql database when required 2018-12-18 11:19:32 -05:00
Baokun Lee
f51222027d Raise datasources number to 5000 2018-12-18 23:59:14 +08:00
bergquist
7aa84aeb61 moves migrations to /sqlstore/migrations 2018-12-17 16:36:57 +01:00
bergquist
11cde7ed71 renames main lock function 2018-12-17 16:36:57 +01:00
bergquist
823bba8d98 change from db_text to nvarchar 2018-12-17 16:36:57 +01:00
Joesis
92a8c5b81b log error when resolvePath 2018-12-13 02:10:29 -08:00
Daniel Lee
90e2175716 migration: renames logging ds to loki ds in data_source table 2018-12-12 20:54:05 +01:00
Victor Cinaglia
9d6da10e82
snapshots: Move external snapshot creation to backend 2018-12-10 16:36:32 -05:00
Victor Cinaglia
d9d6a4481f
snapshots: Add external_delete_url column 2018-12-10 16:25:02 -05:00
bergquist
9eea585773 removes unused code 2018-12-07 14:39:44 +01:00
bergquist
5d720674e3 Merge branch 'master' into add_google_hangouts_chat_notifier
* master: (322 commits)
  graphInterval needs to update after query execution, fixes #14364
  Explore: Parse initial dates
  Aligned styling of stats popover/box with rest of grafana & minor css refactoring
  Prometheus: Make result transformer more robust for empty responses
  Rebase fixes
  Explore: Logging line parsing and field stats
  fixed unit tests
  made unknown color theme aware and sync with graph color, some minor cleanup
  Explore: improve error handling
  use render props instead of cloneElement
  sort of a hacky way to figure if the small variation should be used for the label
  add basic button group component, using the the same label style as is
  explore logs styling
  wip: alternative level styling & hover effect
  wip: explore logs styling
  more detailed error message for loki
  If user login equals user email, only show the email once #14341
  UserPicker and TeamPicker should use min-width instead of fixed widths to avoid overflowing form buttons.  #14341
  wip: explore logs styling
  restoring monospace & making sure width are correct when hiding columns
  ...
2018-12-07 14:31:13 +01:00
bergquist
a90bba859a fixes merge error 2018-12-07 14:17:09 +01:00
moznion
4397ee61d0
Put issue number to test code 2018-12-05 22:47:41 +09:00
moznion
d1e1cde00e
Fix bug what updating user quota doesn't work
Reason is same as 061e06c226
2018-12-05 22:29:07 +09:00
moznion
061e06c226
Fix bug what updating org quota doesn't work
3c330c8e4c/pkg/services/sqlstore/quota.go (L106)

In the real use case, `has` that is described by the above code is always `false` because it includes `Updated` in a query.

So this commit fixes this issue.
2018-12-05 22:19:40 +09:00
Mario Trangoni
fadd816d89 pkg/*: Fix misspell issues
See,
$ find . -type f | xargs misspell -locale US | grep -vi -e vendor -e devenv -e Unknwon -e Destory | grep pkg
./pkg/services/sqlstore/org_test.go:190:15: "frome" is a misspelling of "from"
./pkg/tsdb/elasticsearch/response_parser.go:544:24: "Unkown" is a misspelling of "Unknown"
./pkg/tsdb/opentsdb/opentsdb.go:87:20: "marshalling" is a misspelling of "marshaling"
./pkg/components/dynmap/dynmap_test.go:2:7: "Licence" is a misspelling of "License"
./pkg/components/dynmap/dynmap.go:2:7: "Licence" is a misspelling of "License"
2018-12-04 23:29:34 +01:00
danielbh
d1b8f13c66
feat: #11067 prevent removing last grafana admin permissions 2018-12-03 20:05:52 -05:00
Marcus Efraimsson
36aec52c08
return actual error if failing to update alert data 2018-11-22 11:19:08 +01:00
bergquist
862815d18d go meta lint errors 2018-11-19 14:00:20 +01:00
Carl Bergquist
6049855dc7
Merge pull request #13947 from bergquist/alerting_for
Introduce alert debouncing
2018-11-19 10:38:02 +01:00
Patrick
2de5a7119b
Merge branch 'master' into add_google_hangouts_chat_notifier 2018-11-18 22:00:53 +01:00
bergquist
caec36e7ec alert rule have to be pending before alerting is for is specified 2018-11-15 15:37:46 +01:00
bergquist
a70ea2101c alertmanager: adds tests for should notify 2018-11-15 12:36:11 +01:00
bergquist
28029ce4a7 alerting: support for on execution errors and notdata 2018-11-15 11:04:16 +01:00
bergquist
84eb3bd095 tests for supporting for with all alerting scenarios 2018-11-14 23:43:09 +01:00
bergquist
8fb997d935 should not notify when going from unknown to pending 2018-11-14 23:43:09 +01:00
Marcus Efraimsson
5f9fecd254
feat: team preferences 2018-11-12 20:01:53 +01:00
bergquist
2fb78a50d6 minor fixes based on code review 2018-11-12 10:50:56 +01:00
Athurg Feng
919d00437e Add pic into actionCard message 2018-11-12 11:18:53 +08:00
Athurg Feng
b7787db34e Add new option to set where to open the message url 2018-11-08 18:44:00 +08:00
Andrey Kaipov
63fdffe8c0 Fixes #13993 - adds more options for Slack notifications 2018-11-07 22:08:26 -05:00
Marcus Efraimsson
26cbc6be81
Merge pull request #13966 from marefr/alert_extractor_refactor
Refactor dashboard alert extractor
2018-11-05 17:06:27 +01:00
bergquist
423331dae0 alerting: delete alerts when parent folder is deleted
closes #13322
2018-11-05 14:25:26 +01:00
Marcus Efraimsson
9e0da02b6a
refactor dashboard alert extractor 2018-11-05 14:25:19 +01:00
bergquist
ae2d536740 adds tests for extracting for property 2018-11-05 13:29:33 +01:00
bergquist
ccd89eee97 renames debouceduration to for 2018-11-05 11:05:30 +01:00
Marcus Efraimsson
5882e5bb46
Merge pull request #13900 from marefr/ds_cache_refactor
Datasource proxy cache refactor
2018-11-05 11:02:31 +01:00
bergquist
d25284a364 introduce state unknown for rules that have not been evaluated yet 2018-11-05 10:50:28 +01:00
bergquist
6f748d8a96 fixes go meta lint issue 2018-11-05 10:50:28 +01:00
bergquist
4526660cb2 wire up debounce setting in the ui 2018-11-05 10:50:28 +01:00
bergquist
2d3a575489 adds db migration for debounce_duration 2018-11-05 10:50:28 +01:00
bergquist
ccfd9c89b2 introduces hard coded deboucing for alerting 2018-11-05 10:50:28 +01:00
Marcus Efraimsson
818d48c2c0
always execute the user teams query 2018-11-05 10:49:56 +01:00
Marcus Efraimsson
5be2332c66
handle error before populating cache 2018-11-05 09:58:13 +01:00
bergquist
7c3dcb3702 alerting: adds tests for the median reducer
adds a test that verify that null values are not used
when calculating the median value in alerting

closes #10056
2018-11-05 09:03:35 +01:00
Marcus Efraimsson
6ef941ea17
fix failing tests 2018-11-02 16:03:12 +01:00
Sergio Conde Gomez
65a15b157f
Increase Telegram captions length limit. 2018-10-31 18:07:09 +01:00
Torkel Ödegaard
93453c2d94 added caching of signed in user DB calls 2018-10-31 06:47:14 -07:00
Marcus Efraimsson
6f9c0241af
register datasource cache service with proper name 2018-10-30 12:32:14 +01:00
Marcus Efraimsson
70ddf93688
include teams on signed in user 2018-10-30 09:32:32 +01:00
Marcus Efraimsson
cfb061ddab
refactor datasource caching 2018-10-30 09:31:56 +01:00
Torkel Ödegaard
d505d83ee1
Merge pull request #13679 from mjtrangoni/fix-megacheck-issues
Fix megacheck issues
2018-10-25 16:31:53 +02:00
Athurg Feng
201dd6bf65 Optimize the Dingding match values format 2018-10-25 18:53:45 +08:00
Athurg Feng
cb86e38628 Add Dingding message type to support mass text notification 2018-10-25 18:34:34 +08:00
Athurg Feng
7f45afac63 Split text template into variable 2018-10-25 18:24:04 +08:00
Athurg Feng
ca6dd73923 Add match values into Dingding notification message 2018-10-25 18:23:37 +08:00
Carl Bergquist
0d41904ee5
Merge pull request #13755 from Yukinoshita-Yukino/master
Fix cannot receive dingding alert when alert message is empty
2018-10-24 14:56:08 +02:00
bergquist
0a9bfc5529 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
2018-10-24 13:32:45 +02:00
Marcus Efraimsson
b371f2d91f
add debug logging of folder/dashbord permission checks 2018-10-23 11:08:57 +02:00
Mario Trangoni
68507e8855 pkg/services/alerting/reader.go: Fix should use for range instead of for { select {} }.
$ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck ./...
pkg/services/alerting/reader.go:37:2⚠️ should use for range instead of for { select {} } (S1000) (megacheck)
2018-10-19 19:49:04 +02:00
Yuan Liu
68c460a957
fix cannot receive dingding alert bug 2018-10-19 17:17:38 +08:00
Marcus Efraimsson
da89c27caf
Merge pull request #13702 from grafana/data-source-instance-to-react
Support Data source permissions
2018-10-17 16:54:57 +02:00
bergquist
70385119bc removes d in disableResolvedMessage 2018-10-17 10:41:18 +02:00
bergquist
5566a61aef alerting: tests default value for disable resolve message 2018-10-17 09:53:03 +02:00
Dave Waters
a3137e731d clean up tests 2018-10-16 20:39:07 -04:00
Dave Waters
0eae7b077d fix gofmt, add test, correct noted concerns with default value 2018-10-16 17:38:59 -04:00
Dave Waters
c4dcf5a4ee fix gofmt, add test, correct noted concerns with default value 2018-10-16 17:33:38 -04:00
Dave Waters
18c73631ea rename UI Option, align with control, update tests 2018-10-16 07:12:32 -04:00
Peter Holmberg
ee0cc9bd77 Merge branch 'master' into data-source-instance-to-react 2018-10-16 12:14:11 +02:00
Dave Waters
6376154b16 add channel option to disable the resolved alert (OK Message) that is sent when condition returns to normal. 2018-10-15 17:16:14 -04:00