Commit Graph

42 Commits (b3b982d746fdc34451ca44d262f83b483cd9ea33)

Author SHA1 Message Date
Jeffrey Smith II 090f681737
feat: Add remotes and replications to telemetry (#23456)
* feat: start work on remotes/replications phone home data

* feat: add remotes/replications phone home data (no tests

* refactor: use erroring binary conversions

* style: gofmt

* refactor: improve some error handling

* style: cleanup

* feat: add tests

* refactor: just list remotes/replications rather than decrement

* chore: linting fix

Co-authored-by: DStrand1 <dstrandboge@influxdata.com>
2022-06-16 14:48:06 -04:00
Sam Arnold 5015297d40
fix: more expressive errors (#22448)
* fix: more expressive errors

Closes #22446

* fix: server only logging for untyped errors

* chore: fix formatting
2021-09-13 15:12:35 -04:00
Daniel Moran 00afd95cb7
refactor: automated move of errors and id from root to kit (#21101)
Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2021-03-30 14:10:02 -04:00
Daniel Moran 4c59a34bae
fix(bolt): prevent concurrent access to telegraf plugin metrics cache (#21042) 2021-03-23 14:16:14 -04:00
Daniel Moran 1fa321d85c
fix: inject more specific error message for bolt on shared FS (#20489) 2021-01-11 13:08:47 -08:00
Gershon Shif d8a10e5311
chore: update circleci config to use golang:1.15 images (#19624)
* chore: update circleci config to use golang:1.15 images

* fix: Update Go version and use temporary override for Arrow

The Arrow override is to fix race detection problem. Once the
Arrow PR merges, this override can be removed.

Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
2020-09-23 14:07:13 -07:00
Jonathan A. Sternberg 0ae8bebd75
refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
Greg e593119c3d
feat: report telegraf plugin usage metrics (#16378)
* Begin implementing retreival of telegraf plugin stats

* Implement storing/deletion of telegraf plugin stats

* Test plugin stats

* Initialize plugins bucket for tests

* Add comment

* Shorten time and frequency in bolt when providing telegraf plugins metrics

* Simplify ticker loop

* Leak underlying ticker while still satisfying linter
2020-02-04 08:24:58 -07:00
Jacob Marble b836ab9c17
feat(storage): implement backup and restore (#16504)
* feat(backup): `influx backup` creates data backup

* feat(backup): initial restore work

* feat(restore): initial restore impl

Adds a restore tool which does offline restore of data and metadata.

* fix(restore): pr cleanup

* fix(restore): fix data dir creation

* fix(restore): pr cleanup

* chore: amend CHANGELOG

* fix: restore to empty dir fails differently

* feat(backup): backup and restore credentials

Saves the credentials file to backups and restores it from backups.

Additionally adds some logging for errors when fetching backup files.

* fix(restore): add missed commit

* fix(restore): pr cleanup

* fix(restore): fix default credentials restore path

* fix(backup): actually copy the credentials file for the backup

* fix: dirs get 0777, files get 0666

* fix: small review feedback

Co-authored-by: tmgordeeva <tanya@influxdata.com>
2020-01-21 14:22:45 -08:00
Johnny Steenbergen 8d6d44ac79 chore(bolt): nuke crufty bolt db service
kv store is a thing.. use it instead
2019-12-30 11:19:48 -08:00
Jacob Marble 5f19c6cace
chore: Remove several instances of WithLogger (#15996)
* chore: Remove several instances of WithLogger

* chore: unexport Logger fields

* chore: unexport some more Logger fields

* chore: go fmt

chore: fix test

chore: s/logger/log

chore: fix test

chore: revert http.Handler.Handler constructor initialization

* refactor: integrate review feedback, fix all test nop loggers

* refactor: capitalize all log messages

* refactor: rename two logger to log
2019-12-04 15:10:23 -08:00
Kelvin Wang f75f27c0bd feat(http): add audit log 2019-05-16 10:57:28 -04:00
zhulongcheng 486205188f fix(bolt): remove view service 2019-03-07 10:18:55 +08:00
Alirie Gray 5f524eb92d Rename all occurences of Macro to Variable 2019-02-14 13:21:57 -08:00
Chris Goller af8f698490 feat(telemetry): add initial telemetry metrics 2019-01-21 13:05:58 -06: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
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
Edd Robinson 9403c1ec8e Ensure error strings not capitalised ST1005 2018-11-30 10:54:24 +00:00
Kelvin Wang 1c3ba481eb leo's proposed change 2018-11-16 19:33:20 -05:00
Kelvin Wang 8d15d70360 fix(http): convert auth errors 2018-11-16 19:30:34 -05:00
Michael Desa e1d5e62125 feat(bolt): add boltdb implementation of secret service 2018-11-15 12:42:01 -05:00
Michael Desa e27a1371b0 feat(platform): add keyvalue log interface with boltdb implementation
test(platform): add conformance test for key value log

review(platform): add example keyvalue log usage

review: make changes suggested in pr review
2018-10-31 09:41:55 -04:00
Chris Goller 7756f8dc6a feat(cmd/influxd): add log levels 2018-10-30 02:27:51 -05:00
Chris Goller 6f10173a2d fix(bolt): create bolt/data dir if not exist 2018-10-26 17:12:39 -05:00
Michael Desa 3d653521d2 feat(platform): add meta field to dashboards
feat(testing): test for meta field on dashboard conformance tests

feat(http): ensure that dashboard json is encoded correctly

feat(bolt): update dashboard meta appropriately

fix(testing): use equate empty in dashboard test for empty cells list

feat(inmem): add meta to dashboards for conformance tests

feat(http): add support for dashboard conformance tests

feat(platform): add find options to FindDashboards method on dashboard svc

feat(testing): use find options in dashboard conformance tests

feat(mock): add find options to dashboard service

feat(bolt): add find options to dashboard service

feat(inmem): add find options to dashboard service

feat(http): add find options to dashboard service

feat(http): update dashboard swagger specification

fix(platform): fix mistakes after rebase

review(http): use default find options for dashboards
2018-10-23 13:43:06 -04:00
Kelvin Wang a8ac4a931c add telegraf store service 2018-10-17 15:01:04 -04: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
Michael Desa 13e60ec292 test(bolt): ensure boltdb session service conforms to tests 2018-09-27 15:45:16 -04:00
kelwang fdbca49c2e
Merge pull request #824 from influxdata/feat/default_ids
feat: add onboarding defaults
2018-09-27 15:26:11 -04:00
Jade McGough 232d87b9ac
feat(bolt): user-resource mapping boltdb implementation (#900)
* add bolt tests for user resource mapping

* add function boilerplate

* add more segfaults

* add create fn for bolt mapping

* initialize user resource mapping bucket

* fix error message

* add find user mapping fn

* fix error message

* implement user resource mapping filter fn

* add rest of user resource mapping filter fn
2018-09-27 12:15:26 -07:00
Kelvin Wang 3552af6386 feat: add onboarding defaults 2018-09-27 15:02:17 -04:00
Kelvin Wang f636c52fa5 feat(scraper): add scraper lib 2018-09-14 16:59:18 -04:00
Christopher Henn 00b61c948b Implement macros API 2018-09-14 13:45:42 -07:00
Michael Desa 8bc2d33b78 feat(platform): move chronogaf v2 dashboards to platform
test(testing): add tests for dashboards and cells

test(bolt): all conformance tests for dashbaords and cells

fix(bolt): rename dashboardV2Bucket to dashboardBucket

feat(chronograf): introduce v2 dashboards

Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

chore(chronograf): add tests for v2 dashboard reducer

Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

chore(chronograf): create dashboard from dashboard index

Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

chore(chronograf): move tests to same level of heirarchy as file tested

chronograf(chore): implement import dashboard with v2 api

chore(chronograf): delete dashboards from v2 api

chore(chronograf): add source health handler

chore(chronograf): move sources reducer to sources dir

chore(chronograf): remove stutter in notify

WIP stop namespacing by sourceID

chore(chronograf): no longer namespace routes under sources/:sourceID

WIP move dashtimeV1 to ranges

WIP remove CEO

chrore(chronograf): WIP Remove CEO and QueryMaker

chore(chronograf): introduce updateDashboard v2

chore(chronograf): Change cell to view

A dashboard's cell object now only contains positional information
for the cell in it's grid and a reference to the cell's view data.
A cell's view contains all necessary information for the cell's
visualization.

Add react-grid-layout types

chore(chronograf): introduce add cell

chore(chronograf): fix type errors

Not on DashboardPage

feat(platform): add cell methods to dashboard service interface

feat(mock): update dashboard service with cell methods

feat(testing): add cell methods to testing package

feat(bolt): add dashboard cell methods to bolt dashbaord service

feat(http): add cell routes to dashbaord handler

feat(platform): add dependent create/destroy of views from cells

chore(chronograf): introduce update dashboard cells endpoint

WIP update cells FE

fix(http): rename Cells to cells on dashboard cells response

chore(chronograf): re-introduce dashboard cell dragging

feat(platform): add copy dashboard cell to dashboard service

chore(platform): rename cell to view across codebase

feat(bolt): add replace dashboard tests

Move Layouts to Cells

Introduce delete cell

Fix broken test

fix(platform): update route for copying a a dashboard cell

UI for delete cell

Introduce copy cell

feat(platform): add copy view options to AddDashboardCell

feat(bolt): delete views when dashboard is removed.

Cleanup

Fix type errors

Fix links not updating

Remove annotations from RefreshingGraph

Sources and types work

fix(platform): add TODO.go files back

fix(view): rename visualizationType to type in view JSON

Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

fix(dashboardTime): change dashboardID to string

Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

feat(http): add dashboard api to swagger documentation

review(http): fix comments and function naming

feat(http): update sources swagger documentation

review(http): update the swagger to reflect the implementation

feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-24 13:22:58 -04:00
Michael Desa 503be5b0ef feat(bolt): add zap logger to bolt client
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-08-07 10:45:14 -04:00
Michael Desa 40e504340f feat(bolt): add boltdb implementation of sources service
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-08-07 10:45:13 -04:00
Michael Desa cfe907e8f5 feat(chronograf): all chronograf api handler to platform 2018-07-24 15:55:49 -04:00
Michael Desa d0a2f84c07 feat(platform): add dashboards service
feat(platform): add dashboard service interface and associated types

feat(bolt): add bolt implementation ofplatform dashboard service

feat(http): add dashboard http handler and http implementation dashboard service

feat(cmd/idpd): use bolt dashboard service in idpd

test(testing): add conformance test for dashboard service

test(bolt): ensure conforms dashboard service conforms to tests

fix(platform): rename DashboardContents to DashboardCellContents in test

fix(bolt): correct mispelled comments
2018-06-04 08:26:19 -07:00
Michael Desa f654b59662 feat(platform): add boltdb implementation of services
feat(platform): add id to authorization

feat(platform): add user arg to CreateAuthorization method on auth svc

migrate(platform): move idp command to platform directory

This comit did not move the ifql command as it depends on the query
service which has yet to be migrated.

feat(platform): add optional user name to authorization struct

feat(platform): add organization name to bucket struct

Additionally allow filtering buckets by organization name.

feat(prom): ensure that prom auth svc implement base interface

feat(prometheus): add user to create authorization method

feat(prom): drop user string from create authorization

feat(zap): ensure that zap auth svc implements base service interface

feat(zap): add user to create authorization method

feat(zap): drop user string from create authorization

feat(http): add ids to authorization service

feat(http): ensure that http authoriztaion service implements auth svc interface

feat(http): use authorization ids in authorization handler

squash(http): add check for http status accepted in authorization service

feat(http): clean up authorization service and handlers

feat(http): drop user string from create authorization

fix(http): normalize the http authorization service

feat(http): normalize bucket service and handler methods

Additonally, we added support for DELETE bucket

feat(http): add delete user handler

Additionally, there was a bit of general cleanup

feat(http): add delete route for organization handler and service

Did a bit of additional cleanup of the http code.

test(testing): add service conformance tests

test(testing): add organization service conformance tests

test(testing): add conformance test for orgs service

Additionally, there was a bit of cleanup in the users service tests

test(testing): add conformance test for authorizations service

test(testing): update auth tests to validate that user exists

test(testing): update authorization conformance tests with user name

test(testing): update bucket conformance tests to include organizations

feat(bolt): add bolt implementation services

feat(bolt): add bolt implementation of organization service

feat(bolt): add bolt implementation of users service

feat(bolt): add bolt implementation of authorization service

feat(bolt): add user to create authorization method

feat(bolt): drop user string from create authorization

fix(bolt): set user name on authorization after put

feat(bolt): update bucket servie to include organizations

feat(bolt): add dependent destroy of resources

feat(cmd/idpd): use bolt services in platform server

feat(cmd/idpd): use bolt organization service in platform server

feat(cmd/idpd): use bolt users service in plaform server

feat(cmd/idpd): use bolt client as authorization service

feat(cmd/idp): show user name in output of auth sub command

feat(cmd/idp): clean up bucket subcommand of idp command

fix(cmd/idp): normalize idp command output for users

fix(cmd/idp): normalize auth subcommand output

feat(cmd/idp): add support for delete organiztion command

migrate(idp): move ifql subcommand of idp to platform
2018-05-21 10:08:22 -04:00
Michael Desa f35f8e3386 feat(bolt): add boltdb implementation of bucket service
fix(bolt): use correct bolt package in test

feat(bolt): add bucket name index to bolt bucket service

feat(bolt): establish pattern for bolt back servies
2018-05-16 11:45:10 -04:00