Skip to content

Instantly share code, notes, and snippets.

@bjarneeins
bjarneeins / docker-compose-influxdb2.yaml
Created October 23, 2022 11:19
Docker Compose file for creating a basic InfluxDB2.0 container
version: '3'
services:
influxdb:
image: influxdb:latest
container_name: influxdb
restart: always
volumes:
- influxdb2-data:/var/lib/influxdb2
- influxdb2-config:/etc/influxdb2
ports:
@bjarneeins
bjarneeins / energy-monitor-flux.json
Last active November 13, 2022 18:22
Example for a Grafana Dashboard which will display Information about Energy usage (using Flux queries prepared for InfluxDB2.0)
{
"__inputs": [
{
"name": "DS_INFLUXDB2.0",
"label": "InfluxDB2.0",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
@bjarneeins
bjarneeins / energy-monitor.json
Last active June 7, 2021 10:13
Example for a Grafana Dashboard which will display Information about Energy usage
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@bjarneeins
bjarneeins / docker-compose.yml
Last active March 6, 2020 08:55
Example for running InfluxDB and Grafana with docker-compose
version: '3'
services:
influxdb:
image: influxdb:latest
container_name: influxdb
restart: on-failure
volumes:
- ./data/influxdb/:/var/lib/influxdb
ports:
- "8086:8086"
@bjarneeins
bjarneeins / hs110-data-collect-influxdb.py
Last active October 23, 2022 11:40 — forked from rbaarda/hs110-data-collect.py
Python3 script which collects data from a HS110 power plug and tries to either send it to a local or a remote Influxdb database.
import sys
import time
import socket
import json
import threading
import requests
import argparse
from struct import pack
# needed to disable ssl warnings