Giter VIP home page Giter VIP logo

ase-lab-2023's Introduction

ASE 2023: TSDB Lab


Prerequisites and dependencies

  • Ubuntu 18 or higher (For a different OS, please refer to the InfluxDB installation portal and install InfluxDB version 2.7.1).
  • Docker version 20.10 (or higher)
  • Clone this repository, you will need the data files.

Preparation

sudo apt-get update

Docker installation (skip if Docker is already installed)

sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
apt-cache policy docker-ce
sudo apt install docker-ce -y

InfluxDB Installation

Use the following command to download and run the InfluxDB v2.0 Docker image. Expose port 8086, which InfluxDB uses for client-server communication over the InfluxDB HTTP API.

sudo docker run --name influxdb -p 8086:8086 influxdb:2.7.1

Or if it is already installed:

sudo docker start influxdb

You should now be able to access the web interface by opening your web browser and navigating to http://localhost:8086/.

  • Create an account and organization, set up your first bucket, and save the provided API token.
  • Upload the dataset bitcoin-historical-annotated.csv into your bucket under sources (second option on the left) and select "upload a CSV".
  • Inspect the data with the Data Explorer (third option on the left) by selecting your bucket and the measurement 'coindesk', to see the data you need to select a custom time range starting from 2022-10-11 11:00:00.

Telegraf Installation

In a new terminal, Install Telegraf from the InfluxData repository with the following commands:

wget -q https://repos.influxdata.com/influxdata-archive_compat.key
echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list

sudo apt-get update && sudo apt-get install telegraf

Check your installation

telegraf version

CLI Setup

Install Influx CLI (for other OS follow this link):

wget -q https://repos.influxdata.com/influxdata-archive_compat.key
echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list

sudo apt-get update && sudo apt-get install influxdb2-cli

To avoid having to pass your InfluxDB API token with each influx command, set up a configuration profile to store your credentials–for example, enter the following code in your terminal:

# Set up a configuration profile
influx config create -n default \
  -u http://localhost:8086 \
  -o INFLUX_ORG \
  -t INFLUX_API_TOKEN \
  -a

Test the shell:

influx v1 shell
> use "your_bucket"
>
> select * from "coindesk";

Data Querying

Examples of data queries in Flux can be found on the following page:

https://docs.influxdata.com/influxdb/cloud/query-data/flux/

Dashboard templates:

InfluxDB Community Templates can be found here.

ase-lab-2023's People

Contributors

akheli avatar mkhayati avatar althausluca avatar

Stargazers

 avatar

Watchers

Roman Prokofyev avatar Philippe avatar Laura Rettig avatar Dingqi YANG avatar Alberto avatar Ruslan Mavlyutov avatar Zakhar Tymchenko avatar  avatar Artem V L avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.