Sign inSign up

optimusgreen/system2mqtt

By optimusgreen

•Updated over 4 years ago

remote system monitoring to mqtt

Image
0

310

optimusgreen/system2mqtt repository overview

This is a dockerized version of system2mqtt and is currently only able to monitor proxmox systems. See github⁠ for bare metal monitoring.

This can be installed on any machine in your network as it monitors via the proxmox api.

A config file is required in a mounted volume for this to work. Below is an example of the config file which should be called s2m.conf

# Docker support is for accessing proxmox (pve) info only as this uses the api

# put this config file in your data volume and restart container

COMPUTER_NAME=MyPveServer                        # Required: 

DEBUG_LOG=True                                   ### Optional: default: False

#PUBLISH_PERIOD=30                               ### Optional: default: 30 (seconds)
#MQTT_BASE_TOPIC=system2mqtt/MyTestComputer1     ### Optional: default: system2mqtt/<COMPUTER_NAME>
#MQTT_HOST=192.168.0.14                          ### Optional: default: localhost
#MQTT_USER=myusername                            ### Optional: default: None
#MQTT_PASSWORD=mypassword                        ### Optional: default: None

##### Proxmox
PVE_SYSTEM=True                                  ### Required
#PVE_NODE_NAME=pve                               ### Default: pve                            
#PVE_HOST=192.168.0.7                            ### Default: localhost
#PVE_USER=mypveuser                              ### Default: root@pam
PVE_PASSWORD=mysecretpass


Run from cli like...

docker run -d -v /home/me/s2m:/config optimusgreen/system2mqtt

Or if using a pi zero (tested on a w)

docker run -d --platform=linux/arm/v5 -v /home/me/s2m:/config optimusgreen/system2mqtt

docker-compose example

version: "2"
services:
  s2m:
    image: optimusgreen/system2mqtt:latest
    container_name: system2mqtt
    volumes:
      - ./data:/config

dockerfile

FROM debian:stretch

ENV TERM linux
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y \
    python3 \
    python3-pip \
    git \
    && rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/OptimusGREEN/system2mqtt.git \
    && chmod +x system2mqtt/run.py \
    && chmod +x system2mqtt/s2m.py \
    && pip3 install -r system2mqtt/deps.txt \
    && mkdir /config
    
VOLUME /config

CMD ["/usr/bin/python3", "/system2mqtt/run.py", "/config/s2m.conf"]

For local monitoring of bare metal see github⁠

Tag summary

Content type

Image

Digest

Size

225.8 MB

Last updated

over 4 years ago

docker pull optimusgreen/system2mqtt