mirror of
https://github.com/prometheus-community/json_exporter
synced 2024-12-23 23:14:21 +00:00
9ecc44b064
* Pick timestamp from metric based on #97 and #80 this provides the posibility to use a metric that has a unix style timestamp as the timestamp of the scraped metric When deserializing objects we need to take the key json path into account as well like we would do for all the values as well. This allows collections to be defined still with each entry having a separate timestamp (e.g. list of time-stamped log messages). Update examples for timestamp Update Readme about staleness for custom timestamps Signed-off-by: Jan Phillip Kretzschmar <janphkre@gmx.de> Signed-off-by: Ben Kochie <superq@gmail.com> Co-authored-by: Ben Kochie <superq@gmail.com>
26 lines
507 B
JSON
26 lines
507 B
JSON
{
|
|
"counter": 1234,
|
|
"timestamp": 1657568506,
|
|
"values": [
|
|
{
|
|
"id": "id-A",
|
|
"count": 1,
|
|
"some_boolean": true,
|
|
"state": "ACTIVE"
|
|
},
|
|
{
|
|
"id": "id-B",
|
|
"count": 2,
|
|
"some_boolean": true,
|
|
"state": "INACTIVE"
|
|
},
|
|
{
|
|
"id": "id-C",
|
|
"count": 3,
|
|
"some_boolean": false,
|
|
"state": "ACTIVE"
|
|
}
|
|
],
|
|
"location": "mars"
|
|
}
|