Commit Graph

2 Commits

Author SHA1 Message Date
janphkre 9ecc44b064
Grab Timestamps from Metric (#167)
* 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>
2022-08-28 13:48:35 +02:00
rustyclock c869516e98
Refactor the complete code
* Make the working of this exporter similar to that of the blackbox_exporter to allow probing multiple targets.
* Add functionality to add headers to the request
* Update the example config to use `headers` as well as the `metrics` keys in alignment with the new code
* Add default header 'Accept: application/json'

Signed-off-by: rustyclock <rustyclock@protonmail.com>
2020-08-04 15:21:24 +09:00