Commit Graph

31117 Commits (623224614e118b92eced311dc6f6c024fd9ab538)

Author SHA1 Message Date
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
Andrew Watkins 2c871428c2
Merge pull request #15029 from influxdata/fix/link-to-check
fix(alertHistory): stop linking to dead resources
2019-09-06 22:21:34 -07:00
Chris Goller 71f7e0e0e5
fix(notification/rule): pagerduty does not need token and url (#15048)
fix(notification/rule): pagerduty does not need token and url
2019-09-06 23:53:44 -05:00
Andrew Watkins 7f50a0a078 fix: prettier 2019-09-06 21:14:57 -07:00
Andrew Watkins 446a9112e2 refactor(alerts): use context to pass resourceIDs to rows
Co-Authored-By: Michael Desa <mjdesa@gmail.com>
2019-09-06 21:14:57 -07:00
Andrew Watkins e5b2f8c11f chore: make enum singular and move selector into dir 2019-09-06 21:14:12 -07:00
Andrew Watkins f58b39bc55 fix(alertHistory): stop linking to dead resources
Author: Michael Desa <mjdesa@gmail.com>
2019-09-06 21:11:19 -07:00
Chris Goller 5848056ea7 fix(notification/rule): pagerduty does not need token and url
Previously, the URL would cause pages to be sent to incorrect addresses.
Token is only needed for PagerDuty REST API and not events.
2019-09-06 23:07:37 -05:00
Chris Goller 55e124735c
fix(notification/rule): pagerduty helper functions need key ar… (#15047)
fix(notification/rule): pagerduty helper functions need key args
2019-09-06 22:00:45 -05:00
Chris Goller bf1e198714 fix(notification/rule): pagerduty helper functions need key args
The pagerduty helper functions did not have the correct syntax.
2019-09-06 21:27:09 -05:00
Michael Desa 04b28a0add
Merge pull request #15044 from influxdata/fix/remove-base-filter
fix(notificationRules): remove initial tag filter from draft rule
2019-09-06 21:53:25 -04:00
Jade McGough c1cd152363
feat(http): Add bucket types (#15045) 2019-09-06 17:52:54 -07:00
Michael Desa d969a57be3
fix(notificationRules): remove initial tag filter from draft rule
Closes https://github.com/influxdata/influxdb/issues/15000

When submitted, with the default draft rule, the request would fail due
to the backend attempting to contruct flux with empty string values.
2019-09-06 20:30:34 -04:00
Alirie Gray 51b1c58aaa
Merge pull request #15043 from influxdata/fix/notif-rule-pagerduty
fix(notification/rule): convert time, trigger, severity
2019-09-06 16:52:04 -07:00
Michael Desa 78e1a989fd
Merge pull request #15034 from influxdata/fix-ui-newline-parsing
fix(ui): handle parsing Flux strings containing newlines
2019-09-06 19:43:12 -04:00
Chris Goller 9dcdbd05a1 fix(notification/rule): convert time, trigger, severity
Semantically, we've done the following:

// name of the client sending the alert.
client: "influxdata"

// url of the client sending the alert.
client_url: the endpoint URL for now (needs to change to rule)

// The class/type of the event, for example ping failure or cpu load
class: check's name

// Logical grouping of components of a service, for example app-stack
group: source measurement

Co-authored-by: Alirie Gray <alirie.gray@gmail.com>
2019-09-06 18:34:42 -05:00
alexpaxton f2aff59a75
refactor(ui): update check builder design (#15040)
* refactor(ui): move check message to its own card

* refactor(ui): ensure builder cards fill width of overlay

* refactor(ui): make conditions boxes fill width of parent

* refactor(ui): allow check properties card to grow

* refactor(ui): remove matching rules card

* chore(ui): update changelog
2019-09-06 16:30:39 -07:00
Michael Desa c80eb929d0
Merge pull request #15027 from influxdata/limit-alerting
feat: limit monitoring and alerting
2019-09-06 19:16:53 -04:00
Deniz Kusefoglu a3e576f9d7
feat(ui): limit monitoring and alerting
Remove unused action

Co-Author: Deniz Kusefoglu <deniz@influxdata.com>

add Limits and LimitsStatus to cloud types

Add asset limits for checks, rules and endpoints

Filter blocked endpoint types

fix: type error

Co-Author:    Deniz Kusefoglu <deniz@influxdata.com>
2019-09-06 18:58:10 -04:00
Christopher Henn 73e467b671 fix(ui): change default every value for check to 1m
Closes #14942
2019-09-06 15:57:53 -07:00
Christopher Henn 151e1f94bc fix(ui): don't render thresholds outside of visible plot region
Closes #14965
2019-09-06 15:57:53 -07:00
Christopher Henn b63ca38c46 fix(ui): fix hidden endpoint and rule names in notification history
Closes #14995
2019-09-06 15:57:53 -07:00
Christopher Henn 14d059ac4d
fix(ui): upgrade giraffe to 0.16.3
Closes #15017
2019-09-06 15:38:02 -07:00
docmerlin (j. Emrys Landivar) c91ef8e398 fix(alerts and notifications): updates latest completed when status goes from inactive->active 2019-09-06 17:36:16 -05:00
Russ Savage 799838d327
fix(tagOps): remove options not implemented (#15031) 2019-09-06 15:10:02 -07:00
Christopher Henn ee2f2a6369
fix(ui): handle parsing Flux strings containing newlines
...in Flux CSVs.

Connect #15017
2019-09-06 14:49:53 -07:00
Chris Goller dbcdc8dc59
feat(notification/rule): add _version: 1 to HTTP body (#15028)
This adds the _version: 1 correctly to the body of the HTTP POST.

Additionally, this fixes the imports when using secrets.

The POSTed JSON body now is:

```json
{
  "_check_id": "046cac59e2aa3000",
  "_check_name": "High CPU User Usage",
  "_level": "crit",
  "_measurement": "notifications",
  "_message": "High CPU User Usage: rsavage.prod is crit",
  "_notification_endpoint_id": "046cad0c83aec000",
  "_notification_endpoint_name": "HTTP Endpoint",
  "_notification_rule_id": "046dff53d4183000",
  "_notification_rule_name": "HTTP Notification",
  "_source_measurement": "cpu",
  "_source_timestamp": 1567797375000000000,
  "_start": "2019-09-06T19:15:59Z",
  "_status_timestamp": 1567797376416632300,
  "_stop": "2019-09-06T19:16:20.362006739Z",
  "_time": "2019-09-06T19:16:20.609629338Z",
  "_type": "threshold",
  "_version": 1,
  "cpu": "cpu-total",
  "host": "rsavage.prod",
  "usage_user": 91.12278069517379
}
```
2019-09-06 16:21:27 -05:00
Michael Desa a1ffc5c8ab
Merge pull request #15026 from influxdata/fix/check-update
fix(ui/src/alerting/components/CheckCard): include entire check in update
2019-09-06 16:52:19 -04:00
kelwang c88284840b
Merge pull request #14962 from influxdata/fix_offset_must_be_smaller
fix(notification): offset must be smaller than every
2019-09-06 16:20:49 -04:00
Russ Savage f11dccd687
fix(http): remove template option (#15001) 2019-09-06 13:18:23 -07:00
Russ Savage 6513a8abfe
fix(check): increase max status message length (#15002)
* fix(check): increase max status message length

* fix(alertTemps): update template formatting
2019-09-06 13:17:40 -07:00
Michael Desa 82e4df5d6f
fix(ui/src/alerting/components/CheckCard): include entire check in update
Closes https://github.com/influxdata/influxdb/issues/15022

After we switched to using PUT in the API, we'll need to include the
entire check in our update request. Ideally we could just always use
PATCH, but due to a defect in the API we currently cannot.
2019-09-06 16:04:00 -04:00
Nathaniel Cook 83cb7fce3b build(flux): update to Flux v0.44.1 2019-09-06 11:37:32 -06:00
kelwang f08ec9ce5d
Merge pull request #15013 from influxdata/http_notification_endpoint
feat(notification/endpoint): add headers to http endpoint
2019-09-06 13:07:37 -04:00
Lyon Hill 2b75d20570
fix(task): Update task in scheduler to show updated logs. (#15008)
The current behavior is that the update is pushed into the scheduler,
and the scheduler cherry pick's what it needs. This leaves the task itself out
meaning any logging the scheduler did was not going to have the new task information in it.
2019-09-06 10:38:56 -06:00
Kelvin Wang d08122124f feat(notification/endpoint): add headers to http endpoint 2019-09-06 12:38:42 -04:00
Michael Desa 4c55419ada
Merge pull request #15011 from influxdata/fix/pivot-deadman-check
fix(notification/check): pivot table before sending to deadman call
2019-09-06 12:04:41 -04:00
Lyon Hill a17277f27a
fix(task): Dont update updatedAt on latestCompleted updates (#15009)
We need to only update the updated at time when we recieve a external request for
an update. LatestCompleted is an internal request from the scheduler.
2019-09-06 09:45:10 -06:00
Michael Desa 354746cb1b
fix(notification/check): pivot table before sending to deadman call
Discovered that the deadman table needs to be pivoted before the data
can be passed to deadman.
2019-09-06 11:40:17 -04:00
Lyon Hill 5d6bb3fced
fix(task): clean up offset when removed in script (#14961)
When the flux script removes a offset it should be removed from the task
2019-09-06 08:26:50 -06:00
Michael Desa 5e6e84aee5
Merge pull request #15005 from influxdata/fix/deadman-check
fix(notification/check): remove the aggregateWindow from the deadman query
2019-09-06 10:22:10 -04:00
Michael Desa 2ae2b06c57
fix(notification/check): remove the aggregateWindow from the deadman query
If the user specifies an aggregate window in the query they provide us,
we remove it so that we can property detect the deadman. This is not the
solution we will want long term, but should be sufficient for now.
2019-09-06 10:03:33 -04:00
Russ Savage 225f426e08
fix(slack): remove option for token in UI (#14998)
* fix(slack): remove option for token in UI

* fix(slack): fix linting

* fix(slack): updating tests

* fix(slack): updating go tests

* fix(slack): fixing js test
2019-09-05 22:28:35 -07:00
Chris Goller 8367d8d252
feat(notification/rule): add JSON body for the HTTP POST (#14994)
The body of the JSON webhook would be:
{
        "version": 1,
        "rule_name": notification._notification_rule_name,
        "rule_id": notification._notification_rule_id,
        "endpoint_name": notification._notification_endpoint_name,
        "endpoint_id": notification._notification_endpoint_id,
        "check_name": r._check_name,
        "check_id": r._check_id,
        "check_type": r._type,
        "source_measurement": r._source_measurement,
        "source_timestamp": r._source_timestamp,
        "level": r._level,
        "message": r._message,
}
2019-09-05 20:38:02 -05:00
alexpaxton 0a3d5804e0
fix(ui): alerting polish (#14982)
* fix(ui): allow creating of check from first time widget

* refactor(ui): polish layout of endpoint dropdown

* refactor(ui): provide default URLs in endpoint overlay form

Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com>

* refactor(ui): ensure edit endpoint can be canceled

Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com>

* refactor(ui): move endpoint error out of footer

Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com>

* refactor(ui): appease the linter

* fix(ui): use correct slack and http url defaults

* chore(ui): remove obsolete stylesheet

* fix(ui): remove GET and PUT options from http method dropdown

* fix(ui): capitalize form labels in endpoint form

* fix(ui): change default endpoint name to be type agnostic

* fix(ui): appease linter

* refactor(ui): shrink check message template field

* refactor(ui): reverse sort of threshold levels in check builder
2019-09-05 16:19:42 -07:00
alexpaxton 77a59538e6
refactor(ui): settings navigation (#14990)
* refactor(ui): move tokens tab to load data page and update navbar

* refactor(ui): prefix all settings page urls with "settings"

* refactor(ui): expose settings tabs in navbar as sub-items

* chore(ui): update changelog

* refactor(ui): fix URLs in e2e tests
2019-09-05 16:17:22 -07:00
Andrew Watkins e3f31a3109
Merge pull request #14992 from influxdata/fix/bucket-order
fix: move system buckets to end of list
2019-09-05 16:02:21 -07:00
Nathaniel Cook cd2d9cb031 build(flux): update to Flux v0.44.0 2019-09-05 16:51:33 -06:00
Andrew Watkins e616e0fee4
chore(alerting): add default message templates (#14988)
* chore(alerts): add message defaults to check and endpoint creation

* chore(alerts): time machine is two words :)
2019-09-05 15:50:34 -07:00
Andrew Watkins a344305456 fix: move system buckets to end of list 2019-09-05 15:47:04 -07:00