Documentation

Create a notebook

Create a notebook to explore, visualize, and process your data. Learn how to add and configure cells to customize your notebook. To learn the benefits and concepts of notebooks, see Overview of Notebooks.

Create a notebook from a preset

To create a new notebook, do the following:

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

  2. In the Notebooks page, select one of the following options under Create a Notebook:

  3. Enter a name for your notebook in the Untitled Notebook field.

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

    • Select your local time zone or UTC.
    • Choose a time range for your data.
  5. Your notebook should have a Data Source cell as the first cell. Data Source cells provide data to subsequent cells. The presets (listed in step 2) include either a Query Builder or a Flux Script as the first cell.

  6. To define your data source query, do one of the following:

    • If your notebook uses a Query Builder cell, select your bucket and any additional filters for your query.
    • If your notebook uses a Flux Script cell, enter or paste a Flux script.
  7. Select and click Preview (or press CTRL + Enter) under the notebook title. InfluxDB displays query results in Validate the Data and Visualize the Result without writing data or running actions.

  8. (Optional) Change your visualization settings with the drop-down menu and the Configure button at the top of the Visualize the Result cell.

  9. (Optional) Toggle the Presentation switch to display visualization cells and hide all other cells.

  10. (Optional) Configure notebook actions (Alert, Task, or Output to Bucket).

  11. (Optional) To run your notebook actions, select and click Run under the notebook title.

  12. (Optional) To add a new cell, follow the steps for one of the cell types:

  13. (Optional) Convert a query builder cell into raw Flux script to view and edit the code.

Use Data Source cells

Convert a Query Builder to Flux

To edit the raw Flux script of a Query Builder cell, convert the cell to Flux.

You can’t convert a Flux Script editor cell to a Query Builder cell. Once you convert a Query Builder cell to a Flux Script editor cell, you can’t convert it back.

  1. Click the icon in the Query Builder cell you want to edit as Flux, and then select Convert to |> Flux. You won’t be able to undo this step.

    A Flux Script editor cell containing the raw Flux script replaces the Query Builder cell.

  2. View and edit the Flux script as needed.

Use visualization cells

  • To change your visualization type, select a new type from the drop-down list 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.

Add a data source cell

Add a data source cell to pull information into your notebook.

To add a data source cell, do the following:

  1. Click .
  2. Select Flux Script or Query Builder as your input, and then select or enter the bucket to pull data from.
  3. Select filters to narrow your data.
  4. Select Preview (CTRL + Enter) or Run in the upper left drop-down list.

Add a validation cell

A validation cell uses the Table visualization type to display query results from a data source cell.

To add a Table visualization cell, do the following:

  1. Click .
  2. Under Visualization, click Table.

Add a visualization cell

Add a visualization cell to render query results as a Visualization type.

To add a Table visualization cell, do the following:

  1. Click .

  2. Under Visualization, select one of the following visualization cell-types:

    • Table: Display data in tabular format.
    • Graph: Visualize data using InfluxDB visualizations.
    • Note: Use Markdown to add notes or other information to your notebook.

To modify a visualization cell, see use visualization cells. For detail on available visualization types and how to use them, see Visualization types.

Add an action cell

Add an action cell to create an alert , process data with a task , or output data to a bucket.

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

Add an Alert cell

To add an alert to your notebook, do the following:

  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
    • PagerDuty
  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 Test Alert to send a test message to your configured Endpoint. The test will not schedule the new alert.
  6. Click Export Alert Task to create your alert.

Add an Output to Bucket cell

To write Data Source results to a bucket, do the following:

  1. Click .
  2. Click Output to Bucket.
  3. In the Choose a bucket drop-down list, select or create a bucket.
  4. Click Preview to view the query result in validation cells.
  5. Select and click Run in the upper left to write the query result to the bucket.

Add a Task cell

To add a task to your notebook, do the following:

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

Set your InfluxDB URL

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.