From fb8bc5d6dbf612a7c7962dcd61201038c8b6b3eb Mon Sep 17 00:00:00 2001 From: Matt Rude Date: Sat, 18 Jun 2011 19:04:18 -0500 Subject: Update to status screens, now show daily, weekly, monthly, & yearly graphs on a per type & host page. --- scripts/do-build-graphs | 115 ---------------- scripts/do-build-site | 9 ++ scripts/do-xntp | 276 +++++++++++++++++++++++++++++++------ scripts/templates/template | 5 +- scripts/templates/template-by-type | 26 ++++ scripts/templates/template-host | 42 ++---- 6 files changed, 279 insertions(+), 194 deletions(-) delete mode 100755 scripts/do-build-graphs create mode 100644 scripts/templates/template-by-type (limited to 'scripts') diff --git a/scripts/do-build-graphs b/scripts/do-build-graphs deleted file mode 100755 index f17e5f6..0000000 --- a/scripts/do-build-graphs +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/sh - -RRD_BIN=/usr/bin -RRDPAGE=/var/www/time.mattrude.com/rrd -GRAPHS=/var/www/time.mattrude.com/status -SCRIPTS=/var/www/time.mattrude.com/scripts - -if [ ! -e $GRAPHS ]; then - mkdir -p $GRAPHS -fi - -cd ${RRDPAGE} - -${RRD_BIN}/rrdtool graph \ - --imgformat=PNG ${GRAPHS}/kirby-clients.png \ ---start=-86400 --end=-300 \ ---title='Kirby - 174.143.169.159' \ ---rigid \ ---height=100 \ ---width=290 \ ---alt-autoscale-max \ ---lower-limit=0 \ ---vertical-label='Active Clients' \ ---slope-mode \ ---font TITLE:12: \ ---font AXIS:8: \ ---font LEGEND:8: \ ---font UNIT:8: \ -DEF:a="/var/www/time.mattrude.com/rrd/kirby.mattrude.com-clients.rrd":clients:AVERAGE \ -AREA:a#002A97FF:"" \ -GPRINT:a:LAST:"Now\:%8.2lf %s" \ -GPRINT:a:AVERAGE:"Avg\:%8.2lf %s" \ -GPRINT:a:MAX:"Max\:%8.2lf %s\n" \ - -${RRD_BIN}/rrdtool graph \ - --imgformat=PNG ${GRAPHS}/twyla-clients.png \ ---start=-86400 --end=-300 \ ---title='Twyla - 174.143.174.61' \ ---rigid \ ---height=100 \ ---width=290 \ ---alt-autoscale-max \ ---lower-limit=0 \ ---vertical-label='Active Clients' \ ---slope-mode \ ---font TITLE:12: \ ---font AXIS:8: \ ---font LEGEND:8: \ ---font UNIT:8: \ -DEF:a="/var/www/time.mattrude.com/rrd/twyla.mattrude.com-clients.rrd":clients:AVERAGE \ -AREA:a#002A97FF:"" \ -GPRINT:a:LAST:"Now\:%8.2lf %s" \ -GPRINT:a:AVERAGE:"Avg\:%8.2lf %s" \ -GPRINT:a:MAX:"Max\:%8.2lf %s\n" \ - -${RRD_BIN}/rrdtool graph \ - --imgformat=PNG ${GRAPHS}/samantha-clients.png \ ---start=-86400 --end=-300 \ ---title='Samantha - 174.143.173.49' \ ---rigid \ ---height=100 \ ---width=290 \ ---alt-autoscale-max \ ---lower-limit=0 \ ---vertical-label='Active Clients' \ ---slope-mode \ ---font TITLE:12: \ ---font AXIS:8: \ ---font LEGEND:8: \ ---font UNIT:8: \ -DEF:a="/var/www/time.mattrude.com/rrd/samantha.mattrude.com-clients.rrd":clients:AVERAGE \ -AREA:a#002A97FF:"" \ -GPRINT:a:LAST:"Now\:%8.2lf %s" \ -GPRINT:a:AVERAGE:"Avg\:%8.2lf %s" \ -GPRINT:a:MAX:"Max\:%8.2lf %s\n" \ - -${RRD_BIN}/rrdtool graph \ - --imgformat=PNG ${GRAPHS}/all-clients.png \ ---start=-86400 --end=-300 \ ---title='Active Clients on All Servers' \ ---rigid \ ---height=72 \ ---width=290 \ ---alt-autoscale-max \ ---lower-limit=0 \ ---vertical-label='Active Clients' \ ---slope-mode \ ---font TITLE:12: \ ---font AXIS:8: \ ---font LEGEND:8: \ ---font UNIT:8: \ -DEF:a="/var/www/time.mattrude.com/rrd/kirby.mattrude.com-clients.rrd":clients:AVERAGE \ -DEF:b="/var/www/time.mattrude.com/rrd/twyla.mattrude.com-clients.rrd":clients:AVERAGE \ -DEF:c="/var/www/time.mattrude.com/rrd/samantha.mattrude.com-clients.rrd":clients:AVERAGE \ -LINE1:a#002A97FF:"Kirby:" \ -GPRINT:a:LAST:"Now\:%6.2lf %s" \ -GPRINT:a:AVERAGE:"Avg\:%6.2lf %s" \ -GPRINT:a:MAX:"Max\:%6.2lf %s\n" \ -LINE1:b#000000FF:"Twyla:" \ -GPRINT:b:LAST:"Now\:%6.2lf %s" \ -GPRINT:b:AVERAGE:"Avg\:%6.2lf %s" \ -GPRINT:b:MAX:"Max\:%6.2lf %s\n" \ -LINE1:c#990000FF:"Saman:" \ -GPRINT:c:LAST:"Now\:%6.2lf %s" \ -GPRINT:c:AVERAGE:"Avg\:%6.2lf %s" \ -GPRINT:c:MAX:"Max\:%6.2lf %s\n" \ - -/usr/bin/optipng ${GRAPHS}/kirby-clients.png -/usr/bin/optipng ${GRAPHS}/twyla-clients.png -/usr/bin/optipng ${GRAPHS}/samantha-clients.png -/usr/bin/optipng ${GRAPHS}/all-clients.png - -#end - - diff --git a/scripts/do-build-site b/scripts/do-build-site index 0399467..c381cb0 100755 --- a/scripts/do-build-site +++ b/scripts/do-build-site @@ -32,5 +32,14 @@ do sync cat out.template $TEMPLATESDIR/index-tail > $X/index.html rm -f out.template + for a in clients offset jitter frequency sysjit cjit wander disp + do + mkdir -p $POOLPAGE/$X/$a + cat /dev/null > out.template + sed -e s/POOL/$X/g $TEMPLATESDIR/template-by-type |sed -e s/TYPE/$a/g >> out.template + sync + cat out.template $TEMPLATESDIR/index-tail > $X/$a/index.html + rm -f out.template + done done chown -R apache:apache $POOLPAGE diff --git a/scripts/do-xntp b/scripts/do-xntp index b5e612a..f0ffe0f 100755 --- a/scripts/do-xntp +++ b/scripts/do-xntp @@ -25,19 +25,29 @@ sh ${SCRIPTS}/do-ntp-rrdstats ${X} if [ ! $? ]; then exit 1; fi -#${RRD_BIN}/rrdtool graph \ -# --imgformat PNG ${STATUS}/${X}/ntp-clients.png \ -# --width 600 --height 200 \ -# --vertical-label "${X}" \ -# --title "`TZ=UTC date`" \ -# --start -93600 \ -# DEF:clients=${RRDPAGE}/${X}-clients.rrd:clients:AVERAGE \ -# CDEF:noclients=clients,1,/ \ -# AREA:noclients#002A97FF:"Cients" \ -# GPRINT:noclients:LAST:%le - -${RRD_BIN}/rrdtool graph \ ---imgformat PNG ${STATUS}/${X}/ntp-clients.png \ +# Daily Graphs +${RRD_BIN}/rrdtool graph --imgformat=PNG ${STATUS}/${X}/daily-ntp-clients-small.png \ +--start=-86400 --end=-300 \ +--title='Kirby - 174.143.169.159' \ +--rigid \ +--height=100 \ +--width=290 \ +--alt-autoscale-max \ +--lower-limit=0 \ +--vertical-label='Active Clients' \ +--slope-mode \ +--font TITLE:12: \ +--font AXIS:8: \ +--font LEGEND:8: \ +--font UNIT:8: \ +DEF:a="/var/www/time.mattrude.com/rrd/kirby.mattrude.com-clients.rrd":clients:AVERAGE \ +AREA:a#002A97FF:"" \ +GPRINT:a:LAST:"Now\:%8.2lf %s" \ +GPRINT:a:AVERAGE:"Avg\:%8.2lf %s" \ +GPRINT:a:MAX:"Max\:%8.2lf %s\n" \ + + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-clients.png \ --lazy \ --imgformat=PNG \ --start=-86400 \ @@ -65,8 +75,7 @@ GPRINT:b:LAST:" Current\:%8.2lf %s" \ GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \ GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" -${RRD_BIN}/rrdtool graph \ - --imgformat PNG ${STATUS}/${X}/ntp-offset.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-offset.png \ --width 600 --height 200 \ --vertical-label "${X}" \ --title "`TZ=UTC date`" \ @@ -76,8 +85,7 @@ ${RRD_BIN}/rrdtool graph \ AREA:noffset#002A97FF:"offset" \ GPRINT:noffset:LAST:%le -${RRD_BIN}/rrdtool graph \ - --imgformat PNG ${STATUS}/${X}/ntp-sysjit.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-sysjit.png \ --width 600 --height 200 \ --vertical-label "${X}" \ --title "`TZ=UTC date`" \ @@ -87,8 +95,7 @@ ${RRD_BIN}/rrdtool graph \ LINE2:nsjit#002A97FF:"sysjit" \ GPRINT:nsjit:LAST:%le -${RRD_BIN}/rrdtool graph \ - --imgformat PNG ${STATUS}/${X}/ntp-clkjit.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-clkjit.png \ --width 600 --height 200 \ --vertical-label "${X}" \ --title "`TZ=UTC date`" \ @@ -98,8 +105,7 @@ ${RRD_BIN}/rrdtool graph \ LINE2:ncjit#002A97FF:"cjit" \ GPRINT:ncjit:LAST:%le -${RRD_BIN}/rrdtool graph \ - --imgformat PNG ${STATUS}/${X}/ntp-wander.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-wander.png \ --width 600 --height 200 \ --vertical-label "${X}" \ --title "`TZ=UTC date`" \ @@ -108,8 +114,7 @@ ${RRD_BIN}/rrdtool graph \ LINE2:wander#002A97FF:"Wander" \ GPRINT:wander:LAST:%le -${RRD_BIN}/rrdtool graph \ - --imgformat PNG ${STATUS}/${X}/ntp-freq.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-freq.png \ --width 600 --height 200 \ --alt-autoscale \ --vertical-label "${X}" \ @@ -119,8 +124,7 @@ ${RRD_BIN}/rrdtool graph \ AREA:freq#002A97FF:"Frequency (ppm)" \ GPRINT:freq:LAST:%lf -${RRD_BIN}/rrdtool graph \ - --imgformat PNG ${STATUS}/${X}/ntp-disp.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-disp.png \ --width 600 --height 200 \ --alt-autoscale \ --vertical-label "${X}" \ @@ -131,8 +135,7 @@ ${RRD_BIN}/rrdtool graph \ AREA:ndisp#002A97FF:"Dispersion" \ GPRINT:ndisp:LAST:%lf -${RRD_BIN}/rrdtool graph \ - --imgformat PNG ${STATUS}/${X}/ntp-jitter.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-jitter.png \ --width 600 --height 200 \ --alt-autoscale \ --vertical-label "${X}" \ @@ -142,10 +145,8 @@ ${RRD_BIN}/rrdtool graph \ LINE2:disp#002A97FF:"Jitter" \ GPRINT:disp:LAST:%lf -# fat (weekly) graphs - - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-clients.png \ +# Weekly Graphs +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-clients.png \ --width 600 --height 200 \ --vertical-label "${X}" \ --title "`TZ=UTC date`" \ @@ -156,7 +157,7 @@ ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-clients.png \ GPRINT:nclients:LAST:%le -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-offset.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-offset.png \ --width 600 --height 200 \ --vertical-label "${X}" \ --title "`TZ=UTC date`" \ @@ -166,7 +167,7 @@ ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-offset.png \ AREA:noffset#002A97FF:"offset" \ GPRINT:noffset:LAST:%le -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-sysjit.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-sysjit.png \ --width 600 --height 200 \ --vertical-label "${X}" \ --title "`TZ=UTC date`" \ @@ -176,7 +177,7 @@ ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-sysjit.png \ LINE2:nsjit#002A97FF:"sysjit" \ GPRINT:nsjit:LAST:%le -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-clkjit.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-clkjit.png \ --width 600 --height 200 \ --vertical-label "${X}" \ --title "`TZ=UTC date`" \ @@ -186,7 +187,7 @@ ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-clkjit.png \ LINE2:ncjit#002A97FF:"clkjit" \ GPRINT:ncjit:LAST:%le -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-wander.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-wander.png \ --width 600 --height 200 \ --vertical-label "${X}" \ --title "`TZ=UTC date`" \ @@ -195,8 +196,7 @@ ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-wander.png \ LINE2:wander#002A97FF:"wander" \ GPRINT:wander:LAST:%le -${RRD_BIN}/rrdtool graph \ - --imgformat PNG ${STATUS}/${X}/week-ntp-freq.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-freq.png \ --width 600 --height 200 \ --alt-autoscale \ --vertical-label "${X}" \ @@ -207,8 +207,7 @@ ${RRD_BIN}/rrdtool graph \ GPRINT:freq:LAST:%lf -${RRD_BIN}/rrdtool graph \ - --imgformat PNG ${STATUS}/${X}/week-ntp-disp.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-disp.png \ --width 600 --height 200 \ --alt-autoscale \ --vertical-label "${X}" \ @@ -219,8 +218,7 @@ ${RRD_BIN}/rrdtool graph \ AREA:ndisp#002A97FF:"dispersion" \ GPRINT:ndisp:LAST:%lf -${RRD_BIN}/rrdtool graph \ - --imgformat PNG ${STATUS}/${X}/week-ntp-jitter.png \ +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-jitter.png \ --width 600 --height 200 \ --alt-autoscale \ --vertical-label "${X}" \ @@ -231,10 +229,206 @@ ${RRD_BIN}/rrdtool graph \ LINE2:ndisp#002A97FF:"Jitter" \ GPRINT:ndisp:LAST:%lf + +# Monthly Graphs +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-clients.png \ + --width 600 --height 200 \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -2629744 \ + DEF:clients=${RRDPAGE}/${X}-clients.rrd:clients:AVERAGE \ + CDEF:nclients=clients,1000,/ \ + AREA:nclients#002A97FF:"clients" \ + GPRINT:nclients:LAST:%le + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-offset.png \ + --width 600 --height 200 \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -2629744 \ + DEF:offset=${RRDPAGE}/${X}.rrd:offset:LAST \ + CDEF:noffset=offset,1000,/ \ + AREA:noffset#002A97FF:"offset" \ + GPRINT:noffset:LAST:%le + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-sysjit.png \ + --width 600 --height 200 \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -2629744 \ + DEF:sjit=${RRDPAGE}/${X}.rrd:sjit:LAST \ + CDEF:nsjit=sjit,1000,/ \ + LINE2:nsjit#002A97FF:"sysjit" \ + GPRINT:nsjit:LAST:%le + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-clkjit.png \ + --width 600 --height 200 \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -2629744 \ + DEF:cjit=${RRDPAGE}/${X}.rrd:cjit:LAST \ + CDEF:ncjit=cjit,1000,/ \ + LINE2:ncjit#002A97FF:"clkjit" \ + GPRINT:ncjit:LAST:%le + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-wander.png \ + --width 600 --height 200 \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -2629744 \ + DEF:wander=${RRDPAGE}/${X}.rrd:wander:LAST \ + LINE2:wander#002A97FF:"wander" \ + GPRINT:wander:LAST:%le + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-freq.png \ + --width 600 --height 200 \ + --alt-autoscale \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -2629744 \ + DEF:freq=${RRDPAGE}/${X}.rrd:freq:LAST \ + AREA:freq#002A97FF:"frequency (ppm)" \ + GPRINT:freq:LAST:%lf + + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-disp.png \ + --width 600 --height 200 \ + --alt-autoscale \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -2629744 \ + DEF:disp=${RRDPAGE}/${X}.rrd:disp:LAST \ + CDEF:ndisp=disp,1000,/ \ + AREA:ndisp#002A97FF:"dispersion" \ + GPRINT:ndisp:LAST:%lf + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-jitter.png \ + --width 600 --height 200 \ + --alt-autoscale \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -2629744 \ + DEF:disp=${RRDPAGE}/${X}.rrd:jitter:LAST \ + CDEF:ndisp=disp,1000,/ \ + LINE2:ndisp#002A97FF:"Jitter" \ + GPRINT:ndisp:LAST:%lf + +# Yearly Graphs +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-clients.png \ + --width 600 --height 200 \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -31556926 \ + DEF:clients=${RRDPAGE}/${X}-clients.rrd:clients:AVERAGE \ + CDEF:nclients=clients,1000,/ \ + AREA:nclients#002A97FF:"clients" \ + GPRINT:nclients:LAST:%le + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-offset.png \ + --width 600 --height 200 \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -31556926 \ + DEF:offset=${RRDPAGE}/${X}.rrd:offset:LAST \ + CDEF:noffset=offset,1000,/ \ + AREA:noffset#002A97FF:"offset" \ + GPRINT:noffset:LAST:%le + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-sysjit.png \ + --width 600 --height 200 \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -31556926 \ + DEF:sjit=${RRDPAGE}/${X}.rrd:sjit:LAST \ + CDEF:nsjit=sjit,1000,/ \ + LINE2:nsjit#002A97FF:"sysjit" \ + GPRINT:nsjit:LAST:%le + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-clkjit.png \ + --width 600 --height 200 \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -31556926 \ + DEF:cjit=${RRDPAGE}/${X}.rrd:cjit:LAST \ + CDEF:ncjit=cjit,1000,/ \ + LINE2:ncjit#002A97FF:"clkjit" \ + GPRINT:ncjit:LAST:%le + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-wander.png \ + --width 600 --height 200 \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -31556926 \ + DEF:wander=${RRDPAGE}/${X}.rrd:wander:LAST \ + LINE2:wander#002A97FF:"wander" \ + GPRINT:wander:LAST:%le + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-freq.png \ + --width 600 --height 200 \ + --alt-autoscale \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -31556926 \ + DEF:freq=${RRDPAGE}/${X}.rrd:freq:LAST \ + AREA:freq#002A97FF:"frequency (ppm)" \ + GPRINT:freq:LAST:%lf + + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-disp.png \ + --width 600 --height 200 \ + --alt-autoscale \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -31556926 \ + DEF:disp=${RRDPAGE}/${X}.rrd:disp:LAST \ + CDEF:ndisp=disp,1000,/ \ + AREA:ndisp#002A97FF:"dispersion" \ + GPRINT:ndisp:LAST:%lf + +${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-jitter.png \ + --width 600 --height 200 \ + --alt-autoscale \ + --vertical-label "${X}" \ + --title "`TZ=UTC date`" \ + --start -31556926 \ + DEF:disp=${RRDPAGE}/${X}.rrd:jitter:LAST \ + CDEF:ndisp=disp,1000,/ \ + LINE2:ndisp#002A97FF:"Jitter" \ + GPRINT:ndisp:LAST:%lf done #end +${RRD_BIN}/rrdtool graph --imgformat=PNG ${STATUS}/all-clients.png \ +--start=-86400 --end=-300 \ +--title='Active Clients on All Servers' \ +--rigid \ +--height=72 \ +--width=290 \ +--alt-autoscale-max \ +--lower-limit=0 \ +--vertical-label='Active Clients' \ +--slope-mode \ +--font TITLE:12: \ +--font AXIS:8: \ +--font LEGEND:8: \ +--font UNIT:8: \ +DEF:a="/var/www/time.mattrude.com/rrd/kirby.mattrude.com-clients.rrd":clients:AVERAGE \ +DEF:b="/var/www/time.mattrude.com/rrd/twyla.mattrude.com-clients.rrd":clients:AVERAGE \ +DEF:c="/var/www/time.mattrude.com/rrd/samantha.mattrude.com-clients.rrd":clients:AVERAGE \ +LINE1:a#002A97FF:"Kirby:" \ +GPRINT:a:LAST:"Now\:%6.2lf %s" \ +GPRINT:a:AVERAGE:"Avg\:%6.2lf %s" \ +GPRINT:a:MAX:"Max\:%6.2lf %s\n" \ +LINE1:b#000000FF:"Twyla:" \ +GPRINT:b:LAST:"Now\:%6.2lf %s" \ +GPRINT:b:AVERAGE:"Avg\:%6.2lf %s" \ +GPRINT:b:MAX:"Max\:%6.2lf %s\n" \ +LINE1:c#990000FF:"Saman:" \ +GPRINT:c:LAST:"Now\:%6.2lf %s" \ +GPRINT:c:AVERAGE:"Avg\:%6.2lf %s" \ +GPRINT:c:MAX:"Max\:%6.2lf %s\n" + rm -f /var/www/time.mattrude.com/logs/ntp-stats-samantha.log /var/www/time.mattrude.com/logs/ntp-stats-twyla.log ssh samantha /home/matt/bin/ntp/ntp_clients_stats > /var/www/time.mattrude.com/logs/ntp-stats-samantha.log diff --git a/scripts/templates/template b/scripts/templates/template index 3aefa90..86ea922 100644 --- a/scripts/templates/template +++ b/scripts/templates/template @@ -1,5 +1,2 @@ -

Time Server: POOL

-

- -

+

diff --git a/scripts/templates/template-by-type b/scripts/templates/template-by-type new file mode 100644 index 0000000..2d28cb1 --- /dev/null +++ b/scripts/templates/template-by-type @@ -0,0 +1,26 @@ + + time.mattrude.com :: POOL:TYPE Time Server Status Page + + + + + +
+
+
+

time.mattrude.com — POOL, TYPE Server Status

+
+

time.mattrude.com / status / POOL / TYPE

+ +

Host POOL, TYPE Daily Status

+

+ +

Host POOL, TYPE Weekly Status

+

+ +

Host POOL, TYPE Monthly Status

+

+ +

Host POOL, TYPE Yearly Status

+

+
diff --git a/scripts/templates/template-host b/scripts/templates/template-host index 72c00c8..6dfcfe0 100644 --- a/scripts/templates/template-host +++ b/scripts/templates/template-host @@ -22,40 +22,14 @@ clk_jitter clock jitter clk_wander clock frequency wander (PPM) rootdisp total dispersion to the primary reference clock -
-

Host POOL, Daily Status

-

- +

+

+

+

+

+

+

+


- -
- -
- -
- -
- -
- -
- -
-

Host POOL, Weekly Status

-
- -
- -
- -
- -
- -
- -
- -

-- cgit v1.2.3-59-ga6da