Chapter 5. Using custom rule categories

download PDF

You can create custom rule categories and assign MTA rules to them.


Although MTA processes rules with the legacy severity field, you must update your custom rules to use the new category-id field.

5.1. Adding a custom category

You can add a custom category to the rule category file.


  1. Edit the rule category file, which is located at <MTA_HOME>/rules/migration-core/core.windup.categories.xml.
  2. Add a new <category> element and fill in the following parameters:

    • id: The ID that MTA rules use to reference the category.
    • priority: The sorting priority relative to other categories. The category with the lowest value is displayed first.
    • name: The display name of the category.
    • description: The description of the category.

      Custom rule category example

      <?xml version="1.0"?>
          <category id="custom-category" priority="20000">
              <name>Custom Category</name>
              <description>This is a custom category.</description>

      This category is ready to be referenced by MTA rules.

5.2. Assigning a rule to a custom category

You can assign a rule to your new custom category.


In your MTA rule, update the category-id field as in the following example.

<rule id="rule-id">
        <hint title="Rule Title" effort="1" category-id="custom-category">
            <message>Hint message.</message>

If this rule condition is met, incidents identified by this rule use your custom category. The custom category is displayed on the dashboard and in the Issues report.

Figure 5.1. Custom category on the dashboard

Custom rule category on the Dashboard
Red Hat logoGithubRedditYoutubeTwitter


Try, buy, & sell


About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.