-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathqueries.yml
34 lines (31 loc) · 891 Bytes
/
queries.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
# Use default data source
- nr_companies_per_country:
help: Number of companies per country
sql: >
select country, count(1) as cnt from Companies group by country
data-field: cnt
# Missing database user, data source 'my-ds-missing-user' shall be used instead of the default 'my-ds'
- error_missing_user:
help: Data source error
data-source: my-ds-missing-user
sql: >
select * from dual
interval: 30s
# Missing table
- error_missing_table:
help: Missing table
sql: >
select * from missing_table
interval: 30s
# Sub queries
# This will register two metrics:
# - response_time_count with cnt as value
# - response_time_sum with rt as value
- response_time:
help: Sub metrics
sql: >
select count(*) as cnt, sum(response_time) as rt from Requests
sub-metrics:
count: cnt
sum: rt
interval: 30s