check config
There are several types of checks presented by promtool. One of the most valuable is the check for the main configuration file for the Prometheus server.
check config expects a path to the Prometheus main configuration file and outputs its assessment of the validity of the configuration. When something is amiss, this subcommand can tell the user what the problem is: if it's a non-breaking issue, such as an empty discovery file, it will output a warning but permit promtool to exit with success; when it encounters breaking errors, such as incorrect syntax, it will output an error and will mark the check as a failure. Using the exit code returned by the tool – 0 for success and 1 for failure – is a great way to ensure configuration ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access