Commit 505fa707 authored by Johannes Schilling's avatar Johannes Schilling
Browse files

add cip-grafana-tempgraph-extract

parent 1ca3f7b9
set -eu
CURDATE=$(date +%s)
url() {
olddate=$(date --date="$1" +%s)
printf "http://localhost:3621/render/dashboard-solo/db/public-temperature?orgId=1&from=%d000&to=%d000&panelId=1&width=1000&height=500&theme=light" "${olddate}" "${CURDATE}"
/usr/bin/curl -H 'X-Remote-User: nobody' "$(url '24 hours ago')" > /var/www/temperature/day.png
/usr/bin/curl -H 'X-Remote-User: nobody' "$(url '7 days ago')" > /var/www/temperature/week.png
/usr/bin/curl -H 'X-Remote-User: nobody' "$(url '30 days ago')" > /var/www/temperature/month.png
/usr/bin/curl -H 'X-Remote-User: nobody' "$(url '360 days ago')" > /var/www/temperature/year.png
Description=CIP update temperature graph images from grafana
Description=CIP update temperature graph images from grafana (Timer Unit)
# Run immediately after boot for hosts which are not running 24-7 (powersafe).
# Run every 5 minutes. (the expression was copied from the
# cip-monitoring-tools-run.timer unit, i don't fully understand it
# -- js 2017-08-02)
cip-foxtemp (7) unstable; urgency=medium
* add cip-grafana-tempgraph-extract
-- Johannes Schilling <> Wed, 02 Aug 2017 19:08:58 +0200
cip-foxtemp (6.2) unstable; urgency=medium
* proper restart, version bump again (commit early, build often)
cip-grafana-tempgraph-extract usr/sbin
cip-grafana-tempgraph-extract.service lib/systemd/system
cip-grafana-tempgraph-extract.timer lib/systemd/system
set -e
case "$1" in
install --directory --owner www --group www /var/www/temperature
exit 0
......@@ -15,3 +15,8 @@ Description: foxtemp ds1820 host software
Original source at;a=summary, this is
just the host software packaged, without the AtTiny firmware.
Package: cip-grafana-tempgraph-extract
Architecture: any
Depends: ${misc:Depends}, curl
Description: grafana graph extraction scripts
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment