I am working on monitoring Vault using rest api based approach. We are getting these metrics in json format using “v1/sys/metrics” rest api. I am getting metrics when I perform any operations on Vault. I am not able to get any metrics for specific period. I mean I want to get last 2 hours or 3 hours or 2 days metrics. I don’t want to use Prometheus format metrics. Also I observed that JSON and Prometheus is giving different results.
Could you please help how to get specific period metrics in json format? Is it way to pass startime and end time to “v1/sys/metrics” api to get metrics in that period ? Or is it any way to store metrics in memory for spefic time period ?