Documentation

Create a notebook

To learn how notebooks can be useful and to see an overview of different cell types available in notebooks, see Overview of Notebooks.

  1. In the navigation menu on the left, click Notebooks.

  2. Click +Create Notebook, and then enter a name for your notebook in the Name this notebook field. By default, the notebook name appears as <username>-notebook-<year>-<month>-<day and time>.

  3. Do the following at the top of the page:

    • Select your local time zone or UTC.
    • Choose a time range for your data.
  4. Consider which notebook cells to add to your notebook. You need to have one input cell for other cells to run properly. By default, each notebook includes Metric Selector, Data Validation, and Visualization cells.

  5. Select your bucket in Metric Selector and then select the filters to narrow your data.

  6. Do one of the following:

    • To view results in your cells (for example, Data Validation and Visualization) without writing data, click Preview (or press CTRL + Enter).
    • To view the results of each cell and write the results to the specified output bucket, click Run.
  7. (Optional) Change your visualization settings with the dropdown menus and gear icon at the top of the Visualization cell.

  8. (Optional) Click the + icon, and then add one or more of the following cell types to your notebook:

    • Input: to pull information into your notebook
    • Transform: to filter and apply changes to your data
    • Pass-through: to visualize and add notes to your data
    • Output: to write data to a bucket, preview output before writing, or schedule an output task
  9. (Optional) Convert a cell into raw Flux script to view and edit the code.

Add an input cell

  1. Select Metric Builder or Query Builder as your input, and then select the bucket to pull data from.
  2. Select filters to narrow your data.
  3. Select Preview (CTRL + Enter) or Run in the upper left dropdown menu.

Add a transform cell

  1. Select one of the following transform cell-types:
    • Flux Script: Use __PREVIOUS_RESULT__ to build from data in the previous cell, enter a Flux script to transform your data.
    • Downsample: Window data by time and apply an aggregate to each window to downsample data. For more information, see Downsample data with notebooks.
  2. Select Preview (CTRL + Enter) or Run in the upper left dropdown menu.

If your cell contains a custom script that uses any output function to write data to InfluxDB (for example: the to() function) or send it to a third party service, clicking Preview will write data.

Add a pass-through cell

Select one of the following pass-through cell-types:

Column Editor

  • Click the toggle to hide or view your column.
  • Rename your columns by hovering over the column name and pressing the pencil icon.

Visualization

  • To change your visualization type, click the second dropdown menu at the top of the cell.
  • (For histogram only) To specify values, click Select.
  • To configure the visualization, click Configure.
  • To download results as an annotated CSV file, click the CSV button.
  • To export to the dashboard, click Export to Dashboard.

Markdown

  • Type in notes as needed.

Add an output cell

Select one of the following output cell-types:

  • To recieve a notification, select Alert and complete the steps below.
  • To write output to a bucket, select Output to Bucket and complete the steps below.
  • To create a task, select Schedule and complete the steps below.

Alert

  1. Enter a time range to automatically check the data and enter your query offset.
  2. Customize the conditions to send an alert.
  3. Select an endpoint to receive an alert:
    • Slack and a Slack Channel
    • HTTP post
    • Pager Duty
  4. (Optional) Personalize your message. By default, the message is “${strings.title(v: r._type)} for ${r._source_measurement} triggered at ${time(v: r._source_timestamp)}!”
  5. Click Export as Task to create your alarm.

Output to bucket

  1. Select a bucket.
  2. Click Preview to see what would be written to the bucket without commiting, or click Run in the upper left to write, or select Export as Task to schedule your output as a task.

Schedule

  1. Enter a time and an offset to schedule the task.
  2. Click Export as Task to save.

View and edit Flux script in a cell

Convert your notebook cells into raw Flux script to view and edit the code. Conversion to Flux is available for the following cell types:

  • Inputs: Metric Selector
  • Transform: Column Editor and Downsample
  1. Click the overflow menu icon in the cell you want to view as Flux, and then select Convert to |> Flux. You won’t be able to undo this step. A Flux cell appears with underlying script for the selected cell.
  2. View and edit the Flux script as needed.

Select your region

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.