This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
dbi_cinder_services.json
58 lines (58 loc) · 2.22 KB
/
dbi_cinder_services.json
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
{
"queries": [
{
"name": "services_down",
"statement": "select concat_ws('/', 'services', replace(replace(s1.binary, 'nova-', ''), 'cinder-', ''), 'down') as metric, count(s2.id) as value from services s1 left outer join services s2 on s1.id = s2.id and s1.disabled=0 and s1.deleted=0 and timestampdiff(SECOND,s1.updated_at,utc_timestamp())>120 group by s1.binary",
"results": [
{
"instance_from": "metric",
"value_from": "value"
}
]
},
{
"name": "services_up",
"statement": "select concat_ws('/', 'services', replace(replace(s1.binary, 'nova-', ''), 'cinder-', ''), 'up') as metric, count(s2.id) as value from services s1 left outer join services s2 on s1.id = s2.id and s1.disabled=0 and s1.deleted=0 and timestampdiff(SECOND,s1.updated_at,utc_timestamp())<=120 group by s1.binary",
"results": [
{
"instance_from": "metric",
"value_from": "value"
}
]
},
{
"name": "services_disabled",
"statement": "select concat_ws('/', 'services', replace(replace(s1.binary, 'nova-', ''), 'cinder-', ''), 'disabled') as metric, count(s2.id) as value from services s1 left outer join services s2 on s1.id = s2.id and s2.disabled = 1 and s1.deleted=0 group by s1.binary",
"results": [
{
"instance_from": "metric",
"value_from": "value"
}
]
}
],
"databases": [
{
"name": "cinder",
"driver": "mysql",
"driver_option": {
"host": "123.456.78.9",
"port": "3306",
"username": "cinder",
"password": "passwd",
"dbname": "cinder"
},
"dbqueries": [
{
"query": "services_up"
},
{
"query": "services_down"
},
{
"query": "services_disabled"
}
]
}
]
}