36 Commits

Author SHA1 Message Date
313a8bd033 Merge pull request #12891 from svenklemm/unixepochgroup
add $__unixEpochGroup and $__unixEpochGroupAlias to sql datasources
2018-08-17 14:41:33 +02:00
6225efa50c docs: update postgres provisioning 2018-08-14 11:24:08 +02:00
a96d97e347 add version disclaimer for TimescaleDB 2018-08-14 10:26:08 +02:00
d33019ca67 document TimescaleDB datasource option 2018-08-14 10:22:57 +02:00
bfe28ee061 Add $__unixEpochGroup macro to postgres datasource 2018-08-13 12:08:14 +02:00
ee7602ec1f change fillmode from last to previous 2018-08-07 21:01:41 +02:00
83d7ec1da2 specify grafana version for last fill mode 2018-08-02 20:37:41 +02:00
bfc66a7ed0 add fillmode "last" to sql datasource
This adds a new fill mode last (last observation carried forward) for grafana
to the sql datasources. This fill mode will fill in the last seen value in a
series when a timepoint is missing or NULL if no value for that series has
been seen yet.
2018-08-02 20:35:09 +02:00
82c473e3af document $__timeGroupAlias 2018-08-01 21:23:00 +02:00
43295f9c18 remove alias from postgres $__timeGroup macro 2018-08-01 08:50:19 +02:00
8a22129177 add version note to metric prefix and fix typo 2018-07-30 14:37:23 +02:00
b28a362635 Use metric column as prefix
If multiple value columns are returned and a metric column is
returned aswell the metric column will be used as prefix for
the series name
2018-07-27 15:32:53 +02:00
85ccefdb84 Merge branch 'master' into docs-5.1 2018-04-24 16:17:15 +02:00
2b3c547589 Merge pull request #11642 from grafana/docs-variable-interpolation
Docs variable interpolation
2018-04-20 15:09:05 +02:00
71dcafebb8 docs: add missing backtick for mysql/postgres 2018-04-20 13:22:43 +02:00
5076f9304b slightly better example 2018-04-19 17:01:48 +02:00
048cecdab5 adjust timeFilter, timeFrom and timeTo macro examples 2018-04-19 16:56:58 +02:00
ab4f8c273d docs: describes variable formatting options
csv option in postgres/mysql docs and the regex option in the
graphite docs
2018-04-18 14:40:34 +02:00
ad22e20ecd docs: update postgres macro functions documentation
In addition to closing #11578
2018-04-17 00:06:25 +02:00
48143d6caf Merge branch 'master' into docs-5.1 2018-04-13 16:40:38 +02:00
511b34eb5c docs: improves provisoning example for postgres
[skip ci]
2018-04-13 16:37:49 +02:00
428d4b0dbf Merge branch 'master' into docs-5.1 2018-04-13 15:44:53 +02:00
14bf067263 docs: improves provisoning example for each datasource 2018-04-13 15:25:13 +02:00
2889a405a7 docs: improves provisoning example text 2018-04-09 14:56:42 +02:00
25be937bfa docs: fixes typo 2018-04-09 09:55:10 +02:00
d95eabfeec docs: adds provisioning examples for all datasources
closes #11363
2018-03-28 17:39:00 +02:00
403c64ab20 docs: update postgres, mysql and mssql documentation
Due to changes closing #11306
2018-03-23 15:48:04 +01:00
8a1bd2ee22 docs: fill for mysql/postgres
ref #10138
2018-03-06 09:24:36 +01:00
ce809de1ed postgres: change $__timeGroup macro to include "AS time" column alias (#10119)
* change $__timeGroup macro to include column alias

* update docs and help text for $__timeGroup macro
2017-12-08 15:14:10 +01:00
b44c599410 postgres: pass timerange for template variable queries (#10069)
* pass timerange for template queries when refresh is set to timerange
change

* document on time range change refresh mode for template queries
2017-12-07 10:05:04 +01:00
108f582ec4 sync documentation, add remark about to_timestamp and redshift (#9841) 2017-11-14 11:33:55 +01:00
5b1e6513e6 Update postgres.md
'Annotations' is a plural noun, so it doesn't require adding ‑s to the end of the verb
2017-11-03 17:57:03 +03:00
fc76530577 docs: document annotations for postgres/mysql 2017-10-24 15:13:04 +02:00
f48703502d docs: update for template variables
ref #9030
2017-10-24 14:44:34 +02:00
b2d880c6de modify $__timeGroup macro so it can be used in select clause (#9527)
* modify $__timeGroup macro so it can be used in select clause

* fix $__interval_ms for postgres datasource

* use $__timeGroup macro in documentation

* fix annotation template query
remove title since its no longer used and add tags instead

* change __timeFilter macro to work on postgresql < 8.1 and redshift
2017-10-18 18:10:01 +02:00
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