We recently merged PR arangodb/arangodb#13722 into 3.8/devel.
This PR added a test to check the output of ArangoDB's metrics API (HTTP GET /_admin/metrics/v2) against promtool, which is an executable shipped with Promotheus.
promtool can validate metrics data, and we would like to leverage that, so that whenever we introduced issues with our metrics, promtool can tell us about it.
The test in the PR will only run on Linux and do nothing elsewhere. on Linux, it requires the PROMTOOL_PATH environment variable to set. If it is not set, the test will do nothing as well. This is where we are now.
So what we would need to do is to install promtool on our Linux Jenkins machines, and set the PROMTOOL_PATH environment variable to the directory containing it.
The promtool executable is part of a Prometheus distribution, and can be found in each Prometheus release distributable (e.g. in prometheus/prometheus@v2.25.1 (release)).
We also require the sh command and the true command to be working on Linux. I hope this is a given, otherwise we will need to install these too. We require sh for running a command with input/output redirection, and we use sh -c true to test the shell functionality.
The test in question can be executed as follows:
PROMOTOOL_PATH=/home/jsteemann/Downloads/prometheus/ scripts/unittest shell_client --test shell-promtool.js --cluster true
We recently merged PR arangodb/arangodb#13722 into 3.8/devel.
This PR added a test to check the output of ArangoDB's metrics API (HTTP GET
/_admin/metrics/v2) againstpromtool, which is an executable shipped with Promotheus.promtoolcan validate metrics data, and we would like to leverage that, so that whenever we introduced issues with our metrics,promtoolcan tell us about it.The test in the PR will only run on Linux and do nothing elsewhere. on Linux, it requires the
PROMTOOL_PATHenvironment variable to set. If it is not set, the test will do nothing as well. This is where we are now.So what we would need to do is to install
promtoolon our Linux Jenkins machines, and set thePROMTOOL_PATHenvironment variable to the directory containing it.The
promtoolexecutable is part of a Prometheus distribution, and can be found in each Prometheus release distributable (e.g. in prometheus/prometheus@v2.25.1 (release)).We also require the
shcommand and thetruecommand to be working on Linux. I hope this is a given, otherwise we will need to install these too. We requireshfor running a command with input/output redirection, and we usesh -c trueto test the shell functionality.The test in question can be executed as follows: