Git Product home page Git Product logo

edeckers / huemon Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 3.0 605 KB

Zabbix template with LLD support for Philips Hue network

Home Page: https://branie.it/blog/huemon-connect-philips-hue-to-zabbix-stats-alarms-and-triggers

License: Mozilla Public License 2.0

Python 86.45% Makefile 1.28% Shell 10.59% Dockerfile 1.68%
zigbee hue hue-lights hue-bridge hue-api zabbix zabbix-templates python monitoring philips-hue homeassistant metrics history home-assistant discovery lld

huemon's Introduction

Huemon

License: MPL 2.0 Build PyPI security: bandit

Zabbix monitoring with low-level discovery for Philips Hue networks.

Dashboard: sensors

Requirements

  • Zabbix server 5.0+
  • Zabbix agent 5.0+
  • Python 3.8+ on Zabbix agent machine

Installation

pip3 install huemon

Configuration

  1. Copy config.example.yml from src/huemon to /path/to/config.yml
  2. Make necessary changes
  3. Provide the path through environment variable HUEMON_CONFIG_PATH

Plugins

Create a command or discovery plugin by implementing HueCommand or Discovery respectively and copy the file to the configured path in plugins.commands.path or plugins.discoveries.path of the configuration file.

Zabbix agent configuration

# file:/path/to/zabbix/agent/conf.d/hue.conf

UserParameter=hue.discovery[*],HUEMON_CONFIG_PATH=/path/to/config.yml python3 -m huemon discover $1
UserParameter=hue.value[*],HUEMON_CONFIG_PATH=/path/to/config.yml python3 -m huemon $1 $2 $3

Or Docker

# file:/path/to/zabbix/agent/conf.d/hue.conf

UserParameter=hue.discovery[*],docker-compose run huemon discover $1
UserParameter=hue.value[*],docker-compose run huemon $1 $2 $3

Or agent mode

# file:/path/to/zabbix/agent/conf.d/hue.conf

UserParameter=hue.discovery[*],curl http://127.0.0.1:8000/discover?q=$1
UserParameter=hue.value[*],curl http://127.0.0.1:8000/$1?q=$2\&q=$3

Configure Systemd service

An installer that configures Huemon as a Systemd service is included in this repository. It uses /etc/huemon/config.yml as the configuration path.

assets/service-installer.sh install

Usage

Shell

HUEMON_CONFIG_PATH=/path/to/config.yml python3 -m huemon discover lights

Or agent mode

HUEMON_CONFIG_PATH=/path/to/config.yml python3 -m huemon agent start

Docker

Provide a configuration path for the huemon-config volume in docker-compose.yml before running the commands below.

docker-compose run huemon discover lights

Or agent mode

docker-compose up -d

Screenshots

Dashboards

Dashboard: sensors

Discoveries

Discoveries: batteries

Discoveries: lights

Discoveries: sensors

Template

Template

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Code of Conduct

Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

MPL-2.0

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.