{ "metadata": { "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.2-final" }, "orig_nbformat": 2, "kernelspec": { "name": "Python 3.8.2 64-bit ('stackoverflow': conda)", "display_name": "Python 3.8.2 64-bit ('stackoverflow': conda)", "metadata": { "interpreter": { "hash": "f3131ab0c53afd587e929ab5f3e0081bb3b1675889ab2c259292a9bd8773e05a" } } } }, "nbformat": 4, "nbformat_minor": 2, "cells": [ { "source": [ "# Starting off with InfluxDB" ], "cell_type": "markdown", "metadata": {} }, { "source": [ "InfluxDB is perhaps the most popular Time Series databases out there.\n", "\n", "It is maintained by [influxdata](https://www.influxdata.com) who also provide a whole hosted service with the database, metrics collection, dashboards, and scripting (flux)." ], "cell_type": "markdown", "metadata": {} }, { "source": [ "## Main operations\n", "\n", "The main operations we can do with influxDB on data:\n", "\n", "- Collect\n", "- Write\n", "- Process\n", "- Visualize\n", "- Monitor" ], "cell_type": "markdown", "metadata": {} }, { "source": [ "## Download\n", "\n", "https://portal.influxdata.com/downloads/\n", "\n", "- Select the latest version\n", "- Follow the instructions either for the docker file or for your OS.\n" ], "cell_type": "markdown", "metadata": {} }, { "source": [ "## Installation\n", "\n", "- Follow the [installation instructions](https://docs.influxdata.com/influxdb/v2.0/) for the open source version (OSS)\n", "- Run it with `influxd` from the terminal.\n", "- You can set up influxDB either by opening `http://localhost:8086` in your browser, or by running `influx setup` in the terminal." ], "cell_type": "markdown", "metadata": {} }, { "source": [ "There go through the setup instructions. If you want also set up the influx CLI." ], "cell_type": "markdown", "metadata": {} }, { "source": [ "## The line protocol\n", "\n", "You can write data into InfluxDB in a [line protocol format](https://docs.influxdata.com/influxdb/v2.0/reference/syntax/line-protocol/). Its specifications:\n", "\n", "- One line is one data point\n", "- Dimensions:\n", " - measurement\n", " - field set\n", " - tag set\n", " - timestamp\n", "\n", "\n", "A few example lines (from the official tutorial)\n", "```sh\n", "mem,host=host1 used_percent=23.43234543 1556892576842902000\n", "cpu,host=host1 usage_user=3.8234,usage_system=4.23874 1556892726597397000\n", "mem,host=host1 used_percent=21.83599203 1556892777007291000\n", "```" ], "cell_type": "markdown", "metadata": {} }, { "source": [ "## Scraping\n", "\n", "InfluxDB can scrape data in the [prometheus data format](https://prometheus.io/docs/instrumenting/exposition_formats/).\n", "\n" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ] }