- 28 May 2023
- 5 Minutes to read
- Print
- DarkLight
- PDF
Axonius - Add Custom Data to Assets
- Updated on 28 May 2023
- 5 Minutes to read
- Print
- DarkLight
- PDF
Axonius - Add Custom Data to Assets adds one custom field (string type) to each of the assets that are the result of the query. You can then use that field in future queries.
See Creating Enforcement Sets to learn more about adding Enforcement Actions to Enforcement Sets.
General Settings
- Enforcement Set name (required) - The name of the Enforcement Set. A default value is added by Axonius. You can change the name according to your needs.
- Add description - Click to add a description of the Enforcement Set. It is recommended to describe what the Enforcement Set does.
- Run action on assets matching following query (required) - Select an asset category and a query. The Enforcement Action will be run on the assets that match the query parameters.
- A query only returns results for the asset type it was created for.
- Not all asset categories are supported for all Enforcement Actions.
- See Actions supported for Activity Logs, Adapter Fetch History and Asset Investigation Modules
- See Actions supported for Vulnerabilities.
- See Actions supported for Software.
- Action name (required) - The name of the Main action. A default value is added by Axonius. You can change the name according to your needs.
- Configure Dynamic Values - Toggle on to enter a Dynamic Value statement. See Creating Enforcement Action Dynamic Value Statements to learn more about Dynamic Value statement syntax.
Required Fields
These fields must be configured to run the Enforcement Set.
- Field name - Enter a name for the field.
Custom field names support special characters (i.e., not alphabetic or numeric characters). However, the system does not support giving a custom field a name identical to that of an already existing custom field apart from special characters. For example: If CustomField*1 is a defined custom field, you should not name a new custom field CustomField$1 or CustomField#1.
- In the Field Type list, do one of the following:
- To create a single-value field, select Single Value .
- To create a list field, select Multiple Values.
- In the Value type field, you can select a value type according to the field type you selected.
- When Field Type is Single Value, the following Value Types are available:
- String
- Date - See Adding Dates.
- Float
- Integer
- Boolean
- When Field Type is Multiple Values, the following Value Types are available:
- String
- Date - See Adding a list of Dates
- Float
- Integer
- When Field Type is Single Value, the following Value Types are available:
- When the Field Type is Single Value, enter a value in the Field value box. The value is determined by the Value Type.
a. When you choose String, specify a free-text value for the custom field in the Field value field.
b. When you choose Boolean, select a custom field value either Yes or No in the Field value drop-down.
c. When you choose Date you have to select a date, see Adding Dates below for more details. - When the Field Type is Multiple Values, in the Add text box, type the list of field values. Press Enter, comma or semicolon to add another value. You can click on the x of a value to remove it, or click on a value to edit it.
a. When you choose List String, enter each item and either type a comma, a semi-colon or press Enter to add the value to the list. You can also paste a comma separated list into the field. See Adding a List String below.
b. When you choose List Date you have to select a date, see Adding Dates below for more details.
c. Click on items in a list to edit them. - Field Value - Enter a Value according to the field type
- If the added custom field already exists on the device, it is` overridden.
- If the added custom field already exists with a different field type, the action will fail.
For example. If you want to add an item to an existing list from the enforcement center - you need to use the existing enforcement and add the item there. When you add an item to an existing list, you overwrite the values in the list.
Adding Dates
You can add one or more Dates as custom field values. This is useful to identify the first time an asset was non-compliant.
To add a single date
- Enter a Field name.
Select Single Value * as the Field type and Date as the Value type.
From the Date Type field, set the type of date that will be set in this field; either choose Now (Execution time) or set a Specific date.
- Now (Execution time) adds the date and time that the Enforcement action is run.
- A Specific date can be either in the past or the future. When you choose Specific date, click in the Set Date field to select a date and time. The times displayed are in UTC.
- You can use the option Don’t overwrite values if custom field already exists if you do not want to change an existing date that you have already added (for instance if the action added a custom date to show the first time something was found on the system, you would not want to overwrite this value).
- Click Save to save the Action.
To Add a List of Dates
- Select Multiple Values as the Field type
- Select Date as the Value type
- Follow the steps in Adding Dates.
- Click Add Date in the field, to add another date.
- Click Save to save the Action.
Adding a List String
To add items to a list string
- Do one of the following
- Type the name of the field value and press Enter.
- Type the name of the field value and press Comma (,).
- Type the name of the field value and press Semicolon (;).
For example
* Type “field-1” and press Enter. A tile named “field-1” is added to the list.
* Type “field-2” and type a comma “,”. A tile named “field-2” is added to the list.
* Type “field-3” and type a semicolon “;”. A tile named “field-3” is added to the list.
To remove items from the list, click the x in the tile you want to remove.
You can select If field exists add new values to the list (otherwise override all existing values) to add new values to a list if the field already exists, otherwise existing values are overwritten.
Once you add custom data, you can use the custom data as a field in queries.
Additional Fields
These fields are optional.
- Remove this custom data field from entities not found in the saved query results Select whether to also remove the Custom Fields from all entities that are not part of the list of assets the Enforcement Task ran on. To see a list of these assets, view the run history detail and click Additional in the drawer header.
For more details about other Enforcement Actions available, see Action Library.