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
- Use data source cells
- Use visualization cells
- Add a data source cell
- Add a validation cell
- Add a visualization cell
Create a notebook from a preset
To create a new notebook, do the following:
In the navigation menu on the left, click Notebooks.
In the Notebooks page, select one of the following options under Create a Notebook:
- New Notebook: includes a query builder cell, a validation cell, and a visualization cell.
- Set an Alert: includes a query builder cell, a validation cell, a visualization cell, and an alert builder cell.
- Schedule a Task: includes a Flux Script editor cell, a validation cell, and a task schedule cell.
- Write a Flux Script: includes a Flux script editor cell, and a validation cell.
Enter a name for your notebook in the Untitled Notebook field.
Do the following at the top of the page:
- Select your local time zone or UTC.
- Choose a time range for your data.
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.
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.
(Optional) Change your visualization settings with the drop-down menu and the Configure button at the top of the Visualize the Result cell.
(Optional) Toggle the Presentation switch to display visualization cells and hide all other cells.
(Optional) Configure notebook actions (Alert or Task).
(Optional) To run your notebook actions, select and click Run under the notebook title.
(Optional) To add a new cell, follow the steps for one of the cell types:
(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.
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.
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:
- Click .
- Select Flux Script or Query Builder as your input, and then select or enter the bucket to pull data from.
- Select filters to narrow your data.
- Select 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:
- Click .
- 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:
Click .
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 or process data with a task .
Add an Alert cell
To add an alert to your notebook, do the following:
- Enter a time range to automatically check the data and enter your query offset.
- Customize the conditions to send an alert.
- Select an endpoint to receive an alert:
- Slack and a Slack Channel
- HTTP post
- PagerDuty
- (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)}!
- Click Test Alert to send a test message to your configured Endpoint. The test will not schedule the new alert.
- Click Export Alert Task to create your alert.
Add a Task cell
To add a task to your notebook, do the following:
- Click .
- Click Task.
- Enter a time and an offset to schedule the task.
- Click Export as Task to save.
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.