| ZONEMASTER-CLI(1p) | User Contributed Perl Documentation | ZONEMASTER-CLI(1p) |
zonemaster-cli - run Zonemaster tests from the command line
zonemaster-cli [--help | --version | --list-tests]
zonemaster-cli [OPTIONS] --dump-profile
zonemaster-cli [OPTIONS] DOMAINNAME
zonemaster-cli is a command-line interface to the Zonemaster test engine. It takes instructions the user provides as command line arguments, transforms them into suitable API calls to the engine, runs the test suite and prints the resulting messages. By default, the messages will be translated by the engine's translation module, with the corresponding timestamp and logging level when printed. See the available options below.
The printed version numbers are the versions of this program as well as the ones from the underlying Zonemaster test engine.
This can be the name of a testing module, in which case all test cases from that module will be run, or the name of a module followed by a slash and the name of a test case (test case identifier) in that module, or the name of the test case. This option is case-insensitive.
Messages with this level (or higher) will be printed. The levels are, from highest to lowest: CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, DEBUG2 and DEBUG3. The lowest three levels (DEBUG) add a significant amount of messages to be shown. They reveal some of the internal workings of the test engine, and are probably not useful for most users.
When set to the empty string, testing is allowed to complete normally no matter what messages are emitted.
The levels are, from highest to lowest: CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, DEBUG2 and DEBUG3.
Useful to know that something is happening during a run.
Setting an address not correctly configured on a local network interface fails silently.
Useful to follow the progress in a machine-readable way.
If not given, the translation system itself will look at environment variables to try and guess. If the requested translation does not exist, it will fall back to the local locale, and if that does not exist either, to English.
The argument must be either: (i) a domain name and an IP address, separated by a single slash character (/), or (ii) only a domain name, in which case a A and AAAA records lookup for that name is done in the live global DNS tree (unless overridden by --hints) and from which the results of that lookup will be used.
This switch can be given multiple times. As long as any of these switches are present, their aggregated content will be used as the entirety of the parent-side delegation information.
The four pieces of data (keytag, algorithm, type, digest) should be in the same format they would have in a zone file.
The format of the file should be from one produced by the --save switch.
For streaming JSON output, include the translated message of the tag.
These options are provided for compatibility with older scripts. The first two are aliases for "--help". The rest are aliases for their namesakes spelled with dash "-" instead of underscore "_".
zonemaster-cli zonemaster.net
zonemaster-cli --test=delegation --level=info --no-time zonemaster.net
zonemaster-cli --test=delegation01 --level=debug zonemaster.net
zonemaster-cli --list-tests
The testing and result analysis performed by Zonemaster Engine is always guided by a profile. Zonemaster Engine has a default profile with sensible defaults. Zonemaster CLI allows users to override the default profile data with values from a profile JSON file with the "--profile" option. For details on profiles and how they are represented in files, see Zonemaster::Engine::Profile.
If there is a readable file /etc/zonemaster/cli.args (Linux style), each line in that file will be prepended as an argument on the command line. If no /etc/zonemaster/cli.args is found (or is not readable) but /usr/local/etc/zonemaster/cli.args (FreeBSD style) is found and readable then that file will be used instead. Only one global file is loaded.
If there is a readable file .zonemaster/cli.args in the user's home directory, it will be used in the same way even when a global file has been loaded. Any argument in user's cli.args will override the same argument in the global config file.
For example, if one would like to by default run with the log level set to DEBUG and with translation to human-readable messages turned off, one could put this in the config file:
--raw --level=DEBUG
Only one argument per line. If the argument has a value there must be a "=" between argument and value. A line starting with "#" is a comment. Comments cannot be added on lines with arguments.
Any arguments actually given on the command line will override what is in any of the loaded config files.
More complete documentation on Zonemaster and its tests can be found on <https://doc.zonemaster.net>.
Calle Dybedahl <calle@init.se> and others from the Zonemaster project
| 2025-03-21 | perl v5.40.1 |