添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
谦逊的书包  ·  Nginx 配置不缓存html ...·  2 年前    · 
俊秀的冲锋衣  ·  关于 'npm audit fix ...·  2 年前    · 

Hello

i am using OH3.1 within a docker container on my mac mini.
I want to log some KNX values and used grafana in the past.
Now i want to implement that in docker as well but i fail to do so.

I got influxdb as well as grafana installed and can access both in the browser.
In order to add a InfluxDB data source i need to install telegraf but i fail to do so.

Does anysone use Docker + Influx + Grafana and can help me set up my .yml?

Thank you!

Here’s what i have right now:

version: '2.2' services: influxdb: image: influxdb:latest container_name: influxdb ports: - 8086:8086 volumes: - ./influxdb:/var/lib/influxdb restart: always grafana: image: grafana/grafana container_name: grafana ports: - 3000:3000 links: - influxdb volumes: - ./grafana:/var/lib/grafana restart: always telegraf: image: telegraf:latest container_name: telegraf links: - influxdb volumes: - ./telegraf:/etc/telegraf/telegraf.conf:ro

i did not configure anything in the telegraf.conf (i don’t know how and what) - the docker dashboard says the telegraf container is created but its color is red.

Jonas88:

In order to add a InfluxDB data source i need to install telegraf but i fail to do so.

If you’re trying to graph KNX data gathered by OpenHAB and written to InfluxDB I can’t think why you’d need Telegraf. You should be able to add an InfluxDB datasource to straight into Grafana

Store your openHAB item states in an InfluxDB time-series datastore and create highly customizable diagrams with Grafana . These diagrams can in return be included in your sitemap as images. [image] Following this guide, you will install InfluxDB and Grafana, make openHAB store data in an InfluxDB database, make Grafana fetch data from the InfluxDB database and draw diagrams. Finally you can include these diagrams in your openHAB sitemap. Table of Content Starting Point InfluxDB Installation …

a DB is created there for openhab to write the data to and i thought i would have to do this manually in the influx ui?! maybe i can do it directly via docker though …

if i try to do it manually it tells me that i need telegraf … maybe that’s a thing in new influxdb versions …

I think the influx web UI is deprecated and unmaintained. I’ve never used it. You don’t need telegraf to create a database in influx though, for sure. I’d use the Influx commandline interface.

You can get a shell in your influx container

docker exec -it influxdb /bin/bash

Then use the commandline client to create a database

root@9d49bf5f5217:/# influx
Connected to http://localhost:8086 version 1.8.3
InfluxDB shell version: 1.8.3
> create database foo
              

thank you

if i type influx in the cli i get this output:

apply       Apply a template to manage resources
  auth        Authorization management commands
  backup      Backup database
  bucket      Bucket management commands
  completion  Generates completion scripts
  config      Config management commands
  dashboards  List Dashboard(s).
  delete      Delete points from influxDB
  export      Export existing resources as a template
  help        Help about any command
  org         Organization management commands
  ping        Check the InfluxDB /health endpoint
  query       Execute a Flux query
  restore     Restores a backup directory to InfluxDB.
  secret      Secret management commands
  setup       Setup instance with initial user, org, bucket
  stacks      List stack(s) and associated templates. Subcommands manage stacks.
  task        Task management commands
  telegrafs   List Telegraf configuration(s). Subcommands manage Telegraf configurations.
  template    Summarize the provided template
  transpile   Transpile an InfluxQL query to Flux source code
  user        User management commands
  v1          InfluxDB v1 management commands
  version     Print the influx CLI version
  write       Write points to InfluxDB

create is not an option

That looks to be InfluxDB 2, which I haven’t used. It looks to be very different to 1.x

This seems to be what you need. What was a database is now a bucket.

Then this for Grafana, in case helpful

Hello

i did manage to get influxdb and grafana running in my docker.
i also managed to install the influxdb add on and i think i configured it correctly vor v2.

do i even need telegraf? i quite don’t understand what that does. Or does openhab push data directly into the bucket?

Jonas88:

do i even need telegraf? i quite don’t understand what that does. Or does openhab push data directly into the bucket?

Just for clarity, Telegraf is an agent that gathers information about computers and software running on those servers and pushes the data to InfluxDB. Using InfluxDB + Telegraf + Grafana is one way to set up and configure monitoring of your IT assets. There are many other options including Prometheus, Zabbix, ELK stack, etc.