1. Configure Firewall Rules in Google Cloud
• Go to VPC Network from Google Cloud Console
• Then Go to Firewall and Click Create New Firewall Rule
• And allow TCP Ports 1883, 1880, and 3000.
2. Configure Flow in Node-Red
• Login to Node-Red UI using External IP of your VM Instance.
Go to: http://externalIP:1880/
• Create a Flow in Node-Red as shown below.
• Node Descriptions:
1. MQTT Subscribe Node: MQTT IN 2. WritetoInfluxDB: Influxdb out 3. Msg payload: debug
3. Grafana – InfluxDB Integration
• Login to Grafana using External IP of your VM Instance.
Go to: http://externalIP:3000/
• Configure new admin user password.
• Go to Configuration → Data sources → Add data source
• Select Influxdb
• Perform below steps.
o URL: localhost
o Select Auth → Basic Auth
o Give user ID and password configured while configuring Influxdb
o Enter Database name
o Hit Save and Test
o You will get Connection Success message if everything is correct.
• Go to Create → Dashboard
• Add a Gauge to display the value
• Configure the gauge as shown below: