User Tools

Site Tools


user:jan001:nig_first_steps

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
user:jan001:nig_first_steps [2020/06/26 16:19] jan001user:jan001:nig_first_steps [2020/06/29 11:00] jan001
Line 42: Line 42:
     * Password: db     * Password: db
     * do **not** enable SSL     * do **not** enable SSL
-    * Name: make up something nice+    * Name: makeup something nice
   - Click on save. The database is now saved in node-red and you can use it on every influxdb-node you want to. If you want to, you can delete the node we just created.   - Click on save. The database is now saved in node-red and you can use it on every influxdb-node you want to. If you want to, you can delete the node we just created.
 +<WRAP center round important 60%>
 +The influxdb is only accessible by nodered and grafana. Don't mind the weak password and username.
 +</WRAP>
  
 === Connect grafana with influxdb === === Connect grafana with influxdb ===
 +  - Open the grafana URL provided in the email and log in with the provided username and password. You will have to change your password on the first login. 
 +  - We just need to add the influxdb as a data source. Find the gear icon on the left side and while hovering over it select "Data Sources"
 +  - Click "Add Data Source". In the first part under "Time series databases" you will then find "influxDB". Select it. 
 +  - You will just have to change a few things. Copy all the values provided here: 
 +    * HTTP 
 +      * URL: influxdb:8086 
 +    * InfluxDB Details 
 +      * Database: db 
 +      * User: db 
 +      * Password: db 
 +    * All other values can be left as default 
 +  - Click "Save & Test". You will see a message "Data source is working". You successfully added the influxdb.
  
 ==== Sample project ==== ==== Sample project ====
  
 +For the sample project, we will just let nodered put some values into the influxdb and read them afterward inside of grafana. Make sure you have done the steps under "Connecting all Services with influxdb"!
 +  - Node-RED Part:
 +    - Open up your nodered
 +    - Drag an "inject"-node into your flow.
 +    - Edit it with a double-click. As a payload, we just want a number. Type in a number you want. The topic is a value that we will be sent with the value you have chosen. The nodes communicate under each other with message objects as JSON-Objects. The payload is the raw data you want to work with. The topic is just another value inside this JSON-Object. My topic is just named "testing". We also want that the value gets injected like every 5 seconds. Just for testing of course. The name property you also see is the name you can see inside the flow. 
 +    - Now we only need a node that sends the value to the influxdb. Drag and drop the "influxdb out"-Node into your flow. Choose your influxdb-server and name the measurement also testing. Under this name, you will later find it inside of the database. Click on Done and connect the two nodes with each other. This is your first flow.
 +    - The last click on deploy in the top right corner and the node-red server is already injecting something into your database.
  
  
  
  
user/jan001/nig_first_steps.txt · Last modified: 2021/08/24 17:35 by 127.0.0.1