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.
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.
* 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>
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.
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
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.
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.
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
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.
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>
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
}
```