Influxdb and Python agent

Section:

Influxdb

Python

Functions Influxdb

Github

linux-and-azure/azure-extra-linux-vm/influxdb-telegraf at main · spawnmarvel/linux-and-azure · GitHub

Influxdb

InfluxDB OSS v2 Documentation (influxdata.com)

After install

http://localhost:8086

OSS, open source software. (telegraf is part of the stack)

Install InfluxDB | InfluxDB OSS v2 Documentation (influxdata.com)

Choose linux and systemd

# check amd or aem
dpkg --print-architecture

# Ubuntu/Debian AMD64
curl -LO https://download.influxdata.com/influxdb/releases/influxdb2_2.7.8-1_amd64.deb
sudo dpkg -i influxdb2_2.7.8-1_amd64.deb

# start the influx db server
sudo service influxdb start

# verify services
sudo service influxdb status

Start it and check status

If successful, you can view the InfluxDB UI at http://localhost:8086.

Setup user

Great

Token, API token, this token enables superuser priviliges like creating users, orgs, etc, You want be able to see it again.

Restart server and verify start with boot, jepp all good.

Login

Python agent

Send some test data with python.

Go to influxdb frontend

We use the same python code as for docker.

Generate a token for the bucket

Send data.

View it in influxdb

Format

  • A Measurement (limit 1 million i think): Tag-BRG
  • Tag (meta not change much): location
  • Field (change much): temperature
  • time: use utc as default, then app can use timezone

Example

Example

Youtube (se github)

Result

There are many templates to view data

Functions Influxdb

Telegraf

Is covered in a separate post

Scroll to Top