Skip to content

Check metrics API output against promtool #305

@jsteemann

Description

@jsteemann

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions