---
# System prepended metadata

title: LibreNMS

---

# LibreNMS
- [Officail Website](https://www.librenms.org/)
> - 從 ICMP 做裝置是否連線中的檢測
> - 以 SNMP 進行較深的資料採集，進一步安裝 Agent 可以取得作業系統發行版本資訊等更詳細的資訊。
> - 針對特定的應用提供了 Application 功能來對應的效能數據擷取方式
> - 在不同服務的狀況監控則使用名為 Service 的機制去監視各個服務的運作狀態
> - 可以相容 Nagios 的 Plugin 做更多的擴充

## LibreNMS
- [Download](https://github.com/librenms/packer-builds/releases/tag/21.2.0)
- [VM Image Info](https://docs.librenms.org/Installation/Images/)
	- WebUI (http://localhost:8080)
		- username: librenms
		- password: D32fwefwef
	- SSH (ssh://localhost:2023)
		- username: librenms
		- password: CDne3fwdfds
	- MySQL/MariaDB
		- username: librenms
		- password: D42nf23rewD

## SOP of Manual Install(skip)
> 
## SOP of Setup
- [Official doc](https://docs.librenms.org/)
> http://10.21.20.227/
### [Setup on devices](https://www.dnsstuff.com/snmp-community-string)
- How to Configure SNMP Community Strings in Debian/Ubuntu
```
Enter this command to install the snmpd package:
Apt.get install snmpd
Locate the snmp.conf file and back it up:
Mv /etc/snmp/snmpd/conf /etc/snmp/snmpd.conf.org
Enter the following, replacing “blank” with the community string you are using, to create the new snmpd.conf file:
Echo “rocommunity blank”>/etc/snmp/snmpd.conf
Modify the file:
Nano /etc/default/snmpd
Locate and comment out the following:
SNMPSDOPTS=‘ -lsd -Lf dev/null -u snmp -p /var/run/snmpd.pid’
Add this line:
SNMPDOPTS=‘ -Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd/pid -c /etc/snmp/snmpd/conf’
Save and close the file.
Enter this to restart the snmpd:
/etc/init.d/snmpd restart
sysv-rc-conf snmpd on
```
- [ESXi 開啟與設定 SNMP](https://blog.xuite.net/tolarku/blog/465843932-ESXi+%E9%96%8B%E5%95%9F%E8%88%87%E8%A8%AD%E5%AE%9A+SNMP+)
- [SNMP Configuration Examples - ESX/ESXi 5.x/6.x](https://docs.librenms.org/Support/SNMP-Configuration-Examples/#esxesxi-5x6x)
### Adding Devices
#### CLI
1. Change directory to `/opt/librenms`
	> This is the location where LibreNMS installed.
2. `./lnms device:add [--v1|--v2c] [-c yourSNMPcommunity] yourhostname`
:::spoiler
- `./lnms device:add --help`
```bash=
Description:
  Add a new device

Usage:
  device:add [options] [--] <device spec>

Arguments:
  device spec                                          Hostname or IP to add

Options:
      --v1                                             Use SNMP v1
      --v2c                                            Use SNMP v2c
      --v3                                             Use SNMP v3
  -f, --force                                          Just add the device, do n                            ot make any safety checks
  -g, --group[=GROUP]                                  Poller group (for distrib                            uted polling)
  -b, --ping-fallback                                  Add the device as ping on                            ly if it does not respond to SNMP
  -p, --port-association-mode[=PORT-ASSOCIATION-MODE]  Sets how ports are mapped                             [ifIndex, ifName, ifDescr, ifAlias], ifName is suggested for Linux/Unix [defaul                            t: "ifIndex"]
  -c, --community[=COMMUNITY]                          SNMP v1 or v2 community
  -t, --transport[=TRANSPORT]                          Transport to connect to t                            he device [udp, udp6, tcp, tcp6] [default: "udp"]
  -r, --port[=PORT]                                    SNMP transport port [defa                            ult: "161"]
  -u, --security-name[=SECURITY-NAME]                  SNMPv3 security username                             [default: "root"]
  -A, --auth-password[=AUTH-PASSWORD]                  SNMPv3 authentication pas                            sword
  -a, --auth-protocol[=AUTH-PROTOCOL]                  SNMPv3 authentication pro                            tocol [md5, sha, sha-512, sha-384, sha-256, sha-224] [default: "md5"]
  -x, --privacy-protocol[=PRIVACY-PROTOCOL]            SNMPv3 privacy protocol [                            des, aes] [default: "aes"]
  -X, --privacy-password[=PRIVACY-PASSWORD]            SNMPv3 privacy password
  -P, --ping-only                                      Add a ping only device
  -o, --os[=OS]                                        Ping only: specify OS [de                            fault: "ping"]
  -w, --hardware[=HARDWARE]                            Ping only: specify hardwa                            re
  -s, --sysName[=SYSNAME]                              Ping only: specify sysNam                            e
  -h, --help                                           Display help for the give                            n command. When no command is given display help for the list command
  -q, --quiet                                          Do not output any message
  -V, --version                                        Display this application                             version
      --ansi                                           Force ANSI output
      --no-ansi                                        Disable ANSI output
  -n, --no-interaction                                 Do not ask any interactiv                            e question
      --env[=ENV]                                      The environment the comma                            nd should run under
  -v|vv|vvv, --verbose                                 Increase the verbosity of                             messages: 1 for normal output, 2 for more verbose output and 3 for debug
```
:::

#### GUI






## Reference
### Official

- [Doc for Installing LibreNMS](https://docs.librenms.org/Installation/Install-LibreNMS/)
- [開源網路裝置服務監控系統：LibreNMS](https://ithelp.ithome.com.tw/articles/10224076)