Commit Graph

45 Commits

Author SHA1 Message Date
bergquist
ebbfc529e0 datasource as cfg: support globbing 2017-11-15 14:30:32 +01:00
bergquist
36676e23c1 datasource as cfg: adds readonly datasources 2017-11-15 14:30:32 +01:00
bergquist
0f29b8ac83 datasources as cfg: tests for insert/updating datasources 2017-11-15 14:30:32 +01:00
bergquist
d68bfaa8be datasource as cfg: typo 2017-10-25 12:21:06 +02:00
bergquist
89923bf77a datasources: change to optimisic concurrency
prerequisite for #9504
2017-10-23 07:55:16 +02:00
bergquist
b3a8d93dca mysql: add usage stats for mysql 2017-10-19 10:30:54 +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
bergquist
93cff1a42a move more known datasources from others 2017-09-15 14:26:29 +02:00
Torkel Ödegaard
4ce0bf4d16 mysql: improved mysql data source, added test feature when adding data source, fixed cache issue 2017-05-11 10:50:24 +02:00
Torkel Ödegaard
1cd632cc43 plugins: added state property to plugins 2017-04-07 12:00:03 +02:00
Torkel Ödegaard
6965064ea9 Merge branch 'master' into sql-proxy 2017-03-29 16:40:14 +02:00
huydx
143cbe921f (feat) support datasource delete by name api 2017-02-10 23:30:14 +09:00
Torkel Ödegaard
01f1c1b8dc feat(): began refactoring PR #5364 2017-01-31 17:10:27 +01:00
Daniel Lee
c9b2c694f1 refactor(dataproxy): TLS Client Auth
Use a SecureJsonData field for TLS
Client Auth instead of 3 new db
fields. Same model as used for
PluginSettings.

Saves and encrypts the pem file
content rather than just saving
the paths to the cert and key.
This allows for uploading from
the Edit Datasource page in
Grafana.
2016-11-24 13:22:25 +01:00
Joe Lanford
56b7e2dfaf Added support for TLS client auth for datasource proxies (#5801) 2016-11-24 13:22:25 +01:00
Torkel Ödegaard
a6918617ff feat(api): fixed minor issue with error message when trying to create duplicate datasource, fixes #6164 2016-10-01 16:41:27 +02:00
Nozomi Anzai
6586cc4029 Add the datasource of RDBMS (PostgreSQL and MySQL) 2016-06-13 18:24:18 +09:00
Torkel Ödegaard
34e17f7282 feat(alerting): requests looks to be working again 2016-06-06 17:11:46 +02:00
Torkel Ödegaard
1f9f439acb lib(): added simplejson lib 2016-03-11 23:28:33 +01:00
Mitsuhiro Tanda
6edd6c8f03 add with_credentials to datasource model 2015-12-09 14:44:28 +09:00
Torkel Ödegaard
323e84375b refactoring: minor refactoring and handling of known data source plugins 2015-10-26 16:37:45 +01:00
Torkel Ödegaard
c816ed2527 feat(usage stats): added data source count stats 2015-09-29 13:47:56 +02:00
Mitsuhiro Tanda
00f76ecaf6 CloudWatch proxy support 2015-08-20 00:51:23 +09:00
Torkel Ödegaard
e2f6633d57 Began work on data source test / validation, #1997 & #2043 2015-06-01 12:15:49 +02:00
Torkel Ödegaard
9710771f16 Added basic auth to data source edit/create, add support for basic auth in data source proxy code, Closes #1510 2015-03-02 09:58:35 +01:00
Torkel Ödegaard
d0d995da09 Inital work on SQL metric/annotation data source, #1542 2015-02-28 17:27:30 +01:00
Torkel Ödegaard
c198242292 A lot of work on backend plugin model for frontend components, right now for data sources, will enable dropin plugins for data sources and panels, #1472 2015-02-27 22:29:00 +01:00
Torkel Ödegaard
ae7f18f981 Made a copy of influxdb datasource named influxdb_08 so the main influxdb data source can be modified to support InfluxDB 0.9, made some initial experiments to get queries to work, but a lot more work is needed, #1525 2015-02-25 18:43:44 +01:00
Torkel Ödegaard
26e4809e2e Big Backend Refatoring: Renamed Account -> Org 2015-02-23 20:07:49 +01:00
Jason Wilder
22652889b2 CLI: Add datasource:create command
Allows creating a datasource from the command line
2015-02-15 13:36:10 -07:00
Jason Wilder
f443b7087c CLI: Add datasource:info command
Describes the full datasource details given an account and
datasource name.
2015-02-15 13:36:10 -07:00
Torkel Ödegaard
85c1c97ea2 Updated readme 2015-02-06 09:10:52 +01:00
Torkel Ödegaard
f8a10fa7af Updated account and profile pages, very temporary solution, do not like it at all 2015-02-06 08:21:00 +01:00
Torkel Ödegaard
afb847acc8 a lot of work on database schema and migration setup, postgres now works, every integration test passes for all database types, only token table left to do 2015-01-20 14:15:48 +01:00
Torkel Ödegaard
9a29b04561 Dashboard import/export now works 2015-01-17 10:39:26 +01:00
Torkel Ödegaard
68cc3f86dd Handle default datasource management 2015-01-09 16:36:23 +01:00
Torkel Ödegaard
d562dcd90c Default datasource and event system test 2015-01-09 11:01:37 +01:00
Torkel Ödegaard
e5811e29b1 Added username, site and password for influxdb datasources 2014-12-19 08:19:12 +01:00
Torkel Ödegaard
a7c816c65e Datasource proxy, switch to lookup by id 2014-12-19 07:27:25 +01:00
Torkel Ödegaard
a2a0e0394d Work on data source proxying, #6 2014-12-18 20:26:06 +01:00
Torkel Ödegaard
d69258e28f Backend can now generate config.js, the very basic stuff, more work needed 2014-12-18 15:41:38 +01:00
Torkel Ödegaard
ce947d4793 Update data sources now work, #8 2014-12-17 17:32:22 +01:00
Torkel Ödegaard
c7ed348ee8 Lots of progress on command/query bus concept, in memory sql testing, datasource admin 2014-12-16 21:05:49 +01:00
Torkel Ödegaard
27f07e9de2 Progress on data source admin 2014-12-16 16:45:07 +01:00
Torkel Ödegaard
b70a3f0958 started work datasources admin 2014-12-16 12:04:08 +01:00