You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/config.yml
+31
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,37 @@ modules:
43
43
values:
44
44
population: '{ .population }'
45
45
46
+
transform:
47
+
metrics:
48
+
- name: origin
49
+
transformations:
50
+
- type: jq
51
+
query: |-
52
+
.result[] | .name as $poolName | .id as $poolId | .origins[] | ( .name as $name | .healthy as $endpointHealth | {endpointName: $name, endpointHealthy: .healthy, poolName: $poolName, address:.address, poolId:$poolId, address:.address} )
53
+
help: Health of each origin in the pool
54
+
path: '{ [*] }'
55
+
type: object
56
+
labels:
57
+
pool_id: '{.poolId}'
58
+
pool_name: '{.poolName}'
59
+
address: '{.address}'
60
+
endpoint_name: '{.endpointName}'
61
+
values:
62
+
health: '{.endpointHealthy}'# Extract only the `healthy` field
63
+
64
+
65
+
- name: pool
66
+
type: object
67
+
help: Health of the pools
68
+
path: '{.result[*]}'
69
+
labels:
70
+
pool_name: '{.name}'
71
+
pool_id: '{.id}'
72
+
values:
73
+
health: '{.healthy}'
74
+
75
+
76
+
46
77
## 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
ch<-timestampMetric(mc.Logger, m, mc.Data, metric)
80
+
ch<-timestampMetric(mc.Logger, m, jsonData, metric)
68
81
} else {
69
-
level.Error(mc.Logger).Log("msg", "Failed to convert extracted value to float64", "path", m.KeyJSONPath, "value", value, "err", err, "metric", m.Desc)
82
+
level.Error(mc.Logger).Log("msg", "Failed to convert extracted value to float64", "path", m.KeyJSONPath, "value", value, "err", err, "metric", m.Desc)// was getting error here!
0 commit comments