208 Commits

Author SHA1 Message Date
mcq8
c9728a1f71 refactor: Refactored authorizers to classes (#7497)
* Refactored authorizers to classes

* Merge changes for #7335

* ! fix php 5.3 incompatibility

* Update ADAuthorizationAuthorizer.php

* Fix get_user -> getUser

* Rename AuthorizerFactory to Auth, fix interface missing functions

* Add phpdocs to all interface methods and normalize the names a bit.

* Re-work auth_test.php AD bind tests to work properly with the new class.
Reflection is not the nicest tool, but I think it is appropriate here.
Handle exceptions more nicely in auth_test.php

* Restore AD getUseList fix

Not sure how it got removed

* fix auth_test.php style
2017-11-18 10:33:03 +00:00
Tony Murray
af27195746 feature: Script to collect port polling data and compare full walk vs selective port (#7626)
* Script to collect port polling data and compare full walk vs selective port polling.

* Select hosts. Colors. Percent. Units (s). Enable sel poll.

* Moved the colors. Disable selective if needed. Report set status and count.

* Style fix.

* CLI help.

* Docs.

* Style fix.

* Allow comma separated device_id list.
Better color formatting for output
Fix issue when using &$device by reference
2017-11-17 09:10:37 +00:00
Maximilian Wilhelm
95024af2c0 feature: Added purge-port scipt to allow deleting of ports from the CLI. (#7528)
* Add purge-port scipt to allow deleting of ports from the CLI.

  This script allows deleting single ports by their port_id or a list
  of ports read from a file or STDIN.

  LibreNMS Port purge tool
        -p <port_id>    Purge single port by it's port-id
        -f <file>       Purge a list of ports, read port-ids from <file>, one on each line.
                        A filename of - means reading from STDIN.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>

* Update CLI-Tools.md
2017-11-09 12:57:41 +00:00
Tony Murray
a688a77864 fix: github-apply sometimes fails on PRs with lots of commits (#7604)
.patch is all commits individually, .diff is all commits merged
2017-11-01 21:19:41 +00:00
Tony Murray
9d73cd401a feature: LDAP auth update: alerts, api, remember me (#7335)
* feature: LDAP auth update: alerts, api, remember me
Defer ldap connection until it is needed (saves connections from pollers)
Add ability to use a bind account if the server does not allow anonymous bind.
If the server does allow anonymous bind, no config change is needed.
Use Config class

FYI, I have no way to test this.

TODO: update/validate docs

* prevent duplicate users in get_userlist()

* fix bug in Config get for auth_ldap_uid_attribute, `.` should have been `,`
Change case of uidNumber to match common configs (should be case insensitive anyway)

* revert uidnumber case changes and fix up user supplied ones as it is unintuitive that they need to be lowercase.
Add auth_ldap_binddn setting to allow more a more specific way to enter the bind user.
2017-10-30 19:28:40 +00:00
Tony Murray
51ba934e11 feature: Added web validation (#7474)
* refactor: convert validations to modules to prep for gui integration

* accidentally dropped, schema update

* fix accidental output to webui

* mention discovery-wrapper.py and re-arrange.

* refine some fix statements

* rename the Config validation group to Configuration.

* fix some scrutinizer issues
remove as many local functions from validator.php as possible
move extensions from pre-check
remove duplicate timezone check
looks like there is some db schema differences between mariadb 10.1 and 10.2, investigating

* mariadb version diff take2

* Check schema version first for database.
Remove stop to go back to command line for install docs.
Add helpful link when there is no devices added to /addhost

* fix incorrect validation for empty string defaults

* Fix style

* Add additional file permissions checks

* catch exception and fail for invalid timezone
Change visuals a bit.

* add php version warning

* fix space
2017-10-26 07:56:09 +01:00
Neil Lathwood
f1b50737bb Docs refactor (#7389)
* docs: Refactored docs for new layout

* some more changes

* more doc updates

* More doc updates

* small update

* small update
2017-10-02 21:36:22 +01:00
Neil Lathwood
e0040b2831 newdevice: Added support for Toshiba RemotEye4 devices (#7312)
* newdevice: Added support for Toshiba RemotEye4 devices

* small updates thanks to kate

* Update new-os.php

* Update new-os.php
2017-09-12 22:27:06 -05:00
Neil Lathwood
edae33507a feature: Added script to generate config for new OS (#7161)
* feature: Added script to generate config for new OS

* scrut fixes
2017-09-04 21:38:09 +01:00
Zmegolaz
5441bafc81 fix: Fixed IPv6 host renaming (#7275)
* Fixed IPv6 host renaming

* Added get_rrd_dir() and modified other files to use it where appropriate.

* rrd_name() now uses the new function get_rrd_dir(), to make it simpler to modify the escaping in the future.

* Wrong function name in rrdstep.php
2017-09-02 13:45:31 -05:00
deepseth
809c9ea591 feature: Added Syslog hook for ASA support (#7268)
* Added limited support for ASA using emblem logging

* Updated documentation

* Updated ASA support to cover regular and emblem logging

* Gave the variable a more suitable name

* Removed debug output
2017-09-01 18:37:01 +01:00
Robert (KHobbits)
e3fab24e1c fix: Added Extreme OS mapping to 'gen_rancid' (#7261)
This is based on git-rancid code base, seems to be mirrored in upstream.
2017-08-30 20:05:32 +01:00
Jonathan Thurman
30c1b79b3d fix: Update gen_rancid.php to the correct arista os name (#7214) 2017-08-23 19:29:40 +01:00
Neil Lathwood
7b97e0e761 Attempt to fix repeated sql issue we come across (#7123)
* Attempt to fix repeated sql issue we come across

* renamed sql file
2017-08-14 22:00:41 +01:00
Neil Lathwood
66008a0fd5 feature: Added script to test alerts (#7050)
* feature: Added script to test alerts

* actually added the file

* Add text when no alert is found.
2017-07-23 19:56:22 +01:00
Neil Lathwood
a58a2d8677 fix: Updated sed commands to allow rrdstep.php to be used to increase and decrease values (#6941) 2017-07-03 16:02:30 -05:00
deepseth
683c93cdf5 Non greedy match for IOS-XR works better (#6872) 2017-06-23 22:16:35 +01:00
Olen
bcaeae5976 feature: Added support for passing state to alert templates test
* Added option to specify transport when testing a template

* Allow you to specify "state" on commandline
2017-06-19 06:58:52 +01:00
deepseth
bcc618a3ad feature: Added Syslog hooks for Oxidized integration (and more) (#6785)
* Creating syslog hooks with example script for Oxidized integration

* Corrected IOS-XR matching and stopped spurious calls to Oxidized
2017-06-17 15:21:21 +01:00
Olen
e70e3763d2 feature: Added option to specify transport when testing a template (#6755) 2017-05-31 21:26:47 +01:00
Caio Silva
423c735819 Update test-template.php (#6723)
fix: Added option -h in the example.
2017-05-24 21:26:16 +01:00
Tony Murray
f723f0ba12 fix: auth test script (#6673)
Need to pull in web includes
fix variable collisions...........
2017-05-18 22:06:42 +01:00
Neil Lathwood
0338734fe7 feature: Added script (scripts/test-template.php) to test alert templates (#6631)
* feature: Added script (scripts/test-template.php) to test alert templates

* moved remaining functions, fixed php 5.3 and include dir

* added docs on use for test-template script
2017-05-13 06:46:08 -05:00
Jonathan Price
2186e3b79a fix: Update Shebangs and daily.sh for FreeBSD compatibility (#6413)
* Where shebangs had no flags, updated them to use /usr/bin/env for cross-platform compatibility
Updated daily.sh to support FreeBSD (su has different args, replaced with sudo when not on linux)

* Added myself to AUTHORD.md as per contributor guidelines

* Set all platforms to use sudo rather than su
Re-added missing arguments to sudo
2017-04-17 20:14:23 -05:00
Tony Murray
b1483e3d2e feature: Unit test to validate the db schema (#6367)
* Unit test to validate the db schema
Changes build-schema.php to just write misc/db_schema.yaml

* Only build base if needed
Fix 178.sql

* Database is always created by init.php
add dbSchema test too, should guard against testing against an empty database

* feature: support non-standard unix socket (#5724)

* Add support for custom MySQL unix-socket

* NULL must be lowercase!

* Naive edit of html/install.php

* fixup

* Refactor dbConnect
Use it everywhere

* $config needs to be global
Don't need to set $database_link

* small cleanups

* Connect to the database for every test.

* travis fix for blank line
2017-04-07 15:07:44 +01:00
Neil Lathwood
e583fb8c46 updated schema build user (#6363) 2017-04-05 15:24:00 +01:00
Tony Murray
55162129ff Update schema manually (#6362)
Allow build-schema.php to be run by hand more easily.
2017-04-05 09:06:11 -05:00
Neil Lathwood
6a73e725af updated schema build user (#6360) 2017-04-05 14:18:30 +01:00
Neil Lathwood
b4488e84a1 Deploy schema (#6358)
* updated username

* updated username

* updated username

* updated username

* updated username
2017-04-05 12:10:38 +01:00
Neil Lathwood
284bb19b2e Deploy schema (#6357)
* updated username

* updated username

* updated username

* updated username
2017-04-05 11:47:32 +01:00
Neil Lathwood
d8b651f736 Deploy schema (#6356)
* updated username

* updated username

* updated username
2017-04-05 11:21:09 +01:00
Neil Lathwood
2c3599d3e5 Deploy schema (#6354)
* updated username

* updated username
2017-04-05 10:56:18 +01:00
Neil Lathwood
c6a51adb44 updated username (#6352) 2017-04-05 10:32:36 +01:00
Neil Lathwood
03deb6434a feature: Added ability to validate database schema (#6303)
* feature: Added ability to validate database schema

* small scrut fixes

* Check for extra tables and columns
Print 30 items of schema updates, easier to copy paste sql

* Now supports detections and suggested fix for:
tables: missing, extra
columns: missing, extra, incorrect
indexes: missing, extra, incorrect

* final changes + hook into travis
2017-04-05 09:00:28 +01:00
Tony Murray
1ea7af424b feature: bind user for active_directory auth (#6255)
* feature: bind user for active_directory auth
Optional, allows the use of "remember me", API, and alerting.

* missing global (but still may not be working)

* always return a value from reauthenticate()

* Make sure the ldapbind credentials are correct on reauth.
Do not send output if they are incorrect (use d_echo) this breaks ajax calls, etc.
Add scripts/auth_test.php, to make it easier to debug authentication.

* Refine auth_test.php a bit more
A few small cleanups in other places of the auth

* Add auth_test.php to docs
Some more improvements in the auth_test.php output.

* Update Authentication.md
2017-03-29 08:22:02 -05:00
Neil Lathwood
8ca1f169b3 feature: Added rrd step conversion script (#6081)
* feature: Added rrd step conversion script

* updated to support all for hostname

* update docs + code

* small updates as per murrant
2017-03-11 07:32:43 -06:00
ollb
698584e14d feature: Add support for dynamic interfaces in ifAlias script (#6005)
* add support for dynamic interfaces in ifAlias script

* netlink and ip support alias (`ip link set IFACE alias ALIAS`). In an
  environment with dynamic interfaces, it is useful to be able retrieve
  aliases from ip.

* we cannot assume next iface oid is n + 1 since oids do not necessarily
  follow incrementally when some interfaces has been destroyed and
  recreated.

* use straight POSIX shell

* I agree to the conditions of the Contributor Agreement contained in
doc/General/Contributing.md.
2017-02-26 23:22:03 +00:00
Tony Murray
676e5563b9 Only allow integers for input to github-apply
Remove some unneded code from github-remove
2017-02-17 21:49:29 -06:00
Tony Murray
6b33bdc949 require -d -s or -r 2017-02-17 21:39:22 -06:00
Tony Murray
3c22633cea Port remove script to python 2017-02-17 21:33:09 -06:00
Tony Murray
bf32690abc Port remove script to python 2017-02-17 21:29:52 -06:00
Tony Murray
62c49fedf7 Scripts to easily apply and remove github Pull Requests 2017-02-15 15:07:24 -06:00
Neil Lathwood
5aef36abd6 Tune port update (#5795)
* updates to rrdtune docs and script

* added all support
2017-02-06 18:49:16 -06:00
Xavier Beaudouin
cb5dd299af feature: Rancid config file generator (#5689) 2017-02-02 15:44:15 +00:00
David Bell
a33ae25d0b fix: ifAlias script now works with snmpbulkwalk #5547 2017-01-31 22:19:16 +00:00
patrick7
91dd6a2670 fix: Update ifAlias script to deal with GRE interfaces (#5546) 2017-01-27 23:16:33 +00:00
Tony Murray
839dd31093 feature: Added pre-commit git script to support failing fast 2017-01-24 21:37:49 +00:00
Neil Lathwood
3c0a2109e5 tidy up some file permissions and removed unused files (#5563)
* tidy up some file permissions and removed unused files

* Delete makemini.pl
2017-01-24 12:44:16 -06:00
Neil Lathwood
317402c378 trying to fix docs build (#5340) 2017-01-07 22:14:16 +00:00
Neil Lathwood
03e3249c50 fix: specify specific mkdocs version (#5339) 2017-01-07 18:09:46 +00:00