-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.yaml
59 lines (57 loc) · 1.29 KB
/
config.yaml
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
metrics:
- name: metric_name
help: This is the help text
targets:
- type: file
path: examples/file.json
pipeline_stages:
- type: jq
query: |-
[.[] | {parent: .name} + (.children[] | {child: .name, val: .value})]
parser:
type: json
labels:
- parent
- child
value: val
- name: metric_name_constant_value
help: This is the help text
targets:
- type: file
path: examples/file.json
pipeline_stages:
- type: jq
query: |-
[.[] | {parent: .name} + (.children[] | {child: .name, val: .value})]
parser:
type: json
labels:
- parent
- child
value: 1
- name: github_stars
help: Number of stars on GitHub
targets:
- type: http
url: https://github.com/fredr/data-exporter/stargazers
pipeline_stages:
- type: regex
pattern: (?ms:^.*All <span[^>]+>(?P<counter>\d+)</span>.*$)
replace: |-
{"stars": $counter, "repo": "fredr/data-exporter"}
parser:
type: json
labels:
- repo
value: stars
- name: github_stargazers
help: Stargazers per reopository
targets:
- type: http
url: https://github.com/fredr?tab=repositories&type=source
parser:
type: regex
pattern: (?s:<a [^>]+?href="/(?P<repo>fredr/[^/]+?)/stargazers">.*?(?P<stars>[\d]+)\W+</a>)
labels:
- repo
value: stars