Git Product home page Git Product logo

sensoric's Introduction

Sensoric

Collects system and sensor data which is then submitted to a time series database such as InfluxDB, and victoria-metrics.

Requirements

  • python3-influxdb
  • python3-psutil

Supported modules

  • cpu_sensor:
  • fritzbox_sensor: network traffic (bytes sent, bytes received)
  • memory_sensor: memory consumption
  • weather_sensor: provide temperature and humidity for the provided locations

Environment variables

Required

  • SENSORIC_DB_HOST: IP address of the influxdb / victoria metrics host
  • SENSORIC_DB_PORT: port of the influxdb / victoria metrics host
  • SENSORIC_DB_NAME: name of the time series database
  • SENSORIC_BATCH_SIZE: number of batches to collect before sending them to the time series database

Disk sensor

  • SENSORIC_DISKS: space separated list of partitions to watch for disk usage

Fritzbox sensor

  • SENSORIC_FRITZ_HOST: IP address of the Fritz!Box
  • SENSORIC_FRITZ_PORT: port of the Fritz!Box

Weather sensor

  • SENSORIC_WEATHER: a space sparated list of locations. Spaces within location names need to be replaced with %20 (e.g., Domat Ems > Domat%20Ems)

Usage:

Call sensoric-daemon.py with the list of sensors to use as outlined below.

export SENSORIC_DB_HOST=192.168.0.120
export SENSORIC_DB_PORT=8999
export SENSORIC_DB_NAME=sensoric
export SENSORIC_FRITZ_HOST=192.168.0.200
python3 sensoric-daemon.py cpu_sensor memory_sensor network_sensor disk_sensor fritzbox_sensor

systemd

You can also start sensoric-daemon from systemd:

Unit]
Description=Sensoric daemon service

[Service]
Type=simple
WorkingDirectory=/srv/sensors
Environment=SENSORIC_DB_HOST=192.168.0.120 SENSORIC_DB_PORT=8999 SENSORIC_DB_NAME=sensoric SENSORIC_BATCH_SIZE=1 SENSORIC_DISKS="sda mmcblk1" SENSORIC_FRITZ_HOST=192.168.0.200 SENSORIC_FRITZ_PORT=49000
ExecStart=/srv/sensors/sensoric-daemon.py cpu_sensor memory_sensor network_sensor disk_sensor power_consumption_sensor
Restart=always
User=sensors

[Install]
WantedBy=multi-user.target
Alias=sensor.service

sensoric's People

Contributors

albertweichselbraun avatar

Stargazers

 avatar Nikolaus Schlemm avatar

Watchers

 avatar Philipp Kuntschik avatar Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.