Commit Graph

236 Commits

Author SHA1 Message Date
bergquist 17bf87fb62 typo 💥 2017-12-01 14:05:47 +01:00
bergquist 7a497fd617 move systemd ready notification to server.go 2017-12-01 14:02:05 +01:00
Johannes Grassler d28ca54129 Use systemd notification where applicable
With this change in place, the grafana service will signal
readiness to serve by writing "READY=1" to the path specified
through the NOTIFY_SOCKET environment variable. If this
environment variable is not present or empty, no notification
will happen. This notification is the standard systemd
mechanism for indicating a service is ready to serve. For
Grafana this may be a couple of seconds from startup due to
database migrations. This change also adjusts the Grafana
systemd service definition to make use of this feature.
2017-12-01 10:31:58 +01:00
bergquist 6267ef1391 datasource as cfg: fixes typos 2017-11-15 14:30:32 +01:00
bergquist ebbfc529e0 datasource as cfg: support globbing 2017-11-15 14:30:32 +01:00
bergquist 665df676a5 datasource as cfg: rename feature to provisioning 2017-11-15 14:30:32 +01:00
bergquist c9bfa781fd datasource as cfg: improve name for this feature 2017-11-15 14:30:32 +01:00
bergquist 930da63173 datasource as cfg: setting for purging datasources not in cfg 2017-11-15 14:30:32 +01:00
bergquist 39b6c04643 datasource as cfg: basic implementation 2017-11-15 14:30:32 +01:00
bergquist dea631bedc tech: remove rabbitmq event publisher
closes #9645
2017-10-24 14:10:23 +02:00
Carl Bergquist 9d53653647 Merge pull request #9378 from mattbostock/verify_tls
Bugfix: Always verify TLS unless explicitly told otherwise
2017-10-12 11:11:02 +02:00
Daniel Lee d1c9760fa8 Postgres Data Source (#9475)
* add postgresql datasource

* add rest of files for postgres datasource

* fix timeseries query, remove unused code

* consistent naming, refactoring

* s/mysql/postgres/

* s/mysql/postgres/

* couple more tests

* tests for more datatypes

* fix macros for postgres

* add __timeSec macro

* add frontend for postgres datasource

* adjust documentation

* fix formatting

* add proper plugin description

* merge editor changes from mysql

* port changes from mysql datasource

* set proper defaultQuery for postgres

* add time_sec to timeseries query
accept int for value for timeseries query

* revert allowing time_sec and handle int or float values as unix
timestamp for "time" column

* fix tslint error

* handle decimal values in timeseries query

* allow setting sslmode for postgres datasource

* use type switch for handling data types

* fix value for timeseries query

* refactor timeseries queries to make them more flexible

* remove debug statement from inner loop in type conversion

* use plain for loop in getTypedRowData

* fix timeseries queries

* adjust postgres datasource to tsdb refactoring

* adjust postgres datasource to frontend changes

* update lib/pq to latest version

* move type conversion to getTypedRowData

* handle address types cidr, inet and macaddr

* adjust response parser and docs for annotations

* convert unknown types to string

* add documentation for postgres datasource

* add another example query with metric column

* set more helpful default query

* update help text in query editor

* handle NULL in value column of timeseries query

* add __timeGroup macro

* add test for __timeGroup macro

* document __timeGroup and set proper default query for annotations

* fix typos in docs

* add postgres to list of datasources

* add postgres to builtInPlugins

* mysql: refactoring as prep for merging postgres

Refactors out the initialization of the xorm engine and the query logic
for an sql data source.

* mysql: rename refactoring + test update

* postgres:refactor to use SqlEngine(same as mysql)

Refactored to use a common base class with the MySql data source.

Other changes from the original PR:
- Changed time column to be time_sec to allow other time units in the
future and to be the same as MySQL
- Changed integration test to test the main Query method rather than
the private transformToTable method
- Changed the __timeSec macro name to __timeEpoch
- Renamed PostgresExecutor to PostgresQueryEndpoint

Fixes #9209 (the original PR)

* postgres: encrypt password on config page

With some other cosmetic changes to the config page:
- placeholder texts
- reset button for the password after it has been encrypted.
- default value for the sslmode field.

* postgres: change back col name to time from time_sec

* postgres mysql: remove annotation title

Title has been removed from annotations

* postgres: fix images for docs page

* postgres mysql: fix specs
2017-10-10 15:19:14 +02:00
Matt Bostock 16c5d0e4b7 Always verify TLS unless explicitly told otherwise
TLS was not being verified in a number of places:

- connections to grafana.com

- connections to OAuth providers when TLS client authentication was
  enabled

- connections to self-hosted Grafana installations when using the CLI
  tool

TLS should always be verified unless the user explicitly enables an
option to skip verification.

Removes some instances where `InsecureSkipVerify` is explicitly set to
`false`, the default, to help avoid confusion and make it more difficult
to regress on this fix by accident.

Adds a `--insecure` flag to `grafana-cli` to skip TLS verification.

Adds a `tls_skip_verify_insecure` setting for OAuth.

Adds a `app_tls_skip_verify_insecure` setting under a new `[plugins]`
section.

I'm not super happy with the way the global setting is used by
`pkg/api/app_routes.go` but that seems to be the existing pattern used.
2017-10-06 17:09:27 +01:00
Mitsuhiro Tanda 39607d09d7 (cloudwatch) alerting 2017-09-29 13:44:00 +09:00
Carl Bergquist e9e8ffc769 Merge pull request #9367 from bobrik/dualstack
Enable dualstack in every net.Dialer, fixes #9364
2017-09-28 11:15:49 +02:00
Ivan Babrou 9a4ae30227
Enable dualstack in every net.Dialer, fixes #9364
Default transport enables it:

* https://github.com/golang/go/blob/d2826d3e06/src/net/http/transport.go#L42-L46

```
    DialContext: (&net.Dialer{
	Timeout:   30 * time.Second,
	KeepAlive: 30 * time.Second,
	DualStack: true,
    }).DialContext,
```

See also: https://github.com/golang/go/issues/15324
2017-09-27 22:29:48 -07:00
bergquist 2ed753232f internal metrics: add grafana version 2017-09-26 15:25:44 +02:00
Carl Bergquist 63f78c0b59 Merge pull request #9299 from seuf/grafana-cli-plugin-url
Added --pluginUrl option to grafana-cli for local network plugin inst…
2017-09-22 13:13:17 +02:00
bergquist 0229d28d64 remove unused structs 2017-09-21 15:02:17 +02:00
bergquist 6c7454fc2b tag alert queries that return no_data 2017-09-18 14:53:30 +02:00
bergquist a234e894bb makes jaeger tracing configurable 2017-09-18 11:08:58 +02:00
bergquist 2e350bbb8e adds basic traces using open traces 2017-09-18 11:08:58 +02:00
THIERRY SALLE e978bfc368 Added --pluginUrl option to grafana-cli for local network plugin installation 2017-09-15 20:34:08 +02:00
bergquist 6b1ae1a8a8 use internal init for settings 2017-09-14 14:26:32 +02:00
bergquist 788f677ed7 remove old internal metrics lib 2017-09-14 14:26:32 +02:00
Torkel Ödegaard 284cacf560 logging: write pid file path and pid during startup 2017-09-04 12:44:54 +02:00
Torkel Ödegaard c3cffeb10c packaging: fixed issue with pid file on systemd systems, fixes #9133 2017-09-04 10:43:04 +02:00
Alexander 35522c475f Fix #8998 by not overriding GOMAXPROCS (#8999) 2017-08-07 15:02:04 +02:00
Daniel Lee 6ec1d16327 fix: cli admin reset-password fixes cmd args
Fixes the homepath and config command line args. This allows the
command to be used even when the homepath is different from the
default.

Fixes #7730
2017-04-20 13:30:17 +02:00
Daniel Lee 3ca3c96226 profiling: adds profiling and tracing
If grafana-server binary is started with the -profile flag then
tracing will create a trace.out file and pprof data can be accessed
on the 6060 port.

A custom port for pprof profiling can be set with the -profile-port
flag.
2017-04-11 10:32:18 +02:00
Torkel Ödegaard 8f90c6115d mysql: progress on mysql data source 2017-03-29 22:54:18 +02:00
Torkel Ödegaard 4d4e165be7 links: updated links from grafana.net to grafana.com 2017-03-20 10:20:32 +01:00
bergquist cf871b1284 http: close http server gracefully. 2017-02-17 10:33:47 +01:00
bergquist 52566376b2 tech(server): remove unused code 2017-02-17 10:18:11 +01:00
Kevin Bowling 0c46def1a0 Add an idiomatic plugin path for FreeBSD (#7410) 2017-01-31 14:54:53 +01:00
Torkel Ödegaard 8a95c563bb Merge branch 'master' into websocket 2017-01-31 08:56:49 +01:00
Torkel Ödegaard 40d39f8a3e refactor(): renaming alerting hide ui option, #7318 2017-01-25 13:32:26 +01:00
Torkel Ödegaard fad07f0d15 refactor(http): refactoring http server 2016-12-21 14:36:32 +01:00
bergquist 99e3db8208 Merge branch 'master' into alerting_mqe 2016-12-12 19:01:50 +01:00
bergquist 96e8ecfa7b feat(cli): adds command to reset admin password
closes #5479
2016-12-09 15:25:02 +01:00
bergquist cd85e1f651 Merge branch 'master' into cli_db_commands 2016-12-09 12:36:05 +01:00
bergquist ba7a990f86 tech: bump version in server cli 2016-12-09 12:30:36 +01:00
Torkel Ödegaard cc46b81961 fix(rendering): fixed server side rendering issue when sertting enforce_domain to true, fixes #6769 2016-12-05 11:20:01 +01:00
Torkel Ödegaard 7e831e10a2 updated version in grafana-server main.go 2016-11-29 10:41:31 -05:00
bergquist bd3259d07a feat(mqe): init commit 2016-11-09 15:55:47 +01:00
bergquist 578507ae77 tech(cli): add default settings for transport 2016-11-01 08:58:44 +01:00
David Moravek c6257b30c1 Take grafana-cli proxy settings from env 2016-10-31 23:14:48 +01:00
bergquist 6e65c93203 fix(cli): improve error handling 2016-10-21 16:03:02 +02:00
bergquist 2df8c649b7 Merge branch 'master' into alerting_opentsdb 2016-10-19 13:15:22 +02:00
Torkel Ödegaard 04c23ef322 fix(SIGHUP): ignore SIGHUP syscall, fixes #6276 2016-10-14 14:23:22 +02:00