---
title: "Bulk uploading devices from a file"
description: "Add many devices to NetSense at once from a CSV or XLSX file, using the downloadable template, its mandatory and optional columns, and the import result."
---

> Documentation Index
> Fetch the complete documentation index at: https://netsense-nms.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk uploading devices from a file

Adding devices [one form at a time](https://netsense-nms.com/docs/guides/adding-devices/) is fine for a handful, but
not for a fleet. Devices upload takes a CSV or XLSX file and creates every device in it in one
pass, up to **300 devices at a time**. The columns are the same fields as the create-device
form, so everything you already know about getting manufacturer and model right applies here
too.

## Before you start

- Have your **SNMP community** ready, and permit the **agent's IP** in each device's SNMP
  access list. A bulk upload with the ACLs not yet in place creates 300 devices that all fail
  to poll; see [Device added but SNMP won't poll](https://netsense-nms.com/docs/troubleshooting/device-not-polling-snmp/).
- Check your brands and models against the
  [supported vendors and models](https://netsense-nms.com/docs/reference/supported-vendors/) list first. Names are what
  select the polling template, and fixing them in the spreadsheet before upload is far cheaper
  than fixing 300 devices afterwards.
- If you run **NetBox** as your source of truth, don't use file upload. Use the continuous
  sync instead, described in [Adding devices](https://netsense-nms.com/docs/guides/adding-devices/#bulk-adding-and-netbox).

## Download the template

Go to **Inventory → Devices** and click **Upload Devices**. Download the template in the
format you want to work in, either **Download CSV Template** or **Download XLSX Template**.
Both produce the same columns; CSV and XLSX are the two supported upload formats.

![The Devices upload panel, with buttons to download the CSV template, download the XLSX template, and upload a file](https://netsense-nms.com/docs/_nimbus/md/3wtj0p/devices-upload-panel.png)

Work from the downloaded template rather than building a file from scratch. The importer reads
the columns by their header names, so keep the header row exactly as it comes.

## Fill in the template

The template has twelve columns. Six are mandatory, six are optional and may be left empty.

### Mandatory fields

| Column | Notes |
| --- | --- |
| `device_type` | One of `OLT`, `Switch`, `BNG`, `Server` or `Generic` (case doesn't matter); decides which views the device gets |
| `hostname` | The name you'll see everywhere; pick a convention and stick to it |
| `ip` | The management IP the agent can reach |
| `manufacturer` | **Selects the polling template together with the model** |
| `model` | **Selects the polling template together with the manufacturer** |
| `community` | Your existing SNMP v2c community |

### Optional fields

| Column | Notes |
| --- | --- |
| `zone_id` | A regional grouping, usable for alarm routing |
| `site_id` | The POP the device belongs to; drives the mobile view, so field engineers see their own site's devices |
| `partner_id` | Tags devices belonging to a partner or local operator (LCO); scopes portal access and routes their alarms to their own channel |
| `mgmt_username` | OLTs only. Per-device management username; leave empty to use the tenant default credentials |
| `mgmt_password` | OLTs only. Per-device management password |
| `mgmt_secret` | OLTs only. Per-device enable/secret, where the vendor uses one |

The `mgmt_*` columns are per-device management credentials for **OLTs only**. If you fill
any of the three, `mgmt_username` and `mgmt_password` are both required. Leave all three
empty on every other device type, or the import fails. On an OLT, leaving them empty makes
it use your tenant's default credentials, the same as leaving **Use default credentials**
on in the form.

A filled file, one row per device, looks like this:

```txt
device_type,hostname,ip,manufacturer,model,community,zone_id,site_id,partner_id,mgmt_username,mgmt_password,mgmt_secret
OLT,OLT,192.168.1.1,Syrotech,SY-GEPON-4P,public,,,,,,
Switch,Switch,192.168.1.2,Huawei,S5700,public,,,,,,
BNG,BNG,192.168.1.3,MikroTik,x86,public,,,,,,
Server,Server,192.168.1.4,Supermicro,X10SRi-F,public,,,,,,
Generic,Generic Device,192.168.1.5,Supermicro,X10SRi-I,public,,,,,,
```

:::note
The trailing commas are the empty optional columns. Keep them: every row should have the same
number of columns as the header, even where the optional values are blank.
:::

An XLSX upload reads only the **first worksheet**, and blank rows are skipped.

## Upload the file

Back on **Inventory → Devices → Upload Devices**, click **Upload File** and pick your CSV or
XLSX. NetSense shows the parsed contents under **File data** so you can confirm it read the
file you meant, then reports what it created under **Import result**, broken down by device
type.

![The Devices upload panel showing parsed file data and an import result reading 5 devices imported successfully, with a breakdown by device type](https://netsense-nms.com/docs/_nimbus/md/fy66n2/devices-upload-result.png)

The import is **all-or-nothing**. If any row fails validation, nothing is imported: the
result reads **Import failed** and lists each offending line number with its reasons. Typical
causes are an unknown `device_type`, a bad IP, an empty mandatory field, a hostname or IP
that is repeated in the file or already exists in the tenant, and `mgmt_*` credentials on a
row that isn't an OLT. Fix the rows and upload the whole file again.

A successful import also lists each device type, manufacturer and model with its device
count and an **Integration** column. **Found** means NetSense has a polling template mapped
for that manufacturer and model. **Missing** means the combination isn't in NetSense's model
catalog, and an amber warning sums them up: check the spelling, and if it is right, send us
the model so we map it.

Uploaded devices behave exactly like devices added through the form: they appear in the list
immediately and start polling right away. Generic devices are ping-only.

:::caution
Upload a **small batch first**, two or three devices covering your main models, and confirm
they poll before you push the full file. A manufacturer or model typo shows up only as
**Missing** in the Integration column, or later as a device that polls basics but shows no
traffic or ONU data, and catching that on three rows is much easier than on 300.
:::

## After uploading

1. Spot-check a few devices for traffic and, on OLTs, ONU data. If a device polls but shows
   nothing, fix the manufacturer/model names and, on an OLT, run **Actions → OLT Rediscover**;
   the details are in
   [Adding devices](https://netsense-nms.com/docs/guides/adding-devices/#manufacturer-and-model-select-the-template).
2. Expect port-down alarms from unused ports on freshly added switches; see
   [Taming alarm noise](https://netsense-nms.com/docs/guides/alarm-noise/) for the cleanup.
3. [Enable device syslog](https://netsense-nms.com/docs/guides/device-syslog/) on the new devices.

Source: https://netsense-nms.com/docs/guides/bulk-upload-devices/index.mdx
