2019-04-09 02:04:08 +00:00
|
|
|
variables:
|
2019-06-21 04:45:32 +00:00
|
|
|
mongoconnection: mongo --quiet --host=localhost blog
|
2019-02-04 02:17:56 +00:00
|
|
|
runcharts:
|
2019-06-09 19:00:16 +00:00
|
|
|
- title: SEARCH ENGINE RESPONSE TIME (sec)
|
|
|
|
position: [[0, 0], [52, 16]]
|
|
|
|
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-06-09 19:00:16 +00:00
|
|
|
scale: 3
|
|
|
|
items:
|
|
|
|
- label: GOOGLE
|
|
|
|
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
|
|
|
|
- title: MONGO COLLECTIONS COUNT
|
|
|
|
position: [[53, 0], [27, 8]]
|
|
|
|
legend:
|
2019-06-21 04:45:32 +00:00
|
|
|
enabled: true
|
|
|
|
details: false
|
2019-06-09 19:00:16 +00:00
|
|
|
scale: 0
|
|
|
|
items:
|
|
|
|
- label: ACTIVE
|
|
|
|
init: $mongoconnection
|
|
|
|
sample: db.getCollection('posts').find({status:'ACTIVE'}).itcount()
|
|
|
|
- label: INACTIVE
|
|
|
|
init: $mongoconnection
|
|
|
|
sample: db.getCollection('posts').find({status:'INACTIVE'}).itcount()
|
2019-02-19 04:07:32 +00:00
|
|
|
barcharts:
|
2019-06-09 19:00:16 +00:00
|
|
|
- title: EVENTS BY STATUS
|
|
|
|
position: [[0, 17], [28, 12]]
|
|
|
|
rate-ms: 300
|
|
|
|
scale: 0
|
|
|
|
items:
|
|
|
|
- label: NEW
|
|
|
|
init: $mongoconnection
|
|
|
|
sample: db.getCollection('posts').find({status:'ACTIVE'}).itcount()
|
|
|
|
- label: TRIGGERED
|
|
|
|
init: $mongoconnection
|
|
|
|
sample: db.getCollection('posts').find({status:'INACTIVE'}).itcount()
|
|
|
|
- label: IN_PROCESS
|
|
|
|
init: $mongoconnection
|
|
|
|
sample: db.getCollection('posts').find({status:'UNKNOWN'}).itcount()
|
|
|
|
- label: FAILED
|
|
|
|
init: $mongoconnection
|
|
|
|
sample: db.getCollection('posts').find({status:'ACTIVE'}).itcount()
|
|
|
|
- label: FINISHED
|
|
|
|
init: $mongoconnection
|
|
|
|
sample: db.getCollection('posts').find({status:'INACTIVE'}).itcount()
|
2019-02-26 04:36:23 +00:00
|
|
|
gauges:
|
2019-06-09 19:00:16 +00:00
|
|
|
- title: YEAR PROGRESS
|
|
|
|
position: [[53, 8], [27, 2]]
|
|
|
|
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
|
|
|
|
position: [[53, 10], [27, 2]]
|
|
|
|
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
|
|
|
|
position: [[53, 12], [27, 2]]
|
|
|
|
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
|
|
|
|
position: [[53, 14], [27, 2]]
|
|
|
|
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
|
|
|
|
position: [[28, 22], [24, 7]]
|
|
|
|
scale: 0
|
|
|
|
sample: ps -A -o %cpu | awk '{s+=$1} END {print s}'
|
|
|
|
- title: Memory pages free
|
|
|
|
position: [[28, 17], [24, 5]]
|
|
|
|
scale: 0
|
|
|
|
sample: memory_pressure | grep 'Pages free' | awk '{print $3}'
|
2019-04-10 02:30:21 +00:00
|
|
|
textboxes:
|
2019-06-09 19:00:16 +00:00
|
|
|
- title: Local weather
|
|
|
|
position: [[0, 30], [13, 7]]
|
|
|
|
rate-ms: 10000
|
|
|
|
sample: curl wttr.in?0ATQF
|
|
|
|
border: false
|
|
|
|
- title: New York weather
|
|
|
|
position: [[8, 30], [13, 7]]
|
|
|
|
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
|
|
|
|
position: [[17, 30], [13, 7]]
|
|
|
|
rate-ms: 10000
|
|
|
|
sample: curl wttr.in/sanfrancisco?0ATQF
|
|
|
|
border: false
|
2019-02-17 23:00:00 +00:00
|
|
|
asciiboxes:
|
2019-06-09 19:00:16 +00:00
|
|
|
- title: LOCAL TIME
|
|
|
|
position: [[53, 17], [27, 5]]
|
|
|
|
sample: date +%r
|
|
|
|
- title: UTC TIME
|
|
|
|
position: [[53, 22], [27, 7]]
|
|
|
|
sample: env TZ=UTC date +%r
|
|
|
|
font: 3d
|