Skip to Content
Administration

Route Assets to Spaces

Write asset routing rules that decide which space each asset from an organization-level integration lands in.

When you set up an organization-level integration that scans assets, Mondoo needs to know which space each asset belongs in. Your organization's asset routing rules decide that. Each rule names a target space and the conditions an asset must meet to go there.

Asset routing applies to organization-level scans. It doesn't affect integrations you set up inside a space, which always put their assets in that space, or organization-level exports, which export every space of the organization.

How Mondoo routes an asset

For each asset an organization-level scan finds, Mondoo checks your routing rules in order of priority, lowest number first. The first rule that matches the asset decides its space, and Mondoo stops checking.

  • No rule matches. The asset is not placed in any space, so Mondoo doesn't store it. To make sure every asset lands somewhere, add a default rule as a catch-all.
  • Your organization has no routing rules at all. Mondoo rejects the scan and stores nothing. The integration's Activity log shows the error. Add at least one rule, then run the integration again.

A rule's target must be a space in the same organization.

View your routing rules

In the Mondoo App, navigate to the organization. In the side navigation, select Settings, and then select Asset Routing.

The Routing rules table lists each rule's Target space, its Condition, its Priority, and the number of Assets it has routed. The Asset routing flow chart shows how assets flow from your rules into spaces.

Add a routing rule

  1. On the Asset Routing page, select Add rule.

  2. To make this a catch-all rule, check Default rule. A default rule matches every asset that doesn't match any other rule.

  3. In Target space, choose the space that matching assets go to.

  4. In Priority, enter a number. The default is 100. Lower values are evaluated first, and the first match wins.

  5. Under Conditions, select + Add condition for each condition you want and fill in:

    • Field: what to compare. Choose Hostname, Platform, or Label. For Label, also enter the Label key.
    • Operator: how to compare. Choose Equals, Not equals, Contains, or Matches (glob).
    • Values: one or more values, separated by commas.

    All conditions must match for the rule to apply (they're combined with AND). A rule with no conditions matches every asset.

  6. Select Save.

For example, a rule with the condition Hostname Matches (glob) *.prod.example.com, target space Production, and priority 50 sends every production host to the Production space, ahead of rules with the default priority of 100.

Route one integration's assets to a space

Every asset that an organization-level integration finds carries the label mondoo.com/integration-mrn, whose value is the integration's MRN. To send all of one integration's assets to one space, create a rule with the condition Label, label key mondoo.com/integration-mrn, Equals, and the integration's MRN as the value.

You usually don't have to write this rule yourself. When you add an organization-level scan and pick a space under Asset routing (optional), Mondoo creates exactly this rule with priority 10. For another rule to take precedence over it, give that rule a priority lower than 10.

Delete a routing rule

  1. On the Asset Routing page, select the delete button in the rule's row.

  2. In the Delete routing rule? dialog, select Delete rule.

Removing an integration doesn't delete the routing rule Mondoo created for it. Delete the rule here if you no longer need it.

What happens when you change a rule

Mondoo matches a host only against the assets in the space its rules pick. If you change a rule so that a host now routes to a different space, the next scan creates a new asset for that host in the new space. The asset in the old space stops receiving updates and ages out like any other asset that no longer reports. When you edit a rule and pick a different Target space, the Edit routing rule dialog warns you how many of the rule's assets stay in the old space. To learn how Mondoo cleans up inactive assets, read Remove obsolete assets.

Learn more

Last updated on

On this page