Forrest logo
tool overview
On this page you find all important commands for the CLI tool promtool. If the command you are looking for is missing please ask our AI.

promtool

Promtool is a command-line utility tool used in Prometheus, an open-source monitoring and alerting system.

  1. Promtool is developed by the team behind Prometheus to assist with configuration, rule syntax validation, and troubleshooting.
  2. It comes bundled with Prometheus, so installing Prometheus automatically provides access to promtool.
  3. The tool primarily focuses on two main functionalities: rule syntax checking and configuration validation.
  4. Rule syntax checking ensures that the alerting and recording rules written for Prometheus follow the correct syntax and are error-free, thereby avoiding potential issues during rule evaluation.
  5. Promtool provides a comprehensive rule syntax checker that helps identify any syntax errors and provides feedback on rule correctness.
  6. The configuration validation feature allows users to verify whether their Prometheus configuration file is correctly formatted and adheres to the required specifications.
  7. It performs an extensive set of checks on the configuration file, including checking for missing or unsupported configuration options, and provides detailed error messages to aid troubleshooting.
  8. Promtool can be used both offline and online, making it flexible to operate on local or remote configuration and rule files.
  9. Users can integrate promtool into their CI/CD pipelines or pre-commit hooks to ensure that rule syntax and configuration errors are caught early before being deployed.
  10. It serves as a valuable tool for Prometheus administrators and developers, helping them maintain the health and accuracy of their monitoring and alerting setup.

List of commands for promtool:

  • promtool:tldr:05e41 promtool: Check if the rule files are valid or not (if present report errors).
    $ promtool check rules ${rules_file-yml}
    try on your machine
    explain this command
  • promtool:tldr:5e167 promtool: Check if the config files are valid or not (if present report errors).
    $ promtool check config ${config_file-yml}
    try on your machine
    explain this command
  • promtool:tldr:b3194 promtool: Unit tests for rules config.
    $ promtool test rules ${test_file-yml}
    try on your machine
    explain this command
tool overview