bergquist
0229d28d64
remove unused structs
2017-09-21 15:02:17 +02:00
bergquist
55f1b36e31
refactor response flow
2017-09-21 15:02:17 +02:00
bergquist
8c8fdadb78
trace failed executions
2017-09-18 11:08:58 +02:00
bergquist
e128310045
use tags instead of logs
2017-09-18 11:08:58 +02:00
bergquist
f160ad3bc8
add trace parameters for outgoing requests
2017-09-18 11:08:58 +02:00
bergquist
d6b8c6a2d2
add graphite bridge that support delta counters
2017-09-14 14:26:32 +02:00
wangguoliang
652fce7e76
Optimize some wrong usage and spelling
...
Signed-off-by: wgliang <liangcszzu@163.com>
2017-09-07 17:50:11 +08:00
mxlxm
c5400ffe76
mysql: use collation instead of charset ( #9156 )
...
- use charset would issue additional 'SET NAMES <VALUE>' queries, set
collation would be better. see: https://github.com/go-sql-driver/mysql#charset
2017-09-04 12:32:07 +02:00
Jonathan A. Sternberg
bdfbc2453f
Use parenthesis to surround the selected tags for influxdb queries ( #9131 )
...
The generated queries when selecting multiple tags are incorrect. In
InfluxQL, `AND` has a higher precedence than `OR` so the condition:
WHERE "hostname" = 'server1' OR "hostname" = 'server2' AND time > now() - 5m
This is parsed as if it were:
WHERE "hostname" = 'server1' OR ("hostname" = 'server2' AND time > now() - 5m)
But the intention is to write a query like this:
WHERE ("hostname" = 'server1' OR "hostname" = 'server2') AND time > now() - 5m
This change modifies the generated query so it surrounds a query with
multiple conditions in parenthesis so it doesn't conflict with the time
expression in an unexpected way.
This is currently not an issue because InfluxDB doesn't actually
evaluate the condition for the time expression correctly. It just looks
through the AST for anything that looks like a time expression and then
assumes the proper format of `AND` was used rather than validating that
it was used correctly.
2017-08-31 09:33:03 +02:00
Torkel Ödegaard
c92317bafa
fix: fixed gofmt formating for #9091
2017-08-28 13:29:24 +02:00
pdoan017
3eea5d235d
Added import for container/list
2017-08-24 15:42:54 -04:00
pdoan017
d6085755c4
Added series order according to query results
...
Raw query results would return as expected. But when appending new series to pointsBySeries map, order of keys is random. So I've added a list to keep track of series order. Should implement FIFO rules.
2017-08-24 15:38:36 -04:00
Daniel Lee
43fa852cc1
mysql: change logging from into to debug for scan
2017-08-09 19:33:09 +02:00
Daniel Lee
563795245a
mysqlds: support for more column types
...
Includes integration test for most column types. Fixes #8918
2017-08-08 15:24:41 +02:00
Daniel Lee
2fb25d8fa4
mysqlds: add tests for new macros
2017-08-08 14:40:27 +02:00
Brad Lhotsky
a8ac215039
Add a few more MySQL macros:
...
* $__timeFrom() -> Returns the dashboard 'from' suitable for use querying
against a MySQL TIMESTAMP field.
* $__timeTo() -> Returns the dashboard 'to' suitable for use querying
against a MySQL TIMESTAMP field.
* $__unixEpochFiler(column) -> If you store timestamps as UNIX epoch's,
this builds: column > 'from' AND column < 'to'
* $__unixEpochFrom() -> Returns the dashboard 'from' suitable for use querying
against a MySQL integer field (UNIX epochs)
* $__unixEpochTo() -> Returns the dashboard 'to' suitable for use querying
against a MySQL integer field (UNIX epochs)
2017-08-08 14:40:27 +02:00
Torkel Ödegaard
60da730c95
mysql: fix for TIME columns, fixes #8534
2017-06-23 12:55:40 -04:00
Daniel Lee
2479e51a6b
mysql: Null value should not be considered as previous value
...
fixes #8655
2017-06-20 02:02:05 +02:00
Denis Doria
41d300f69d
Fix timeInterval for mysql datasource ( #8651 )
...
* Fix timeInterval for mysql datasource
This changes the > to >= and the < to <=, so the intervals are inclusive.
This should fix the #8635
* Fix validation
2017-06-19 08:58:22 -04:00
Prasanna Gautam
6541ffe045
minor change: more accurate variable name ( #8449 )
2017-05-24 08:38:13 +02:00
Daniel Lee
e8b798914d
mysql: adds mapping for int/long
2017-05-16 16:07:42 +02:00
Daniel Lee
a9c535e551
mysql: add some more type mapping
...
Decimals mapped to floats for now. No mapping for bit or
any of the blob types. Tinyint not mapped to bool.
2017-05-12 11:37:51 +02:00
Pranay Kanwar
ee8799de88
Fix dropcounter option, is called dropResets ( #8336 )
2017-05-10 15:46:19 +02:00
Yaron de Leeuw
d4f7a2bc99
minor code style: use strings.Replace
fourth argument in influxdb ( #8225 )
...
Remove 5 lines from the codebase and an unecessary function,
by calling `strings.Replace` with -1 for the fourth argument.
A better alternative to what was merged in #8037
2017-04-27 08:51:43 +02:00
Torkel Ödegaard
ae5e004b69
mysql: time filter macro updated
2017-04-24 14:55:43 +02:00
Daniel Lee
7784e4e24b
mysql: add datetime type to table data
2017-04-23 21:56:58 +02:00
Daniel Lee
413ee33d5d
mysql: fix go vet error
2017-04-23 20:07:20 +02:00
Torkel Ödegaard
97e2d75f51
mysql: added support for tables in mysql queries
2017-04-21 15:07:43 +02:00
Torkel Ödegaard
c78c460f79
mysql: worked on mysql data soruce
2017-04-20 17:10:23 +02:00
Torkel Ödegaard
50e70cf3db
build: fixed unit test
2017-04-20 13:04:42 +02:00
Torkel Ödegaard
fc878bc8ad
build: fixed order
2017-04-20 11:59:11 +02:00
Torkel Ödegaard
11806dfa78
mysql: progress
2017-04-19 17:26:37 +02:00
Torkel Ödegaard
e164eba677
mysql: began work on backend macro engine
2017-04-19 10:10:08 +02:00
Torkel Ödegaard
9bdcc4ec5f
influxdb: holt winters edits
2017-04-11 14:40:08 +02:00
Torkel Ödegaard
26804d630f
Merge branch 'master' into sql-proxy
2017-04-07 10:34:51 +02:00
Alexander Zobnin
2b81bfe9bf
alerting: fix $timeFilter cannot be used twice ( #7969 ) ( #8037 )
2017-04-05 17:17:55 +02:00
Torkel Ödegaard
5af81b974e
mysql: graph showing
2017-03-31 13:57:10 +02:00
Torkel Ödegaard
a7babfb7cf
tech: updated xorm libs
2017-03-31 12:54:39 +02:00
Torkel Ödegaard
e5a5bef200
mysql: minor update
2017-03-31 12:49:05 +02:00
Torkel Ödegaard
d6d2080f11
mysql: minor progress on response processing
2017-03-31 11:45:25 +02:00
Torkel Ödegaard
080d2a2054
mysql: reading arbitrary SQL data in go is really strange, data is only in strings?
2017-03-30 13:46:46 +02:00
Torkel Ödegaard
00fcaaf171
mysql: commented out old code from old PR
2017-03-29 22:55:37 +02:00
Torkel Ödegaard
8f90c6115d
mysql: progress on mysql data source
2017-03-29 22:54:18 +02:00
Pranay Kanwar
6ab90425c4
Pass dropcounter rate option if no max counter and no reset value or reset value as 0 is specified ( #7743 )
2017-03-06 16:19:37 +01:00
bergquist
c7febca447
mqe: fixes broken test for indexalias
2017-02-09 16:43:57 +01:00
bergquist
aa7292fac6
mqe: adds support for wildcard and index aliases
2017-02-09 16:25:03 +01:00
Carl Bergquist
7d205ae2b8
Merge pull request #7466 from hagen1778/prometheus-basicauth-query
...
allow setting basic auth headers for prometheus datasource
2017-02-07 11:18:17 +01:00
hagen1778
a1e835884b
use configured Transport instead of defaultHttpTransport
2017-02-07 11:56:59 +02:00
r.khavronenko
25be602dce
go fmt
2017-02-06 17:17:16 +02:00
bergquist
57d36b3d42
feat(alerting): transform labels into tags for prometheus tsdb
2017-02-06 15:25:15 +01:00
r.khavronenko
80b92335bb
allow setting basic auth headers for prometheus datasource
2017-02-06 16:22:09 +02:00
bergquist
3827c0a69c
tech(alerting): adds tags to alerting data model
2017-02-06 14:59:29 +01:00
bergquist
46e4a54a6e
style: go fmt with simplify
2017-01-27 15:21:02 +01:00
Torkel Ödegaard
d354f3a8af
fix(alerting): fixed evaluation for no_value condition, fixes #7244 ( #7247 )
...
* fix(alerting): fixed evaluation for no_value condition, fixes #7244
* feat(alerting): moving null library into grafana, fixing handling on no value / no series
2017-01-13 12:32:30 +01:00
Torkel Ödegaard
b475f91387
feat(templating): completed work on built in template variables and , closes #7190 , refactors #7170
2017-01-11 12:10:26 +01:00
Darrian
27ead53382
Set indentation to tabs
2016-12-21 22:54:56 +00:00
Darrian
b8572b69f0
Register new queries available in InfluxDB - Holt Winters fixes #5619
...
For correct data fill on holt winters predictions, the time function
needed modification to allow a 2nd param for offset, as per
https://docs.influxdata.com/influxdb/v1.0/query_language/data_exploratio
n/#advanced-group-by-time-syntax
2016-12-21 22:30:32 +00:00
bergquist
4e306590f8
Merge branch 'v4.0.x'
2016-12-21 10:02:28 +01:00
bergquist
8cef4cc74e
fix(influxdb): handles time(auto) like time($interval)
...
closes #6997
2016-12-21 10:01:20 +01:00
bergquist
df3adbc0f8
refactor(mqe): reduce duplication
2016-12-16 08:01:58 +01:00
bergquist
51c4385c92
fix(mqe): only parse none empty functions
2016-12-15 08:52:43 +01:00
bergquist
e3b53fe599
test(mqe): adds test for double function usage
2016-12-15 07:36:06 +01:00
bergquist
7dece3ff0c
test(mqe): solves brittle unit test
2016-12-15 07:36:06 +01:00
bergquist
dde6e73fed
feat(mqe): add basic support for functions list
2016-12-14 22:29:17 +01:00
bergquist
ca6a667555
feat(mqe): renames app tag into cluster
2016-12-14 16:49:16 +01:00
bergquist
f8871f9e4a
chore(mqe): remove comments
2016-12-14 16:16:42 +01:00
bergquist
6d57e42246
feat(mqe): restricts the executor to max 4 concurrent outgoing requests
2016-12-14 15:40:15 +01:00
huydx
adb441e5c8
(format) run go fmt in pkg
2016-12-14 12:17:38 +09:00
bergquist
362162d6fa
feat(mqe): add token cache
2016-12-13 14:01:48 +01:00
bergquist
69d6316512
style(mqe): instance dependencies in ctor func
2016-12-13 12:47:57 +01:00
bergquist
549c3ab78b
tech(mqe): update todo
2016-12-13 11:42:06 +01:00
bergquist
99e3db8208
Merge branch 'master' into alerting_mqe
2016-12-12 19:01:50 +01:00
Carl Bergquist
2c7adccf12
Use cache for http.client in tsdb package. ( #6833 )
...
* datasource: move caching closer to datasource struct
* tsdb: use cached version of datasource http transport
closes #6825
2016-12-07 11:10:42 +01:00
bergquist
c9b7f8603e
tech(): replace spaces to handle input more graceful
2016-12-02 23:43:02 +01:00
bergquist
f70d7ff3a3
fix(influxdb): align tsdb.influxdb with dataproxy
...
ref #6784
2016-12-02 21:10:29 +01:00
bergquist
1b0005a9e5
feat(mqe): add support for app and host alias
2016-11-18 11:40:38 +01:00
bergquist
a3b0fbcaba
fix(influxdb): fixes broken tag rendering for influxdb alerting
...
closes #6626
ref #6523
2016-11-17 15:50:49 +01:00
bergquist
0a0f558c48
style(mqe): improve code
2016-11-17 08:52:27 +01:00
bergquist
23387bd39b
feat(mqe): simplify timestamp parsing
2016-11-17 08:42:09 +01:00
bergquist
9572f086ae
feat(mqe): add timerange to query
2016-11-16 17:09:34 +01:00
bergquist
fa8213d8d5
feat(mqe): send http requests
2016-11-16 15:28:31 +01:00
bergquist
f1897b7e96
feat(mqe): add response parser
2016-11-16 14:42:43 +01:00
bergquist
c6ad0cc5ec
test(mqe): basic test for response parser
2016-11-16 13:00:25 +01:00
bergquist
113020aabe
feat(mqe): support basic aliases
2016-11-16 11:04:15 +01:00
bergquist
430104aaac
feat(mqe): add support for wildcard series
2016-11-16 10:03:22 +01:00
bergquist
fa92dfb7b2
feat(mqe): add support for apps in where clause
2016-11-16 09:54:45 +01:00
bergquist
ab7263579f
Merge branch 'master' into alerting_mqe
2016-11-16 09:28:26 +01:00
bergquist
4739608ffb
tests(mqe): add query builder
2016-11-15 18:37:34 +01:00
bergquist
1bdda76ba9
tests(mqe): parse mqe query model
2016-11-14 15:03:49 +01:00
bergquist
c973241435
feat(mqe): add token request
2016-11-14 14:00:35 +01:00
bergquist
4fdfee739a
fix(influxdb): add support for regex measurments
...
closes #6560
2016-11-14 08:48:19 +01:00
bergquist
118e2a6364
WIP: more boilerplate
2016-11-13 13:51:54 +01:00
bergquist
e04d27c0b0
fix(influxdb): return internal influxdb errors
...
ref #6523
2016-11-11 08:47:53 +01:00
bergquist
f924b241ae
tech(influxdb): refactor query builder
...
trying to reduce the amounts of moving parts for influxdb
2016-11-10 14:38:07 +01:00
bergquist
a948dfe514
fix(influxdb): fixes broken raw query usage
2016-11-10 14:18:10 +01:00
bergquist
ecba23e883
Merge branch 'master' into influxdb_alias_seriename
2016-11-10 12:22:17 +01:00
bergquist
4f3c8c6663
fix(influxdb): add default operator
...
ref #6523
2016-11-10 11:21:38 +01:00
bergquist
ef08a243c5
fix(influxdb): fixes possible nil pointer
...
closes #6531
2016-11-10 08:23:58 +01:00
bergquist
bd3259d07a
feat(mqe): init commit
2016-11-09 15:55:47 +01:00
bergquist
82e1d3f6aa
feat(influxdb): disable debug logging in appmode
2016-11-09 14:48:05 +01:00
bergquist
f0a0e647a0
feat(influxdb): backend support for alias by segment
...
ref #6510
2016-11-09 12:45:59 +01:00
bergquist
c897d39d5e
feat(influxdb): add support for serie alias replacement
...
ref #6510
2016-11-09 10:22:11 +01:00
bergquist
24a3a100ed
feat(influxdb): add alias to query
2016-11-09 10:05:12 +01:00
bergquist
98a7bf181a
tech(influxdb): close body reader
2016-11-08 19:19:49 +01:00
bergquist
56340bfdfb
fix(influxdb): fixes bug when using regexps/numbers in tags
...
closes #6488
2016-11-07 14:26:20 +01:00
bergquist
2d7bb4a9f3
fix(tsdb): broken build :(
2016-11-03 19:20:53 +01:00
bergquist
1afe0e90f9
fix(tsdb): fixes broken legend buidler for prometheus
...
closes #6456
2016-11-03 18:04:09 +01:00
bergquist
0059beb85d
chore(tsdb): remove commented code
2016-11-03 17:34:57 +01:00
Carl Bergquist
bb7f03c91e
Merge pull request #6446 from utkarshcmu/graphite_alerting_fix
...
Fixed intervalFormat for Graphite Alerting
2016-11-03 06:58:51 +01:00
utkarshcmu
fc91231104
Fixed failing tests
2016-11-02 22:31:59 -07:00
utkarshcmu
33ee85ede9
Commented strange behavior of tests
2016-11-02 11:11:06 -07:00
utkarshcmu
a4a2e35bb2
Verified interval format function and gofmt check
2016-11-02 02:07:08 -07:00
bergquist
d4bc92b267
feat(tsdb): default tsdb httpclient
2016-11-02 08:51:34 +01:00
utkarshcmu
2088363bf9
Added tests for graphite alerting
2016-11-02 00:00:18 -07:00
utkarshcmu
1e8beb8983
Fixed intervalFormat for Graphite Alerting
2016-11-01 17:55:45 -07:00
bergquist
2df8c649b7
Merge branch 'master' into alerting_opentsdb
2016-10-19 13:15:22 +02:00
bergquist
20bfe443fe
feat(prometheus): trim labelname lookup key
...
closes #6300
2016-10-19 08:57:58 +02:00
utkarshcmu
333a853948
Fixed for loop and append
2016-10-18 08:48:06 -07:00
bergquist
9429434cb5
feat(influxdb): use database auth if provided
...
closes #6310
2016-10-18 15:12:04 +02:00
utkarshcmu
10d581dd0a
Added unit tests for query parsing
2016-10-17 14:51:51 -07:00
utkarshcmu
2374d09877
Fixed query parsing bugs
2016-10-17 14:50:53 -07:00
utkarshcmu
ace81760ea
Added tests file for writing tests
2016-10-16 12:10:13 -07:00
utkarshcmu
b7744b4928
Added tags and filters params to alerting
2016-10-16 10:55:07 -07:00
utkarshcmu
35f93f4117
Added rate params to alerting
2016-10-16 05:20:58 -07:00
utkarshcmu
cc0a39f816
Added downsampling params to alerting
2016-10-16 04:12:13 -07:00
bergquist
5e0fa0f0ad
feat(opentsdb): context aware http requests
2016-10-14 10:21:47 +02:00
bergquist
f44e360b0d
fix(opentsdb): fmt
2016-10-14 10:15:30 +02:00
bergquist
fe24e6c8a8
Merge branch 'alerting_opentsdb' of https://github.com/utkarshcmu/grafana into utkarshcmu-alerting_opentsdb
2016-10-14 09:19:42 +02:00
bergquist
455df7f0a0
Merge branch 'master' into alerting_opentsdb
2016-10-14 09:17:35 +02:00
bergquist
f4e0a9245e
feat(influxdb): choose highest interval value
2016-10-14 09:14:13 +02:00
utkarshcmu
4247e92e87
Resolved conflicts
2016-10-14 00:01:36 -07:00
utkarshcmu
06f2047ced
OpenTsdb alerting works with metric query
2016-10-13 23:49:28 -07:00
bergquist
b8ec1ce9a2
tech(tsdb): add basic skeleton for alerting
2016-10-13 23:49:27 -07:00
bergquist
4144eacc24
feat(influxdb): start parsing interval parameters
2016-10-13 11:42:51 +02:00
bergquist
5a91d45f3f
fix(influxdb): broken unittests
2016-10-12 07:43:30 +02:00
bergquist
885e0366c5
feat(influxdb): support raw queries in alerting
...
ref #6231
2016-10-11 18:53:09 +02:00
Torkel Ödegaard
f1905a8485
fix(alerting): fixed issue with using nested queries in graphite query used in alerting rule, fixes #5996
2016-10-11 12:50:11 +02:00
bergquist
8d96262106
chore(tsdb): tidy up code
2016-10-10 11:58:06 +02:00
bergquist
f609623abd
style(influxdb): tidy up code
2016-10-10 11:34:52 +02:00
bergquist
95b9f472d1
tech(influxdb): remove unused logging
2016-10-10 11:17:00 +02:00
bergquist
f919d04e3c
docs(tsdb): improve fill comment
2016-10-10 09:52:53 +02:00
bergquist
0bfb94dc6f
feat(tsdb): add interval calculator
2016-10-10 09:45:33 +02:00
bergquist
4fafefd66a
feat(influxdb): proper support for group by tags
2016-10-07 15:09:54 +02:00
bergquist
e499e8850c
fix(influxdb): fix for timerange
2016-10-07 11:33:17 +02:00
bergquist
0633e2c03f
feat(influxdb): add real support for time ranges
2016-10-07 11:23:37 +02:00
bergquist
e36f9fa795
Merge branch 'master' into alerting_influxdb
2016-10-07 10:45:05 +02:00
bergquist
522d40fa26
fix(influxdb): support mulitple tags
2016-10-06 18:51:17 +02:00
bergquist
87650c150b
feat(influxdb): add tags to serie names
2016-10-06 18:47:59 +02:00
bergquist
b0addbd7cb
feat(influxdb): support multi row results
2016-10-06 15:30:09 +02:00
bergquist
d8aa38fafe
tech(influxdb): refactor and cleanup
2016-10-06 14:16:26 +02:00