2020-08-04 05:50:52 +00:00
---
2022-05-27 05:47:32 +00:00
modules :
default :
2023-03-08 01:49:17 +00:00
headers :
X-Dummy : my-test-header
2022-05-27 05:47:32 +00:00
metrics :
- name : example_global_value
2023-03-08 01:49:17 +00:00
path : '{ .counter }'
2022-05-27 05:47:32 +00:00
help : Example of a top-level global value scrape in the json
labels :
environment : beta # static label
2023-03-08 01:49:17 +00:00
location : 'planet-{.location}' # dynamic label
2022-08-28 11:48:35 +00:00
- name : example_timestamped_value
2023-03-08 01:49:17 +00:00
type : object
2022-10-14 01:54:46 +00:00
path : '{ .values[?(@.state == "INACTIVE")] }'
2023-03-08 01:49:17 +00:00
epochTimestamp : '{ .timestamp }'
2022-08-28 11:48:35 +00:00
help : Example of a timestamped value scrape in the json
labels :
environment : beta # static label
2023-03-08 01:49:17 +00:00
values :
count : '{.count}' # dynamic value
2022-05-27 05:47:32 +00:00
- name : example_value
type : object
help : Example of sub-level value scrapes from a json
path : '{.values[?(@.state == "ACTIVE")]}'
labels :
environment : beta # static label
2023-03-08 01:49:17 +00:00
id : '{.id}' # dynamic label
2022-05-27 05:47:32 +00:00
values :
2023-03-08 01:49:17 +00:00
active : 1 # static value
2022-05-27 05:47:32 +00:00
count : '{.count}' # dynamic value
boolean : '{.some_boolean}'
2020-08-04 05:50:52 +00:00
2023-03-08 01:49:17 +00:00
animals :
metrics :
- name : animal
type : object
help : Example of top-level lists in a separate module
path : '{ [*] }'
labels :
name : '{ .noun }'
predator : '{ .predator }'
values :
population : '{ .population }'
2021-10-03 09:30:53 +00:00
2023-03-08 01:49:17 +00:00
## HTTP connection configurations can be set in 'modules.<module_name>.http_client_config' field. For full http client config parameters, ref: https://pkg.go.dev/github.com/prometheus/common/config?tab=doc#HTTPClientConfig
2022-05-27 05:47:32 +00:00
#
# http_client_config:
# tls_config:
# insecure_skip_verify: true
# basic_auth:
# username: myuser
# #password: veryverysecret
# password_file: /tmp/mysecret.txt
2022-07-11 00:08:07 +00:00
2023-03-08 01:49:17 +00:00
## List of accepted status codes for this probe can be set in 'modules.<module_name>.valid_status_codes' field. Defaults to 2xx.
# valid_status_codes: [ <int>, ... | default = 2xx ]
## If 'modueles.<module_name>.body' field is set, it will be sent by the exporter as the body content in the scrape request. The HTTP method will also be set as 'POST' in this case.
# body:
# content: |
# {"time_diff": "1m25s", "anotherVar": "some value"}
## The body content can also be a Go Template (https://golang.org/pkg/text/template), with all the functions from the Sprig library (https://masterminds.github.io/sprig/) available. All the query parameters sent by prometheus in the scrape query to the exporter, are available in the template.
# body:
# content: |
# {"time_diff": "{{ duration `95` }}","anotherVar": "{{ .myVal | first }}"}
# templatize: true