* Make usage of logger, also harden exception logging
* Make usage of hardened command_runner
This is a hardened version of subprocess.call which handles timeout, encoding and various errors that may happen during execution
* Remove unused exception logging
* Fix bogus exception logging
* Rename exception to match log line
* Make command_runner pylint friendly under Unix
* Add copyrights to my parts of code
* Faster initial database creation
Add db dumps to improve initial db migration
On my test system 13s -> 7s, a 46% reduction.
Should help out a lot on systems like RPi
* lnms schema:dump command
--snapshots saves db snapshots, otherwise it saves the yaml
* fix style
* fix timezones...
* not working with in-memory db yet
remove build.sql
* Use a proxy server for the PagerDuty transport.
We don't use the get_guzzle_proxy() function since tcp:// doesn't work
with all of the HTTP transports that Guzzle supports. Instead we use
the standard get_proxy() function.
Tested against Squid
* formatting only
* snmpwalk_cache_oid handle multiline strings
* remove useless function
* some output has no space after equals
* airos-af-ltu use hr processors
* don't try to append with empty strings
* fix changed test data due to fix
* revert smartax
* better regex
additional check
* split siteboss 530 and 550 into multiple OS
* add more sensors to siteboss550 and new Percent sensor
* fix contact closure event state values
* split os polling for siteboss to siteboss530 and siteboss550
* add test unit for siteboss550, rename test unit for siteboss to siteboss530
* refactor siteboss os polling to \Librenms\OS
* implement OSPolling to Sitebos550
* force save in pollOS() to keep custom sysName during polling
* updated unit test
* update device graphs
* remove pollOS and extra save()
* siteboss550 no longer extends OSPolling
* update siteboss550 test data
* update discoverOS() to match recent os discovery changes
* styleCI changes
* fix siteboss hardware discovery; add check to OS polling if os_group .inc file exists
* collapse siteboss to single OS, implement siteboss sensors in advanced discovery
* add siteboss unit tests
* removed unneeded OS disco defs
* styleCI changes
* more styleCI changes
* split siteboss os to siteboss530 and siteboss550
* split siteboss os to siteboss530 and siteboss550
* move php polling back into yaml
* keep original siteboss OS name
* resave snmp data for siteboss OS
* resave snmp data for siteboss550 OS
* Implement locks in the file cache
* Replace custom locks
* implement restore lock
Used when re-hydrating
* remove legacy use statements
* Add class descriptions
* Fix style
* Default to database cache driver
* missed cache_locks table
prevent chicken-egg issue
* style fixes
* Remove custom file lock implementation
* missed items from file cache
* Update schema definition
hmm, other schema noise must be from manual modification as this is generated from a freshly migrated db.
* require predis, it is pure python, so no harm in adding
* and set predis as the default client
* All os detection now uses Yaml
Move OS detection code into the Core module.
Defer all OS with snmp queries.
Add snmpwalk option.
Port ubnt and mobileiron to yaml.
* Silly ide refactor
* Add simple tag-parsing of colors and highlights in alerts
* Fixing a few CodeClimate-issues
* Fixing a missing ;
* Fixing some more typography
* Whitespace...
* Deduplicate code
* Missing ; - too much python lately...
* Fix end of function name
* Simplifying sendAlert a bit
* Keeping up with PR#12141
* ; again...
* this->sendAlert...
* 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