Commit Graph

99 Commits (876238d68892b4a8988c1a709f63b6994f9e587f)

Author SHA1 Message Date
Ariel Salem ffddeb480b fix(zero_value_checks): checks can now have a value set to 0 (#17933) 2020-05-05 01:35:02 -05:00
jlapacik 7541af8414 chore: merge master into algow 2020-04-15 14:42:03 -07:00
Johnny Steenbergen c245f3233b chore(pkger): add stack state management for notification endpoints 2020-04-06 14:56:56 -07:00
Jonathan A. Sternberg d3fa60991f
Merge branch 'master' into chore/merge-master 2020-04-06 12:17:47 -05:00
Jonathan A. Sternberg 0ae8bebd75
refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
Jonathan A. Sternberg 469c5849c4
Merge branch 'master' into feat/use-algo-w 2020-04-03 09:30:04 -05:00
Johnny Steenbergen 21d2bf5dc6 chore(pkger): add stack state management for checks 2020-04-02 16:32:20 -07:00
Ariel Salem 4f65cda351
fix(ui): fixed threshold check bug that wouldn't allow threshold checks to be created where fields had spaces in them (#17391) 2020-03-23 19:17:52 -07:00
Ariel Salem d2a49b8052
fix(ui): fixed dashboard cells and check query builder update bug (#17202) 2020-03-11 14:35:39 -07:00
Jonathan A. Sternberg 0d6e4e310b
Merge branch 'master' into feat/use-algo-w 2020-03-06 16:46:49 -06:00
Jonathan A. Sternberg bcbb9df72e
refactor(task): tasks will now use the flux language service (#17104)
The tasks subsystem will now use the flux language service to parse and
evaluate flux instead of directly interacting with the parser or
runtime. This helps break the dependency on the libflux parser for the
base influxdb package.

This includes the task notification packages which were changed at the
same time.
2020-03-05 14:36:58 -06:00
Michael Desa be636f983d fix(notification/rule): import experimental package for pagerduty rule
🤦
2020-02-21 09:13:36 -08:00
Michael Desa c0bccf53dd fix(notification/rule): add alert level filtering to pagerduty rule
An accidental omission of status a level check resulted in all statuses
triggering notifications for pagerduty rules. This was not caught due
to insufficient testing of the pagerduty rule.
2020-02-20 13:37:03 -08:00
Zoe Steinkamp d8b7856c36 fix(tasks): validate check params new backend error message 2020-01-16 08:40:17 -07:00
Zoe Steinkamp f65a9e663a fix(tasks): validate check params new backend error message 2020-01-16 08:40:17 -07:00
Zoe Steinkamp a56fd9a808 fix(tasks): validate check params new backend error message
Fixing go test, added go test
2020-01-16 08:40:17 -07:00
Zoe Steinkamp 9a87917d01 fix(tasks): validate check params new backend error message 2020-01-16 08:40:17 -07:00
Johnny Steenbergen 77dd06bc5e fix: enable skipped tests for notification rules and fixup issue in tag matcher 2020-01-02 07:16:03 -08:00
Deniz Kusefoglu 219d73bf60
fix(notificationrules): Correct logic on matching notification rules (#16328)
* fix(notificationrules): Correct logic on matching notification rules

* feat(nrs): Add more tests
2019-12-31 23:44:27 +00:00
Deniz Kusefoglu fcc39e371f
feat(checks): Add custom check type (#16350)
* feat(checks): Add custom check type

* feat(checks): Remove alert builder from custom check

* feat(checks): Add AlertBuilderAction to list of possible actions

* feat(checks): Query visualization does not make sense for custom check

* feat(check): check editor should only reexecute queries if view query changes

* Update ui/src/timeMachine/components/TimeMachineFluxEditor.tsx

Co-Authored-By: Bucky Schwarz <hoorayimhelping@users.noreply.github.com>

* Address PR review

Co-authored-by: Bucky Schwarz <hoorayimhelping@users.noreply.github.com>
2019-12-31 20:21:48 +00:00
Johnny Steenbergen 300d89887d chore(kv): refactor notification endpoint to use reusable uniqByNameStore
this is work moving us towards more reusable components that add some
rigidity around handling indexes and the entity bucket. The behavior
is very common across much of the kv pkg. This can be reused throughout.
adding some easy wins for tracing(eventually metrics) that enable more
insight that what is currently possible. It normalizes these concerns
across the kv store.
2019-12-30 16:44:57 -08:00
Johnny Steenbergen 5569193116 fix: add custom marshaler to dashboard builder config to stop breaking all external api clients with nil vals 2019-12-26 14:53:14 -08:00
Johnny Steenbergen 61dceaa727 feat(pkger): add application functionality for the notification rules resource 2019-12-20 12:48:46 -08:00
Johnny Steenbergen a8a4d3d0b2 feat(pkger): add export functionality to checks resource 2019-12-18 17:52:28 -08:00
Johnny Steenbergen 677e836bf4 feat(pkger): add apply functionality for checks
this work is to support pkger, but was able to add back in the
skipped tests. seeing failures upstream, and didn't catch it in
influxdb b/c the tests were being skipped.

closes: #14799
2019-12-18 15:02:03 -08:00
Johnny Steenbergen 13ac83e0c4 chore: refactor bits of checks and its dependencies for readability 2019-12-18 11:07:19 -08:00
Johnny Steenbergen 38606c66e1 feat(endpoint): drop id specific check for secret keys in all endpoints
the original design made the secrets unable to be reused, a bit to opinionated
to be useful eleswhere. This relaxes that requirement so that secrets can be
referenced here.
2019-12-17 17:10:27 -08:00
Johnny Steenbergen 86a359f34b chore(http): refactor http layer to be able to encode/decode influxdb.ID's safely
noticed that I had not used the http server as the entry point for server tests.
This was work to make that happen. Along the way, found a bunch of issues I hadn't
seen before 🤦. There are a number of changes tucked away inside the
other types, that make it possible to encode/decode a type with zero value for
influxdb.ID.
2019-12-13 09:46:01 -08:00
Johnny Steenbergen 3daaa4d307 feat(pkger): add apply functionality for notification endpoints kind 2019-12-11 15:13:42 -08:00
Johnny Steenbergen ea67663ab7 fix(pkger): cleanup leftover bits from telegraf and label mapping misses
telegraf was not being mapped correctly for applying the label mapppings
and touched up a bunch of other issues that came up along the way.
2019-12-06 08:51:32 -08:00
Kelvin Wang 2837d4ec08 fix(predicate): add string parser 2019-10-18 12:02:53 -04:00
Kelvin Wang 62f4042853 feat(influxdb): add predicate package 2019-10-18 12:02:52 -04:00
kelwang 3f168b109d
Merge pull request #15117 from influxdata/clientURL_optional
fix(notification/endpoint): pagerduty clientURL should be optional
2019-10-15 13:11:50 -04:00
Michael Desa 58fbddc123
fix(notification/rule): ensure stateChanges rule has enough data in window
Closes https://github.com/influxdata/influxdb/issues/15154

Previously, we niavely incremented the unit associated with the leading
duration. Now, if the unit is `s` we double it. For every other unit, we
increase the magnitude by 1.

fix(notification/rule): change panic to t.Fatal

chore(notification/rule): add support for durations less than s
2019-09-24 12:48:10 -04:00
kelwang c3127c8cdd
Merge pull request #15179 from bednar/check-cron
fix(alerts): remove the cron option from checks/rules
2019-09-23 21:28:02 -04:00
Brandon Farmer d83fabeabc feat(influxdb): user disabling 2019-09-23 11:57:16 -07:00
Jakub Bednar 265bc7bf2a fix(alerts): remove the cron option from checks/rules 2019-09-23 10:20:22 +02:00
kelwang 63c5311494
Merge pull request #15111 from bednar/notification-endpoint
docs(http): update NotificationEndpoint swagger definition to reflect reality
2019-09-12 11:09:17 -04:00
Kelvin Wang aed8035472 fix(notification/endpoint): pagerduty clientURL should be optional 2019-09-11 15:26:50 -04:00
Michael Desa a1979ef615
fix(notification/rule): alert on all statuses if for any status rule
This PR special cases `any` level rules so that they will alert on all
conditions.
2019-09-11 15:19:00 -04:00
Jakub Bednar a8ad9e2615 docs(http): update NotificationEndpoint swagger definition to reflect reality 2019-09-11 11:53:44 +02:00
Michael Desa a23962fef8
Merge pull request #15079 from influxdata/fix/pagerduty-client-url
fix(pagerduty/rule): change url to clientURL for pagerduty endpoint/rule
2019-09-09 19:27:29 -04:00
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
Kelvin Wang 0ec2db0785 fix(notification/endpoint): http bearer token 2019-09-09 16:20:23 -04:00
Kelvin Wang 99ec1c45af fix(notification/check): range outside logic 2019-09-09 15:11:08 -04: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 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
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
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
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