Commit Graph

235 Commits (ddce5d383ad40bfa5a0b7a083129ae8fc0b636e7)

Author SHA1 Message Date
Michael Desa ea1b7bec09
fix(pagerduty/rule): change url to clientURL for pagerduty endpoint/rule
Closes https://github.com/influxdata/influxdb/issues/15042

Previously, there was an optional URL provided for the pagerduty
endpoint. However, the pagerduty API url does not change and as a result
it should not have been a parameter. The Pagerduty API does require a
`clientURL` that is presented in the pagerduty UI when an alert is
triggered. Currently that value will default to the alerts history page
for the organization.
2019-09-09 19:09:35 -04:00
Chris Goller 623224614e feat(kv): random ids without comma, space, backslash for org and bucket
At times snowflake id generation would create org and bucket IDs with
characters that had special meaning for the storage engine.

The storage engine concats the org and bucket bytes together into a
single 128 bit value.  That value is used in the old measurement
section.  Measurement was transformed into the tag, _measurement.

However, certain properties of the older measurement data location
are still required for the org/bucket bytes.  We cannot have
commas, spaces, nor backslashes.

This PR puts a specific ID generator in place during the creation of
orgs and buckets.  The IDs are just random numbers but with each
of the restricted chars incremented by one.  While this changes the
entropy distribution somewhat, it does not matter too much for our
purposes.

... because now org and bucket ids are checked for previous existence
transactionally in the key-value stores.  If the ID does already exist
then we try to generate a new key up to 100 times.
2019-09-08 01:50:05 -05:00
Michael Desa 8251922b63
fix(notification/rule): filter for state changes in rules
fix(notification/rule): add overlap to windows so that state changes works

Since stateChanges cannot detect a state change for the initial point,
returned, we generate a task that queries for more data than required
and filters out records that are before the every. This way we will not
miss state changes that take place on the initial value.

fix(notification/rule): prevent union of tables for single status rule

fix(testing): add status rules to notifications
2019-09-03 16:58:50 -04:00
Kelvin Wang 9d67e4bfbf fix(kv): fix notification rule testing 2019-09-03 12:33:48 -04:00
Kelvin Wang 5b33003e4a fix(kv): fix the status check of check and notification 2019-09-03 10:21:39 -04:00
Jade McGough d147874c1e
fix(kv): mock system buckets (#14884) 2019-08-30 12:47:06 -07:00
Kelvin Wang 7a677e9532 fix(http): fix notfication endpoint secret store 2019-08-28 16:02:17 -04:00
Jade McGough 2fa1ca3f49
feat: add metadata for system buckets when org is created (#14741)
feat: add metadata for system buckets when org is created
2019-08-28 12:50:23 -07:00
Jade McGough cd2e29cbcb
feat(swagger): notification rule tag filtering (#14793)
feat(swagger): notification rule tag filtering
2019-08-28 09:25:54 -07:00
Michael Desa 6c9d399249
fix(testing): add stale time to checks tests 2019-08-28 10:40:37 -04:00
Michael Desa 02bda26866
feat(deadman): add staleTime duration to deadman check
fix(deadman): change timeSince to a duration string instead of int
2019-08-28 10:16:38 -04:00
Michael Desa b26ed76d6a
fix(notification/check): ensure cloud integration works
fix(notification/check): include tags in check object in generated flux

Closes https://github.com/influxdata/influxdb/issues/14769

fix(notification/check): use selected field in threshold functions

Closes https://github.com/influxdata/influxdb/issues/14776

fix(testing): add selected field for check tests

fix(check): use real flux for threshold check

feat(notification/check): generate flux for deadman checks

chore(endpoint): rename webhook endpoint to http endpoint

fix(notification/rule): fetch url for flux script off of endpoint

fix(notification/rule): clean up slack and http rules

fix(notification/rule): change MessageTemp to MessageTemplate

fix(rules): pass endpoint in to rule during create

fix(ui): rename webhook to http

feat(notification/check): namespace deadman under alerts

fix(notification/check): nest tags under tags key in data object in flux

wip

feat(kv): log error if urm cannot be deleted for notification rule

fix(notification/rule): remove name from notify call in slack rule

chore(ui/cypress/e2e): skip rule create test
2019-08-27 15:02:53 -04:00
Michael Desa b4644a39d1
fix(kv): Create/Update/Delete notification rule tasks in transaction 2019-08-26 07:55:43 -04:00
Michael Desa 9cccf32452
fix(kv): Create/Update/Delete check tasks in transaction 2019-08-26 07:55:43 -04:00
Kelvin Wang 03f6214d0e chore(http): split taskservice from check and notification 2019-08-19 18:56:17 -04:00
Michael Desa 8e56c36737
feat(notification_rule): create notification rule task
feat(notification_rule): generate base flux for notification rule

wip: saving state

fix(notification/endpoint): add comment about weird requirements

feat(notification_rule): create notification rule task
2019-08-16 15:43:15 -04:00
Michael Desa a2a9eb5e49
feat(check): pass ownerID to task on create 2019-08-16 07:12:28 -04:00
Kelvin Wang bbb4fbc50d fix(notification/check): remove authorizationID 2019-08-16 00:00:55 -04:00
Kelvin Wang 61628671ed feat(kv): add notification endpoint
Co-authored-by: Jade McGough <jade@thezets.com>
2019-08-15 21:56:18 -04:00
Kelvin Wang f3dcdee504 fix(notification/rule): remove authID requirement 2019-08-15 19:31:45 -04:00
Kelvin Wang f688697ca6 fix(notification/check): convert threshold type 2019-08-15 16:53:46 -04:00
Deniz Kusefoglu e1508ac2e1
feat(checks): add first pass at creating tasks from checks
First pass at flux AST generation from check

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

fix(notification/check): format call expression

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

fix(notification/check): cleanup CheckDefinition

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

fix(notification/check): clean up threshold functions

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

fix(notification/check): clean up message function

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

fix(notification/check): misc fixes

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

fix(notification/check): remove dead code

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

fix(notification/check): move threshold flux generation to check pkg

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

fix(notification/check): move base ast generation to its own package

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

fix(notification/check): add comment for GenerateFluxAST

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

docs(notification/flux): add comments to each exported function

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

feat(notification/check): add tests for GenerateFlux

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

feat(notification/check): add task options to generated flux

fix(notification/check): use flux compatible duration type

test(notification/check): add task option to task definition

test(http): use check Duration in checks http handlers

feat(check): add TaskID to checks base

fix(notification/check): hack around issue with formatting ast package
wtih multiple files

test(check): create task when check is created

A lot of little changes had to happen as a result of this. This change
was rather painful.

feat(checks): add update and delete of task for check

fix(notifications/check): hack around the alerts package not being
available

test(kv): temporarily skip check tests while we merge the pr above
2019-08-15 15:07:09 -04:00
Michael Desa c355e62a27
Revert "feat(notification/check): convert threshold type" 2019-08-15 13:53:44 -04:00
Kelvin Wang d8a88e1865 feat(notification/check): convert threshold type 2019-08-15 12:11:22 -04:00
Jade McGough 0e5091ed21 feat(kv): add check kv 2019-07-31 18:52:13 -04:00
zhulongcheng ce4d5a9852 feat(http): patch notification rule 2019-07-28 22:08:23 +08:00
Kelvin Wang aaa84617d8 feat(kv): add notification rule kv 2019-07-25 15:15:35 -04:00
Kelvin Wang e4539ad04d fix(inmem): fix dbrp not found 2019-07-03 15:54:57 -04:00
lisale0 8c045ad08a gofmt 2019-06-20 16:25:38 -07:00
lisale0 2187bf345b fixed bolt and inmem tests 2019-06-20 16:25:38 -07:00
lisale0 4057183dac setting createdAt and updatedAt in bolt and inmem 2019-06-20 16:25:38 -07:00
Jade McGough fa132d19a7 WIP 2019-06-20 16:25:38 -07:00
Jade McGough b79e096bef fix segfault 2019-06-20 16:25:38 -07:00
lisale0 3330d38984 feat(http): adding createdAt variable 2019-06-20 16:25:38 -07:00
Kelvin Wang 18a0f3f542 fix(influxdb): rename telegraf orgID 2019-06-03 16:20:53 -04:00
Kelvin Wang b8c2cd6c05 feat(influxdb): add org create and update time 2019-05-20 17:36:29 -07:00
kelwang 7683fbc662
Merge pull request #13954 from influxdata/bucket_audit_log
feat(influxdb): bucket created and updated time
2019-05-17 14:20:19 -04:00
kelwang 497a813044
Merge pull request #13629 from zhulongcheng/upd-org-desc
feat(http): update org description
2019-05-17 12:36:45 -04:00
Kelvin Wang 57ceb9e275 feat(influxdb): bucket created and updated time 2019-05-17 11:49:10 -04:00
Kelvin Wang f75f27c0bd feat(http): add audit log 2019-05-16 10:57:28 -04:00
zhulongcheng 8d5c7d33a7 feat(http): update org description 2019-05-16 22:33:14 +08:00
kelwang 8687cb8039
Merge pull request #13448 from influxdata/create_view_issue
fix(http): create view
2019-05-13 13:33:34 -04:00
Jade McGough c6a0bf93a7
Merge pull request #13661 from influxdata/no_filter_parameters_provided
fix(influxdb): invalid filter error
2019-05-09 15:14:54 -07:00
Kelvin Wang ea54e2c2c8 fix(kv): fix empty org name 2019-04-26 18:16:28 -04:00
Kelvin Wang 2021321186 fix(influxdb): invalid filter error 2019-04-26 12:22:42 -04:00
Kelvin Wang 717fcc44b3 feat(influxdb): add scraper filter 2019-04-25 11:33:34 -04:00
kelwang 4acad08ea5
Merge pull request #13519 from influxdata/doc_desc
feat(influxdb): add doc description
2019-04-24 14:11:03 -04:00
kelwang 6ef624142b
Merge pull request #13556 from influxdata/org_desc
feat(influxdb): add org desc
2019-04-24 14:10:20 -04:00
Kelvin Wang 76cc27751b feat(influxdb): add bucket desc 2019-04-24 11:20:05 -04:00
Kelvin Wang 4c9f34122c feat(influxdb): add org desc 2019-04-22 22:40:07 -04:00