connect icon indicating copy to clipboard operation
connect copied to clipboard

Add ability to push metrics as json

Open Ion-manden opened this issue 2 years ago • 0 comments

Currently if you want benthos to push metrics to external systems it seems the only way is using one of the provided databases like influx, prometheus and cloud watch.

But for some applications, simply pushing the json version of stats/metrics to an http endpoint is more desirable.

I feel like this could fit well into https://github.com/benthosdev/benthos/blob/v4/lib/metrics/logger.go just adding endpoint and protocol defaulting to "" and stdout respectivly to keep compatibility. This would also give to possibility to extend it even more like appending to a file or pushing to some event service.

Another solution would be to create it as a new file metrics/http though this kinda clashes with the current json_api.

Any suggestions or notes are much appreciated, if one of these implementations could be interesting for benthos i will start work on it as it would simplify my current setup quite a bit.

Ion-manden avatar Apr 21 '22 14:04 Ion-manden