-
-
Notifications
You must be signed in to change notification settings - Fork 548
/
example.yml
116 lines (116 loc) · 3.24 KB
/
example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
runcharts:
- title: Search engine response time
position: [[0, 0], [45, 19]]
rate-ms: 500
triggers:
- title: Latency threshold exceeded
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'
legend:
enabled: true
details: false
scale: 2
items:
- label: GOOGLE
color: 178
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
barcharts:
- title: Local network activity
position: [[45, 20], [35, 8]]
rate-ms: 500
scale: 0
items:
- 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}'
gauges:
- title: YEAR PROGRESS
position: [[45, 0], [35, 2]]
cur:
sample: date +%j
max:
sample: echo 365
min:
sample: echo 0
- title: DAY PROGRESS
position: [[45, 3], [35, 2]]
cur:
sample: date +%H
max:
sample: echo 24
min:
sample: echo 0
- title: HOUR PROGRESS
position: [[45, 6], [35, 2]]
cur:
sample: date +%M
max:
sample: echo 60
min:
sample: echo 0
- title: MINUTE PROGRESS
position: [[45, 9], [35, 2]]
triggers:
- title: CLOCK BELL EVERY MINUTE
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
sparklines:
- title: CPU usage
position: [[0, 20], [22, 8]]
rate-ms: 200
scale: 0
sample: ps -A -o %cpu | awk '{s+=$1} END {print s}'
- title: Free memory pages
position: [[22, 20], [23, 8]]
rate-ms: 200
scale: 0
sample: memory_pressure | grep 'Pages free' | awk '{print $3}'
textboxes:
- 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}}"
- title: Local weather
position: [[69, 31], [13, 7]]
rate-ms: 10000
sample: curl wttr.in?0ATQF
border: false
- title: New York weather
position: [[45, 31], [13, 7]]
rate-ms: 10000
sample: curl wttr.in/newyork?0ATQF
transform: echo 1
border: false
- title: San Francisco weather
position: [[56, 31], [13, 7]]
rate-ms: 10000
sample: curl wttr.in/sanfrancisco?0ATQF
border: false
asciiboxes:
- title: UTC time
position: [[45, 12], [35, 7]]
rate-ms: 500
sample: env TZ=UTC date +%r
border: false
font: 3d