Asset filter
Overview
For Eliona apps with Continuous Asset Creation (CAC), it is useful to have the ability to choose which assets are created in Eliona. This can prevent the Infravolt budget from being exceeded.
Therefore, most apps with CAC offer an asset filter as a configuration option. If the app supports this option, follow this document for configuration.
Note that the asset filter is empty by default and imports all available assets. Defining an asset filter is therefore completely optional.
Structure
The assetFilter is a two-dimensional array, where:
The outer array Rules combined by the logical OR (disjunction).
Each inner array Rules combined by the logical AND (conjunction).
Each rule is an object with the following properties:
parameter: The asset attribute to be checked.regex: A regular expression for matching the attribute.
Logical evaluation
The filter logic follows these rules:
An asset matches, if at least one inner array (AND rule group) is evaluated as
truetrue.An inner array is evaluated as
truetrue if all of its rules match.A rule matches, if the asset attribute
parameterdefined inregexmatches the regular expression inIf
assetFilterempty ornullis, all assets pass the filter.
Available parameters
While there are general parameters such as "name", each app has its own set of parameters. More information about the possible filter parameters can be found in the documentation of the respective app.
Regular expressions
The regexThe regex field enables advanced filtering with regular expressions. Here are some commonly used patterns:
.*– Matches everything^Main.*– Matches strings that begin with "Main"192\\.168\\..*– Matches IP addresses in the range 192.168..(A|B|C)– Matches "A", "B" or "C"
Example scenarios
0. Import everything
1. Filter devices with the name "Main" and type "Router"
2. Filter devices with specific MAC addresses
3. Filter every asset with an IP address in the 192.168.x.x range
4. Complex filtering with multiple conditions
How it works:
If an asset meets at least one of the three groups, it passes the filter.
The first group requires that both conditions (
deviceNameanddeviceType) are met.The second and third groups each contain only one condition each, so an asset passes the filter if it has a matching
macAddressoripAddress.
Example asset evaluation:
MainRouter
Router
00:11:22:33:44:55
10.0.0.1
✅ (First group)
Printer
Printer
70:82:0e:12:28:cc
10.0.0.1
✅ (Second group)
Server
Server
00:11:22:33:44:55
192.168.5.10
✅ (Third group)
MainSwitch
Switch
00:11:22:33:44:55
10.0.0.1
❌ (No match)
Error handling
If a regular expression is invalid, an error is returned describing the problem. Make sure that:
The regular expression follows correct syntax.
Escape sequences (e.g.
\.for a dot) are used correctly.
Conclusion
The assetFilter enables flexible filtering of assets with logical conditions and regular expressions. By combining multiple conditions with AND and OR rules, users can create powerful filter logic tailored precisely to their needs.
Last updated
Was this helpful?