Asset Filter
Overview
For Eliona apps with Continuous Asset Creation (CAC), it's useful to have possibility to select which assets will be created in Eliona. This way you can avoid overrunning infravolt budget.
Most apps with CAC therefore have an asset filter as an option in configuration. If the app has such option, follow this document to configure it.
Note that empty asset filter is the default, and will import all the assets available. Therefore defining the asset filter is completely optional
Structure
The assetFilter
is a two-dimensional array where:
The outer array represents rules combined by logical OR (disjunction).
Each inner array represents rules combined by logical AND (conjunction).
Each rule is an object containing:
parameter
: The asset attribute to match.regex
: A regular expression used for matching the attribute.
Logical Evaluation
The filtering logic follows these rules:
An asset matches if at least one inner array (AND rule group) evaluates to
true
.An inner array evaluates to
true
if all its rules match.A rule matches if the asset's attribute, defined in
parameter
, satisfies the regular expression inregex
.If
assetFilter
is empty ornull
, all assets pass the filter.
Available Parameters
While there are common parameters, like "name", every app has a different set of parameters. Refer to the application’s documentation to find the filtering parameters possibilities.
Regular Expressions
The regex
field allows advanced filtering using regular expressions. Here are some common patterns:
.*
– Matches anything^Main.*
– Matches strings starting with "Main"192\\.168\\..*
– Matches IP addresses in the 192.168.. range(A|B|C)
– Matches "A", "B", or "C"
Example Scenarios
0. Import everything
1. Match Devices Named "Main" with Type "Router"
2. Match Devices with Specific MAC Addresses
3. Match Any Asset with an IP in 192.168.x.x
4. Complex Filtering with Multiple Conditions
How It Works:
If an asset matches any one of the three groups, it passes the filter.
The first group requires both conditions (
deviceName
anddeviceType
) to be true.The second and third groups contain only one condition, meaning if an asset has a matching
macAddress
oripAddress
, it passes.
Example Asset Evaluations:
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)
Last updated