Skip to content

Uploading assets to the Nanitor system with a csv file

If your company oversees assets that you are aware of but are fully invisible to the Nanitor system (that is, they do not have a running agent, are not collected by a collector, and are not seen on the network by other devices if the Network Discovery feature is enabled), then you can still manually let Nanitor know about them by uploading a .csv file with information about these assets.

  1. From within the Nanitor interface, click the "Assets" link in the menu under "Inventory".

Asset Inventory Menu

  1. Near the top right corner of the asset list table, click the Add new asset button

Then choose Import assets as CSV, click Select, and pick the CSV file. Importing requires the Manage assets permission.

Add asset options

The columns in this CSV file should be:

  • Hostname (required): The hostname of the device, to be shown in the Nanitor interface.
  • IP (required): An IP address for this device, required to uniquely identify it.
  • Type (optional): A device type: for example "Desktop", "Laptop", "Server", "Network", "Mobile", "Database", "Cloud" or "Printer". The value is not case-sensitive. If none (or a different string) is specified, it will be "Unknown". See CSV File Format in the User Guide for the full list.
  • Labels (optional): Any device labels that should be assigned to the device, separated by commas. In a comma-delimited file, put the whole cell in double quotes, for example "Servers, Production". Without the quotes, the import fails with "CSV row N has an incorrect number of columns". In a semicolon-delimited file, no quotes are needed. Label names cannot contain commas. Labels that do not exist yet are created automatically.
  • Benchmark (optional): The name of the benchmark profile used to report compliance coverage for this unmonitored asset (see below).

For new assets, the optional columns may be empty or left out entirely. Existing assets are handled differently, see Updating existing assets. The first line of the CSV file should contain the column headers in use, as listed above. An example CSV file could for instance look like this:

Hostname;IP;Type;Labels;Benchmark
MyDevice1;192.168.0.141;Desktop;Sandbox,Label1;MS Win 10 - Level 1
MyDevice2;192.168.0.142;Desktop;label1;MS Win 10 - Level 1
MyDevice3;192.168.0.143;Server;Label2;MS Win Server 2012 - Level 1 - Member Server

You can create a CSV file by exporting from a program such as Microsoft Office Excel. If you prepare an Excel spreadsheet that looks like this:

Then it can be exported into a CSV file like the above by pressing Ctrl+Shift+S (Cmd+Shift+S on a Mac) and selecting "Comma-separated Values (.csv)" in the "File Format" field.

(Nanitor will understand CSV files with either comma or semicolon delimeters.)

When the import succeeds, a message shows how many assets were processed and how many new assets were created:

Success message after a CSV import

An asset added to the system in this way will have Authorized state (not monitored). When Authorized devices exist, you can filter by Authorized in the assets inventory to see these devices:

Asset inventory filtered to Authorized assets

Since the Nanitor system has no way of collecting information about this asset, it will have no information beyond that included in the CSV file. You can however edit the basic info for the device the same as any other device.

Asset details of an asset imported from CSV

On the compliance report page, if assets with Authorized state (not monitored) exist in the system there will be two added columns, Undiscovered assets and Coverage. The former shows the number of authorized (unmonitored) assets listed under that benchmark, while the latter shows the percentage of the total assets under that benchmark that have been discovered by Nanitor.

Authorized assets that match no archival rule become pending archival after 7 days of inactivity. See Nanitor Archival Policy. The 7-day period is set by the auto_archive_undiscovered_days setting in nanitor_manager.ini, which defaults to the auto_archive_days value. Uploading a CSV file with archived assets again will unarchive them, unless a user archived them manually. Manually archived assets stay archived.

Importing a CSV adds or updates assets only. Assets that are not in the file are left unchanged.

Updating existing assets

Uploading a CSV that contains an asset that already exists does not always change it. What the import changes depends on how the asset is monitored, and rows for assets that an agent, collector or parent asset monitors are never changed. See CSV Import in the User Guide for the full rules, including custom fields and error messages.

A row matches an existing asset only when both of these are true:

  • The Hostname is exactly the name shown in Nanitor, including upper and lower case.
  • The IP is exactly one of the addresses in the asset's IP Addresses column, including the prefix length, for example 192.168.0.140/24. An IP without a prefix length is read as /32 (for IPv6, /128), so 192.168.0.140 matches only an address listed as 192.168.0.140/32.

If no asset matches, the import creates a new Authorized asset. For an asset that an agent, collector or parent asset monitors, that new asset is a duplicate.

A missing Benchmark value removes the benchmark assignment

If the Benchmark column is left out, or a cell is empty or not recognized, the benchmark profile that an earlier import assigned to the asset is removed. Benchmarks on assets monitored by an agent, collector or parent asset are never affected.

What if I add an agent to the device later?

When the agent first contacts the server, Nanitor matches it to the existing asset if the hostnames are equal (ignoring case) and the agent shares at least one IPv4 address with the asset. For sign-up the netmask is ignored, unlike the exact match that the CSV import uses. The asset is then converted from Authorized state to Active state, beginning active monitoring. See Matching agent sign-ups to existing assets in the User Guide for the other match conditions.

Benchmark profiles

The benchmark profile names that should be entered in the CSV match the names given on the Nanitor compliance report page. Note that the name must match exactly for the benchmark to be properly assigned. The most common are as follows:

Benchmark profile name
Amazon Linux 2 - Level 1 - Server
Amazon Web Services Foundations - Level 1
Apple OSX Big Sur - Level 1
Apple OSX El Capitan - Level 1
Apple OSX High Sierra - Level 1
Apple OSX Mojave - Level 1
Apple OSX Sierra - Level 1
Apple OSX Yosemite - Level 1
CentOS 6 - Level 1 - Server
CentOS 7 - Level 1 - Server
CentOS 8 - Level 1 - Server
Check Point Gaia - Level 1
Cisco Firepower - Level 1
Cisco Firewall - Level 1 - Cisco ASA 8.x
Cisco IOS 12 - Level 1
Cisco IOS 15 - Level 1
Cisco IOS 16 - Level 1
Cisco Nexus - Level 1
Debian 10 - Level 1
Debian 7 - Level 1
Debian 8 - Level 1
Debian 9 - Level 1
Fortigate FortiOS - Level 1
FreeBSD 11 - Level 1
HP Comware - Level 1
IBM AIX - Level 1
Juniper JunOS - Level 1
MS Win 10 - Level 1
MS Win 7 - Level 1
MS Win 8 - Level 1
MS Win 8.1 - Level 1
MS Win Server 2003 - Level 1 - Member Server
MS Win Server 2003 - Level 1 - Domain Controller
MS Win Server 2008 - Level 1 - Member Server
MS Win Server 2008 - Level 1 - Domain Controller
MS Win Server 2008 R2 - Level 1 - Member Server
MS Win Server 2008 R2 - Level 1 - Domain Controller
MS Win Server 2012 - Level 1 - Member Server
MS Win Server 2012 - Level 1 - Domain Controller
MS Win Server 2012 R2 - Level 1 - Member Server
MS Win Server 2012 R2 - Level 1 - Domain Controller
MS Win Server 2016 - Level 1 - Member Server
MS Win Server 2016 - Level 1 - Domain Controller
MS Win Server 2019 - Level 1 - Member Server
MS Win Server 2019 - Level 1 - Domain Controller
MS Win XP - Level 1
Nginx - Level 1 - Webserver
OpenBSD 6 - Level 1
Oracle Database 11 - Level 1 - RDBMS
Oracle Database 12 - Level 1 - RDBMS using Traditional Auditing
Oracle Linux 6 - Level 1 - Server
Oracle Linux 7 - Level 1 - Server
Oracle Linux 8 - Level 1 - Server
Oracle MySQL - Level 1 - MySQL RDBMS Community
Oracle Solaris 10 - Level 1
Oracle Solaris 11 - Level 1
PostgreSQL - Level 1 - PostgreSQL
RHEL 5 - Level 1
RHEL 6 - Level 1 - Server
RHEL 7 - Level 1 - Server
RHEL 8 - Level 1 - Server
SUSE 11 - Level 1 - Server
SUSE 12 - Level 1 - Server
SUSE 15 - Level 1 - Server
Ubiquity EdgeOS - Level 1
Ubuntu 14.04 - Level 1 - Server
Ubuntu 16.04 - Level 1 - Server
Ubuntu 18.04 - Level 1 - Server
Ubuntu 20.04 - Level 1 - Server