Devops tools to monitor polytunnel



Devops tools to monitor polytunnel

0 0


devops-to-monitor-polytunnel


On Github oroce / devops-to-monitor-polytunnel

Devops tools to monitor polytunnel

Devops tools to monitor polytunnel

Robert Oroszigithub.com/oroce@oroce

Who am i

  • currently doing node and devops
  • previously done frontend too
  • ...worked on a dental practice management software and fall in love with hardware

  • had to integrate those x-ray software, we could write some own software for controlling those x-rays

Used perl, c#

...back to polytunnel

polytunnel part

  • growing cucumber
  • in polytunnel
  • about 1000 square meter (m2)
  • with heating option

Cucumber

devops part

  • monitoring CPU temperature
  • getting alerted by unusual metrics (something is down, temperature is too high etc)
  • historical and realtime visualization
  • (also you develop stuff and deploy as well)

how what about to

  • monitor temperature in polytunnel
  • getting alerted if temperature drops below 10 degrees
  • making decision making process better by historical and realtime visualization

how to get started

software part is easy, what about the hardware

  • measure temperature
  • measure humidity
  • send data to a remote server

Raspberry pi

what about the sensor?

my first thought was arduino, but

  • you have to buy the temperature, humidity sensor separately
  • you have to write code to make it work
  • need to find out how to transfer data from arduino to Raspberry pi

Sensortag

Sensortag

  • multiple sensors (humidity, temperature, pressure, gyroscope, accelerometer, magnetometer)
  • uses Bluetooth 4
  • it works out of the box

Current architecture

Current architecture

Raspberry PI reads sensor data RPI sends data to a remote server Server stores in db

The remote side

The remote side

  • influxdb
  • grafana
  • Riemannactually it's not riemann but the node.js port: godot

Influxdb: distributed time series database written in go, like graphite but newer

Grafana: metrics dashboard, it's a frontend for influxdb, graphite

Riemann: event aggregator, stream processing

The future

The future

  • better battery life (currently ~2 weeks)
  • multiple sensors
  • move away from wifi, use cable
  • alerting

Future architecture

Alerting

  • humidity is too high:
    IF humidity > 90 for 2 hours THEN notify
    						
  • heating is broken:
    IF external_temperature < 10 AND temperature < 15 for 30 minutes THEN notify
    						

humidity is more than 90 percent

if temperature is less than 10 or 15 degrees

Alerting

  • plug into pagerduty
  • detect low battery level
  • detect broken sensor
  • detect internet connection problems

Pagerduty: incident management tool,it can send you push notification, sms or even call alarms.

Final thoughts

Open source is amazing, you can build anything you want. I've used open source softwares to build this. What I had to is just put together the lego bricks

Thank you people for making these awesome open source stuffs. YOU ARE AWESOME

Of course this is open source as well: https://github.com/oroce/sensortag-with-godot

Questions?