CSV
  • 23 Sep 2022
  • 11 Minutes to read
  • Dark
    Light
  • PDF

CSV

  • Dark
    Light
  • PDF

About CSV Adapter

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

Use cases the adapter solves

You might have custom user or device data that isn’t coming from a discrete data source. Or an adapter for your particular tool might not yet be available (Although if this is the case, please let us know. We’re happy to create new adapters for our customers). With the CSV adapter, you can still import custom data and ensure it correlates to Axonius’ aggregated fields as expected.

Data retrieved by CSV
For more details on the possible formats of the CSV file, review the documentation below or the sample .csv files provided.


NOTE

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

Parameters

  1. File contains users information
    • 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
    • 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 doesn't 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) - 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:// or with SFTP:// or with FTPS://
      • The default port for each method is as follows:
        • FTP: 21
        • SFTP: 22
        • FTPS: 990
      • A custom port can be specified in the supplied path, for example: ftps://my.host.in.axonius.com:21/path/to/file.ext
  3. User name for online resource (Share/URL) and Password for online resource (Share/URL) (optional) - 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. Azure Storage Container Name - the name of the container on Azure where the CSV file is located.

  5. Azure Connection String - The connection string that includes the authorization information required to access data in the Azure Storage account.

    • When you Configure the CSV adapter to fetch a file from Azure you need to supply the following information, the File Name, the Azure Storage Container Name, the Azure Blob Name, and the Azure Connection String. You can find the connection string in the Azure portal under Storage Accounts -> [Account Name] -> Access Keys, where [Account Name] is the specific storage account that contains the CSV files to be ingested into Axonius. You will need to copy the entire connection string and paste it into this field.
  6. Azure Blob Name - the Azure Blog Name.

  7. Amazon S3 bucket name (optional) - The name of the S3 bucket to fetch the file.

  8. Amazon S3 object location (optional) - The location within the S3 bucket where the file can be fetched.

  9. Amazon S3 Use EC2 Attached Instance Profile

    • 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.
  10. Amazon S3 Access Key ID and Amazon S3 Secret Access Key (optional) - The credentials used to access the S3 object.

  11. Encoding (optional) - 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.
  12. Ignore illegal characters - Select whether illegal characters to be ignored during the data import. An illegal character is any character that cannot be translated in the specified file encoding.

    • If enabled, Axonius will ignore illegal characters and will omit those from the imported data.
    • If disabled, if an illegal character is found, the entire data import will fail.
  13. Custom prefix for dynamic fields (optional) - Specify a prefix to be added for dynamic fields. Dynamic fields refer to any field that is not part of an asset default fields.

    • If supplied, Axonius will add the specified prefix for any dynamic field. This can assist you in identifying such fields.
    • If not supplied, Axonius will not add any prefix for any dynamic field.
  14. Multi-value fields delimiter (optional) - Specify a delimiter to separate between values within the same field in the imported CSV file.

    • If supplied, Axonius will consider fields that contains the specified delimiter as multi-value fields. For example, ';'.
    • If not supplied, Axonius will consider all imported fields as single-value field.
  15. Verify SSL - 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.
  16. HTTP proxy (optional) - A proxy to use when connecting to a HTTP(S) URL specified in Path to Resource (SMB/URL)

  17. HTTPS proxy (optional) - A proxy to use when connecting to a HTTP(S) URL specified in Path to Resource (SMB/URL)

  18. Additional HTTP headers (optional) - 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.
  19. Suppress NetBIOS name lookup - 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.
  20. For details on the common adapter connection parameters and buttons, see Adding a New Adapter Connection.

CSV adapter

Advanced Settings

Note:

From Version 4.6, Advanced settings can either apply for all connections for this adapter, or you can set different advanced settings and/or different scheduling for a specific connection, refer to ​Advanced Configuration for Adapters.

  • Set Time Zone - Set the time zone of date fields fetched with this adapter. Default is UTC.

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 are required for each Import Type?


Import Type *KEY fields Optional fields
From a File - File name
- Upload file
- File contains users information
- File contains installed software information
- Encoding
- Ignore illegal characters
- Custom prefix for dynamic fields
- Multi-value fields delimiter
- 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
- Ignore illegal characters
- Custom prefix for dynamic fields
- Multi-value fields delimiter
- 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
- Ignore illegal characters
- Custom prefix for dynamic fields
- Multi-value fields delimiter
- 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
- Ignore illegal characters
- Custom prefix for dynamic fields
- Multi-value fields delimiter
- 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 *KEY 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 *KEY
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 *KEY 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 *KEY 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 *KEY 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 *KEY 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 *KEY 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 *KEY
Name name, vmname, displayname, assetname, machinename, instancename, samaccountname, endpointname *KEY
User Name username *KEY

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 *KEY 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 *KEY This field is required since the software list is imported to each individual device.
Software Name softwarename, swname *KEY
Software Vendor softwarevendor, swvendor
Software Version softwareversion, swversion

Example CSV File

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

CSVExamples.zip


First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.