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?
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.
I’m not familiar with telegraf. But it looks like you try to map a directory ./telegraf to a file /etc/telegraf/telegraf.conf. Or is telegraf a file without extension?
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
oh wow. i totally didn’t see that even after checking twice …
@zygotic:
that’s what i thought as well but i cannot create a standard influxdb datasource in the influxdb UI. it’s listet under telegraf plugins (see screenshots).
in the past i followed this guide and got it working:
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
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
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?
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.