Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
6fd4f92
Add missing Smokeping validation group title (#21043)
chris9951 Oct 26, 2026
691dd43
APC use numbers for division (#21046)
murrant Oct 26, 2026
806bf96
Fix poller group create button (#21047)
murrant Oct 26, 2026
fa8736c
Fix Oxidized backup dates when the API returns `time` instead of `dat…
shivytyahoo Oct 26, 2026
c909511
Fix notifications count making navbar tall (#21048)
murrant Oct 26, 2026
b8bba89
VRF module modernize (#21029)
murrant Oct 26, 2026
4572a68
fix(discovery): avoid ambiguous LLDP neighbor IP matches (#20981)
dongxuelian2 Oct 26, 2026
457c1c4
Graph widget: filter empty port ids (#20980)
Psycomy Oct 26, 2026
6a0b870
Split SNMP secret into two separate secret types (#20978)
murrant Oct 26, 2026
fd95fa2
Handle unknown polling types (#21052)
murrant Oct 27, 2026
fa49886
docs: fix teams adaptivecard example json and state labels (#21053)
mxhob1 Oct 27, 2026
1daae3e
AOS6 - fdb table, tranceivers, nac (#18914)
paulierco Oct 27, 2026
f36d2f6
Fix settings translations stored under unreachable keys (#21056)
chris9951 Oct 27, 2026
d6ac5fa
Fix Browser Push user dropdown hiding users with duplicate realnames …
shivytyahoo Oct 27, 2026
4765f6c
Modern bgp peers module (#21054)
murrant Oct 27, 2026
862ecdd
Move get_nagios_state() into the SensorState enum (#20944)
mpikzink Oct 27, 2026
aae46f0
eaton-sc200: skip rectifier slots by registration state, not serial n…
bsteinert Oct 27, 2026
89a7ce9
Add Fortigate DHCP trap handler (#21061)
zeki893 Oct 28, 2026
5a410de
fix(bgp): poll TiMOS total message counters (#20982)
dongxuelian2 Oct 28, 2026
3f94455
Fix possible issue in QoS (#21063)
murrant Oct 28, 2026
42d2ab1
Fix python validate missing pip (#21064)
murrant Oct 28, 2026
337606a
Allow multiple polling methods per module (#20992)
murrant Oct 28, 2026
01a3d69
gwd: ONU count sensors per PON port, fix CPU and memory (#19546)
hrtrd Oct 28, 2026
91b9a40
BGP peer table: find the neighbour of peers identified by interface (…
J-cztery Oct 28, 2026
5b78fc7
FabOS: improve hardware, version and serial detection, add sensors (#…
Jellyfrog Oct 28, 2026
0a18fba
HPE PDU Management Module: group sensors by PDU (#21073)
Jellyfrog Oct 28, 2026
3282ad1
Quanta: use inventory OIDs for OS info and move sensors to YAML (#21074)
Jellyfrog Oct 28, 2026
ed846d2
Fix selecting existing secret (#21076)
murrant Oct 28, 2026
d51ed7a
Ruckus SmartZone: Add sensor categories (#20989)
Jellyfrog Oct 28, 2026
19162cd
Replace getidbyname with DeviceCache in api_functions (#20946)
mpikzink Oct 28, 2026
ee60784
Added support for Kontron iskratel lumia devices (#21062)
laf Oct 28, 2026
52b1a67
Remove getidbyname and migrate remaining callers (#21079)
mpikzink Oct 28, 2026
b66fcc8
More sensors, fix logo and moved test data (#21082)
laf Oct 28, 2026
e8346c0
More generic context check (#21077)
murrant Oct 29, 2026
2f34fb0
sensors/datacom-dmos: add SFP transceiver sensors via DATACOM-XCVR-MI…
JosivanPigozzo Oct 29, 2026
5feb4d7
Weaken superlinter yamllint checks (#21085)
murrant Oct 29, 2026
f73ae48
Remove Device displayName() (#21086)
murrant Oct 29, 2026
bd8c0ee
Restore displayName() (#21093)
murrant Oct 29, 2026
075dab7
LibreNMS First Run wizard (#21084)
murrant Oct 30, 2026
ff8f41e
Processors module modernize (#21083)
murrant Oct 30, 2026
c7684f9
remove some unneeded functions (#21099)
murrant Oct 30, 2026
43f5a3b
Remove find_port_id (#21100)
murrant Oct 30, 2026
f9390d4
remove json-app-tool (#21101)
murrant Oct 30, 2026
525e905
cleanup unused web functions (#21102)
murrant Oct 30, 2026
cc1335d
processors fixes (#21105)
murrant Oct 30, 2026
539dc44
Set 644 permissions on installed cron and logrotate files (#21070)
shivytyahoo Oct 30, 2026
aa32c37
Remove legacy helpers array_pairs(), preg_match_any(), trans_fb() (#2…
mpikzink Oct 30, 2026
4d2c70e
Use database in config cache key (#21109)
murrant Oct 30, 2026
cfc91dd
Eaton UPS (Network-M2): add battery and output state sensors (#21092)
bsteinert Oct 30, 2026
52cd30a
Eaton PDU / daisy chain (#21087)
marcinpsk Oct 30, 2026
acec022
FortiGate: add 5G modem signal sensors and session status (#21049)
prefixhub Oct 30, 2026
bf26c14
nokia-isam: convert hex-encoded ifHC counters to integers (#21050)
bsteinert Oct 30, 2026
6582505
docs: fix dead Webex, PowerDNS Recursor and changelog links (#21112)
sarankumar1325 Oct 31, 2026
ef804a4
Fix hrStorage volumes skipped due to Integer32 overflow (#21051)
florian-obradovic Oct 31, 2026
daa25b3
Add Phone number field to users (#21110)
DouglasJack Oct 31, 2026
b47c981
Eaton UPS (Network-M2): add outlet group state sensors (#21111)
bsteinert Oct 31, 2026
3244bdf
Add Riedel MediorNet support (#21096)
teacupuk Oct 31, 2026
6acb054
Add IHSE Draco tera support (#21094)
teacupuk Oct 31, 2026
d388ea3
TrueNAS SCALE: parse version and hardware from 25.x sysDescr (#21023)
dreamworks Oct 31, 2026
f246653
Add support for Didactum (new OS) DMS (Didactum Monitoring System) pr…
rudybroersma Oct 31, 2026
4330dc4
junos: add VRRP state and master-transition sensors (#21004)
bsteinert Oct 31, 2026
08cc143
DRAC Definition Update (#20986)
danb223 Oct 31, 2026
1603a98
Zyxel NWA: set device type to wireless (#20943)
micceo Oct 31, 2026
05b7e95
Add WiseWay UPS adapter support (#20893)
peejaychilds Oct 31, 2026
5e7ca68
Fix didactum test data and others (#21116)
murrant Oct 31, 2026
53d1b37
dev:generate-test data match by fixture prefix (#21117)
murrant Oct 31, 2026
d7b1d75
Remove Flare error reporting (#20846)
Jellyfrog Oct 31, 2026
d96ff45
Bump follow-redirects from 1.16.1 to 1.16.2 (#21122)
dependabot[bot] Oct 31, 2026
b7b2a13
Keep manually set BGP peer descriptions on discovery (#21123)
KromeFR Nov 1, 2026
c1429ff
nokia-isam: drop low limits from board temperature sensors (#21125)
bsteinert Nov 1, 2026
937cb4f
Migrate junose atm vp (#21121)
mpikzink Nov 1, 2026
5f08088
Send grouped recovery when fault recovers before dispatcher reaches a…
Starson323 Nov 1, 2026
ab832ce
Packages pages use filter (#21132)
murrant Nov 2, 2026
ed7e618
Fix LT slot names on NFXS-F (nokia-isam) (#21128)
bsteinert Nov 2, 2026
7bfaabf
Add battery runtime estimation state sensors for eaton-sc200 (#21130)
bsteinert Nov 2, 2026
16c7b5d
Fix IPv6 prefix length parsing (#21133)
murrant Nov 2, 2026
2a78d77
Netonix workaround bad fdb tables return (#21134)
murrant Nov 2, 2026
9799df4
junos: add VRRP master transition count sensors (#21129)
bsteinert Nov 2, 2026
a656378
Billing Eloquent (#21119)
murrant Nov 2, 2026
6eb4ae7
Split RRD backend functions into separate interface (#20479)
eskyuu Nov 2, 2026
5971650
Migrate CISCO-CEF discovery and polling to a modern module (#21127)
mpikzink Nov 2, 2026
4778e5b
[jetdirect] Add OID to detection (#21137)
autinerd Nov 2, 2026
744d4d3
Use the Service Model (#20781)
mpikzink Nov 3, 2026
903f10c
OS Types cleanup (#21081)
Jellyfrog Nov 3, 2026
cb8988a
Lantronix SLC: management type, temperature and power supply sensors …
ryanhoggpm Nov 3, 2026
10428aa
Added additional sensors for infortrend devices (#20415)
ervin09 Nov 3, 2026
8b975c0
dev:collect-snmprec and dev:generate-test-data: prompt for OS and mod…
Jellyfrog Nov 3, 2026
d613c1d
Fix infortrend outdated test data (#21144)
murrant Nov 3, 2026
4b44082
New librenms-worker.service, can run discovery and polling (#20958)
murrant Nov 3, 2026
f712acd
Fix: editing device services (#21147)
electrocret Nov 3, 2026
26de409
New Network Search Page (#21113)
murrant Nov 4, 2026
6d2b088
Avoid error on first update before Horizon (#21151)
murrant Nov 4, 2026
3df4a7c
Allow renaming a device that has no RRD folder (#21135)
Wenkow Nov 4, 2026
9192231
Fix unit text keys in powermon_consumption.inc.php (#21153)
priiduonu Nov 4, 2026
10ebc35
Discover Arista power supply and fan operational states (#21150)
peejaychilds Nov 4, 2026
8637535
CI: install test dependencies in parallel and only where needed (#21149)
Jellyfrog Nov 4, 2026
c7c2263
Fix graph subtypes containing spaces or missing (#21090)
shivytyahoo Nov 4, 2026
3feaacb
Network Search: +N more link (#21159)
murrant Nov 4, 2026
589fee2
Fix flaky test (#21162)
murrant Nov 5, 2026
b787b2e
Detect SNMPv3 timeouts in hasConnectionError (#21158)
bsteinert Nov 5, 2026
e81cf08
oslv_monitor: don't write three stats twice per poll (#21165)
Jellyfrog Nov 5, 2026
6e28f13
Show author of last config backup (#21005)
knpo Nov 5, 2026
4d104f5
Laravel 13 (#20802)
Jellyfrog Nov 5, 2026
f3f5d17
BulkTableSync for routes module (#21167)
murrant Nov 6, 2026
1ac679e
Additional network search changes (#21168)
murrant Nov 6, 2026
cbe8601
Add DCN sysObjectID branch .1.3.6.1.4.1.6339.1.1.3 to dcn-software (#…
draxien Nov 6, 2026
ec92de4
Bump PHPStan and Rector (#21154)
Jellyfrog Nov 6, 2026
0112e33
Fix php-fpm max children reached graph on apps overview page (#21174)
gnomii Nov 7, 2026
427bcba
Remove fico7489/laravel-pivot (#21179)
Jellyfrog Nov 7, 2026
df071ef
Fix auto-format (#21182)
murrant Nov 7, 2026
e9a111b
IS-IS module cleanup (#21180)
murrant Nov 7, 2026
fe152d1
Remove snmpwalk_cache_twopart_oid (#21157)
mpikzink Nov 7, 2026
654fa5d
Speed up polling by not serializing the device for each module perf m…
Jellyfrog Nov 7, 2026
c865448
Rewrite fdb-table module (#21152)
murrant Nov 7, 2026
1dd0ec1
Speed up device jobs by building the device array from attributes onl…
Jellyfrog Nov 7, 2026
1ea48ca
Read optics from snIfOpticalLaneMonitoringTable for Ironware devices …
alxrxs Nov 7, 2026
054d04b
Deprecate OS::getCacheTable() (#21187)
murrant Nov 7, 2026
a7de98c
Deprecate OS::getCacheByIndex() (#21188)
murrant Nov 7, 2026
1c22ea7
nokia-isam: handle the alarm severity bitmap (#21189)
bsteinert Nov 7, 2026
5477729
Handle non-standard BGP4-MIB indexes on FortiOS 7.4+ (#21160)
Starson323 Nov 8, 2026
64a2cb2
Migrate MEF discovery and polling to a modern module (#21126)
mpikzink Nov 8, 2026
9dda4bc
Add `auth_fallback_local`: let local users log in when the configured…
filipsio Nov 9, 2026
1cfccea
Added Pcoweb Vikinor device support (#21140)
laf Nov 9, 2026
bb0582b
Add RDP EcoNPB (ecosdn) support (#21058)
hrtrd Nov 9, 2026
fd2fefe
Only count enabled OSPF instances in the routing menu (#21197)
Niibizness Nov 9, 2026
8f50023
global search devices (#21203)
murrant Nov 9, 2026
ab22fd8
Proxmox vminfo via API (#21066)
murrant Nov 9, 2026
555e5c3
Global search fix highlighting (#21205)
murrant Nov 9, 2026
4997487
Fix usage reporting check (#21204)
murrant Nov 9, 2026
7bef21e
popup.js event listener leak (#21145)
dj1079 Nov 9, 2026
3955ea1
nokia-isam: move the board state sensors to yaml (#21193)
bsteinert Nov 9, 2026
82703ee
Fix cache index migration rerun (#21208)
murrant Nov 9, 2026
bd61f8e
Fix migration cache table compact format (#21209)
murrant Nov 9, 2026
abfe23e
Lock schema updates directly (#21191)
murrant Nov 9, 2026
7412a72
iupdate MIBs and add CM7116, IM7216, OM2224 test data for opengear (#…
jorgenspange Nov 9, 2026
dba2461
Log SSL certificate expiry only on urgent and danger state transition…
mpikzink Nov 9, 2026
3bdf5dc
influxdb: require the database to be created before enabling export (…
peejaychilds Nov 10, 2026
09a50e3
Unified OS profile for full SNR switch lineup (#19510)
hrtrd Nov 10, 2026
67d0f0c
Update DCN-MIB to vendor version 2.1.116 (#21215)
draxien Nov 10, 2026
9213366
Run OS detection tests against the snmprec files directly (#21190)
Jellyfrog Nov 10, 2026
4badac9
Fix silent polling outage on psutil AccessDenied in reap_psutil (#21161)
danjbh Nov 10, 2026
963efcc
SNMP bulk display (#21222)
murrant Nov 10, 2026
71cd71e
New way to define graphs (#21118)
murrant Nov 11, 2026
b05a925
Fix ModuleModelObserver logger (#21223)
murrant Nov 11, 2026
bd49d68
Update Check Point icon to the current logo (#21236)
jorgenspange Nov 11, 2026
909a468
Add ZscalerOS detection with swap and process CPU sensors (#21235)
jorgenspange Nov 11, 2026
dd4cebd
Add sysObjectID for FreeBSD detection (#21237)
Jellyfrog Nov 11, 2026
8ad6595
terra-receivers: move sensor discovery to YAML (#21224)
murrant Nov 11, 2026
50e11d1
procurve: move current, temperature, voltage sensor discovery to YAML…
murrant Nov 11, 2026
4c3122d
webmon: move humidity sensor discovery to YAML (#21227)
murrant Nov 11, 2026
8f8ff93
netagent2: move charge, current, frequency, load, state and temperatu…
murrant Nov 11, 2026
b47280e
voss: move state sensor discovery to YAML (#21230)
murrant Nov 11, 2026
5b058d2
fortigate: move percent and state sensor discovery to YAML (#21231)
murrant Nov 11, 2026
267c818
Fix lnms config:set rejecting OS settings for OS names with digits (#…
SirZeruks Nov 11, 2026
971233e
fs-nmu: move dbm and state sensor discovery to YAML (#21233)
murrant Nov 11, 2026
cb1dd9f
tpdin: move sensor discovery to YAML (#21241)
murrant Nov 11, 2026
00b5189
infinera-groove: move delay and load sensor discovery to YAML (#21243)
murrant Nov 11, 2026
b1dab3d
microsemipdsine: move voltage sensor discovery to YAML (#21240)
murrant Nov 11, 2026
8710350
aos-emu2: move temperature sensor discovery to YAML (#21244)
murrant Nov 11, 2026
b152485
Fix unsorted, duplicate and invalid OIDs in snmprec files (#21246)
Jellyfrog Nov 12, 2026
798fcea
Use snmpsim 2.0.3 and 25 max repeaters in snmpsim tests (#21245)
Jellyfrog Nov 12, 2026
2292f93
Restore HTTP Basic auth password as API v0 token source (#21212)
Starson323 Nov 12, 2026
4d309a6
adva_fsp150: move voltage sensor discovery to YAML (#21232)
murrant Nov 12, 2026
167f9e5
aos-emu2: move humidity and state sensor discovery to YAML (#21226)
murrant Nov 12, 2026
e82d511
Php snmpv3 fixes (#21248)
eskyuu Nov 12, 2026
73dcefb
Rewrite vminfo graphs as graph classes (#21250)
murrant Nov 12, 2026
25eed3f
Hide Proxmox LXC containers from diskops graphs (#21253)
murrant Nov 12, 2026
18b73e1
Rename MIB files to match their module names (#21258)
Jellyfrog Nov 12, 2026
54add18
Smokeping: pick the probe family from the ICMP polling method (#21035)
phastier Nov 13, 2026
ef221ab
Update EqualLogic MIBs to v10.0.3 (#21265)
Jellyfrog Nov 13, 2026
74c8908
Graph error changes (#21255)
murrant Nov 13, 2026
18b37c5
Drop the invalid luminato entPhysicalMfgDate test data (#21268)
Jellyfrog Nov 13, 2026
50ec304
Unix Agent and IPMI cleanup (#21262)
murrant Nov 13, 2026
59b3885
CI: seed the database so the test snmp timeout applies (#21259)
Jellyfrog Nov 13, 2026
253aa53
Speed up in memory db tests (#21271)
Jellyfrog Nov 13, 2026
d0eb5e0
Update standard mibs (#21266)
Jellyfrog Nov 13, 2026
c7f9483
Update dependencies (#21273)
Jellyfrog Nov 13, 2026
eee5ee2
nokia-isam: discover the alarm count as a count sensor (#21264)
bsteinert Nov 13, 2026
ba506e5
Detect Zscaler ZPA Service Edge on Linux as zscaler (#21263)
jorgenspange Nov 13, 2026
62ea6f6
Fix voltage divisor for additional Delta UPS models (#21252)
Pinki18 Nov 13, 2026
534df05
Fix legend parameter on port type and group graphs (#21278)
murrant Nov 14, 2026
09fc596
Migrate eventlog (#21186)
mpikzink Nov 15, 2026
f1e08a2
Escape NetScaler vserver fields
murrant Nov 15, 2026
a9727a0
Escape SLA tag, owner and type in the SLA list view
murrant Nov 15, 2026
9e819a2
Escape Cisco ACE and dhcp-stats device data
murrant Nov 15, 2026
d0fdf21
Escape application name and instance in the device apps menu
murrant Nov 15, 2026
7c17bc4
Escape disk I/O description on the device health page
murrant Nov 15, 2026
1e3892e
Escape device supplied text in app page overlib links
murrant Nov 15, 2026
2953a5c
Enforce device access on device group rediscover and static membership
murrant Nov 15, 2026
da08129
Encode widget settings placed in inline javascript
murrant Nov 15, 2026
618b665
Only allow http(s) and relative target urls in the image widget
murrant Nov 15, 2026
8d3ef89
Check device access in component, ntp and AS selection ajax tables
murrant Nov 15, 2026
549230a
Validate the new hostname in the API device rename
murrant Nov 15, 2026
713dd89
style: auto-format code
github-actions[bot] Nov 15, 2026
4afc7e3
Add plugin:sync and configurable Composer plugin paths (#21286)
murrant Nov 15, 2026
f7b5176
alerts: namespace incident ids per dashboard widget instance (#21195)
mpikzink Nov 15, 2026
25851c6
Fix ambiguous user_id in dashboard select (#21200)
Niibizness Nov 15, 2026
12f46a1
Core discovery: keep device identity when SNMP query fails (#21201)
hrtrd Nov 15, 2026
a777462
Device list actions honor port override attribs (#21247)
danjbh Nov 15, 2026
63afdc6
fix m4350 discovery issues (#21156)
shrank Nov 15, 2026
c5c3425
Fix service template Apply failing when the template has no device gr…
shivytyahoo Nov 15, 2026
af0fd86
Update verbiage and option flags in Health-Information.md (#21267)
tippenring Nov 16, 2026
692fc9b
Only register 10s queue dispatch schedule when queue is in use (#21281)
Jellyfrog Nov 16, 2026
e1dd09c
fix: scale Calix E7 (EXA) PON optical power to mW before dBm conversion
mxhob1 Nov 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 17 additions & 17 deletions .agents/skills/add-os-support/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Use this workflow when LibreNMS does not yet support the operating system.
2. Create detection YAML in `resources/definitions/os_detection/<os>.yaml`.
3. Create discovery YAML in `resources/definitions/os_discovery/<os>.yaml`.
4. Add an icon to `html/images/os/<os>.svg` and optionally a logo to `html/images/logos/<os>.svg`. Prefer vector (SVG) over bitmap (PNG).
5. Capture real SNMP test data in `tests/snmpsim/<os>_<variant>.snmprec`.
6. Generate test data JSON with `./lnms dev:generate-test-data <os> --variant="<variant>"`.
5. Capture real SNMP test data in `tests/snmpsim/<os>_<model>.snmprec` with `./lnms dev:collect-snmprec <device> -M <model>`.
6. Generate test data JSON with `./lnms dev:generate-test-data <os>_<model>`.
7. Verify all tests pass with `./lnms dev:check unit -o <os>`.

### Workflow 2: Update an Existing OS
Expand All @@ -30,8 +30,8 @@ Use this workflow when you add sensors, processors, mempools, or support for a n
- Use `skip_values` with identical indexes when defining alternative definitions of the same physical sensor.
4. Add vendor MIBs to `mibs/<vendor>/` if needed.
5. Update test fixtures:
- To update modules in existing fixtures: `./lnms dev:generate-test-data <os> -m <module>`.
- To add a new hardware variant: record `tests/snmpsim/<os>_<variant>.snmprec` and generate with `./lnms dev:generate-test-data <os> --variant="<variant>"`.
- To update modules in existing fixtures: `./lnms dev:generate-test-data <os>_ -m <module>`. The argument is a file name prefix: `<os>_` matches only the fixtures of that OS, while `<os>` also matches other OSes that start with the same name.
- To add a new hardware model: run `./lnms dev:collect-snmprec <device> -M <model>` and generate with `./lnms dev:generate-test-data <os>_<model>`.
6. Run fast verification with `./lnms dev:check unit -o <os> --os-modules-only`.

---
Expand Down Expand Up @@ -74,8 +74,8 @@ Use this workflow when you add sensors, processors, mempools, or support for a n
- Do not include standard RFC MIBs in vendor directories.
- Include only the MIBs that LibreNMS uses.
10. **Mandatory Real Test Data**:
- Every OS must include test data (`tests/snmpsim/<os>_<variant>.snmprec` and `tests/data/<os>_<variant>.json`).
- Always name a variant: the lowercase hardware model or similar (for example, `ios_2960x`). Do not create a bare `<os>.snmprec`.
- Every OS must include test data (`tests/snmpsim/<os>_<model>.snmprec` and `tests/data/<os>_<model>.json`).
- Always name a model: the lowercase hardware model or similar (for example, `ios_2960x`). Do not create a bare `<os>.snmprec`.
- Do not fabricate `snmprec` files. You must only capture `snmprec` files from an actual device or convert them from `snmpwalk` output from an actual device.
- Do not break the data when you sanitize it.
- Tests must pass before you finish.
Expand All @@ -91,8 +91,8 @@ Use this workflow when you add sensors, processors, mempools, or support for a n
| Vendor MIBs | `mibs/<vendor>/<MIB-NAME>` | File name equals MIB module, no extension |
| OS Icon | `html/images/os/<os>.svg` | Square, no padding. Vector (SVG) preferred; PNG at least 32x32 px |
| OS Logo | `html/images/logos/<os>.svg` | Optional wide logo. Vector (SVG) preferred over bitmap (PNG) |
| SNMP Recording | `tests/snmpsim/<os>_<variant>.snmprec` | SNMP test data from a real device; variant is the lowercase model |
| Test Data JSON | `tests/data/<os>_<variant>.json` | Expected database dump |
| SNMP Recording | `tests/snmpsim/<os>_<model>.snmprec` | SNMP test data from a real device; the model is lowercase |
| Test Data JSON | `tests/data/<os>_<model>.json` | Expected database dump |

---

Expand Down Expand Up @@ -346,32 +346,32 @@ Save the image files. Prefer vector (SVG) over bitmap (PNG, saved as `<os>.png`

Tests verify OS detection and module polling. Every OS must have test files.

### 1. SNMP Recording (`tests/snmpsim/<os>_<variant>.snmprec`)
### 1. SNMP Recording (`tests/snmpsim/<os>_<model>.snmprec`)

Always name a variant: the lowercase hardware model or similar (for example, `ios_2960x`). Do not create a bare `<os>.snmprec`.
Always name a model: the lowercase hardware model or similar (for example, `ios_2960x`). Do not create a bare `<os>.snmprec`.

Do not fabricate `snmprec` files. You must only capture `snmprec` files from an actual device or convert them from `snmpwalk` output from an actual device.

Methods to acquire `.snmprec` data:
1. Capture from a device added to LibreNMS (`<device>` is the device ID, IP, or hostname), after the OS detection and discovery definitions are in place and the device has been rediscovered. By default this collects only the OIDs that discovery and polling use:
```bash
./lnms dev:collect-snmprec <device> --variant="<variant>"
./lnms dev:collect-snmprec <device> -M <model>
```
Add `--full` to walk the whole device instead, or `--modules=<module>,<module>` to limit collection to specific modules.
The command rejects a device that is still detected as generic. It always replaces the snmprec file and never merges with earlier data, so `--modules=<module>,<module>` leaves only the OIDs of those modules in the file. To walk the whole device into another file instead, use `--full --output=<file>`.
2. Convert `snmpwalk` output from the actual device:
Convert walk output into `<numeric_oid>|<type_code>|<value>` format using snmpsim tools or scripts.

> **Important**: Sanitize the recording to remove real credentials, SNMP community strings, public IP addresses, and private names. Do not break the data format or SNMP types when sanitizing. Add all OIDs that your OS discovery and polling definitions query.

### 2. Generate Test Data JSON (`tests/data/<os>_<variant>.json`)
### 2. Generate Test Data JSON (`tests/data/<os>_<model>.json`)

The variant must be lowercase and match the snmprec file name:
Use the exact name of the snmprec file, without the extension:
```bash
./lnms dev:generate-test-data <os> --variant="<variant>"
./lnms dev:generate-test-data <os>_<model>
```
> **Note**: You must pass `--variant` when creating a new fixture for the first time. Without it, the tool searches only for existing fixtures and will exit with an error.
> **Note**: The argument is a file name prefix that matches existing JSON fixtures. To create a new fixture, you must give the exact snmprec file name. Otherwise the tool finds no fixtures and exits with an error.

Do not edit `tests/data/<os>_<variant>.json` manually. Always use `dev:generate-test-data` to update it.
Do not edit `tests/data/<os>_<model>.json` manually. Always use `dev:generate-test-data` to update it.

---

Expand Down
20 changes: 20 additions & 0 deletions .github/linters/.yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
# Used by super-linter (see .github/workflows/lint.yml).
# Only flag problems that break parsing or are likely mistakes, not style.
extends: relaxed

rules:
braces: disable
brackets: disable
colons: disable
commas: disable
comments: disable
comments-indentation: disable
document-start: disable
empty-lines: disable
indentation: disable
line-length: disable
truthy: disable
new-line-at-end-of-file: disable
trailing-spaces: disable
hyphens: disable
4 changes: 2 additions & 2 deletions .github/workflows/auto-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
github.repository_owner != 'librenms' &&
vars.ENABLE_AUTO_FORMAT == 'true' &&
github.ref_name != github.event.repository.default_branch
runs-on: ubuntu-latest
runs-on: ubuntu-26.04

permissions:
contents: write
Expand Down Expand Up @@ -57,7 +57,6 @@ jobs:
uses: ./.github/actions/composer-install
with:
cache-matched-key: ${{ steps.composer-restore.outputs.cache-matched-key }}
dump-autoload: false

- name: Format Code
env:
Expand All @@ -66,6 +65,7 @@ jobs:
git fetch origin "$DEFAULT_BRANCH"
DIFF_TARGET=$(git merge-base "origin/$DEFAULT_BRANCH" HEAD 2>/dev/null || echo "origin/$DEFAULT_BRANCH")

./vendor/bin/rector process --no-progress-bar --ansi --memory-limit=1G
./vendor/bin/pint --parallel --diff="$DIFF_TARGET"

- name: Commit and push changes
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

phpstan:
name: PHP Static Analysis
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:

rector:
name: Rector (dry-run)
runs-on: ubuntu-latest
runs-on: ubuntu-26.04

steps:
# start checkout last, it can fail reading the event payload while other steps start
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:

pint:
name: Pint (dry-run)
runs-on: ubuntu-latest
runs-on: ubuntu-26.04

steps:
# start checkout last, it can fail reading the event payload while other steps start
Expand Down
29 changes: 21 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ jobs:
name: PHP 8.5 Other
php-version: pre-installed
database: mysql
arguments: --full --exclude-phpunit-group=browser,mibs,external-dependencies,os
arguments: --full --exclude-phpunit-group=browser,mibs,os
-
name: PHP 8.2 Other
php-version: 8.2
name: PHP 8.4 Other
php-version: 8.4
database: ghcr.io/mariadb/mariadb:lts
arguments: --full --exclude-phpunit-group=browser,mibs,external-dependencies,os
arguments: --full --exclude-phpunit-group=browser,mibs,os

env:
# keep in sync with LibreNMS/Util/Snmpsim.php
SNMPSIM_VERSION: 2.0.1
SNMPSIM_VERSION: 2.0.3
steps:
-
# mysql is the runner's own MySQL, anything else is a docker image
Expand Down Expand Up @@ -109,6 +109,14 @@ jobs:
key: ${{ runner.os }}-vendor-
restore-keys: ${{ runner.os }}-vendor-

# only the rrd backend and svn tests need these, the os tests have rrd disabled.
# setup-php installs the extension of other versions
- name: Install test dependencies
if: contains(matrix.arguments, '--full')
run: |
sudo apt update
sudo apt install -y rrdtool rrdcached subversion php8.5-rrd

- name: Checkout
uses: actions/checkout@v7
-
Expand All @@ -124,14 +132,19 @@ jobs:
# returns once snmpsim answers, fails with the error otherwise
.python_venvs/snmpsim/bin/snmpsim-command-responder-lite --daemonize --pid-file=/tmp/snmpsimd.pid --data-dir=tests/snmpsim --agent-udpv4-endpoint=127.1.6.2:1162 --log-level=error --logging-method=file:/tmp/snmpsimd.log
-
# pre-installed uses the runner's PHP as is, a version number makes
# setup-php update it. The runner already has composer
# pre-installed uses the runner's PHP as is, it already has composer
name: Set up PHP
if: matrix.php-version != 'pre-installed'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: rrd
tools: none
coverage: none
-
name: Disable Xdebug
background: true
run: sudo phpdismod xdebug
-
name: Init env
run: |
Expand Down Expand Up @@ -171,7 +184,7 @@ jobs:
wait: database
-
name: Migrate Database
run: php artisan migrate
run: php artisan migrate --seed

-
name: Wait for SNMPSIM
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
jobs:

dusk-php:
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
steps:
- name: Start Database
id: database
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.log
# Ignore all dotfiles #
#######################
.*
Expand All @@ -6,6 +7,7 @@
!/.editorconfig
!/.php_cs
!/.github/
!/.github/linters/.yamllint.yml
!/.mention-bot
!/.env.example

Expand Down
2 changes: 1 addition & 1 deletion LibreNMS/Alert/AlertData.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function testData(Device $device, array $faults = []): array
'os' => $device->os,
'type' => $device->type,
'ip' => $device->ip,
'display' => $device->displayName(),
'display' => $device->display,
'version' => $device->version,
'hardware' => $device->hardware,
'features' => $device->features,
Expand Down
2 changes: 1 addition & 1 deletion LibreNMS/Alert/AlertUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class AlertUtil
* Map of alert-query id columns to registered morph aliases (see AppServiceProvider).
* Used to resolve the entity a problem is about (Port, Sensor, ...).
*/
private const ENTITY_COLUMN_MAP = [
private const array ENTITY_COLUMN_MAP = [
'port_id' => 'interface',
'sensor_id' => 'sensor',
'bgpPeer_id' => 'bgppeer',
Expand Down
17 changes: 12 additions & 5 deletions LibreNMS/Alert/RunAlerts.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
use LibreNMS\Enum\AlertRuleOperationPhase;
use LibreNMS\Enum\AlertState;
use LibreNMS\Enum\MaintenanceStatus;
use LibreNMS\Enum\PollingMethodType;
use LibreNMS\Enum\Severity;
use LibreNMS\Exceptions\AlertTransportDeliveryException;
use LibreNMS\Polling\ConnectivityHelper;
use LibreNMS\Util\Time;

class RunAlerts
Expand Down Expand Up @@ -104,7 +104,7 @@ public function describeAlert($alert)

$obj['hostname'] = $device->hostname;
$obj['sysName'] = $device->sysName;
$obj['display'] = $device->displayName();
$obj['display'] = $device->display;
$obj['sysDescr'] = $device->sysDescr;
$obj['sysContact'] = $device->sysContact;
$obj['os'] = $device->os;
Expand All @@ -129,7 +129,7 @@ public function describeAlert($alert)
$obj['status'] = $device->status;
$obj['status_reason'] = $device->status_reason;

if ((new ConnectivityHelper($device))->icmpIsEnabled()) {
if ($device->polling()->isEnabled(PollingMethodType::Icmp)) {
if ($device->stats) {
$obj['ping_timestamp'] = $device->stats->ping_last_timestamp;
$obj['ping_loss'] = $device->stats->ping_loss_last;
Expand Down Expand Up @@ -616,7 +616,7 @@ public function runAlerts()
$this->dispatchOpenRecoveries($alert);
$rule = AlertRule::query()->find($alert['rule_id']);
if ($rule !== null) {
(new AlertRules($alert['device_id']))->syncAlertState($rule);
new AlertRules($alert['device_id'])->syncAlertState($rule);
}

if ($sentAck) {
Expand Down Expand Up @@ -796,7 +796,7 @@ private function dispatchOpenRecoveries(array $alert): void
->where('state', '!=', AlertState::RECOVERED)
->count();
$entityCount = $remaining + $recovered->count();
if ($rule !== null && AlertUtil::shouldNotifyPerEntity($rule, $entityCount)) {
if ($rule !== null && (AlertUtil::shouldNotifyPerEntity($rule, $entityCount) || ($remaining === 0 && $this->deviceCanNotify((int) $alert['device_id'])))) {
$recoveryAlert = $alert;
$recoveryAlert['state'] = AlertState::RECOVERED;
$this->issueAlert($recoveryAlert);
Expand All @@ -816,6 +816,13 @@ private function closeRecoveredFaults(int $ruleId, int $deviceId): void
->update(['open' => 0]);
}

private function deviceCanNotify(int $deviceId): bool
{
$device = DB::table('devices')->where('device_id', $deviceId)->first(['ignore', 'disabled']);

return $device !== null && ! $device->ignore && ! $device->disabled && ! $this->isParentDown($deviceId);
}

/**
* Run external transports
*
Expand Down
16 changes: 11 additions & 5 deletions LibreNMS/Alert/Transport/Browserpush.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,16 @@ public function deliverAlert(array $alert_data): bool

public static function configTemplate(): array
{
$users = [__('All Users') => 0];
foreach (User::get(['user_id', 'username', 'realname']) as $user) {
$users[htmlentities((string) $user->realname ?: (string) $user->username)] = $user->user_id;
}
$users = User::get(['user_id', 'username', 'realname']);
$nameCounts = $users->countBy(fn ($user) => (string) ($user->realname ?: $user->username));
$options = $users->mapWithKeys(function ($user) use ($nameCounts) {
$label = (string) ($user->realname ?: $user->username);
if ($nameCounts[$label] > 1) {
$label .= " ($user->username)";
}

return [htmlentities($label) => $user->user_id];
})->all();

return [
'config' => [
Expand All @@ -62,7 +68,7 @@ public static function configTemplate(): array
'name' => 'user',
'descr' => 'LibreNMS User',
'type' => 'select',
'options' => $users,
'options' => [__('All Users') => 0] + $options,
],
],
'validation' => [
Expand Down
4 changes: 2 additions & 2 deletions LibreNMS/Alert/Transport/Telegram.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

class Telegram extends Transport
{
private const BASE_URL = 'https://api.telegram.org/bot';
private const string BASE_URL = 'https://api.telegram.org/bot';

private $message = [];

Expand Down Expand Up @@ -113,7 +113,7 @@ private function embedGraphs(): array
$regex = '#<img class="librenms-graph" src="(.*?)"\s*/>#';

$this->message['text'] = preg_replace_callback($regex, function ($match) {
$this->message['images'][] = Graph::getImage($match[1]);
$this->message['images'][] = Graph::getImage($match[1])->data;

return '';
}, (string) $this->message['text']);
Expand Down
2 changes: 1 addition & 1 deletion LibreNMS/Alert/Transport/Weechatbot.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function deliverAlert(array $alert_data): bool
$pre .= "{$this->config['irc-channel']} ";

try {
$fp = (new \Socket\Raw\Factory())
$fp = new \Socket\Raw\Factory()
->createClient("udp://{$this->config['bot-hostname']}:{$this->config['bot-port']}");
} catch (\Socket\Raw\Exception $e) {
throw new AlertTransportDeliveryException($alert_data, $e->getCode(), $e->getMessage());
Expand Down
7 changes: 4 additions & 3 deletions LibreNMS/Alerting/QueryBuilderParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,10 @@ protected function generateGlue(string $target = 'devices'): array
foreach ($tables as $table) {
$path = $this->schema->findRelationshipPath($table, $target);
if ($path) {
foreach (array_pairs($path) as $pair) {
[$left, $right] = $pair;
$glue[] = $this->getGlue($left, $right);
foreach ($path as $i => $left) {
if (isset($path[$i + 1])) {
$glue[] = $this->getGlue($left, $path[$i + 1]);
}
}
}
}
Expand Down
Loading