Download the PHP package averyhabbott/librenms-windows-dhcp without Composer

On this page you can find all versions of the php package averyhabbott/librenms-windows-dhcp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package librenms-windows-dhcp

LibreNMS Windows DHCP Monitoring

A LibreNMS plugin package that monitors Windows DHCP server and scope health without SNMP, by polling the PowerShell Universal HTTPS API that already runs on each DHCP server (deployed by the companion netbox-windows-dhcp plugin).

It follows the LibreNMS plugin guidelines (docs): it is a composer package (the only plugin type that may publish migrations, commands and views), installed via the upgrade-safe composer.plugins.json, and touches zero core LibreNMS files — so the monthly auto-upgrade can't clobber it.

What it collects

Per poll (every 5 min) it calls GET /api/dhcp/metrics on each DHCP server and stores:

Server packet counters are cumulative; the poller derives per-second rates and stashes the last sample in a device attribute.

Architecture

Requirements

Prerequisite: PSU endpoint

The companion /api/dhcp/metrics endpoint must be deployed on each DHCP server. It lives in the netbox-windows-dhcp repo (netbox_windows_dhcp/psu/dhcp_api_endpoints.ps1, SECTION 0) and is pushed by that plugin's "Update PSU Scripts" action. It is reachable by the existing DHCPReader App Token.

Expected /metrics response (schema_version 1)

This plugin is written against schema_version: 1. A response whose schema_version differs is still parsed best-effort (every field is defensively coerced), but the poll logs a warning — update the plugin or the PSU script when you see it. The shape consumed:

Resilience contract: if scopes is empty but server.scopes_total > 0, the poller treats it as a transient server-side enumeration failure and keeps the existing scope rows rather than deleting them. Counters under server.packets are cumulative; the poller derives per-second rates. The full field reference lives in the PSU repo's psu/README.md ("Response Shapes").

Install

On the primary:

On each distributed poller (only if PSU endpoints are reachable only from that poller — otherwise the primary's scheduler polls everything centrally):

Then, on the primary, configure the scheduler to route polls by group:

The installer records the package in composer.plugins.json (git-ignored), runs composer, and on --primary runs migrations and enables the plugin. Because LibreNMS's monthly daily.sh re-requires everything in composer.plugins.json from Packagist, the plugin is zero-touch across upgrades — no need to re-run the installer after each update.

Optionally install the canned "Windows DHCP Servers" device group and alert rules (no API token needed — see Alerts):

Upgrade

The installer is idempotent, so upgrading is as simple as downloading the latest version and re-running the install script.

Uninstall

Per-device PSU attributes can be cleared with lnms windows-dhcp:configure <device> --clear.

Add a device

Then open Plugins → DHCP Scopes (full scope browser), the device → Overview (DHCP Scopes summary), and the device → Health (server sensors).

Commands

Command Purpose
lnms windows-dhcp:poll [--device=] [--group=] Poll DHCP servers and store data
lnms windows-dhcp:configure <device> --token=… Set/clear PSU connection attributes

Settings

The plugin has a settings page at Plugins → (gear) → WindowsDhcp (/plugin/settings/WindowsDhcp) — standard LibreNMS plugin settings, no core edits:

Setting Default Effect
Graphed series in use / free Which series to draw: in use / free / pending / bad / reservations. Pending, bad and reservations are off by default.
Graphing reservations off (single line) When "Reservations" is graphed: off draws one total-reserved line; on draws separate active and inactive lines (which read 0 unless "Monitor reservation states" is on).
Stack series on Stack in-use + free as a filled pool vs. drawing every series as a line.
Scale to scope size off Pin the graph y-axis to the scope's size (its total address count) so fullness is shown to scale and graphs are comparable across scopes; off = auto-scale to the data.
Warning (%) / Critical (%) 80 / 95 Utilization thresholds driving the scopes-table bar colours, the menu critical badge, the device-Overview tallies, and the utilization sensor's alert limits.
PSU HTTP timeout (s) 30 Request timeout for the PSU/metrics call. Raise it when the opt-in scrapes below are enabled on large estates — they enumerate leases per scope and can exceed the default, failing the whole poll.
Monitor reservation states off Split the reserved count into active/inactive. The total reserved count is always collected for free; the split enumerates leases on scopes that have reservations, adding server-side time.
Monitor declined addresses off Count bad/declined (conflict) addresses per scope. The heaviest scrape (scans every scope), so it adds the most collection time on estates with many scopes.

Alerts

Install with sudo ./install.sh --primary --alert-rules (or lnms windows-dhcp:install-alert-rules directly on an already-installed plugin). This runs locally via Eloquent, not the HTTP API — no API token required. It creates a dynamic "Windows DHCP Servers" device group (devices carrying the dhcp_psu_url attribute) and scopes every rule below to that group, so they only ever evaluate against actual DHCP servers.

Rules (alert_rules/windows-dhcp-alert-rules.json): scope utilization warn ≥80% / crit ≥95% (defaults; tune via the settings above), high bad-address rate, "server not responding" (ACK rate 0), PSU API unreachable (while ICMP up), failover not normal, and high NACK ratio.

Idempotent by name: re-running --alert-rules never touches a group/rule that already exists, so any customization (severity, notification/operation assignment, narrowed scope) survives a re-run when a newer plugin version ships additional rules. Pass --force to hard-reset the named group/rules back to their packaged defaults, e.g. to pick up a rule-logic fix shipped in an update — see CHANGELOG before doing this on an existing install, since it discards local customizations to those specific rules.

Notes / roadmap


All versions of librenms-windows-dhcp with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package averyhabbott/librenms-windows-dhcp contains the following files

Loading the files please wait ...