Fix valuetype tests (#165)
Add missing valuetype configuration to tests. Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
parent
73f01066f3
commit
a03b913a00
|
@ -5,6 +5,7 @@ modules:
|
|||
- name: example_global_value
|
||||
path: "{ .counter }"
|
||||
help: Example of a top-level global value scrape in the json
|
||||
valuetype: gauge
|
||||
labels:
|
||||
environment: beta # static label
|
||||
location: "planet-{.location}" # dynamic label
|
||||
|
@ -13,6 +14,7 @@ modules:
|
|||
type: object
|
||||
help: Example of sub-level value scrapes from a json
|
||||
path: '{.values[?(@.state == "ACTIVE")]}'
|
||||
valuetype: counter
|
||||
labels:
|
||||
environment: beta # static label
|
||||
id: '{.id}' # dynamic label
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# HELP example_global_value Example of a top-level global value scrape in the json
|
||||
# TYPE example_global_value untyped
|
||||
# TYPE example_global_value gauge
|
||||
example_global_value{environment="beta",location="planet-mars"} 1234
|
||||
# HELP example_value_active Example of sub-level value scrapes from a json
|
||||
# TYPE example_value_active untyped
|
||||
# TYPE example_value_active counter
|
||||
example_value_active{environment="beta",id="id-A"} 1
|
||||
example_value_active{environment="beta",id="id-C"} 1
|
||||
# HELP example_value_boolean Example of sub-level value scrapes from a json
|
||||
# TYPE example_value_boolean untyped
|
||||
# TYPE example_value_boolean counter
|
||||
example_value_boolean{environment="beta",id="id-A"} 1
|
||||
example_value_boolean{environment="beta",id="id-C"} 0
|
||||
# HELP example_value_count Example of sub-level value scrapes from a json
|
||||
# TYPE example_value_count untyped
|
||||
# TYPE example_value_count counter
|
||||
example_value_count{environment="beta",id="id-A"} 1
|
||||
example_value_count{environment="beta",id="id-C"} 3
|
||||
|
|
Loading…
Reference in New Issue