Bulk update hosts

Instead of editing hosts one by one, you can manage your inventory in bulk: export the host list to a CSV file, edit it offline in a spreadsheet or text editor, then import the updated file. Axoflow compares the file against your current inventory and applies the changes.

Using this workflow, you can:

  • Update the description and labels of existing hosts.
  • Add new hosts.
  • Delete hosts.

The Export/Import CSV option is available on the Routers page (for AxoRouters) and on the Sources page (for source and edge hosts).

Export the inventory list

  1. Open the Routers or the Sources page.

  2. (Optional) Filter or search the list to narrow down the hosts you want to work with.

  3. Select Export/Import CSV, then on the Export tab select Export CSV.

    The current list is downloaded as a CSV file.

    Export host inventory from AxoConsole

Edit the CSV file

The exported file has one row per host and the following columns, for example:

name,type,description,label.app,label.building,label.discovered,label.hostGroup,label.location,label.os,label.platform,label.product,label.rack,label.targetSample,label.team,label.vendor,fqdn,ip
arbor-edge-ppa,APPLIANCE,,,,,,,,,arbor-edge,,,,netscout,arbor-edge-ppa,192.168.9.99
azure-us-east-2-eventhub,APPLIANCE,,,2,,8,us-east-2,,,azure-event-hub,A,,windows,microsoft,azure-us-east-2-eventhub,10.192.23.63
  • name: The unique name of the host. This is what identifies the host, so keep it unchanged for hosts you want to update. The name must be a valid hostname and must be unique within the file. Required.
  • type: The type of the host: APPLIANCE, EDGE, or ROUTER. You can’t change the type of an existing host. To delete a host, set this column to DELETED.
  • description: A free-text description of the host.
  • label.<key>: Each label is a separate column named after its key, for example label.location. The cell holds the label value. To add a new label to every host, add a new label.<key> column. To add a label to a single host, fill in its cell and leave the others empty. Label keys follow the same rules as labels added in the UI.
  • fqdn, ip: The fully qualified domain name and IP address of the host. You can only set these for APPLIANCE hosts. For other host types, these values are reported by the agent and can’t be changed, so leave them as exported.

When editing the file, keep the following in mind:

  • The file is the desired state. For the fields you can edit (description, labels, and the fqdn and ip of appliances), clearing a cell clears that value on the host. For example, emptying a label.<key> cell removes that label from the host.
  • Adding a host: Add a new row. You can only add type APPLIANCE hosts, and each new host needs at least an fqdn or an ip. To add a ROUTER or an EDGE host, provision an AxoRouter or an Axoflow agent.
  • Deleting a host: Set the type column of the row to DELETED.
  • Hosts you leave out are untouched. Only the rows in the file are processed. Removing a row from the file does not delete the host — use DELETED for that.

Import the edited CSV file

  1. On the Routers or the Sources page, select Export/Import CSV, then open the Import tab.

    Import host inventory from CSV

  2. Upload the edited CSV file.

    AxoConsole compares the file against the current inventory and shows a summary of the changes to be made: how many hosts will be added, updated, and removed.

    If the file contains errors, they’re listed per row and column so you can correct them and upload the file again.

  3. Review the summary.

    Import host inventory from CSV

    CAUTION:

    Deleting hosts (DELETED) and clearing values can’t be undone. Review the change summary carefully before importing.

    Select Import CSV to apply the changes.