The shared heart of every DashyNMS app.
One LibreNMS client and one set of rules, so desktop, mobile and the MCP server agree.
DashyNMS Core is the plain .NET library behind DashyNMS desktop, DashyNMS Mobile and DashyNMS MCP. It has no UI. Each app adds its own screens on top, so an alert is counted, named and notified the same way everywhere.
- LibreNMS, Graylog and Unimus clients: the API, with LibreNMS's quirks handled once (404s that mean "none", stringly-typed numbers, permission errors that mean "not this token").
- Alerting: change detection between polls, counting, history, notification rules, and the rule builder's field catalogue.
- Monitors and caches: the alert, device and sensor pollers, the device and rule caches, a disk cache of the last 20 device logos viewed, and the dashboard layout, including the Spotlight that keeps an event log or Graylog card to some devices, a group or a location. Each app supplies when it's in the background and whether it's signed in.
- Graphs: LibreNMS's graphs restyled to the app's theme, with the app's own legends.
- Sensor definitions: optional OS-sharded data with exact and source-derived type/context selectors. Unknown values, missing metadata and conflicting mappings remain unresolved.
- Sign-in, settings and the rest: sign in with LibreNMS's own page, settings and the starter dashboard, and the open-source notices every app shows.
Core is published as the DashyNMS.Core package on GitHub Packages, for net9.0 and net10.0. Add the feed to nuget.config:
<packageSources>
<add key="dashynms" value="https://nuget.pkg.github.com/DashyNMS/index.json" />
</packageSources>GitHub Packages needs a login even for public packages: a token with read:packages (locally, gh auth refresh -s read:packages, then gh auth token; in GitHub Actions, GITHUB_TOKEN with packages: read).
Versions
- Releases, for example
2.0.0, follow semver. A breaking change to the public API, or to anything saved in settings, is a major version. - Development builds,
2.0.0-ci.N, come from every merge tomain, so an app can test unreleased Core.
The assembly and namespaces are still DesktopNMS.Core; renaming them is #1.
AppSettings.DiagnosticsConsentVersion records which Desktop diagnostics disclosure was explicitly accepted. It defaults to 0 for existing settings (launch-only scope) and survives cloning and persistence. The existing DiagnosticsSharingPreference values are unchanged. Desktop must require a new explicit choice before collecting broader usage/performance metrics and must treat unknown versions conservatively. Mobile and MCP need no behaviour changes; this Desktop metadata does not authorise collection in other clients. This is an additive API change in the next 2.0.0-ci.N package.
AppSettings.PortsLayout remembers whether Device Details' Ports tab shows a table or cards: AppSettings.PortsLayoutTable ("Table", the default) or AppSettings.PortsLayoutCards ("Cards"). Settings files without it, and any other value, load as the table, and Clone() carries it. Desktop adds the choice under Settings > Devices; mobile and MCP need no changes. This is an additive API change in the next 2.0.0-ci.N package.
AppSettings.NetworkSearchMacFormat (Colon, Hyphen, Dotted or Bare; read it through NetworkSearchMacFormatValue) and AppSettings.NetworkSearchRecent (newest first, at most MaxNetworkSearchRecent, added with RememberNetworkSearch) remember Network Search's MAC format and recent queries. Unknown formats load as Colon, and Clone() carries both. Recent queries name addresses on the user's network, so they stay local and are removed with the settings file on sign-out. Desktop uses them on its Network Search page, and mobile can do the same when it adds the page. This is an additive API change in the next 2.0.0-ci.N package.
Search.NetworkSearch is the shared Network Search lookup (#91), and it replicates LibreNMS 26.11's Network Search page. It finds an endpoint by address, network, MAC or name, then reports where the endpoint sits: its switch ports with uplinks marked, the router interfaces that resolved it, its subnet and gateways, and any conflicts. It records what each source said (SourceCoverage), so a source that was denied, unavailable or failed is never shown as "not found". Results are paged and requests are bounded. NetworkSearchQuery reads queries, MacAddresses reads and writes MACs, and NetworkSearchExport writes CSV. Desktop and mobile build their pages on it; MCP needs no changes.
LibreNmsTransport.RequestObserver is an optional host-owned callback for bounded request performance measurements. It is null by default and Core uploads nothing. Each public transport call reports once after retries/failover and response parsing; collection deserialisation does not double-count. Measurements contain only fixed operation/outcome/HTTP-class enums and elapsed time, with no URL, identifiers, headers, payload or exception text. Observer exceptions cannot alter request results. Desktop must attach it only under expanded metrics consent, keep callbacks fast, and discard completions from an earlier consent generation. Mobile/MCP need no changes and remain unobserved unless they explicitly opt in. This is an additive API in the next 2.0.0-ci.N package.
LibreNMS 26.10 polls alerts through faults (and probes faults?state=-1). Those GET requests are measured as ApiOperation.Alerts, the same as alerts on older servers, so alert polling can be compared across versions. Writes such as acknowledging a fault stay ApiOperation.Other. The probe runs once per connection on every server, so on servers before 26.10 its expected 404 is now one Alerts request with a ClientError outcome rather than an Other one; read a single client error per connection there as version detection, not failed polling. No enum value is added, so consumers' fixed dimension lists are unchanged; Desktop and Mobile only need to pin the next 2.0.0-ci.N package to report 26.10 alert polling correctly.
Sensor definition readers accept schemas 1 and 2. They prefer the separate v2 feed, falling back to v1 only when v2 returns 404. Existing Resolve and ApplyAsync calls remain supported. Schema 2 preserves fixed OID suffixes after an index, so neighbouring columns cannot match a rule accidentally. Consumers with device metadata should use Resolve(sensor, os, device) or ApplyWithDevicesAsync so hardware/version conditions can be evaluated. ResolveDetailed and SensorStateResolution.Outcome distinguish unavailable data, coverage gaps, unknown enum values and conflicts. SensorMonitor supplies cached device metadata automatically; Desktop and MCP need the updated Core package, with no vendor-specific matching code.
Validated cached shards remain usable after an offline restart even when the index is stale. Failed updates back off for 15 minutes across the fleet; an explicit update retries immediately. Failed refreshes do not advance the last successful check or download every missing OS separately.
Device reads expose nullable ReportedStatus, ReportedDisabled, ReportedIgnore,
ReportedUptime, ReportedOverrideSysLocation, ReportedIgnoreStatus and
ReportedPollerGroup. Omitted or null fields stay unknown, including across JSON
round trips. Use ReportedState for display; incomplete flags yield
DeviceState.Unknown. Existing scalar accessors and State retain their previous
behaviour for source compatibility. Mobile adopts the reported values for
restricted resources; desktop and MCP can adopt them when they need the same
unknown-value distinction. This is an additive API in the 2.0 development stream.
SettingsStore also implements the optional ICheckedSettingsStore interface.
Its TrySave() returns false when a settings write fails and raises Changed
only after a successful write. It does not roll back the live settings object on
failure; the consumer owns rollback of its own edits. ISettingsStore, Save,
SaveQuietly, the JSON format and existing implementations remain compatible.
Mobile adopts this acknowledgement for Intelligence settings so a failed disk
write cannot be presented as a saved change. Desktop and MCP need no changes
and may opt in when they need persistence acknowledgement. This is an additive
API in the next 2.0.0-ci.N package, with no settings migration.
GraphLegend keeps missing readings distinct from measured zero. Processor
readings must be finite and within 0–100 inclusive; otherwise their value is
–. Traffic, packet and error counter rates must be finite and non-negative.
Negative rates are unavailable, never converted to a healthy zero. Signed sensor
readings (for example temperature and dBm) retain their existing meaning.
Device traffic is evaluated independently for In and Out across the existing
eligible ports. An entirely unavailable direction, no eligible ports, or an
unrepresentable sum/byte-to-bit conversion displays –. If some eligible ports
have unavailable rates, the known subtotal displays, for example,
1 kb/s (incomplete) (including 0 b/s (incomplete) when the known readings are
zero). This is only the known contribution, not an estimate of the device total.
Port legends use – for unavailable supported readings; unsupported series still
have null values. Valid values retain their units, rounding and culture behaviour.
This is a non-breaking formatting correction in the existing 2.0 development
stream: GraphLegendEntry and all method signatures, names, ordering, counts,
SensorIds and SVG series identities are unchanged. No version bump or manual
publication is needed. After review and merge, the existing main workflow tests
and publishes 2.0.0-ci.N; consumers should pin the exact resulting version and
verify its repository commit metadata.
IntelligenceStatusCards reads MCP's device status as LibreNMS reports it
(DashyNMS/mcp#121): Ignored and Maintenance are named on device rows, and
anything unrecognised or missing stays Unknown. None of them takes an up or
down tone. The network overview's Device status card adds "Devices ignored" and
"Devices with no reported state" rows when MCP sends those counts, so its rows
add up to the network. [[status:ignored]] renders as a neutral label. The
model instruction blocks are unchanged. Desktop gets this by pinning the next
2.0.0-ci.N. Mobile builds its own cards and needs no change; MCP isn't
affected. This is a non-breaking fix in the 2.0 development stream.
You need the .NET 9 and .NET 10 SDKs.
git clone https://github.com/DashyNMS/core.git
cd core
dotnet test DashyNMS.Core.slnCI runs the tests on Windows, macOS and Linux. Mark a test that only holds on one platform with [WindowsFact] or [NotWindowsFact].
Releasing: push a tag such as v2.0.0. The release workflow tests, packs and publishes that version. Then raise <Version> in Directory.Build.props to the next version, so later development builds sort after the release.
The same standard as every DashyNMS repository: type(scope): what changes, in plain words.
- Types:
feat,fix,perf,refactor,docs,test,build,ci,chore,revert. - Scopes:
api,alerting,rules,sensors,graphs,services,sign-in,settings,json,licences. - The description: lower-case start, no full stop, under about 72 characters.
- Issues: issue titles use the same form, worded as the result the fix delivers.
- PRs: one issue per PR, squash-merged, with
Closes #NNin the description. - Breaking changes: add
!after the type or scope.
Every PR says what desktop, mobile and MCP need to do about it.
- Found a bug or have an idea? Open an issue. Planned work is under the milestones.
- Issue numbers in older code comments and commits (
#169,#266…) refer to DashyNMS/desktop, where Core lived until October 2026 (desktop#248).
DashyNMS isn't affiliated with LibreNMS, Graylog or Unimus, which are trademarks of their respective owners.
MIT licence: see LICENSE.