13 Commits

Author SHA1 Message Date
0d56bbd946 Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
77c531527c Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI

* Disable style check
2020-09-21 14:54:51 +02:00
bbdb1a2a5d Rewrite smokeping script to be an lnms command (#11585)
* Rewrite smokeping script to be an lnms command

* Add a default number of probes for smokeping

* Formatting fixes

* Refactor to simplify a couple of methods

* Fix a name collision when using more than 60 threads

* Simplify

* First pass at documentation

A few climate fixes too.

I'm a little dubious about the + LibreNMS fix - it could be included
in /etc/smokeping/config if it is really needed, but it sounds like
(looking at git blame) it's needed for if the script generates a broken
configuration file.

I'm thinking we should just not generate broken config.

* Improve testability and add some tests

* Load laravel to make translations available

* Second pass at documentation

* Fix brace

* Extend the device factory to include the type

Also adds a device group fake I created before I realised I didn't need it

* Mimic gen_smokeping.php a little more closely

* Update tests to properly verify old and new behaviour against each other

* Replace gen_smokeping with a wrapper

* Don't double whitespace

Render does this automatically.
Explicitly order by hostname too.

* Make faker less likely to generate duplicates

I tried adding a unique constraint here, but it didn't have the
intended effect.

Extending the hostname like this seems to work fine - I tried
generating 10 million hosts and got no duplicates, compared to
duplicates appearing with as few as 100 hosts without this
 change.

A true fix would be to add an 'fqdn' fake upstream.

* Make the tests more robust

* Assorted bug fixes

* Style corrections

* Handle 'generic' devices

* Fix an issue that came up during rebase

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-09-18 00:04:54 -05:00
1366bdebaf Added ignored devices to be pinged by smokeping (#11557)
Co-authored-by: Daniel Baeza <d.baeza@tvt-datos.es>
2020-05-14 22:06:18 -05:00
277333c752 space on type like "OOB Management" cause issue on smokeping, edit ge… (#11160)
* space on type like "OOB Management" cause issue on smokeping, edit gen_smokeping script to replace dot and space

* create fonction for replace dot and space

* correct indentation

* moving function to functions.php

* correct function name

* Remove function

this should not be a function...

* Remove function

* Update gen_smokeping.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-02-26 11:43:21 -06:00
9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
d2193f76ca feature: allow scripts to be run from any working directory (#4437)
* feature: allow validate.php to be run from any working directory

* remove redundant realpath() call

* re-add realpath() to remove symbolic links

* realpath() isn't needed...

* chdir() in all php scripts in ./ and ./scripts/

* update-sql.php clearly is not used, as it was broken.

* Change some scripts to executable
Remove extra chdir() call in snmp-scan.php

* Missed console-ui.php
Kind of fixed console-ui.php help output

* Re-add newline
2016-09-14 16:53:04 +01:00
abc6a5b799 PSR-2 Final cleanup (#4247)
refactor: Final PSR2 cleanup
2016-08-28 23:32:55 +01:00
16b91f6a97 Fix Smoking Path (#3577)
Fix Smokping Path
2016-05-31 21:24:03 -05:00
80a816dab9 - added env php to top of file 2015-10-04 19:15:12 +02:00
laf
6ec525c222 Formatting + scrut updates 2015-07-16 16:01:51 +01:00
laf
b668571c8c Some small changes 2015-07-07 20:28:04 +01:00
laf
0b30d18733 Final pieces to the smokeping integration 2015-07-07 20:24:09 +01:00