Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Add docker run instructions, and pre-provision some grafana #11

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Notaphish
Copy link

Thanks for making this, would super easy to add to my existing dashboard project! I've made some tweaks/additions, would love to get your input and happy to cut out where you think I've over stepped.

Changes:

  • Added instructions to the readme for running the script entirely in docker
  • Added container names to enable the first
  • Persist the influxdb data if container is brought down
  • Preprovision the grafana datasource
  • Preprovision the grafana dashboard

Questions:

  • Is it worth putting Grafana persistence in too? Just so any dashboard changes survive restarts?
  • Do you know about this https://hub.docker.com/r/jontutcher/octograph ? If so should I update the readme so folks know its around?

Woes:
Having problems with the readme... can't get the bottom section to appear - I've never used rst markdown before! Would appreciate any pointers :P

@jrothlis
Copy link

jrothlis commented Jan 7, 2021

How do you do the daily update? The initial load of meter data works fine, but in my short time trying to figure it out, I was unable to get a scheduled task (cron) to run every day to keep the data up to date.

@Notaphish
Copy link
Author

Notaphish commented Jan 7, 2021

Really don't know much about cron but below is my file ( used as part of my dashboard project ) and its calling this Makefile command https://github.com/Notaphish/nota_smarthome_dashboard/blob/main/Makefile#L19 -- basically the command I added to the README in this PR, just different influxdb container name.

SHELL=/bin/bash

* 8 * * * make -f /home/pi/projects/home_dashboard/octograph/Makefile run-docker >> /home/pi/logs/cron.log 2>&1

I had trouble with it because cron didn't know where docker was, so I needed to specify the absolute path to it in the Makefile command, also log forwarding was painful too! Not sure if you've done it already but if you haven't make sure you add a volume for InfluxDB so the data persists after a restart!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants