forked from stefanprodan/dockprom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
my-exporter.yml
44 lines (44 loc) · 1.02 KB
/
my-exporter.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
name: test-exporter
endpoint: /test
port: 10001
metrics:
- name: test_gauge_values
help: Some values
type: gauge
executions:
- type: sh
command: expr 123
labels:
shell: sh
- type: bash
command: alias a=222;alias|grep alias|cut -d= -f2|cut -d\' -f2 # Only bash uses prints aliases so that the result will be 222
labels:
shell: bash
- type: tcsh
command: setenv test 333;env | grep test | cut -d= -f2 # Only tcsh has the setenv command
labels:
shell: tcsh
- type: zsh
command: foreach i (1) echo 444;end # Only zsh can run foreach on a single line
labels:
shell: zsh
- name: test_gauge_other_values
help: Other values
type: gauge
executions:
- type: sh
command: echo 1 | wc -c
labels:
type: two-digit
- type: sh
command: echo 123 | wc -c
labels:
type: four-digit
- type: sh
command: echo 1234 | wc -c
labels:
type: five-digit
- type: sh
command: echo 12345 | wc -c
labels:
type: six-digit