sampler-fork/example.yml

117 lines
3.2 KiB
YAML
Raw Normal View History

runcharts:
2019-07-26 03:36:34 +00:00
- title: Search engine response time
position: [[0, 0], [45, 19]]
rate-ms: 500
2019-06-09 19:00:16 +00:00
triggers:
- title: Latency threshold exceeded
condition: echo "$prev < 0.8 && $cur > 0.8" |bc -l
actions:
2019-06-21 04:45:32 +00:00
terminal-bell: true
sound: true
visual: true
script: 'say alert: ${label} latency exceeded ${cur} second'
2019-07-26 03:36:34 +00:00
legend:
enabled: true
details: false
scale: 2
2019-06-09 19:00:16 +00:00
items:
- label: GOOGLE
2019-07-26 03:36:34 +00:00
color: 178
2019-06-09 19:00:16 +00:00
sample: curl -o /dev/null -s -w '%{time_total}' https://www.google.com
- label: YAHOO
sample: curl -o /dev/null -s -w '%{time_total}' https://search.yahoo.com
- label: BING
sample: curl -o /dev/null -s -w '%{time_total}' https://www.bing.com
2019-02-19 04:07:32 +00:00
barcharts:
2019-07-26 03:36:34 +00:00
- title: Local network activity
position: [[45, 20], [35, 8]]
rate-ms: 500
2019-06-09 19:00:16 +00:00
scale: 0
items:
2019-07-26 03:36:34 +00:00
- label: UDP bytes in
sample: nettop -J bytes_in -l 1 -m udp | awk '{sum += $4} END {print sum}'
- label: UDP bytes out
sample: nettop -J bytes_out -l 1 -m udp | awk '{sum += $4} END {print sum}'
- label: TCP bytes in
sample: nettop -J bytes_in -l 1 -m tcp | awk '{sum += $4} END {print sum}'
- label: TCP bytes out
sample: nettop -J bytes_out -l 1 -m tcp | awk '{sum += $4} END {print sum}'
2019-02-26 04:36:23 +00:00
gauges:
2019-06-09 19:00:16 +00:00
- title: YEAR PROGRESS
2019-07-26 03:36:34 +00:00
position: [[45, 0], [35, 2]]
2019-06-09 19:00:16 +00:00
cur:
2019-06-21 04:45:32 +00:00
sample: date +%j
2019-06-09 19:00:16 +00:00
max:
2019-06-21 04:45:32 +00:00
sample: echo 365
2019-06-09 19:00:16 +00:00
min:
2019-06-21 04:45:32 +00:00
sample: echo 0
2019-06-09 19:00:16 +00:00
- title: DAY PROGRESS
2019-07-26 03:36:34 +00:00
position: [[45, 3], [35, 2]]
2019-06-09 19:00:16 +00:00
cur:
2019-06-21 04:45:32 +00:00
sample: date +%H
2019-06-09 19:00:16 +00:00
max:
2019-06-21 04:45:32 +00:00
sample: echo 24
2019-06-09 19:00:16 +00:00
min:
2019-06-21 04:45:32 +00:00
sample: echo 0
2019-06-09 19:00:16 +00:00
- title: HOUR PROGRESS
2019-07-26 03:36:34 +00:00
position: [[45, 6], [35, 2]]
2019-06-09 19:00:16 +00:00
cur:
2019-06-21 04:45:32 +00:00
sample: date +%M
2019-06-09 19:00:16 +00:00
max:
2019-06-21 04:45:32 +00:00
sample: echo 60
2019-06-09 19:00:16 +00:00
min:
2019-06-21 04:45:32 +00:00
sample: echo 0
2019-06-09 19:00:16 +00:00
- title: MINUTE PROGRESS
2019-07-26 03:36:34 +00:00
position: [[45, 9], [35, 2]]
2019-06-09 19:00:16 +00:00
triggers:
- title: CLOCK BELL EVERY MINUTE
condition: '[ $label == "cur" ] && [ $cur -eq 0 ] && echo 1 || echo 0'
actions:
2019-06-21 04:45:32 +00:00
sound: true
script: say -v samantha `date +%I:%M%p`
2019-06-09 19:00:16 +00:00
cur:
2019-06-21 04:45:32 +00:00
sample: date +%S
2019-06-09 19:00:16 +00:00
max:
2019-06-21 04:45:32 +00:00
sample: echo 60
2019-06-09 19:00:16 +00:00
min:
2019-06-21 04:45:32 +00:00
sample: echo 0
2019-04-10 02:30:21 +00:00
sparklines:
2019-06-09 19:00:16 +00:00
- title: CPU usage
2019-07-26 03:36:34 +00:00
position: [[0, 20], [22, 8]]
rate-ms: 200
2019-06-09 19:00:16 +00:00
scale: 0
sample: ps -A -o %cpu | awk '{s+=$1} END {print s}'
2019-07-26 03:36:34 +00:00
- title: Free memory pages
position: [[22, 20], [23, 8]]
rate-ms: 200
2019-06-09 19:00:16 +00:00
scale: 0
sample: memory_pressure | grep 'Pages free' | awk '{print $3}'
2019-04-10 02:30:21 +00:00
textboxes:
2019-07-26 03:36:34 +00:00
- title: Docker containers stats
position: [[0, 29], [45, 10]]
rate-ms: 500
sample: docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.PIDs}}"
2019-06-09 19:00:16 +00:00
- title: Local weather
2019-07-26 03:36:34 +00:00
position: [[69, 31], [13, 7]]
2019-06-09 19:00:16 +00:00
rate-ms: 10000
sample: curl wttr.in?0ATQF
border: false
- title: New York weather
2019-07-26 03:36:34 +00:00
position: [[45, 31], [13, 7]]
2019-06-09 19:00:16 +00:00
rate-ms: 10000
sample: curl wttr.in/newyork?0ATQF
transform: echo 1
2019-06-21 04:45:32 +00:00
border: false
2019-06-09 19:00:16 +00:00
- title: San Francisco weather
2019-07-26 03:36:34 +00:00
position: [[56, 31], [13, 7]]
2019-06-09 19:00:16 +00:00
rate-ms: 10000
sample: curl wttr.in/sanfrancisco?0ATQF
border: false
2019-02-17 23:00:00 +00:00
asciiboxes:
2019-07-26 03:36:34 +00:00
- title: UTC time
position: [[45, 12], [35, 7]]
rate-ms: 500
2019-06-09 19:00:16 +00:00
sample: env TZ=UTC date +%r
2019-07-26 03:36:34 +00:00
border: false
2019-06-09 19:00:16 +00:00
font: 3d