Commit Graph

572 Commits (633b588b1b53b19171467939f39f1b00b7bdb00c)

Author SHA1 Message Date
Max U ed7b88525b fix(launcher): print inspect as a subcommand when running with --help flag 2019-08-21 16:15:30 -07:00
Kelvin Wang 64e42271be feat(cmd/launcher): add notification endpoint 2019-08-15 21:56:24 -04:00
maxunt 757fb4f80c
Merge pull request #14280 from influxdata/er-rename
feat(fs): API for replacing os calls
2019-08-07 11:33:57 -07:00
Edd Robinson a2fc43ff0c
Merge pull request #14470 from influxdata/mu-reportTSI-2.x
feat(tsi1): add report-tsi tool to 2.x
2019-08-07 19:30:58 +01:00
Max U 64747e9781 refactor(tsi1): address config changes to report-tsi tool 2019-08-05 10:03:32 -07:00
Kelvin Wang 87730440ee feat(cmd/launcher): add check to launcher 2019-07-31 19:00:26 -04:00
Adam Perlin 4fef1683a0 refactor(tsi1): address review comments for report-tsi tool 2019-07-26 16:21:11 -07:00
Adam Perlin 7ce1b8109f chore(tsi1): Clean up flags and naming in report-tsi tool; add comments 2019-07-26 11:16:59 -07:00
Max U 9bd6200f15 fix(tsi1): make mergeable 2019-07-26 11:16:12 -07:00
Max U 17b1dd8562 feat(tsi1): add shorthand for --top flag as -t, plus cleaning 2019-07-26 11:12:15 -07:00
Max U aa2f7a8ff7 feat(tsi1): add a --top flag for limiting output, output now sorted 2019-07-26 11:12:15 -07:00
Adam Perlin 32b283d25a feat(tsi1/report): Add ability to filter by measurement; add additional maps for efficient retrieval of total org/bucket cardinalities 2019-07-26 11:12:15 -07:00
Max U 5e5fa96c5b feat(tsi1): add flags for --org-id and --bucket-id 2019-07-26 11:12:15 -07:00
Max U bfd38d93d8 feat(tsi1): provide API tooling for use in testing 2019-07-26 11:12:15 -07:00
Max U 8f99d20deb feat(tsi1): port report-tsi tool to influxdb 2.x 2019-07-26 11:12:15 -07:00
Max U eb6d0f4478 feat(tsi): report cardinality for all indexes, still needs to be cleaned
Fix iteration logic and clean up
2019-07-26 11:12:00 -07:00
Max U 99c0622ea0 fix(pkg/fs): merge branch 'master' into HEAD 2019-07-25 15:17:15 -07:00
Kelvin Wang a6a7d3471d feat(cmd/influx): add flags for notification rule auth 2019-07-25 15:15:35 -04:00
Kelvin Wang 149cbcf0e6 feat(cmd/influxd/launcher): add notification rule service 2019-07-25 15:15:35 -04:00
Max U 979c075931 Merge branch 'master' into HEAD 2019-07-22 10:21:59 -07:00
Christopher Wolff 63c0f40548 fix(query): use auth-wrapped org and bucket services for query 2019-07-19 20:02:53 -06:00
Kelvin Wang 42c893f31d fix(cmd/influx): user flag shouldn't be ignore 2019-07-16 13:25:13 -04:00
Stuart Carnie 030e11a82a
feat: Allow existing influxdb.ID type to be used as a pflag 2019-07-09 09:20:02 +10:00
Stuart Carnie 00561d5a1b
feedback: Move verify routines to `tsm1` package for consistency
Should have left it there to begin with 🤣
2019-07-09 09:00:41 +10:00
Stuart Carnie 46952afe37
feat(influxd): New influxd verify tsm-blocks command
This command performs verification of TSM blocks

* expected and actual CRC-32 checksums match
* expected and actual min and max timestamps match decoded
  data
2019-07-09 09:00:41 +10:00
Max U 2202d727da fixes merge conflicts 2019-07-08 14:07:04 -04:00
maxunt ca5a599261
Merge branch 'master' into er-rename 2019-07-08 13:42:24 -04:00
Max U fe748128e3 replaces os.Rename calls w api calls to fs.RenameFile. tests now are failing 2019-07-03 13:14:43 -04:00
Ben Johnson 08e24faf4c
feat(tsdb): Add block exporter.
Adds export tooling to `influxd inspect export-blocks` so that we
can dump out block data in SQL format for better analysis during
the debugging process.
2019-07-01 10:10:52 -06:00
Adam Perlin 24baec9e6d Gofmt verify-wal files 2019-06-27 16:28:28 -07:00
Adam Perlin f4faa9b2f5 feat(storage): Small verify-wal output and test tweaks 2019-06-27 16:28:28 -07:00
Adam Perlin c868ece4f6 feat(storage): Initial 2.x verify-wal tool functionality 2019-06-27 16:28:28 -07:00
Kelvin Wang 9dc5438e06 feat(cmd/influxd): add http error handler 2019-06-26 21:39:22 -04:00
Lyon Hill 435c8bbed5
fix(task): add logging into the task analytical store (#14124)
* fix(task): add logging into the task analytical store

* add in more detail around log structure
2019-06-12 20:01:41 -06:00
Alirie Gray 04a427e99e feat(tasks): add runID to Log struct 2019-06-06 11:24:38 -07:00
Jonathan A. Sternberg 21c80f3e93
refactor(query/control): move the controller from flux to influxdb (#13991)
The controller implementation is primarily used by influxdb so it
shouldn't be part of the flux repository. This copies the code from flux
to influxdb so it can be removed from the next flux release.
2019-05-29 09:04:34 -05:00
kelwang 4bbfa8c6f4
Merge pull request #13552 from influxdata/kv_log_time
feat(http): add audit log
2019-05-16 11:10:56 -04:00
Kelvin Wang f75f27c0bd feat(http): add audit log 2019-05-16 10:57:28 -04:00
Iris Scholten 2e26f23f9e
feat(authentication): Add cli args for specifying session length and renewal (#13924)
Co-authored-by: Jade McGough <jade@influxdata.com>

* Add session renew option to launcher and use in middlewhere
* pass session options to services
* Update SessionAutoRenew to SessionRenewDisabled
* Add test for service constructor defaults
* Update changelog
2019-05-15 10:16:47 -07:00
Palak Bhojani 3b6cf6234f Update read/write generate token to have option to create all buckets token 2019-05-09 15:08:30 -07:00
Stuart Carnie fb39ac39ce
fix(storage): Store.Read behavior changed to return unsorted series keys
Closes #13581
2019-04-26 10:38:59 -07:00
Christopher Wolff ab8d964a85 fix(query): remove per-query memory limit from OSS
Fixes #13639.
2019-04-25 15:08:07 -07:00
jlapacik e75d10d6b7 test(launcher): fix ill-formatted query; range must come before filter
Until https://github.com/influxdata/flux/issues/1215 is fixed, the query
writer must make sure to always place a range directly after a from
operation. Otherwise the query will fail planning.
2019-04-25 11:16:11 -07:00
jlapacik 5c973b6830 fix(launcher): call Done on query that errors 2019-04-25 11:16:11 -07:00
Alirie Gray 9f39ddfbef refactor(tasks): move validator to authorizer package 2019-04-24 11:36:54 -07:00
Jade McGough 808acf4a56
Merge pull request #13392 from zhulongcheng/cmd-find-auth
feat(cmd/influx): find auths by org
2019-04-23 10:29:32 -07:00
Nathaniel Cook bc17af2118
Merge pull request #13569 from influxdata/flux-staging
chore(dep): update Flux to v0.27.0
2019-04-22 18:34:39 -06:00
Kelvin Wang 7a72c363f2 remove org from bucket 2019-04-22 18:39:05 -04:00
Kelvin Wang 9d44ac3635 rename bucket organization to org 2019-04-22 18:39:01 -04:00
Nathaniel Cook a49d1696dc Merge branch 'master' into flux-staging 2019-04-22 14:25:33 -06:00
Christopher M. Wolff c9f94d4ee8
refactor(query): add parameters to query controller config (#13554)
Recently added to controller config:
  ConcurrencyQuota
  MemoryBytesQuotaPerQuery
  QueueSize
2019-04-22 12:11:32 -07:00
Lyon Hill 726fbefe9a
Integrate the new changes to tasks (#13473)
* Integrat the new changes to tasks
2019-04-19 08:37:59 -06:00
Nathaniel Cook 4c77e3598b Merge branch 'master' into flux-staging 2019-04-18 11:01:22 -06:00
Todd Persen cd64ec8718 Fix typos in miscellaneous packages 2019-04-17 13:30:22 -07:00
Nathaniel Cook 8b918539db Merge branch 'master' into flux-staging 2019-04-17 12:26:10 -06:00
Michael Desa e00c071c2c
feat(influxdb): add query/write http event recorders
feat(http): add prometheus counters for tracking write/query usage

feat(http/metric): add metric recoder for recording http metrics

feat(prometheus): implement metric.Recorder for prometheus metrics

fix(prometheus): remove erroneous fmt.Printlns

feat(http): add prometheus registry to API backend

This was done as exposing prometheus metrics to a higher level was quite
difficult. It was much simple to simply pass the registry down to
anything that needs it.

feat(cmd/influxd/launcher): pass prom registry in on api backend

feat(http): collect metrics for write and query endpoints

This was much messier than I would have preferred. Future work is
outlined in TODOs.

review(influxdb): rename metric.Metric to metric.Event
2019-04-17 08:33:31 -04:00
zhulongcheng 17304da3da feat(cmd/influx): find auths by org 2019-04-15 14:06:27 +08:00
Jonathan A. Sternberg b68b5053db refactor: replace usages of the spec compiler with the ast compiler (#13222)
This replaces usages of the spec compiler with the ast compiler and it
removes the error message referencing the spec compiler as an available
input.

It does not remove any of the code using the spec compiler that is
involved for proxying requests and it does not remove it from the API.
2019-04-12 07:15:27 -07:00
Christopher M. Wolff 16b9158b39 refactor(task): make tasks use new Query interface (#13219)
Fixes #12883.
2019-04-12 07:15:27 -07:00
kelwang 67bf2f54ac
Merge pull request #13052 from influxdata/auth_update_interface
fix(influxdb): updated auth shall return
2019-04-11 11:24:02 -04:00
Jacob Marble f56c42794b
chore(tracing): Cleanup (#13296)
* chore(tracing): Cleanup

* broken test

* fix unused var

* fix test
2019-04-10 19:28:21 -07:00
kelwang fbd313456a
Merge pull request #13061 from influxdata/swagger_proto_definition
fix(http): swagger proto definition
2019-04-03 15:55:51 -04:00
Kelvin Wang 1cf600aca9 remove proto 2019-04-03 15:42:25 -04:00
Lyon Hill 986a1acdbe
Update task executor to use a TaskService (#13099) 2019-04-02 15:55:31 -06:00
Lyon Hill 83000361c3
Update task coordinator to act as a TaskService middleware (#13068)
* Update task coordinator to act as a TaskService middleware
2019-04-01 16:45:44 -06:00
Kelvin Wang 712010d013 if(influxdb): updated auth shall return 2019-04-01 12:56:29 -04:00
kelwang 22dd44c4d1
Merge pull request #12955 from influxdata/auth_description_update
feat(kv): add auth description update
2019-03-29 14:08:34 -04:00
Lyon Hill c78344c441
update task schedler to use the new task control service (#12949) 2019-03-28 16:52:25 -06:00
kelwang 4d83e886fb
Merge pull request #12967 from zhulongcheng/cmd-kv-svc
refactor(cmd): replace bolt.Client with kv.Service
2019-03-28 12:32:42 -04:00
zhulongcheng 97140920a9 refactor(cmd): replace bolt.Client with kv.Service
Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
2019-03-28 23:58:23 +08:00
Kelvin Wang a2c0bdbe77 feat(kv): add new update 2019-03-28 11:46:41 -04:00
Lorenzo Affetti 90a48c74f6 test(launcher): test for query memory limits and launcher test helpers 2019-03-27 15:50:35 +01:00
Edd Robinson dbca30dac5 Add integration tests for cache snapshotting 2019-03-25 11:44:01 +00:00
Edd Robinson 16cef36aa2 Move tests around 2019-03-25 11:44:01 +00:00
Edd Robinson af3f7bc9cb Add new cache configuration value 2019-03-25 11:44:01 +00:00
Stuart Carnie 8abb76cb4e
Merge pull request #12710 from influxdata/sgc/data-gen
Add data generation subcommand to influxd
2019-03-20 11:08:49 -07:00
Mark Rushakoff 9541fbb859 fix(task): report query statistics correctly
The synchronous executor was missing a call to ResultIterator.Release.
The asynchronous executor wasn't even calling Query.Statistics.

Also add a test that the scheduler records the statistics to the run
log, and that the statistics are visible from the launcher test. The
launcher test is the most likely place to catch if something goes wrong
in the full stack.
2019-03-20 08:11:14 -07:00
Stuart Carnie 8669e94904
feat(influxd): Add the generate subcommand 2019-03-19 21:52:26 -07:00
Edd Robinson c4cc3ca7bc Fix 2019-03-19 15:12:35 +00:00
Edd Robinson f383ec9225 Add ability to use report-tsm programmatically 2019-03-19 14:29:25 +00:00
Edd Robinson 117a5a98e8 Static analysis 2019-03-19 14:29:25 +00:00
Edd Robinson fb8db80c22 Add doc to sub-command 2019-03-19 14:29:25 +00:00
Edd Robinson a3bab05cb1 Refactor command 2019-03-19 14:29:24 +00:00
Edd Robinson f5e608bce6 WIP - defaults not working 2019-03-19 14:28:47 +00:00
Edd Robinson 70e5a33bff Add inspect sub-command 2019-03-19 14:25:51 +00:00
Edd Robinson d1e1d8f063 Add inspect sub-command 2019-03-19 13:47:36 +00:00
Mark Rushakoff ce7b53ef37 feat(task): log authorization errors
This should simplify debugging when a user isn't allowed to do something
with a task, that they expect to be able to do.
2019-03-14 14:04:37 -07:00
Stuart Carnie c8d70fdaf0
feedback(influxd): Use InfoLevel constant 2019-03-14 09:23:54 -07:00
Stuart Carnie c7c58275f9
feedback(influxd): Respond to PR feedback
* Add CHANGELOG entry
* Remote erroneous comment
2019-03-14 09:23:53 -07:00
Stuart Carnie e8045ae187
feat(influxd): Migrate influxd binary to cobra Command package
This commit consists of several improvements or changes:

* migrate the influxd binary to cobra.Command
* introduce a default run sub-command to start the server
* register the run sub-command flags with viper
  to maintain compatibility with the existing behavior of automatic
  binding of flags to environment variables.

Closes #12602
2019-03-14 09:23:53 -07:00
Kelvin Wang 9d3b5932ba fix(influx): return the error when token file already exists 2019-03-07 20:10:48 -05:00
Jacob Marble 603a1f26e0 use tracing.StartSpanFromContext 2019-03-07 12:12:31 -07:00
Jacob Marble 9541e861a3 goimports -w -local github.com/influxdata/influxdb 2019-03-07 12:12:31 -07:00
Jacob Marble 92fa813c45 add spans to multiple services 2019-03-07 12:12:31 -07:00
Chris Goller 0d74ea8d55 feat(influxd/launcher): add test mimicing chronograf setup 2019-03-07 11:07:02 -06:00
Edd Robinson 8bdf857ddb Fix expected flux cases 2019-03-07 09:56:07 +00:00
Edd Robinson 3f1bec0836 Update emitted keys and tests 2019-03-07 09:56:07 +00:00
Michael Desa 2687b7fd61
feat(influxdb): add support for templates
feat(influxdb): add generic store for documents

feat(influxdb): support authorizations in document store

feat(influxdb): support orgs in user resource mapping

feat(influxdb): add read-only included field on documents

feat(influxdb): add labels support to documents service

fix(influxdb): rename data field to content on documents

feat(influxdb): add with org id options for document store

feat(http): add templates swagger

feat(influxdb): add documentation to document options

doc(kv): add documentation for kv document store

test(kv): pull document tests in to the testing package

fix(http): fix swagger specification of templates endpoints
2019-03-06 13:18:31 -08:00
Nathaniel Cook b129026334
Merge pull request #12371 from influxdata/flux-staging
upgrade Flux to v0.21.3
2019-03-06 12:17:12 -07:00
Kelvin Wang e93ea03d38 fix(setup): create dir when influxdb ran as a different user 2019-03-06 09:43:36 -05:00
Nathaniel Cook a190ddb44c fix(http): fix tests for encoding changes 2019-03-05 16:56:35 -07:00
Lyon Hill 17026c2053
change task logs from a string to a struct (#12363)
* change task logs from a string to a struct
2019-03-05 15:58:33 -07:00
Jacob Marble b9c7ec439e
feat(influxd): Tracing refactor (#12318)
* feat(launcher): Tracing to log disabled by default

* remove traceLogger and use opentracing directly

* add Jaeger tracing

* go vet && go fmt
2019-03-04 11:48:11 -08:00
Jeff Wendling 2544a90cac buildtsi: support specifying a specific index path 2019-02-28 15:20:33 -07:00
Lyon Hill b3f450eca9
Allow the CLI to find tasks by org name (#12202)
* Allow the CLI to find tasks by org name
2019-02-27 08:56:32 -07:00
Nathaniel Cook a75adf6c4b fix(http): separate InfluxQL and Flux services
Previously the APIBackend understood only a ProxyQueryService,
but it needs to understand that there are two implementations of the
ProxyQueryService one for handling InfluxQL queries and one for handling
Flux queries. The names of the fields have been updated to make this
clear. As well as the FluxBackend is now initialized using the
FluxService explicitly.
2019-02-22 10:31:20 -07:00
Lyon Hill c78477314a
Allow tasks to skip catchup (#12068) 2019-02-22 09:47:04 -07:00
Julius Volz e7a27243be Check error when writing token file during setup
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-02-22 09:08:41 -07:00
Chris Goller c0266ba5cf refactor(cmd/influxd): use simple query rather than the flux service 2019-02-21 11:18:08 -08:00
Chris Goller 1ec7b69d85 fix(kv): error org search if neither name nor id is set 2019-02-21 11:18:08 -08:00
Stuart Carnie 2872233252 feedback: Add end-to-end write and read tests for multiple organizations 2019-02-21 11:18:08 -08:00
Chris Goller df95564c07
Merge pull request #12052 from zhulongcheng/show-auth-in-task-cmd
feat(cmd/influx): show AuthorizationID of tasks
2019-02-21 10:28:25 -06:00
zhulongcheng 126d3edef7 feat(cmd/influx): show AuthorizationID of task 2019-02-22 00:07:45 +08:00
Chris Goller bfcc753836 fix(cmd/influx): remove unsigned for equality check 2019-02-21 09:13:05 -06:00
Chris Goller 79e0a2ae90 feat(cmd/influx): allow infinite retention in non-interactive setup 2019-02-21 08:51:37 -06:00
Lyon Hill 3665feef38
Populate organization name on task create action (#12004)
* Populate organization name on task create action

* Move the responsiblity of organization lookup to the platform adaptor
2019-02-20 13:36:35 -07:00
Chris Goller 40525fcfe8
Merge pull request #11934 from Zyqsempai/check-setup-password-length
Added password length check
2019-02-19 18:47:12 -06:00
Michael Desa 6a8a1fce32 feat(kv): implemented key/value store with end-to-end integration tests
* feat(kv:inmem:bolt): implement user service in a kv

* refactor(kv): use consistent func receiver name

* feat(kv): add initial basic auth service

* refactor(passwords): move auth interface into own file

* refactor(passwords): rename basic auth files to passwords

* refactor(passwords): rename from BasicAuth to Passwords

* refactor(kv): copy bolt user test into kv

Co-authored-by: Michael Desa <mjdesa@gmail.com>

* feat(kv): add inmem testing to kv store

* fix(kv): remove extra user index initialization

* feat(kv): attempt at making errors nice

* fix(http): return not found error if filter is invalid

* fix(http): s/platform/influxdb/ for user service

* fix(http): s/platform/influxdb/ for user service

* feat(kv): initial port of telegraf configs to kv

* feat(kv): first pass at migrating bolt org service to kv

* feat(kv): first pass at bucket service

* feat(kv): first pass at migrating kvlog to kv package

* feat(kv): add resource op logs

* feat(kv): first pass at user resource mapping migration

* feat(kv): add urm usage to bucket and org services

* feat(kv): first pass at kv authz service

* feat(kv): add cascading auth delete for users

* feat(kv): first pass d authorizer.OrganizationService in kv

* feat(cmd/influxd/launcher): user kv services where appropriate

* fix(kv): initialize authorizations

* fix(influxdb): use same buckets while slowly migrating stuff

* fix(kv): make staticcheck pass

* feat(kv): add dashboards to kv

review: make suggestions from pr review

fix: use common bucket names for bolt/kv stores

* test(kv): add complete password test coverage

* chore(kv): fixes for staticcheck

* feat(kv): implement labels generically on kv

* feat(kv): implement macro service

* feat(kv): add source service

* feat(kv): add session service

* feat(kv): add kv secret service

* refactor(kv): update telegraf and urm with error messages

* feat(kv): add lookup service

* feat(kv): add kv onboarding service

* refactor(kv): update telegraf to avoid repetition

* feat(cmd/influxd): use kv lookup service

* feat(kv): add telegraf to lookup service

* feat(cmd/influxd): use kv telegraf service

* feat(kv): initial port of scrapers in bolt to kv

* feat(kv): update scraper error messaging

* feat(cmd/influxd): add kv scraper

* feat(kv): add inmem backend tests

* refactor(kv): copy paste errors

* refactor(kv): add code to password errors

* fix(testing): update error messages for incorrect passwords

* feat(kv:inmem:bolt): implement user service in a kv

* refactor(kv): use consistent func receiver name

* refactor(kv): copy bolt user test into kv

Co-authored-by: Michael Desa <mjdesa@gmail.com>

* feat(kv): add inmem testing to kv store

* fix(kv): remove extra user index initialization

* feat(kv): attempt at making errors nice

* fix(http): return not found error if filter is invalid

* fix(http): s/platform/influxdb/ for user service

* feat(kv): first pass at migrating bolt org service to kv

* feat(kv): first pass at bucket service

* feat(kv): first pass at migrating kvlog to kv package

* feat(kv): add resource op logs

* feat(kv): first pass at user resource mapping migration

* feat(kv): add urm usage to bucket and org services

* feat(kv): first pass at kv authz service

* feat(kv): add cascading auth delete for users

* feat(kv): first pass d authorizer.OrganizationService in kv

* feat(cmd/influxd/launcher): user kv services where appropriate

* feat(kv): add initial basic auth service

* refactor(passwords): move auth interface into own file

* refactor(passwords): rename basic auth files to passwords

* fix(http): s/platform/influxdb/ for user service

* fix(kv): initialize authorizations

* fix(influxdb): use same buckets while slowly migrating stuff

* fix(kv): make staticcheck pass

* feat(kv): add dashboards to kv

review: make suggestions from pr review

fix: use common bucket names for bolt/kv stores

* feat(kv): implement labels generically on kv

* refactor(passwords): rename from BasicAuth to Passwords

* test(kv): add complete password test coverage

* chore(kv): fixes for staticcheck

* feat(kv): implement macro service

* feat(kv): add source service

* feat(kv): add session service

* feat(kv): initial port of telegraf configs to kv

* feat(kv): initial port of scrapers in bolt to kv

* feat(kv): add kv secret service

* refactor(kv): update telegraf and urm with error messages

* feat(kv): add lookup service

* feat(kv): add kv onboarding service

* refactor(kv): update telegraf to avoid repetition

* feat(cmd/influxd): use kv lookup service

* feat(kv): add telegraf to lookup service

* feat(cmd/influxd): use kv telegraf service

* feat(kv): update scraper error messaging

* feat(cmd/influxd): add kv scraper

* feat(kv): add inmem backend tests

* refactor(kv): copy paste errors

* refactor(kv): add code to password errors

* fix(testing): update error messages for incorrect passwords

* feat(http): initial support for flushing all key/values from kv store

* feat(kv): rename macro to variable

* feat(cmd/influxd/launcher): user kv services where appropriate

* refactor(passwords): rename from BasicAuth to Passwords

* feat(kv): implement macro service

* test(ui): introduce cypress

* test(ui): introduce first typescript test

* test(ui/e2e): add ci job

* chore: update gitignore to ignore test outputs

* feat(inmem): in memory influxdb

* test(e2e): adding pinger that checks if influxdb is alive

* hackathon

* hack

* hack

* hack

* hack

* Revert "feat(inmem): in memory influxdb"

This reverts commit 30ddf032003e704643b07ce80df61c3299ea7295.

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* chore: lint ignore node_modules

* hack

* hack

* hack

* add user and flush

* hack

* remove unused vars

* hack

* hack

* ci(circle): prefix e2e artifacts

* change test to testid

* update cypress

* moar testid

* fix npm warnings

* remove absolte path

* chore(ci): remove /home/circleci proto mkdir hack

* wip: crud resources e2e

* fix(inmem): use inmem kv store services

* test(dashboard): add first dashboard crud tests

* hack

* undo hack

* fix: use response from setup for orgID

* chore: wip

* add convenience getByTitle function

* test(e2e): ui can create orgs

* test(e2e): add test for org deletion and update

* test(e2e): introduce task creation test

* test(e2e): create and update of buckets on org view

* chore: move types to declaration file

* chore: use route fixture in dashboard tests

* chore(ci): hack back

* test(ui): update snapshots

* chore: package-lock

* chore: remove macros

* fix: launcher rebase issues

* fix: compile errors

* fix: compile errors

* feat(cmd/influxdb): add explicit testing, asset-path, and store flags

Co-authored-by: Andrew Watkins <watts@influxdb.com>

* fix(cmd/influxd): set default HTTP handler and flags

Co-authored-by: Andrew Watkins <watts@influxdb.com>

* build(Makefile): add run-e2e and PHONY

* feat(kv:inmem:bolt): implement user service in a kv

* refactor(kv): use consistent func receiver name

* feat(kv): add initial basic auth service

* refactor(passwords): move auth interface into own file

* refactor(passwords): rename basic auth files to passwords

* refactor(passwords): rename from BasicAuth to Passwords

* refactor(kv): copy bolt user test into kv

Co-authored-by: Michael Desa <mjdesa@gmail.com>

* feat(kv): add inmem testing to kv store

* fix(kv): remove extra user index initialization

* feat(kv): attempt at making errors nice

* fix(http): return not found error if filter is invalid

* fix(http): s/platform/influxdb/ for user service

* fix(http): s/platform/influxdb/ for user service

* feat(kv): initial port of telegraf configs to kv

* feat(kv): initial port of scrapers in bolt to kv

* feat(kv): first pass at migrating bolt org service to kv

* feat(kv): first pass at bucket service

* feat(kv): first pass at migrating kvlog to kv package

* feat(kv): add resource op logs

* feat(kv): first pass at user resource mapping migration

* feat(kv): add urm usage to bucket and org services

* feat(kv): first pass at kv authz service

* feat(kv): add cascading auth delete for users

* feat(kv): first pass d authorizer.OrganizationService in kv

* feat(cmd/influxd/launcher): user kv services where appropriate

* fix(kv): initialize authorizations

* fix(influxdb): use same buckets while slowly migrating stuff

* fix(kv): make staticcheck pass

* feat(kv): add dashboards to kv

review: make suggestions from pr review

fix: use common bucket names for bolt/kv stores

* test(kv): add complete password test coverage

* chore(kv): fixes for staticcheck

* feat(kv): implement labels generically on kv

* feat(kv): implement macro service

* feat(kv): add source service

* feat(kv): add session service

* feat(kv): add kv secret service

* refactor(kv): update telegraf and urm with error messages

* feat(kv): add lookup service

* feat(kv): add kv onboarding service

* refactor(kv): update telegraf to avoid repetition

* feat(cmd/influxd): use kv lookup service

* feat(kv): add telegraf to lookup service

* feat(cmd/influxd): use kv telegraf service

* feat(kv): update scraper error messaging

* feat(cmd/influxd): add kv scraper

* feat(kv): add inmem backend tests

* refactor(kv): copy paste errors

* refactor(kv): add code to password errors

* fix(testing): update error messages for incorrect passwords

* feat(kv): rename macro to variable

* refactor(kv): auth/bucket/org/user unique checks return errors now

* feat(inmem): add way to get all bucket names from store

* feat(inmem): Buckets to return slice of bytes rather than strings

* feat(inmem): add locks around Buckets to avoid races

* feat(cmd/influx): check for unauthorized error in wrapCheckSetup

* chore(e2e): add video and screenshot artifcats to gitignore

* docs(ci): add build instructions for e2e tests

* feat(kv): add id lookup for authorized resources
2019-02-19 17:47:19 -06:00
Mark Rushakoff cbef811c63 refactor(task): remove explicit org from run/log lookup
Task ID is now a required value on run and log filters. It was
effectively required by all implementations before anyway, so now those
types reflect that requirement.

Organization ID was removed from those same fields. The TaskService
looks up the organization ID via the task in cases where we need it at a
lower layer.
2019-02-16 14:34:49 -08:00
Lyon Hill 48cc643992
Clean out user from the task store's (#11882)
* Clean out user from the task store's
2019-02-15 15:50:09 -07:00
bpopovschi bd0db5d0f9 Added password length check 2019-02-15 18:07:18 +02:00
Mark Rushakoff 954cea93bc fix(cmd/influx): don't set authorizer context when creating task
Setting the authorizer from the HTTP client wasn't necessary, and
looking up the token to do so didn't work as written.

Fixes #11903.
2019-02-14 17:27:31 -08:00
Alirie Gray 5f524eb92d Rename all occurences of Macro to Variable 2019-02-14 13:21:57 -08:00
Mark Rushakoff d562d6bdde feat(task): pass authorizer to query service
Immediately before the executor calls out to the query service, the
executor loads the authorizer associated with the task, and associates
that authorizer with the context used to execute the query.
2019-02-14 08:53:40 -08:00
Mark Rushakoff caf08b5078 feat(task): store authorization ID with task
Accept token when creating or updating a task, but only report back the
authorization ID.

This means the executor and the platform adapter are now both aware of
an Authorization Service.
2019-02-14 08:53:40 -08:00
Mark Rushakoff 007f5059c7 refactor(task): extract TaskCreate struct
With the ongoing authorization work, creation arguments will differ from
what's returned on reads. More specifically, creation will accept a
token, but reads will report back a token ID.

This refactor facilitates that authorization work, and also brings the
code closer to the swagger definition, for the TaskCreateRequest type in
particular.
2019-02-12 15:10:03 -08:00
Michael Desa 386c70ea0d fix(influxdb): revert functionality added in pr#10947 2019-02-06 15:54:09 -05:00
Michael Desa f79075deda fix(cmd/influxd/launcher): use http clients for testing launcher 2019-02-06 14:24:21 -05:00
Michael Desa d96787dd67 fix(cmd/influxd/launcher): remove platform alias for influxdb 2019-02-06 14:24:21 -05:00
Jeff Wendling c9bb55b889 refactor: move the tsm1/wal into the storage/wal package
Because the WAL relies on the tsm1.Value type, we move that into its own
tsm1/value package and set up some aliases forwarding them into tsm1. This
also required adding some methods and changing consumers to avoid the
unexported fields. I imagine this step will be useful one day when we make
the write path more efficient with respect to consuming points.

This commit additionally fixes some issues with generation. The iterator.tmpldata
and generation for array_cursor_* were removed accidentally when removing
iterators, making those generated files stale. Restore that and regenerate.

No change in functionality.
2019-02-04 10:32:52 -07:00
docmerlin (j. Emrys Landivar) 0fec7aa6c4 feat(tasks): end-to-end tests for the task system 2019-01-25 13:28:25 -06:00
Jacob Marble 296e119783
feat: Add influx ping subcommand (#11603)
* feat: Add influx ping subcommand
2019-01-25 10:01:55 -08:00
Mark Rushakoff 84f8f8d88c chore(task): move 'task retry' command to 'task run retry'
Runs are retried; tasks aren't.

Closes #11170.
2019-01-23 16:34:10 -08:00
Chris Goller bb09a74732 fix(gather): add all subscribers to a single nats queue group
Previously, scrapers would scrape the target 10 times.  This was
because each scraper subscriber was not put into a queue group.

I've added the queue group "metrics" and now we the subcribers
will only scrape the target once.

Additionally, I moved to using nats memory instead of nats file
store.  We don't need durability for scraper runs across restarts.
2019-01-22 23:05:24 -06:00
Chris Goller e2a1e25707 feat(cmd/influxd): log build information 2019-01-22 21:39:40 -06:00
Michael Desa d2a2338c8d fix(cmd/influx): add context to error messages in bucket commands 2019-01-22 17:10:43 -08:00
Michael Desa 057e99befc fix(cmd/influx): add contextual information to org command errors 2019-01-22 15:40:54 -08:00
Michael Desa b68fff97f5 fix(cmd/influx): remove bolt op prefix from http org/bucket service 2019-01-22 15:40:27 -08:00
Jacob Marble 62ebb2c9ad feat: Onboarding without interaction 2019-01-22 14:36:34 -08:00
Jade McGough fefea5566c fix(main): require either org or org-id when creating buckets 2019-01-22 14:30:27 -08:00
Chris Goller 31ab881c96
Merge pull request #11347 from influxdata/feat/telemetry
Add optional telemetry that reports every 8 hours
2019-01-22 15:48:24 -06:00
Michael Desa d9473182d2 fix(cmd/influx): make setup, write, query a solid experience
fix(cmd/influx): format error for bare influx command

feat(cmd/influx): add org flag to query command

fix(cmd/influx): check correct error in wrapCheckSetup

fix(influx/cmd): use correct shorthand flag for org flag

feat(cmd/influx): wrapCheckSetup with wrapErrorFmt

feat(cmd/influx): cleanup language and errors during setup command

fix(http): use id query param in get buckets request

feat(cmd/influx): add helpful error messages for write command

feat(cmd/influx): add context to query command
2019-01-22 13:25:17 -08:00
Chris Goller ae62edfa51 feat(cmd/influxd): scrapers should run every ten seconds
Previously, scrapers were running every one minute.
2019-01-22 12:49:13 -06:00
Michael Desa 81875c78b2 feat(cmd/influx): check if instance has been setup if error encountered 2019-01-22 10:19:26 -08:00
Chris Goller 781e305aff feat(telemetry): encode metrics into store in various formats 2019-01-21 22:02:24 -06:00
Chris Goller d9f5e84d6a feat(telemetry): add telemetry server handler 2019-01-21 13:05:58 -06:00
Chris Goller 2d00eb18c5 feat(telemetry): add telemetry handler 2019-01-21 13:05:58 -06:00
Chris Goller e690f4bfb3 chore(telemetry): move telemetry into its own package 2019-01-21 13:05:58 -06:00
Chris Goller af8f698490 feat(telemetry): add initial telemetry metrics 2019-01-21 13:05:58 -06:00
Michael Desa e2bc8afc04
Merge pull request #11301 from influxdata/feat/authorize-urm
authorize user resource mapping operations
2019-01-21 08:33:25 -08:00
Chris Goller 49782c3be4 feat(bolt): add metrics for resources stored in boltdb 2019-01-18 17:45:45 -06:00
Chris Goller dea64a3685 feat(proto): read JSON files in proto
We used go-bindata to embed all JSON files in proto to be shipped
with our released influxdb.

We are committing the bin_gen.go so that it simplifies the building
via make and go build.

If you would like to add another proto JSON file, run make
to generate a new bin_gen.go.

Co-Authored-By: Deniz Kusefoglu <deniz@influxdata.com>
2019-01-18 15:13:19 -06:00
Michael Desa cdc9146b78 feat(influxdb): add authorized user resource mappings
feat(bolt): add function to find a resources organization id

rename platform to influxdb

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

fix(bolt): rename FindResoureOrganization to FindResoureOrganizationID

feat(authorizer): add authorized user resource mapping service

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

feat(influxdb): wire up authorized user resource mapping

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

fix(authorizer): remove unused field from tests

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2019-01-18 14:22:08 -05:00
Lyon Hill 523e52d662
Show organization names in task api actions (#11223)
* Show organization names on task actions.

closes #10876
2019-01-18 09:10:14 -07:00
Michael Desa c60031a6b7 fix(influxdb): change resource to resource type 2019-01-15 12:57:57 -05:00
Nathaniel Cook 8372859dee Merge branch 'master' into flux-staging 2019-01-15 08:35:59 -07:00
Leonardo Di Donato 9ef3ce8f9b chore(cmd/influx): command descriptions and parameters start with uppercase now
Fixes #10995

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-15 16:33:56 +01:00
Leonardo Di Donato 42fcd5ae8d feat(cmd/influx): override help for all commands
Making its initial word uppercase, at the same time.

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-15 16:33:56 +01:00
Nathaniel Cook 622106caaa Merge branch 'master' into flux-staging 2019-01-14 17:03:57 -07:00
Leonardo Di Donato 1e42e0259e chore(platform): specific not found error for telegraf configs 2019-01-14 17:08:44 +01:00
Michael Desa a3541b22d4 feat(http): allow user id to be specified explicitly on authorization
test(http): get user off of session in create authz test

fix(http): allow user id to be specified explicitly on authorization

create authorization now allows specifying user id explicitly. If no
user id is specified then we use the user id from the authorizer.

fix(http): use influxdb import

fix(http): use platform error in http auth tests

feat(cmd/influx): allow create auth command to specify user explicitly

feat(http): add org id to permissions
2019-01-14 10:20:20 -05:00
Nathaniel Cook 3a2231be98 Merge branch 'master' into flux-staging 2019-01-11 13:47:49 -07:00
Kelvin Wang ce6004243c add(gather): add writer interface 2019-01-11 13:09:18 -05:00
Michael Desa 944de4157a fix(influxdb): add org id to permissions
filter out resources that have mission IDs

fix(influxdb): simplify auth check in PermissionAllowed

review(platform): update as noted in review

fix(influxdb): ensure permission has valid org id
2019-01-11 12:23:28 -05:00
Jade McGough 8b255440e5 feat(cmd): add missing auth cli params 2019-01-10 15:38:07 -08:00
jlapacik 5266cba346
deps: updates for packages and imports (#10962) 2019-01-10 14:33:25 -08:00
Mark Rushakoff d73d73c0d4 chore: rename imports from platform to influxdb
I did this with a dumb editor macro, so some comments changed too.

Also rename root package from platform to influxdb.

In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.

Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
Jeff Wendling 703c3c15ca Hook up DeleteBucket to the tsm1 engine 2019-01-09 15:24:26 -07:00
Edd Robinson f0b0d33db1
Merge pull request #2366 from influxdata/er-bucket-delete
Wire up Storage Engine to API-layer BucketService
2019-01-09 18:44:37 +00:00
kelwang 69461e500f
Merge pull request #2342 from influxdata/onboarding_cli
fix(cmd/influx): don't print token, print the file where it stored
2019-01-09 11:51:10 -05:00
Edd Robinson 42ff769f1c Wire up storage.Engine to HTTP BucketService 2019-01-09 15:09:56 +00:00
Michael Desa 857b60150e feat(platform): add proto service for creating templated resources
feat(http): add http handler for proto service

feat(mock): add mock proto service

test(http): add proto handler tests

fix(platform): add view as option when adding a cell

feat(platform): add dashboard to proto struct

feat(fs): add filesystem implementation of proto

feat(http): add protos endpoints to api handler

feat(cmd/influxd/launcher): add protos path to server

doc(http): add protos to swagger

test(cmd/influxd/launcher): add --protos-path to launcher tests

fix(fs): remove unused args from test

fix(http): use platform.Error where appropriate
2019-01-09 09:55:15 -05:00
Michael Desa 338e0587d0 fix(platform): nest view beneath dashboard cell
feat(platform): add functional options for platform errors

fix(testing): set dashboard ids properly in dashboard tests

feat(bolt): add dashboard specific views

fix(bolt): delete view when cell is removed or dashboard is deleted
2019-01-08 18:11:13 -05:00
Kelvin Wang 8a5da95f4d fix(cmd/influx): don't print token, print the file where it stored 2019-01-08 15:58:31 -05:00
Jeff Wendling 14b5f103c4
Merge pull request #1984 from influxdata/jmw-tsm1-fixes
tsm1 index fixes and improvements
2019-01-07 21:07:18 -07:00
Adam fa35dea009 feat(query/functions/tests): end to end testing is configured to run against a live storage engine.
all tests use a unique bucket based on the test file name.  copied all tests over from flux repo

the tests are currently disabled due to engine consistency issues:  https://github.com/influxdata/flux/issues/613
2019-01-07 13:05:29 -05:00
Jeff Wendling 14cf01911e tsm1: change TSMFile to use an iterator style api 2019-01-07 11:00:35 -07:00
Adam 9a561f8b53 manually merged addition of secrets to launcher 2019-01-02 15:42:55 -05:00
Andrew Watkins 3429e8d0c6
feat(auth): rewrite authorization service (#2157)
* feat(view-token-overlay): add view token overlay

* test(tokens): update tests

* chore(auths): rename mock data file

* feat(token-view): clicking on description opens token view modal

* feat(token-view): add ability to close overlay

* feat(token-view): display token permissions with updated permissions shape

* feat(token-view): wip update authorization and permission shapes

* feat(auth): wip refactor auth permissions

* fix(auth): generate permissions via functions

* fix(auth): make Id ID

* chore(types): update generated client

* feat(auth): wip add user and org names to auth

* fix(user): didnt save rebase

* feat(auth): WIP refactor auth

* feat(auth): check for user existence during auth creation

* feat(auth): org must exist during auth creation

* fix(auth): pluralize telegrafs resource type

* docs(http): update swagger definition for the Authorization

* test(auth): fix broken tests

* docs(swagger): update cur_swagger Authrorizations

* fix(api): remove trace from cur_swag

* test(ui/token): update components with new generated type definitions

* feat(http): add lookup service adding names for permissions

* fix(http): remove debugging panics

* chore: go tidy

* fix: unsaved rebase

* test(idpe): add ids to Authorizations for log tests
2018-12-28 15:02:19 -08:00
Michael Desa 4c60eacb58 chore(platform): cleanup, document, and use secret service
fix(http): add members/secrets/labels links on org response

fix(http:cmd/influxd): use secret service in api backend

fix(bolt): return empty list if there are no secrets for an org

chore(vault): add description of vault usage
2018-12-28 11:11:21 -05:00
AJ Bond 941e7526c0 fix(http): Fix developer mode default
Developer mode is now passed to assets
closes #2050
2018-12-21 16:33:04 -05:00
Adam 30b2d9ca00
refactor(cmd/influxd): move driver code for influxd main package to sub-package so it can be reused. (#2089) 2018-12-20 17:05:36 -05:00
Adam ad38ad8c3f Revert "refactor(cmd/influxd): move driver code for influxd main package to sub-package so it can be reused (#2077)"
This reverts commit c3c12d1517.
2018-12-20 16:29:28 -05:00
Adam c3c12d1517
refactor(cmd/influxd): move driver code for influxd main package to sub-package so it can be reused (#2077)
* refactor(cmd/influxd): move driver code for influxd main package to sub-package so it can be reused.

* chore(query/influxql): moved query_test.go and requisite files to the influxql dir to be closer to the code it tests. (#2013)
2018-12-20 16:15:40 -05:00
Ben Johnson 846192c066
Merge pull request #1886 from influxdata/bj-refactor-test-cancellation
fix(cmd/influxd): Refactor test cancellation out of main path.
2018-12-14 10:43:15 -07:00
Lyon Hill f7ae8c3524
feat(api/task): Add validation for both tasks and buckets on task create (#1900)
fixes #1622
2018-12-12 16:07:40 -07:00
Ben Johnson 89bf9765cc
fix(cmd/influxd): Refactor test cancellation out of main path.
This commit moves the `Main.cancel()` execution to the `main_test.go`
file so it's only executed for tests. This was interfering with the
shutdown process on the regular `influxd` binary.
2018-12-12 10:53:10 -07:00
Ben Johnson 8d071f85fd
Fix hang on help command. 2018-12-11 11:07:54 -07:00
Edd Robinson c4b42c72be Add option to disable TSI metrics 2018-12-10 15:02:26 +00:00
Edd Robinson 3ea3d90e10
Merge pull request #1623 from influxdata/er-storage-metrics
Add storage engine metrics
2018-12-07 17:50:13 +00:00
Mark Rushakoff 2e81dd31b4 refactor(task): enable high-frequency WithTicker option
Previously, the WithTicker option would call TickScheduler.Tick every
time the underlying time.Ticker sent a time on its channel. This meant
we used a 1s period, which meant that in the worst case, we would see a
tick at about 999ms after the second rollover.

This change increases the underlying time.Ticker frequency, but only
calls TickScheduler.Tick after a second rolls over. Since we now use a
tick frequency of 100ms, during normal operation, TickScheduler.Tick
will be called within 0.1s after the second rolls over.
2018-12-07 08:38:59 -08:00
Edd Robinson 93892c20ab Fix test 2018-12-07 14:32:34 +00:00
Edd Robinson c76626accf Fix rebase 2018-12-07 14:32:34 +00:00
Edd Robinson f56bc0853f Convert TSM compaction stats to Prom metrics
This commits converts all the 1.x TSM compaction statistics, which
previously were written to an _internal db, to Prometheus metrics.
2018-12-07 14:32:34 +00:00
Kelvin Wang 2b602bfcfe fix(http): convert org errors endpoint 2018-12-06 11:05:13 -05:00
Jade McGough 8c961e12bb
Labels (#1668)
* feat(platform): add label struct

* feat(platform): add label service interface

* WIP label service

* chore(http): simplify URMapping validation

* WIP label service skeleton

* add new GET labels handler

* feat(http): add POST handler for label service

* feat(http): add label delete handler

* fix json tag

* add happy path testing

* feat(http): add label endpoints to dashboard service

* make fmt

* add label delete handler

* make fmt again :(

* feat(bolt): add label implementation

* wire boltdb implementation of labels

* feat(mock): add mock for label service

* fix tests, add delete test

* add remaining tests, flesh out GET params

* unused code

* remove comments

* add labels endpoints

* clean up labels after deleting a dashboard

* fix issues from code review

* WIP remove type from labels

* feat(http): add label cli functions

* fixes

* make fmt

* feat(http): add labels to tasks and buckets

* feat(bolt): remove labels if their resources are deleted

* remove bolt cleanup for now

* make fmt

* type conversion magic

* feat(inmem): implement label service

* prevent race conditions

* remove labels from inmem if their resources are deleted

* fix race condition

* fix formatting
2018-12-03 08:07:08 -08:00
Jade McGough 873aae3fad
Revert "feat(http): add label service" (#1667)
This reverts commit 70a430c599.
2018-12-03 04:27:27 -08:00
Jade McGough 70a430c599
feat(http): add label service (#1346) 2018-11-30 21:08:35 -08:00
Jorge Landivar b0fc331c6d
Merge pull request #1589 from influxdata/bug/1235
remove requestedAt param from retry call
2018-11-30 13:39:50 -06:00
j. Emrys Landivar (docmerlin) 7ffd18c7b8 remove requestedAt param from retry call and refactor TaskService interface 2018-11-30 13:14:21 -06:00
kelwang 6db9acc951
Revert "Revert "convert /buckets endpoint error to platform error "" 2018-11-30 13:27:40 -05:00
Mark Rushakoff b1c80c8991
Merge pull request #1627 from zhulongcheng/task-page-size
fix(task): add limit field to TaskFilter
2018-11-30 08:17:12 -08:00
Edd Robinson 9403c1ec8e Ensure error strings not capitalised ST1005 2018-11-30 10:54:24 +00:00
zhulongcheng d8c80fa50c add limit param to task service 2018-11-30 10:02:41 +08:00
kelwang 2a57dc1970
Revert "convert /buckets endpoint error to platform error " 2018-11-29 12:02:32 -05:00
Kelvin Wang 232d9d71e3 fix(http): fix bucket errors 2018-11-29 09:58:56 -05:00
Ben Johnson 1862b4421d
Integrate scanned values statistics tracking. 2018-11-28 15:32:06 -07:00
docmerlin (j. Emrys Landivar) 57fe285e56 add run return to rerun 2018-11-27 11:48:32 -06:00
Mark Rushakoff a06d4dea16 refactor(query): explicitly shut down query controller
The flux query controller was updated to include a Shutdown method a
while ago. Explicitly handle query controller creation and shutdown
where applicable.

In influxd, this ensures that outstanding queries are handled before the
process dies. In tests, this ensures that query controller goroutines
aren't leaked, which drastically simplifies reading full stack traces.

This change also registers query controller metrics with the prometheus
registry in influxd.
2018-11-26 16:13:19 -08:00
Mark Rushakoff b0b0d965ff feat(task): integrate task logs with system buckets
- Brought over enterprise's QueryLogReader, with small adjustments
  - Time filters are for the run's ScheduledFor field, per spec
- Adjusted run log timestamps for consistent formatting:
  - ScheduledFor is RFC3339 because it's a whole-second timestamp
  - StartedAt, FinishedAt use RFC3339Nano for high precision
- Several test adjustments to use relative time, for easier integration
  with storage retention
2018-11-15 08:59:15 -08:00
Ben Johnson 37be1e9219
Add end-to-end write/query integration testing. 2018-11-15 09:08:36 -07:00
Kelvin Wang a783c213c3 (feat/cmd): add default token 2018-11-09 19:43:29 -05:00
Jeff Wendling 22e23d6e31 final touches
- move default directories to the storage package
- make the directory layout match before
- clean up some dead missed functions
2018-11-08 11:39:36 -07:00
Jeff Wendling 2cbc2ee896 refactor wal out, paths, and options 2018-11-08 11:39:36 -07:00
Jeff Wendling 0d411023f2 config: clean up
- Breaks the weird cycle that existed with the EngineOptions
- Removes a bunch of useless parameters
- Moves around a bunch of defaults
2018-11-08 11:39:36 -07:00
Michael Desa 459f2cbfbb feat(cmd/influx): add local flag for operating directly with boltdb
feat(internal/fs): move influxDir function to internal package in base of repo

feat(cmd/influx): add local flag that operates on local file system

feat(cmd/influx): add local support for org command

feat(cmd/influx): add local support for user command

eat(cmd/influx): add local support for bucket command

feat(cmd/influx): add error for local with query/task/setup cmds

fix(cmd/influx): unshadow error in delete bucket command

fix(cmd/influx): update copy for local flag commands
2018-11-02 14:34:48 -04:00
Michael Desa 7227bf8fa2 feat(platform): add operation log for resources
feat(platform): add dashboard operation log interface

feat(bolt): add dashboard operation log to bolt client

feat(platform): add links to dashboard load response

fix(http): update links in json response of dashboards

feat(bolt): add operation logs for each resource

feat(http): add routes for operation logs

feat(cmd/influxd): set operation logs on http api backend
2018-11-02 14:21:14 -04:00
Jorge Landivar 34ab06634f
Merge pull request #1266 from influxdata/opentracing
open tracing context handling for tasks and for HTTP endpoints for tasks and query
2018-11-01 16:33:19 -05:00
docmerlin (j. Emrys Landivar) bcbd7b5c24 context handling for tasks and for HTTP endpoints for tasks and query 2018-11-01 16:29:52 -05:00
Mark Rushakoff 89813b8aa4 chore(cmd): fix megacheck errors 2018-11-01 12:54:46 -07:00
Mark Rushakoff c3e3b44a75 feat(task): include task scheduler metrics on /metrics endpoint
Closes #1223.
2018-10-30 18:52:02 -07:00
kelwang 3b1660d7d0
Merge pull request #1229 from influxdata/feat/telegraf_http
add http for telegraf
2018-10-30 15:33:51 -04:00
Kelvin Wang 74ef984e53 add http for telegraf 2018-10-30 14:00:10 -04:00
Mark Rushakoff cd80e41220 feat(task): add ability to retry runs
This also adjusts the TaskService interface's RetryRun method to accept
a task ID rather than an org ID. Internally, we still look up runs by
organization, and maybe that will change later, but this is a more
natural way for clients to look it up.
2018-10-30 09:20:40 -07:00
Chris Goller c978ead25b
Merge pull request #1227 from influxdata/feature/clean-influxd-main
Clean up influxdb main
2018-10-30 07:37:29 -05:00
Edd Robinson 46a7b8155a
Merge pull request #1170 from zhulongcheng/rm-index
refactor(tsdb): remove tsdb.Index and tsdb.IndexSet
2018-10-30 11:10:54 +00:00
Chris Goller 7756f8dc6a feat(cmd/influxd): add log levels 2018-10-30 02:27:51 -05:00
Chris Goller eb5f4fbe8a refactor(cmd/influxd): use kit and close all services 2018-10-30 01:57:48 -05:00
Jorge Landivar 198793d955
Merge branch 'master' into cancel-task 2018-10-29 17:07:02 -05:00
Jonathan A. Sternberg 67dc4d8cdd
fix: conform to logging style guide for initial log messages
These are the log messages that get printed immediately when starting
the application for the first time. This fixes the messages to conform
to the logging style guide.
2018-10-29 16:42:55 -05:00
docmerlin (j. Emrys Landivar) 6e2620418c Now you can cancel runs 2018-10-29 16:08:50 -05:00
Mark Rushakoff cfd685d72a fix(cmd/influx): require query command's org-id flag
Before, if you ran `influx query` and didn't have --org-id, you would
get an unhelpful runtime error like `id must have a length of 16 bytes`.
After this, you get a more helpful `required flag(s) "org-id" not set`
error.
2018-10-29 11:52:41 -07:00
Chris Goller 226d18bb22 fix(cmd/influx): typos in cli variables 2018-10-26 15:51:55 -05:00
zhulongcheng 9d29874e20 move SeriesFileDirectory constant to defaults package 2018-10-27 02:08:31 +08:00
Chris Goller d2ecf8aad6 http(write): support timestamp precision 2018-10-25 21:23:50 -05:00
Chris Goller 9d64d2192b feat(write): add line protocol batch writing 2018-10-25 19:13:53 -05:00
Chris Goller ca2b6941f2 refactor(cmd/influx): write now returns errors rather than os.Exit 2018-10-25 19:13:53 -05:00
Chris Goller 05117ac7cb fix(cmd/influx): typos and grammar for write command 2018-10-25 19:13:53 -05:00
Chris Goller b3a7324c3e fix(cmd/influx): update write to new platform ID 2018-10-25 19:13:53 -05:00
Chris Goller dd8c2691ed feat(cmd/influx): add write to influx binary 2018-10-25 19:13:53 -05:00
Lyon Hill 0894d5a3e3
fix task create (#1192)
fixes #1190
2018-10-25 13:57:17 -06:00
Lyon Hill 751a53dd24
Allow coordinator to pick up existing tasks on startup (#1187) 2018-10-25 13:50:41 -06:00
Lyon Hill 19b7709bad
Add tasks to the influx cli (#1163) 2018-10-23 11:51:13 -06:00
kelwang 022bdc86d6
Merge pull request #1120 from influxdata/fix/onboarding_change
Fix/onboarding change
2018-10-19 10:59:07 -04:00
Chris Goller 11f869fb37
feat(cmd/influx): add org name option to repl (#1121)
* feat(cmd/influx): add org name option to repl

* fix(cmd/influx): repl org-id and org are mutually exclusive
2018-10-18 15:55:31 -05:00
Kelvin Wang 60fdf79726 add retention policy 2018-10-18 16:04:21 -04:00
Kelvin Wang a3c9185ba6 remove default org bucket 2018-10-18 13:38:17 -04:00
Mark Rushakoff 5af42835fa chore: default bolt db location to .influxdbv2 dir
Per previous discussion in #1065.
2018-10-12 16:39:02 -07:00
Mark Rushakoff 2958318c1f chore(bolt): log path of bolt file
Now at startup, there will be a log line like:

    Opened bolt database {"log_id": "0B5Oks9W000", "path": "influxd.bolt"}

Which gives a somewhat better idea of what's going on.
2018-10-12 08:14:50 -07:00
Kelvin Wang b5e7b5f138 enter "n" to cancel setup 2018-10-11 20:58:29 -04:00