Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check metrics API output against promtool #305

Open
jsteemann opened this issue Mar 19, 2021 · 0 comments
Open

Check metrics API output against promtool #305

jsteemann opened this issue Mar 19, 2021 · 0 comments
Assignees
Milestone

Comments

@jsteemann
Copy link
Contributor

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/[email protected] (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
@jsteemann jsteemann added this to the devel milestone Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants