LibreNMS

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

LibreNMS

  • Download
  • VM Image Info
    • 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

http://10.21.20.227/

Setup on devices

  • 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

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
  • ./lnms device:add --help
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