This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nut_host": "host", | |
"nut_ups": "salicru", | |
"nut_vars": { | |
"ups.load": {"type": "int", "measurement_name": "ups_load"}, | |
"input.voltage": {"type": "float", "measurement_name": "ups_voltage"}, | |
"battery.charge": {"type": "int", "measurement_name": "ups_charge"} | |
}, | |
"influx_host": "http://influx1:8086", | |
"influx_creds": ["telegraf_w", "%AfqgnSb5Ye?p!qd"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.7 | |
ADD influx_nut.json /etc/influx_nut.json | |
ADD influx_nut /influx_nut | |
WORKDIR /influx_nut | |
RUN python setup.py install | |
CMD influx_nut --config /etc/influx_nut.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nut_host": "localhost", | |
"nut_ups": "salicru", | |
"nut_vars": { | |
"ups.load": {"type": "int", "measurement_name": "ups_load"}, | |
"input.voltage": {"type": "float", "measurement_name": "ups_voltage"}, | |
"battery.charge": {"type": "int", "measurement_name": "ups_charge"} | |
}, | |
"influx_host": "http://localhost:8086", | |
"influx_creds": ["THE_INFLUXDB_USER", "THE_INFLUXDB_PASSWORD"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DEBUG=0 | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin | |
export PATH | |
TZ='Europe/Madrid' | |
export TZ | |
function log() { | |
if [ $DEBUG -eq 1 ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source config | |
function mailSend() { | |
TMP_FILE="/tmp/ups.email" | |
/bin/echo "To: $MAIL_NAME <$MAIL_RCPT>" > $TMP_FILE | |
/bin/echo "Subject: $1" >> $TMP_FILE | |
/bin/echo "" >> $TMP_FILE | |
/bin/echo "$2" >> $TMP_FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
homer: | |
image: b4bz/homer | |
container_name: homer | |
volumes: | |
- ./assets/:/www/assets | |
environment: | |
- UID=1000 | |
- GID=100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
node-red: | |
container_name: node-red | |
image: nodered/node-red:latest | |
environment: | |
- TZ=Europe/Madrid | |
volumes: | |
- /dev:/host/dev | |
- /etc/localtime:/etc/localtime:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
nginx: | |
image: nginx:latest | |
container_name: nginx | |
restart: unless-stopped | |
volumes: | |
- ./etc:/etc/nginx:ro | |
- ./logs:/var/logs/nginx | |
- ./html:/usr/share/nginx/html:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
grafana: | |
container_name: grafana | |
image: grafana/grafana | |
restart: unless-stopped | |
environment: | |
- TZ="Europe/Madrid" | |
volumes: | |
- /etc/localtime:/etc/localtime:ro |