CSV
  • 10 minutes to read
  • Print
  • Share
  • Dark
    Light

CSV

  • Print
  • Share
  • Dark
    Light

The CSV adapter imports .csv files with inventory information including: devices and serial numbers, users, and installed software data.

NOTE

The CSV adapter parameters and functionality are common to all adapters that import files:

Parameters

  1. File contains users information (required, default: False)
    • Selecting this option will import the file as a list of Users instead of devices.
    • See the below section for fields required in a Users Information File.
  2. File contains installed software information (required, default: False)
    • Selecting this option will import an installed software list instead of devices.
    • See the below section for fields required in a Software Applications File.
  3. File name (required) - A unique name for the adapter connection. The value supplied here will be populated in the File name field for the data supplied by a specfic adapter connection.
NOTE

The specified File Name does not need to be the actual imported file name. This field is an identifier for use in the Query Wizard.

  1. Upload file (optional) - Select a local CSV file to import

    NOTE
    • When using this option, the data imported from the CSV will never be fetched again, as the file is static.
    • Each adapter that imports files supports a different file type: CSV, JSON or XML.
  2. Path to Resource (SMB/URL) (optional, default: empty) - Specify an SMB share path, a HTTP(S) URL or an FTP URL where a file can be fetched for this connection.

    • This path must include the file name.
    • If an SMB share path is supplied:
      • The path must start with double-backslashes ("\\").
      • If Suppress NetBIOS name lookup is enabled, the path must include the server's full NetBIOS name (in the following format: \\<full_server_NetBIOS_name>\path\to\file.ext). *
    • If a HTTP(S) URL is supplied:
      • The endpoint must support the HTTP GET method.
      • All URLs must start with HTTP:// or with HTTPS://.
    • If an FTP URL is supplied, all URLs must start with FTP://
  3. User name for online resource (Share/URL) and Password for online resource (Share/URL) (optional, default: empty) - Optional user name and password for the SMB share or the URL. These settings may be required if the "ubuntu" user on the Axonius system does not have access to the SMB share / URL.

    • If supplied for an SMB path, the user name and the password will be used for authentication for this connection.
    • If supplied for a URL, the user name and the password will be used for BASIC authentication for this connection.
  4. Amazon S3 bucket name (optional, default: empty) - The name of the S3 bucket to fetch the file.

  5. Amazon S3 object location (optional, default: empty) - The location within the S3 bucket where the file can be fetched.

  6. Amazon S3 Use EC2 Attached Instance Profile (required, default: False)

    • If enabled, Axonius will use the EC2 instance (Axonius installed on) attached IAM role / instance profile.
    • If disabled, Axonius will use the supplied account details in the AWS Access Key ID and AWS Access Key Secret.
  7. Amazon S3 Access Key ID and Amazon S3 Secret Access Key (optional, default: empty) - The credentials used to access the S3 object.

  8. Encoding (optional, default: empty) - Specify a specific file encoding or let Axonius encode it.

    • If supplied Axonius will try to encode the CSV file based on the specified the file encoding type (for example, utf-8) for this connection.
    • If not supplied, Axonius will try to encode the CSV file based on common file encoding types for this connection.
  9. Verify SSL (required, default: False) - If HTTP(S) URL is specified, verify the SSL certificate offered by the host supplied in the Path to Resource (SMB/URL) field. For more details, see SSL Trust & CA Settings.

    • If enabled, the SSL certificate offered by the host will be verified against the CA database inside of Axonius. If it fails validation, the connection will fail with an error.
    • If disabled, the SSL certificate offered by the host will not be verified against the CA database inside of Axonius.
  10. HTTP proxy (optional, default: empty) - A proxy to use when connecting to a HTTP(S) URL specified in Path to Resource (SMB/URL)

    • If supplied, Axonius will utilize the HTTP proxy when connecting to the host defined for this connection.
    • If not supplied, Axonius will connect directly to the host defined for this connection.
  11. HTTPS proxy (optional, default: empty) - A proxy to use when connecting to a HTTP(S) URL specified in Path to Resource (SMB/URL)

    • If supplied, Axonius will utilize the HTTPS proxy when connecting to the host defined for this connection.
    • If not supplied, Axonius will connect directly to the host defined for this connection.
  12. Additional HTTP headers (optional, default: empty) - Specify additional information to pass with the HTTP request.

    • If supplied Axonius will pass additional information with the HTTP request (for example, {"Accept": "text/csv"}) for this connection.
    • If not supplied, Axonius will not pass additional information with the HTTP request for this connection.
  13. Suppress NetBIOS name lookup (required, default: False) - Applicable only for files fetched from SMB share.

    • If enabled and if the file is fetched from SMB share, Axonius will not verify the server's name via NetBios for this connection.
    • If disabled and if the file is fetched from SMB share, Axonius will verify the server's name via NetBios for this connection.
  14. For details on the common adapter connection parameters and buttons, see Adding a New Adapter Connection.

image.png

If multiple file options are added to a 'file-based' adapter, what file will be imported?

If multiple import file import types are provided in the CSV adapter (or for other file-based) adapter, the following order will be taken for importing:

  1. Path to resource (SMB/URL)
  2. Amazon S3 Bucket
  3. Uploaded file


The file content is determined based on the following order:

  1. User assets - If File contains users information is selected
  2. Installed software list - If File contains installed software information field is enabled.
  3. Device assets - If none of the options above is selected, the CSV is assumed to be a device CSV.

Which fields can be populated for each file import type?


Import Type Required fields Optional fields
From a File - File name
- Upload file
- File contains users information
- File contains installed software information
- Encoding
- Connection Label
From a URL - File name
- Path to resource (SMB/URL)
- Verify SSL
- Choose Instance (on multi-node Axonius environment)
- File contains users information
- File contains installed software information
- Username for online resource (Share/URL)
- Password for online resource (Share/URL)
- Encoding
- HTTP proxy
- HTTP proxy
- HTTPS proxy
- Additional HTTP headers
- Connection Label
From a file share - File name
- Path to resource (SMB/URL)
- Verify SSL
- Choose Instance (on multi-node Axonius environment)
- Suppress NetBIOS name lookup
- File contains users information
- File contains installed software information
- Username for online resource (Share/URL)
- Password for online resource (Share/URL)
- Encoding
- HTTP proxy
- HTTP proxy
- HTTPS proxy
- Additional HTTP headers
- Connection Label
From an Amazon S3 Bucket - File name
- Amazon S3 bucket name
- Amazon S3 object location (key)

- File contains users information
- File contains installed software information
- Amazon S3 Access Key ID
- Amazon S3 Secret Access Key
- Encoding
- Connection Label


NOTE
Based on the order of operations, any fields that are specified and not applicable to the import type will be ignored. For example, filling in the Amazon S3 bucket name field while the Path to resource (SMB/URL) is populated will cause the Path to resource (SMB/URL) property to be ignored but not removed.

Which fields will be imported with a devices file?

The following data will be imported as common data fields while any other data in the CSV/JSON/XML will exclusively be Adapter Specific data.

NOTE
Fields marked as REQUIRED indicate that at least one of those values is required to import. The more fields available will help provide stronger correlation.
UI Field Name Accepted CSV Field Name(s) Notes
Architecture architecture
Asset Name name, vmname, displayname, assetname, machinename, instancename, samaccountname, endpointname If no hostname is configured, the Asset Name value will be used for the Host Name.
Device Manufacturer Serial serial, serialnumber, sn, hostserialnumber, deviceserialnumber, serial#, endpointserialnumber REQUIRED
Device Manufacturer manufacturer, devicemanufacturer
Device Model model, modelid, endpointmodel
Domain domain, domainname, endpointdomain If this value is not specified AND the device is specified in DOMAIN\Name format, Axonius will replace the Domain value with the parsed out DOMAIN.
Host Name hostname, host, fqdn, fullyqualifieddomainname, compname, computername, servername, dnsname, hosthostname, endpointfqdn REQUIRED If the device is specified in DOMAIN\Name, Axonius will parse the DOMAIN value out. If the CSV field is set to "unknown", Axonius will set the Host Name to blank.
ID id, identifier, serialnumber, assetid, resourceid REQUIRED The ID field is a combination of the "CSV File Name" value and the specified field names.
IPs ipaddresstext, ip, ipaddress, ipaddresses, ips, primaryip, endpointipaddress This field will accept a comma separated set of IP addresses.
Last Seen lastmessagetime, lastdiscoveredtime, lastseen If this value is not specified, we will enter the time that the CSV was last imported.
Last Used Users username This will append to the existing Last Used Users list if the device already exists.
MAC mac, macaddress, macaddresses, macs REQUIRED This field will accept a comma separated set of MAC addresses.
Network Interfaces networkinterfaces Axonius will attempt to parse IP address(es), MAC address(es), and network interface cards from this field.
OS (see Notes) os, osname, osversion, operatingsystem, osmode, uname, endpointos This field will be parsed out into multiple properties within the OS field. Not all OSes will be parsed properly. Please reach out to Axonius if an OS is not parsing as expected.
OS: Kernel Version kernel, kernelversion
Software Name packages This is delimited by spaces.

Which fields will be imported with a users file?

The following data will be imported as common data fields while any other data in the CSV/JSON will exclusively be Adapter Specific data.

NOTE
Fields marked as REQUIRED indicate that at least one of those values is required to import. The more fields available will help provide stronger correlation.
UI Field Name Accepted CSV Field Name(s) Notes
Domain domain, domainname, endpointdomain
First Name firstname, givenname
ID id, identifier, serialnumber, assetid, resourceid REQUIRED The ID field is a combination of the "CSV File Name" value and the specified field names.
Last Name lastname, surname, sn
Mail mail, email, usermail, mailaddress, email address, emailprimarywork REQUIRED
Name name, vmname, displayname, assetname, machinename, instancename, samaccountname, endpointname REQUIRED
User Name username REQUIRED

Which fields will be imported with a software applications file?

The following data will be imported as common data fields while any other data in the CSV/JSON will exclusively be Adapter Specific data.

NOTE
Fields marked as REQUIRED indicate that at least one of those values is required to import. The more fields available will help provide stronger correlation.
UI Field Name Accepted CSV Field Name(s) Notes
Host Name hostname, host, fqdn, fullyqualifieddomainname, compname, computername, servername, dnsname, hosthostname, endpointfqdn REQUIRED This field is required since we are importing the software list to each individual device.
Software Name softwarename, swname REQUIRED
Software Vendor softwarevendor, swvendor
Software Version softwareversion, swversion

Example CSV File

For an example of a csv file, please download the following zipped csv:

csv-example.zip

Was this article helpful?