Go to file
Adam Bishop 41ed0537b4
Fix midnight poller data loss (#11582)
* Handle more signals

* Flush buffers before exiting process
This ensures log messages aren't lost

* Restart process before jobs have finished
If there is a very log running job it can cause service restart to
take over 5 minutes.

We tweak the order of things to make sure that running processes
continue, but nothing more is scheduled.

The worst case impact is that a pollling/discovery job gets
scheduled twice, but this should not be a big issue - this should
only occur at most once per day.

* Remove python 3.8 feature

* Ensure that processes from the previous invocation are reaped

* Correct typo's

* Attach subprocess descriptors to /dev/null

Occasionally, PHP would throw a fit and crash when its stdout went
away. To avoid this, we attach stdout to devnull.

This means we lost output of daily.sh - but this is already recorded
in $LOGDIR/daily.log

* Don't immediately schedule long running jobs

To avoid the situation where the maintenance reload happens or a sighup,
then a second long running job is immediately started, we wait
(`last_[poll/discovery]_timetaken` * 1.25) seconds before scheduling
any jobs.

* Add `psutil` to requirements

* Add support for "systemctl reload" to the unit files

* Add a fallback for systems that don't have psutil

* Reduce CPU load when psutil is not installed

* Don't avoid double polling by extending the timeout

This shouldn't happen due to locks

* Remove fallback option

* Remove extra variable

* Fix issue introduced during rebase

* Fix issue introduced when fixing issue introduced during rebase

* Make psutil optional
2020-09-29 23:50:40 -05:00
.github Use lnms dev:check instead of pre-commit.php (#12149) 2020-09-24 12:32:03 +02:00
LibreNMS Fix midnight poller data loss (#11582) 2020-09-29 23:50:40 -05:00
app Add Blade Submenu component (#12159) 2020-09-29 23:11:05 -05:00
bootstrap Check PHP version first (#10473) 2019-08-01 06:58:22 -05:00
cache fix: page/graph load speed: part 1 (#6611) 2017-05-10 08:57:10 +01:00
config New OS: Ekinops (#12088) 2020-09-23 18:23:57 +02:00
contrib Apply fixes from StyleCI (#12117) 2020-09-21 14:54:51 +02:00
database new index in alert_log table (#12143) 2020-09-24 17:05:21 +02:00
doc Fix midnight poller data loss (#11582) 2020-09-29 23:50:40 -05:00
html New OS: Ekinops (#12088) 2020-09-23 18:23:57 +02:00
includes Fix edgeswitch regex (#12168) 2020-09-30 01:04:56 +02:00
licenses delete old stuff, put licenses into licenses 2011-09-29 15:58:18 +00:00
logs Restore gitignore file contents (#9784) 2019-02-06 06:57:44 -06:00
mibs Adding basic support for Symertricom-Microsemi SSU2000 (#12145) 2020-09-24 17:06:01 +02:00
misc Fix midnight poller data loss (#11582) 2020-09-29 23:50:40 -05:00
resources Add Blade Submenu component (#12159) 2020-09-29 23:11:05 -05:00
routes API Calls to list Device Outages, calculated Availability (#12103) 2020-09-24 00:21:08 +02:00
rrd Restore gitignore file contents (#9784) 2019-02-06 06:57:44 -06:00
scripts Add panos (paloalto) to rancid_map (#12161) 2020-09-28 17:57:54 +02:00
sql-schema Alert template clean up "\r\n\n" (#10541) 2019-09-05 04:34:24 +00:00
storage Update to Laravel 5.7 (PHP 7.3 support) (#9800) 2019-02-12 17:45:04 -06:00
tests Windows detect newer versions (#12164) 2020-09-30 01:01:43 +02:00
.codeclimate.yml More codeclimate tuning (#9197) 2018-09-13 12:18:58 -05:00
.editorconfig Update to Laravel 5.7 (PHP 7.3 support) (#9800) 2019-02-12 17:45:04 -06:00
.env.example create .env if non-existing 2020-06-27 07:47:08 -05:00
.env.travis fix test env 2020-06-27 08:23:58 -05:00
.gitignore Unbundle javascript language files (#10788) 2019-11-08 15:18:41 +00:00
.mention-bot Update .mention-bot (#5371) 2017-01-09 21:19:03 +00:00
.php_cs Update dev:check style to use php-cs-fixer (#12132) 2020-09-23 20:54:00 -05:00
.scrutinizer.yml refactor: use Composer to manage php dependencies (#5216) 2017-01-01 09:37:15 +00:00
.styleci.yml Add StyleCI config (#12126) 2020-09-21 16:02:55 +02:00
.travis.yml Update travis to Ubuntu 18.04 (#12043) 2020-08-31 13:32:37 +02:00
AUTHORS.md Matrix txnid fix (#12057) 2020-09-04 16:38:19 +02:00
CHANGELOG.md Small Cleanup (#8871) 2018-07-07 13:55:17 +01:00
CODE_OF_CONDUCT.md docs: Added code of conduct doc in root (#7055) 2017-07-21 12:36:33 -05:00
CONTRIBUTING.md documentation link fixes (#10848) 2019-11-19 17:14:15 +01:00
LICENSE.txt Update copyright instructions 2014-06-23 13:44:12 +10:00
Makefile webui: Removed unused JS causing issues with typeahead (#8307) 2018-03-09 18:11:24 +01:00
README.md Misc changes (#11991) 2020-08-03 13:44:37 +02:00
addhost.php Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
adduser.php Apply fixes from StyleCI (#12117) 2020-09-21 14:54:51 +02:00
alerts.php Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
artisan Update to Laravel 5.7 (PHP 7.3 support) (#9800) 2019-02-12 17:45:04 -06:00
billing-calculate.php Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
build-base.php Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
build.sql Remove graph_types definitions from DB (#9618) 2019-01-08 13:46:45 -06:00
check-services.php Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
composer.json Update dev:check style to use php-cs-fixer (#12132) 2020-09-23 20:54:00 -05:00
composer.lock Update dev:check style to use php-cs-fixer (#12132) 2020-09-23 20:54:00 -05:00
config.php.default Remove DB credentials from config.php 2020-06-27 07:47:08 -05:00
config_to_json.php Remove DB credentials from config.php 2020-06-27 07:47:08 -05:00
cronic fix: Updated bin/bash to use env in cronic script (#4752) 2016-10-13 22:23:53 +01:00
daily.php Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
daily.sh Full path to python requirements check (#11982) 2020-07-30 22:29:16 +02:00
delhost.php Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
discovery-wrapper.py Remove DB credentials from config.php 2020-06-27 07:47:08 -05:00
discovery.php Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
dist-pollers.php Apply fixes from StyleCI (#12117) 2020-09-21 14:54:51 +02:00
irc.php Apply fixes from StyleCI (#12117) 2020-09-21 14:54:51 +02:00
librenms-service.py Updated shebang on librenms-service.py (#8875) 2018-07-08 22:25:29 +01:00
librenms.cron More more docs (#4197) 2016-08-25 18:40:11 -05:00
librenms.nonroot.cron Add note to cron file advising not to disable daily.sh (#9164) 2018-09-06 22:30:31 +01:00
lnms Check running user lnms (#11726) 2020-05-30 09:23:21 -05:00
mkdocs.yml Rewrite the docs for OS discovery (#12047) 2020-09-02 15:18:08 +02:00
package-lock.json Bump http-proxy from 1.18.0 to 1.18.1 (#12081) 2020-09-11 13:13:46 +02:00
package.json Bump lodash from 4.17.15 to 4.17.19 (#11942) 2020-07-18 16:02:41 +02:00
pbin.sh updated pbin.sh to be inline with other scripts and use env bash (#6583) 2017-05-05 07:52:52 +01:00
phpunit.xml Laravel 7.x Shift (#11676) 2020-07-09 08:22:50 -05:00
ping.php Speed up tests by skipping pings (#11642) 2020-05-19 22:08:41 -05:00
poll-billing.php Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
poller-wrapper.py Remove DB credentials from config.php 2020-06-27 07:47:08 -05:00
poller.php Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
readmegen.yml added changelog for v1.25 (#6018) 2017-02-26 22:14:06 +00:00
renamehost.php Apply fixes from StyleCI (#12117) 2020-09-21 14:54:51 +02:00
requirements.txt Fix midnight poller data loss (#11582) 2020-09-29 23:50:40 -05:00
server.php Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
services-wrapper.py Remove DB credentials from config.php 2020-06-27 07:47:08 -05:00
snmp-scan.py Add functionality to use snmp-scan.py to addto specific poller group (#12029) 2020-09-03 12:51:16 -05:00
snmp.conf.example snmp.conf is not needed so do not recommend to set anything (#6204) 2017-03-16 13:52:23 -05:00
snmpd.conf.example Documentation updates for DMI support and making two links in the FAQ work (#8440) 2018-05-08 18:35:25 -05:00
snmptrap.php Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
syslog.php Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
validate.php Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
webpack.mix.js Unbundle javascript language files (#10788) 2019-11-08 15:18:41 +00:00

README.md

Scrutinizer Status Scrutinizer Code Quality Travis Status

Introduction

LibreNMS is an autodiscovering 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 behaviour towards others. For more about the culture we're trying to build, please read the Freenode philosophy, including guidelines for running an IRC channel and being a community catalyst.

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:

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-2020 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 http://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]