2017-10-02 20:36:22 +00:00
|
|
|
source: Support/Adding-a-Device.md
|
2018-10-27 22:04:34 +00:00
|
|
|
path: blob/master/doc/
|
2017-10-02 20:36:22 +00:00
|
|
|
|
2017-11-08 22:57:23 +00:00
|
|
|
# Adding Device
|
|
|
|
|
2019-07-19 02:25:53 +00: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 20:36:22 +00:00
|
|
|
|
2019-07-19 02:25:53 +00:00
|
|
|
## CLI
|
2017-10-02 20:36:22 +00:00
|
|
|
|
2019-07-19 02:25:53 +00: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 20:36:22 +00:00
|
|
|
|
|
|
|
```bash
|
2018-07-28 23:09:54 +00:00
|
|
|
./addhost.php yourhostname [community] [v1|v2c] [port] [udp|udp6|tcp|tcp6]
|
2017-10-02 20:36:22 +00:00
|
|
|
```
|
|
|
|
|
2019-07-19 02:25:53 +00: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 20:36:22 +00:00
|
|
|
|
|
|
|
```bash
|
2018-07-28 23:09:54 +00:00
|
|
|
./addhost.php mydevice.example.com my_company v2c
|
2017-10-02 20:36:22 +00:00
|
|
|
```
|
|
|
|
|
2019-07-19 02:25:53 +00: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 20:36:22 +00:00
|
|
|
|
2019-07-19 02:25:53 +00:00
|
|
|
## WebUI
|
2017-10-02 20:36:22 +00:00
|
|
|
|
2019-07-19 02:25:53 +00:00
|
|
|
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
|
2017-10-02 20:36:22 +00:00
|
|
|
|
|
|
|
![Add device](/img/webui_add_device.png)
|
|
|
|
|
2017-11-08 22:57:23 +00:00
|
|
|
### Ping Only Device
|
|
|
|
|
2019-07-19 02:25:53 +00:00
|
|
|
You can add ping only devices into LibreNMS through the WebUI. When
|
|
|
|
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 22:57:23 +00: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.
|
|
|
|
|
2017-11-12 17:33:06 +00:00
|
|
|
[How to add ping only devices](https://youtu.be/cjuByubg-uk)
|
|
|
|
|
2017-11-08 22:57:23 +00:00
|
|
|
![Ping Only](/img/add-ping-only.png)
|
|
|
|
|
2019-07-19 02:25:53 +00: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 20:36:22 +00:00
|
|
|
|
2019-07-19 02:25:53 +00:00
|
|
|
You may also want to add devices programatically, if so, take a look
|
|
|
|
at our [API documentation](../API/index.md)
|