Commit Graph

327 Commits

Author SHA1 Message Date
Daniel Lee
56c965e5df cli: chmod 755 for backend plugin binaries
Fixes #15500. Does a simple filename check if the binary names ends
with _linux_amd64 or _darwin_amd64 then sets the file mode to 755.
2019-02-18 15:05:34 +01:00
Daniel Lee
1c364b57b5
Merge pull request #15353 from grafana/14623-azure-monitor-alerting
Adds alerting for the Azure Monitor API in the Azure Monitor datasource
2019-02-11 15:16:32 +01:00
Daniel Lee
0e228d582d azuremonitor: builds a query and sends it to Azure on the backend
Lots of edge cases not covered and the response is not parsed. It only
handles one service and will have to be refactored to handle multiple
2019-02-08 17:20:31 +01:00
Marcus Efraimsson
8ae066ab5d
move authtoken package into auth package 2019-02-06 17:02:57 +01:00
bergquist
ff136b6ba8 initial verison of server lock 2018-12-17 16:36:57 +01:00
Marcus Efraimsson
a6a1362ad1
temporary fix for starting grafana not running systemd 2018-11-21 18:15:28 +01:00
Carl Bergquist
acf8d43682
Merge pull request #14056 from mjtrangoni/fix-errcheck-issues
Fix errcheck issues
2018-11-21 17:23:56 +01:00
Leonard Gram
2e8c4699b0 build: internal metrics for packaging. 2018-11-15 14:42:09 +01:00
Mario Trangoni
774ad3ff39 pkg/cmd/grafana-server/server.go: Check sendSystemdNotification return value.
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=errcheck ./...
server.go:165:25⚠️ error return value not checked (sendSystemdNotification("READY=1")) (errcheck)
2018-11-13 21:21:18 +01:00
Mario Trangoni
dae7c11a5f pkg/cmd/grafana-server/server.go: check serviceGraph.Provide() errors
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=errcheck ./...
pkg/cmd/grafana-server/server.go:77:22⚠️ error return value not checked (serviceGraph.Provide(&inject.Object{Value: bus.GetBus()})) (errcheck)
pkg/cmd/grafana-server/server.go:78:22⚠️ error return value not checked (serviceGraph.Provide(&inject.Object{Value: g.cfg})) (errcheck)
pkg/cmd/grafana-server/server.go:79:22⚠️ error return value not checked (serviceGraph.Provide(&inject.Object{Value: routing.NewRouteRegister(middleware.RequestMetrics, middleware.RequestTracing)})) (errcheck)
pkg/cmd/grafana-server/server.go:80:22⚠️ error return value not checked (serviceGraph.Provide(&inject.Object{Value: cache.New(5*time.Minute, 10*time.Minute)})) (errcheck)
pkg/cmd/grafana-server/server.go:87:23⚠️ error return value not checked (serviceGraph.Provide(&inject.Object{Value: service.Instance})) (errcheck)
pkg/cmd/grafana-server/server.go:90:22⚠️ error return value not checked (serviceGraph.Provide(&inject.Object{Value: g})) (errcheck)
2018-11-13 20:02:55 +01:00
Mario Trangoni
a6d54d5d9f pkg/cmd/grafana-server/main.go: Fix error value not checked
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=errcheck ./...
pkg/cmd/grafana-server/main.go:56:23⚠️ error return value not checked (http.ListenAndServe(fmt.Sprintf("localhost:%d", *profilePort), nil)) (errcheck)
2018-11-13 19:51:32 +01:00
Torkel Ödegaard
07d78da5ec Merge branch 'ds_cache_refactor' of https://github.com/marefr/grafana into marefr-ds_cache_refactor 2018-10-31 06:06:24 -07:00
Marcus Efraimsson
5d4dc18bbc
revert application lifecycle event support 2018-10-30 12:31:28 +01:00
Carl Bergquist
42d902b07d
Add new build info metrics that contains more info (#13876)
* Add new build info metrics that contains more info

The goal was to add more information about Grafana. But rather than
just adding those to the current metrics I created a new metric
since its a common pattern in the prometheus community to expose that
info in a metric named `*_build_info`.

We keep the old metric to avoid introducing any breaking changes but
we should be able to remove it the next breaking change
2018-10-30 11:18:43 +01:00
Marcus Efraimsson
2332b3e205
remove unused code 2018-10-30 09:34:09 +01:00
Marcus Efraimsson
9edaa3fa8c
application lifecycle event support 2018-10-30 09:32:32 +01:00
Marcus Efraimsson
cfb061ddab
refactor datasource caching 2018-10-30 09:31:56 +01:00
bergquist
c9ac762fb1 build: adds branch info to binary build 2018-10-29 13:27:29 +01:00
Mario Trangoni
6218fadf21 pkg/cmd/grafana-server/main.go: remove os.Kill as it cannot be trapped
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck ./...
pkg/cmd/grafana-server/main.go:103:42⚠️ os.Kill cannot be trapped (did you mean syscall.SIGTERM?) (SA1016) (megacheck)
2018-10-13 11:02:36 +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
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
Daniel Lee
66c95991c1 Merge remote-tracking branch 'origin/master' into stackdriver-plugin 2018-09-26 17:59:56 +02:00
Marcus Efraimsson
90595ffdce
cli: fix init of bus 2018-09-25 21:31:24 +02:00
Axel Pirek
d2f2c3f220 Fix spelling of your and you're 2018-09-25 12:38:02 +02:00
Torkel Ödegaard
c282f39121 Merge branch 'master' into stackdriver-plugin 2018-09-21 10:17:13 +02:00
Erik Sundell
9ee61b6606 Add stackdriver backend skeleton 2018-09-14 09:33:50 +02:00
Dan Cech
124b21a6aa
use pluginName consistently when upgrading plugins 2018-09-13 17:19:51 -04:00
Leonard Gram
5d87aa2fa4
Merge pull request #13031 from bergquist/golang_1.11
upgrade to golang 1.11
2018-09-05 15:31:43 +02:00
maicon
a6aa219895 Reopen log files after receiving a SIGHUP signal (#13112)
* Reopen log files after receiving a SIGHUP signal

Implements a system signals listener in log.FileLogWriter.

After receiving a SIGHUP signal from the system, the listener will close the current log file and then open it again.

The listener will finishes after receiving a SIGINT, SIGKILL or SIGTERM signal.

Closes grafana/grafana#2497

* Move the SIGHUP handling to the main file
2018-09-04 10:31:41 +02:00
Carl Bergquist
ee1083d9b4 cli: avoid rely on response.ContentLength (#13120)
response.ContentLength might be invalid if the http response
is chunked.

fixes #13079
2018-09-03 20:33:21 +02:00
Jasper Lievisse Adriaanse
d668a922e6 Return correct path for OpenBSD in cli's returnOsDefault (#13089) 2018-08-30 11:56:52 +02:00
bergquist
12c9860882 string formating fixes 2018-08-28 22:33:38 +02:00
Torkel Ödegaard
b8724ae0c4
refactoring: enterprise build/hooks refactorings (#12478) 2018-07-02 04:33:39 -07:00
Carl Bergquist
88783d6e0a avoid calling os.Exit outside main.go (#12459)
I don't think we should call os.Exit outside main.go. Calling
os.Exit breaks the application control flow.
2018-06-29 22:48:26 -07:00
Torkel Ödegaard
7a7c6f8fab fix: log close/flush was done too early, before server shutdown log message was called, fixes #12438 2018-06-28 04:38:23 -07:00
bergquist
dbfafa1cb5 routing: allows routes to be added to existing groups
this enables services to add routing to ex /api
without causing conflicts.
2018-06-25 16:50:27 +02:00
Marcus Efraimsson
e5e1683840
Merge branch 'master' into feature/add_es_alerting 2018-05-28 18:10:34 +02:00
Torkel Ödegaard
80d694d205
Backend image rendering as plugin (#11966)
* rendering: headless chrome progress

* renderer: minor change

* grpc: version hell

* updated grpc libs

* wip: minor progess

* rendering: new image rendering plugin is starting to work

* feat: now phantomjs works as well and updated alerting to use new rendering service

* refactor: renamed renderer package and service to rendering to make renderer name less confusing (rendering is internal service that handles the renderer plugin now)

* rendering: now render key is passed and render auth is working in plugin mode

* removed unneeded lines from gitignore

* rendering: now plugin mode supports waiting for all panels to complete rendering

* fix: LastSeenAt fix for render calls, was not set which causes a lot of updates to Last Seen at during rendering, this should fix sqlite db locked issues in seen in previous releases

* change: changed render tz url parameter to use proper timezone name as chrome does not handle UTC offset TZ values

* fix: another update to tz param generation

* renderer: added http mode to renderer service, new ini setting [rendering] server_url
2018-05-24 15:26:27 +02:00
Marcus Efraimsson
1324a67cbd
Merge branch 'master' into WPH95-feature/add_es_alerting 2018-05-23 14:35:45 +02:00
Torkel Ödegaard
d0c17100cb fix: fixed some minor startup logging issues 2018-05-18 11:17:31 +02:00
Torkel Ödegaard
6c0752473a
Sqlstore refactor (#11908)
* refactor: tracing service refactoring

* refactor: sqlstore to instance service

* refactor: sqlstore & registory priority

* refactor: sqlstore refactor wip

* sqlstore: progress on getting tests to work again

* sqlstore: progress on refactoring and getting tests working

* sqlstore: connection string fix

* fix: not sure why this test is not working and required changing expires

* fix: updated grafana-cli
2018-05-18 11:10:10 +02:00
Marcus Efraimsson
d3f516f1c4
Merge branch 'master' into WPH95-feature/add_es_alerting 2018-05-12 11:33:58 +02:00
Torkel Ödegaard
27e1c67453
refactor: tracing service refactoring (#11907) 2018-05-10 16:51:55 +02:00
Marcus Efraimsson
cde347bd3d
Merge branch 'master' into WPH95-feature/add_es_alerting 2018-05-08 17:13:08 +02:00
bergquist
65352dccc0 only error log when err is not nil 2018-05-08 11:59:27 +02:00
Marcus Efraimsson
99257eb048
Merge branch 'master' of git://github.com/grafana/grafana into WPH95-feature/add_es_alerting 2018-05-03 12:03:04 +02:00
Torkel Ödegaard
c40a50829d fix: removed manully added http server from inject graph as it is now a self registered service 2018-05-02 21:30:15 +02:00
Torkel Ödegaard
b5e70d4607 fix: removed unused channel 2018-05-02 19:56:15 +02:00
Torkel Ödegaard
e3ea6c683c fix: comment spell fix 2018-05-02 19:56:15 +02:00
Torkel Ödegaard
23655315b8 fix: fixed race condition between http.Server ListenAndServe & Shutdown, now service crash during startup correctly closes http server every time 2018-05-02 19:56:15 +02:00