2017-11-08 16:57:23 -06:00
|
|
|
# Adding Device
|
|
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
You have two options for adding a new device into LibreNMS. You can
|
|
|
|
|
add a device via the `cli` or by using the `WebUI`.
|
2017-10-02 21:36:22 +01:00
|
|
|
|
2022-02-09 00:02:28 +01:00
|
|
|
## Via WebUI
|
|
|
|
|
|
|
|
|
|
Using the web interface, go to Devices and click Add Device. Enter the
|
|
|
|
|
details required for the device that you want to add and then click
|
|
|
|
|
'Add Host'. As an example, if your device is configured to use the
|
|
|
|
|
community `my_company` using snmp `v2c` then you would enter: SNMP
|
|
|
|
|
Port defaults to 161.
|
|
|
|
|
|
|
|
|
|
By default Hostname will be used for polling data. If you want
|
|
|
|
|
to get polling Device data via a specific IP-Address (e.g. Management IP)
|
|
|
|
|
fill out the optional field `Overwrite IP` with it's IP-Address.
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
## Via CLI
|
2017-10-02 21:36:22 +01:00
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
Using the command line via ssh you can add a new device by changing to
|
|
|
|
|
the directory of your LibreNMS install and typing (be sure to put the
|
|
|
|
|
correct details).
|
2017-10-02 21:36:22 +01:00
|
|
|
|
2021-07-09 05:10:05 +08:00
|
|
|
```bash
|
2022-04-04 10:41:18 -05:00
|
|
|
./lnms device:add yourhostname [--v1|--v2c] [-c yourSNMPcommunity]
|
2021-07-09 05:10:05 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
You can use `./lnms device:add --help` for a list of available options and defaults.
|
|
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
As an example, if your device with the name `mydevice.example.com` is
|
|
|
|
|
configured to use the community `my_company` using snmp `v2c` then you
|
|
|
|
|
would enter:
|
2017-10-02 21:36:22 +01:00
|
|
|
|
2021-07-09 05:10:05 +08:00
|
|
|
```bash
|
|
|
|
|
./lnms device:add --v2c -c my_company mydevice.example.com
|
|
|
|
|
```
|
|
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
> Please note that if the community contains special characters such
|
|
|
|
|
> as `$` then you will need to wrap it in `'`. I.e: `'Pa$$w0rd'`.
|
2017-10-02 21:36:22 +01:00
|
|
|
|
2021-07-09 05:10:05 +08:00
|
|
|
## Ping Only Device
|
2017-11-08 16:57:23 -06:00
|
|
|
|
2021-07-09 05:10:05 +08:00
|
|
|
You can add ping only devices into LibreNMS through the WebUI or CLI. When
|
2019-07-18 21:25:53 -05:00
|
|
|
adding the device switch the SNMP button to "off". Device will be
|
|
|
|
|
added into LibreNMS as Ping Only Device and will show ICMP Response Graph.
|
2017-11-08 16:57:23 -06:00
|
|
|
|
|
|
|
|
- Hostname: IP address or DNS name.
|
|
|
|
|
- Hardware: Optional you can type in whatever you like.
|
|
|
|
|
- OS: Optional this will add the Device's OS Icon.
|
|
|
|
|
|
2021-07-09 05:10:05 +08:00
|
|
|
Via CLI this is done with `./lnms device:add [-P|--ping-only] yourhostname`
|
2017-11-12 17:33:06 +00:00
|
|
|
|
2017-11-08 16:57:23 -06:00
|
|
|

|
|
|
|
|
|
2021-07-09 05:10:05 +08:00
|
|
|
A How-to video can be found here: [How to add ping only devices](https://youtu.be/cjuByubg-uk)
|
|
|
|
|
|
|
|
|
|
## Automatic Discovery and API
|
|
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
If you would like to add devices automatically then you will probably
|
|
|
|
|
want to read the [Auto-discovery
|
|
|
|
|
Setup](../Extensions/Auto-Discovery.md) guide.
|
2017-10-02 21:36:22 +01:00
|
|
|
|
2020-12-30 09:38:14 -05:00
|
|
|
You may also want to add devices programmatically, if so, take a look
|
2019-07-18 21:25:53 -05:00
|
|
|
at our [API documentation](../API/index.md)
|