influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
29.07k stars 3.56k forks source link

Generic Event Markers populated by Influx queries #15575

Open mkarlesky opened 5 years ago

mkarlesky commented 5 years ago

(I believe @ebb-tide may want to be aware of this submission specifically; hence, tagging her. By the way, thank you again, @ebb-tide, for your work on the CSV export functionality in Chronograf from way back. That was clutch for us.)

Background: Originally, I submitted the core of this feature request as Issue #5165, an enhancement to Chronograf's Annotation feature. My request got some love from others and was on the development roadmap for a short while. I assume that with the shift to Influx v2 it fell to the wayside. Most recently it was closed as stale.

I've heard from an insider the rough outline of the Event Marker feature in the Influx v2 roadmap. As I understand it, the first version to be rolled out will be tied specifically to Alerting & Monitoring, displaying notification events overlaid on data plots. Subsequently, Event Markers are intended to be made more generic and available throughout dashboards and data exploration.

I was encouraged to write up a feature request for sake of providing example use cases and providing some input on how the future generic Event Markers might operate.

Proposal: Event Marker overlays throughout the InfluxDB v2 interface (e.g. Dashboards & Data Explorer) populated by Influx query results able to display both singular events and events with a time range. Event Markers would be centrally configured and available to be selectively enabled in the various views throughout the interface.

Manually entered events (akin to Chronograf's Annotation feature) would also be supported. However, it would probably make the best sense if manual annotations were stored in an Influx bucket and then queried for display using the same mechanisms needed to support the generic ability discussed here.

Notes on events:

Current behavior: To my knowledge Event Markers are in some form of development but only in relation to Alerting & Monitoring at present.

Desired behavior: In essence, my proposal is essentially Grafana's query-based Annotations plus the following. The first two in this list are enhancements to Grafana's existing abilities. The last item in this list is an all new feature.

  1. Not only single event markers but also event time ranges (see Proposal above) both populated by query results.
  2. The ability to create centrally managed Event Marker queries whose results are available for overlay anywhere within Dashboards and the Data Explorer interface.
    1. In Dashboards these would be selectable (toggle on / toggle off) for an entire dashboard but also per individual plot (dashboard cell).
    2. In the Data Explorer interface not only would the user be able to enable preconfigured Event Marker overlays, they would also be able to author ad hoc Event Marker queries for overlay on the existing query submission / display interface.
  3. Event Marker overlays on tabular data views. Some query results are not suitable for graphing, but understanding events in relation to query results is still desirable.

Alternatives considered: At present we can use Grafana for query-filled “Annotations” in dashboards, albeit only for singular events and not time ranges. With some custom work Power BI can be coerced into displaying rudimentary event markers / annotations in dashboards and reports. Otherwise, we have not found a good way to present discrete events or event time ranges in a user-driven data explorer interface for InfluxDB time-series data. Chronograf was previously our best hope for this had my requested enhancement to Annotations come to pass.

Use case: Our time-series data largely falls in three categories:

  1. Sensor readings (environmental monitoring)
  2. Equipment operation (on/off, cycle times, state transitions)
  3. Production line events — e.g. Batch XYZ entered/exited a production stage

All of the above are interrelated and also influenced by other events — maintenance, system changes, etc. We want to begin tracking external events also as time-series data (a fourth category that does not yet exist for us) so we can visually correlate cause and effect across our systems.

Examples:

Being able to visualize our events in relation to plotted data such as above would help us:

ebb-tide commented 5 years ago

@mkarlesky thank you so much for this thoughtful writeup. I was just working on some polish on event markers (as part of the monitoring feature) today, so your timing is great for us to consider ways to generalize the implementation. Thanks so much for sharing your perspective. I'll be referencing this issue as I move forward.

mkarlesky commented 5 years ago

@ebb-tide Thanks for the quick reply and so nice to hear from you. I realize there's a lot in my feature request. I'm happy to clarify or provide further input in the future if it's desired.

We've come to learn that correlating events to time-series data is incredibly valuable. InfluxDB is nearly perfect for supporting this sort of insight.

Thank you again.

mkarlesky commented 4 years ago

Woohoo! Thank you, @russorat.

russorat commented 4 years ago

@mkarlesky sure thing. sorry about the bot, it has been removed.

We have this on our roadmap but we might not get to it for a while. We will keep this issue updated with status.

afausti commented 4 years ago

@mkarlesky @russorat I'm happy to see this proposal, having event marker overlays populated by Influx queries would help some of the use cases I described in #16954, thank you.

mkarlesky commented 4 years ago

@afausti Thank you for your contributions on this product direction!

The story on my side is that I originally contributed feature requests in relation to Annotations in Chronograf (https://github.com/influxdata/chronograf/issues/5165); eventually these requests became irrelevant as InfluxDB 2 development came to the fore. I was involved in the InfluxCloud 2 beta and saw the early versions of Event Markers in relation to the Alerts and Notifications features. Having seen those designs I wanted to bring my original Chronograf feature requests for Annotations forward to the InfluxDB 2 product and was encouraged to do so by internal InfuxData people. I did so but then my requests here from last October were closed by stalebot. Thankfully, @russorat revived my issue a little over a month ago.

Your needs and feature requests as described in https://github.com/influxdata/influxdb/issues/16954 aligns quite well with our own in spirit. We talk about things a bit differently, but I think these our two Github issues are quite a bit in alignment.