sampler-fork/config.yml

105 lines
2.9 KiB
YAML
Raw Normal View History

runcharts:
2019-02-21 04:53:59 +00:00
- title: SEARCH ENGINE RESPONSE TIME (sec)
2019-03-26 03:29:23 +00:00
position: [[0, 0], [52, 16]]
2019-03-03 19:35:29 +00:00
triggers:
2019-03-13 03:15:55 +00:00
- title: Latency threshold exceeded
2019-03-27 03:52:41 +00:00
condition: echo "$prev < 0.8 && $cur > 0.8" |bc -l
actions:
terminal-bell: true
sound: true
visual: true
script: 'say alert: ${label} latency exceeded ${cur} second'
2019-03-09 01:00:13 +00:00
scale: 3
2019-02-21 04:53:59 +00:00
items:
- label: GOOGLE
sample: curl -o /dev/null -s -w '%{time_total}' https://www.google.com
2019-02-21 04:53:59 +00:00
- label: YAHOO
sample: curl -o /dev/null -s -w '%{time_total}' https://search.yahoo.com
2019-02-21 04:53:59 +00:00
- label: BING
sample: curl -o /dev/null -s -w '%{time_total}' https://www.bing.com
2019-03-01 03:44:01 +00:00
- title: MONGO COLLECTIONS COUNT
position: [[53, 0], [27, 8]]
2019-02-21 04:53:59 +00:00
legend:
enabled: true
details: false
scale: 0
items:
- label: ACTIVE
init: mongo --quiet --host=localhost blog
sample: mongo --quiet --host=localhost blog --eval "db.getCollection('posts').find({status:'INACTIVE'}).itcount()"
transform: $sample | grep cpu
2019-02-21 04:53:59 +00:00
- label: INACTIVE
sample: mongo --quiet --host=localhost blog --eval "db.getCollection('posts').find({status:'INACTIVE'}).itcount()"
2019-02-19 04:07:32 +00:00
barcharts:
2019-02-23 16:27:22 +00:00
- title: EVENTS BY STATUS
2019-02-21 04:53:59 +00:00
refresh-rate-ms: 1000
2019-03-26 03:29:23 +00:00
position: [[0, 17], [27, 12]]
2019-02-21 04:53:59 +00:00
scale: 0
items:
2019-02-23 16:27:22 +00:00
- label: NEW
sample: mongo --quiet --host=localhost blog --eval "db.getCollection('posts').find({status:'ACTIVE'}).itcount()"
2019-02-23 16:27:22 +00:00
- label: TRIGGERED
sample: mongo --quiet --host=localhost blog --eval "db.getCollection('posts').find({status:'INACTIVE'}).itcount()"
2019-02-23 16:27:22 +00:00
- label: IN_PROCESS
sample: echo 0
2019-02-23 16:27:22 +00:00
- label: FAILED
sample: mongo --quiet --host=localhost blog --eval "db.getCollection('posts').find({status:'ACTIVE'}).itcount()"
2019-02-26 04:36:23 +00:00
- label: FINISHED
sample: mongo --quiet --host=localhost blog --eval "db.getCollection('posts').find({status:'INACTIVE'}).itcount()"
2019-02-26 04:36:23 +00:00
gauges:
2019-02-28 02:10:21 +00:00
- title: YEAR PROGRESS
position: [[53, 8], [27, 2]]
cur:
sample: date +%j
max:
sample: echo 365
min:
sample: echo 0
2019-02-28 02:10:21 +00:00
- title: DAY PROGRESS
position: [[53, 10], [27, 2]]
cur:
sample: date +%H
max:
sample: echo 24
min:
sample: echo 0
2019-02-27 04:23:56 +00:00
- title: HOUR PROGRESS
position: [[53, 12], [27, 2]]
cur:
sample: date +%M
max:
sample: echo 60
min:
sample: echo 0
2019-02-27 04:23:56 +00:00
- title: MINUTE PROGRESS
position: [[53, 14], [27, 2]]
triggers:
- title: CLOCK BELL EVERY MINUTE
2019-03-17 03:13:14 +00:00
condition: '[ $label == "cur" ] && [ $cur -eq 0 ] && echo 1 || echo 0'
actions:
sound: true
script: say -v samantha `date +%I:%M%p`
cur:
sample: date +%S
max:
sample: echo 60
min:
sample: echo 0
2019-02-17 23:00:00 +00:00
asciiboxes:
2019-02-23 16:27:22 +00:00
- title: LOCAL TIME
position: [[53, 17], [27, 5]]
sample: date +%r
2019-02-23 16:27:22 +00:00
- title: UTC TIME
position: [[53, 22], [27, 7]]
sample: env TZ=UTC date +%r
2019-02-21 04:53:59 +00:00
font: 3d
sparklines:
- title: CPU usage
2019-04-01 03:02:58 +00:00
position: [[27, 22], [25, 7]]
scale: 0
sample: ps -A -o %cpu | awk '{s+=$1} END {print s}'
2019-03-27 03:52:41 +00:00
- title: Memory pages free
2019-04-01 03:02:58 +00:00
position: [[27, 17], [25, 5]]
2019-03-27 03:52:41 +00:00
scale: 0
sample: memory_pressure | grep 'Pages free' | awk '{print $3}'