- PHP 84.3%
- Blade 8.9%
- JavaScript 5.1%
- Python 0.9%
- CSS 0.5%
- Other 0.2%
* Fix silent polling outage on psutil AccessDenied in reap_psutil
psutil.Process().children() scans /proc and raises AccessDenied when a
process disappears or is unreadable mid-scan (common on containerized
hosts with pid churn). The exception is raised by children() itself,
outside the per-process try/except, so it escapes reap_psutil(). The
main dispatcher loop only catches KeyboardInterrupt, so the exception
kills the loop: the service process keeps running (alerting/billing
threads stay alive and the container still reports healthy) while
device polling silently stops until the process is restarted.
Catch AccessDenied (and OSError) around the children() enumeration and
skip the reap pass, and add AccessDenied to the per-process handler
since p.status() can raise it too.
Observed repeatedly in a k8s (Fargate) deployment: the dispatcher loop
died multiple times per day with
psutil.AccessDenied: (pid=NNNN)
...
File "LibreNMS/service.py", line 553, in start
self.reap_psutil()
and polling stayed dead with the pod showing Running/Ready.
Signed-off-by: Dan Meyers <danjbh@users.noreply.github.com>
* Re-arm reap_flag when a reap pass is skipped
The dispatcher loop clears reap_flag before calling reap_psutil(), and
SIGCHLD is edge triggered, so a skipped pass (enumeration failure or an
unreadable child) left pending zombies unreaped until another child
happened to exit. Re-arm the flag on the failure paths so the next loop
iteration retries; the loop sleep keeps this from spinning.
NoSuchProcess does not re-arm: the child is already gone, there is
nothing left to reap.
Signed-off-by: Dan Meyers <danjbh@users.noreply.github.com>
* Apply suggestion from @murrant
---------
Signed-off-by: Dan Meyers <danjbh@users.noreply.github.com>
Co-authored-by: Dan Meyers <danjbh@users.noreply.github.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
|
||
|---|---|---|
| .agents/skills/add-os-support | ||
| .github | ||
| app | ||
| bootstrap | ||
| cache | ||
| config | ||
| database | ||
| dist | ||
| doc | ||
| html | ||
| includes | ||
| lang | ||
| LibreNMS | ||
| licenses | ||
| logs | ||
| mibs | ||
| misc | ||
| resources | ||
| routes | ||
| rrd | ||
| scripts | ||
| storage | ||
| tests | ||
| .editorconfig | ||
| .env.example | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| alerts.php | ||
| artisan | ||
| AUTHORS.md | ||
| billing-calculate.php | ||
| CHANGELOG.md | ||
| check-services.php | ||
| CODE_OF_CONDUCT.md | ||
| composer.json | ||
| composer.lock | ||
| config.php.default | ||
| config_to_json.php | ||
| CONTRIBUTING.md | ||
| cronic | ||
| daily.php | ||
| daily.sh | ||
| delhost.php | ||
| discovery-wrapper.py | ||
| discovery.php | ||
| irc.php | ||
| librenms-service.py | ||
| LICENSE.txt | ||
| lnms | ||
| mkdocs.yml | ||
| package-lock.json | ||
| package.json | ||
| phpstan-baseline-deprecated.neon | ||
| phpstan-deprecated.neon | ||
| phpstan-legacy.neon | ||
| phpstan.neon | ||
| phpunit.xml | ||
| ping.php | ||
| pint.json | ||
| poll-billing.php | ||
| poller-wrapper.py | ||
| poller.php | ||
| publiccode.yml | ||
| README.md | ||
| rector.php | ||
| renamehost.php | ||
| requirements.txt | ||
| SECURITY.md | ||
| services-wrapper.py | ||
| snmp-scan.py | ||
| snmpd.conf.example | ||
| snmptrap.php | ||
| syslog.php | ||
| validate.php | ||
| vite.config.mjs | ||
Introduction
LibreNMS is an auto-discovering PHP/MySQL/SNMP based network monitoring which includes support for a wide range of network hardware and operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade, Foundry, HP and many more.
We intend LibreNMS to be a viable project and community that:
- encourages contribution,
- focuses on the needs of its users, and
- offers a welcoming, friendly environment for everyone.
The Debian Social Contract will be the basis of our priority system, and mutual respect is the basis of our behavior towards others.
Documentation
Documentation can be found in the doc directory or docs.librenms.org, including instructions for installing and contributing.
Participating
You can participate in the project by:
- Talking to us on Discord or Twitter.
- Joining the LibreNMS Community
- Improving the documentation.
- Cloning the repository and filing pull requests on GitHub.
- Bug Reports on our Community Forums
- See CONTRIBUTING for more details.
VM image
You can try LibreNMS by downloading a VM image. Currently, a Ubuntu-based image is supplied and has been tested with VirtualBox.
Download one of the VirtualBox images we have available, documentation is provided which details login credentials and setup details.
License
Copyright (C) 2006-2012 Adam Armstrong adama@memetic.org
Copyright (C) 2013-2026 by individual LibreNMS contributors
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
LICENSE.txt contains a copy of the full GPLv3 licensing conditions.
The following additional license conditions apply to LibreNMS (a GPL exception):
As a special exception, you have permission to link or otherwise combine LibreNMS with the included copies of the following third-party software, and distribute modified versions, as long as you follow the requirements of the GNU GPL v3 in regard to all of the remaining software (comprising LibreNMS).
Please see Acknowledgements
Backers
Support us with a monthly donation and help us continue our activities. [Become a backer]
Sponsors
Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]