DynamicDevices / ming-original

Balena.io/Docker-compose repo for a containerised #MING (Mosquitto, InfluxDB, NodeRed, Grafana) stack
33 stars 20 forks source link

Needs to have a database in the influxdb at the start #1

Closed goatchurchprime closed 4 years ago

goatchurchprime commented 5 years ago

Needed to run this on my local PC connected to the access point.

from influxdb import InfluxDBClient
client = InfluxDBClient("mqttroam.local", 8086, "root", "bubblino", None)
print(client.get_list_database())
client.create_database("balena-sense")
print(client.get_list_database())
goatchurchprime commented 5 years ago

Also would need to document the prefered:

Username/password for the Grafana login Username/password for the InfluxDB database Username/password for the Nodered flow control

Username/password for the SSH of the device

These are all easy to get confused between, esp the Grafana and InfluxDB which almost seem like the same thing.

ajlennon commented 5 years ago

OK - seems like this could be run in the grafana container build process ?

ajlennon commented 4 years ago

You can use the InfluxDB API to do what you need, including creating databases e.g.

curl 'http://e844144.local:8086/query' --data-urlencode "q=CREATE DATABASE mydb"