Mario Trangoni
556219b192
pkg/tsdb: fix ineffassign isues
2018-04-22 20:51:58 +02:00
Daniel Lee
f959ba9bcf
influxdb: escape backslashes in tag values (for alerting)
...
Closes #10957 . Backslash escaping was already implemented on the
frontend but does not work for queries executed on the backend.
2018-02-19 10:02:14 +01:00
bergquist
35232a77e6
removes unused properties
...
the dsType property caused some confusion about what datasource is
beeing used. I just removed it since it not beeing used.
closes #10072
2017-12-05 08:26:43 +01:00
bergquist
9282182805
influxdb: pass tags to alerting from influxdb client
...
closes #10046
2017-12-01 16:16:49 +01:00
Carl Bergquist
5d6ed6c45f
prom: add support for default step param ( #9866 )
...
Alerting for prometheus have been depending on the step parameter from each query.
In https://github.com/grafana/grafana/pull/9226 we changed the behavior for step in the
frontend which caused problems for alerting. This commit fixes that by introducing a default
min interval value so alerting always have something to depend on.
closes #9777
2017-11-15 11:22:00 +01:00
bergquist
ed661767f8
follow go idiom and return error as second param
2017-09-21 18:04:16 +02:00
bergquist
a45e2ec9c3
context is reserved for go's context
2017-09-21 15:23:34 +02:00
bergquist
16b5b9f6be
make ds a param for Query
2017-09-21 15:09:14 +02:00
bergquist
7f9f388293
rename executor into tsdbqueryendpoint
2017-09-21 15:02:17 +02:00
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
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
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
9bdcc4ec5f
influxdb: holt winters edits
2017-04-11 14:40:08 +02:00
Alexander Zobnin
2b81bfe9bf
alerting: fix $timeFilter cannot be used twice ( #7969 ) ( #8037 )
2017-04-05 17:17:55 +02: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
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
f70d7ff3a3
fix(influxdb): align tsdb.influxdb with dataproxy
...
ref #6784
2016-12-02 21:10:29 +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
4fdfee739a
fix(influxdb): add support for regex measurments
...
closes #6560
2016-11-14 08:48:19 +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
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
d4bc92b267
feat(tsdb): default tsdb httpclient
2016-11-02 08:51:34 +01:00
bergquist
9429434cb5
feat(influxdb): use database auth if provided
...
closes #6310
2016-10-18 15:12:04 +02:00
bergquist
f4e0a9245e
feat(influxdb): choose highest interval value
2016-10-14 09:14:13 +02: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
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
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
bergquist
ab8751767c
feat(influxdb): send request and parse response
2016-10-06 12:51:45 +02:00
bergquist
887ca40455
feat(influxdb): add support for policies
2016-10-05 20:57:28 +02:00
bergquist
4387d20222
feat(influxdb): render select and groupby
2016-10-05 20:36:05 +02:00
bergquist
9968fa5bc5
feat(influxdb): add query part definitions
2016-10-05 16:59:33 +02:00
bergquist
8588bb386c
feat(influxdb): add conditions property to tag
2016-10-05 16:57:32 +02:00
bergquist
c7abd3ba4e
feat(influxdb): add querypart renderers
2016-10-05 14:42:06 +02:00
bergquist
d0e6a9559e
feat(influxdb): add query part model
2016-10-05 10:56:34 +02:00
bergquist
946e0bf32e
feat(influxdb): parse query json
2016-10-04 21:28:05 +02:00
bergquist
e556df5b49
feat(tsdb): add draft implementation for influxdb
2016-10-04 16:25:33 +02:00