From 3dd69c20638477e736c2181ec173cdc985877845 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 9 Jun 2013 15:49:49 +0100 Subject: [PATCH] Merge 2.008000 release from og-work branch. Squashed commit of the following: commit aa2baf5c75c07bf9c7f19af23c842f60bc93b518 Author: Oliver Gorwits Date: Sun Jun 9 15:44:29 2013 +0100 next stable release commit 79fe5b59e680451965294100b19dc7a2338c18db Author: Oliver Gorwits Date: Sun Jun 9 15:37:26 2013 +0100 fix localenv discovery for scripts commit 1af2f78dd41df26069683ed2647fb0a10dc9b46b Author: Oliver Gorwits Date: Sun Jun 9 14:55:39 2013 +0100 include new bin scripts commit 23d0e1b0e778bf537d9515cd2333037179a608b8 Author: Oliver Gorwits Date: Sun Jun 9 14:09:27 2013 +0100 more bug fixes commit dfeacd12e22cb6a512da60f407358c6f71f8ee0b Author: Oliver Gorwits Date: Sun Jun 9 11:30:06 2013 +0100 several bug fixes commit 9fd41f1c26daefabbef8351032a335196e29b473 Author: Oliver Gorwits Date: Sat Jun 8 21:22:44 2013 +0100 bump version for next beta commit b0925cf11610d19e32159a6282920cee74c28053 Author: Oliver Gorwits Date: Sat Jun 8 21:20:13 2013 +0100 update plugin docs commit 9571c45634548727c94304890a584c108e0a46f1 Author: Oliver Gorwits Date: Sat Jun 8 20:54:30 2013 +0100 sanitize configuration files commit dd447e4246a1474ac1b4c15d0632d1aadecb2cb3 Author: Oliver Gorwits Date: Sat Jun 8 20:04:43 2013 +0100 tweak parsing of lists of regex in config commit 9957548022090eeba4a8b9202f49971bdf7d6604 Author: Oliver Gorwits Date: Sat Jun 8 19:54:10 2013 +0100 workers instead of daemon_* config commit 4f6b470429f6e9d4db16d42751e8b3b8212d10b7 Author: Oliver Gorwits Date: Sat Jun 8 19:39:40 2013 +0100 no more demo :( commit eda73c7dac02dafdcf6acf767553a6d2babf7f07 Author: Oliver Gorwits Date: Sat Jun 8 19:24:47 2013 +0100 lots of docs commit 4a1ccba71a2cace2510ec5387d71128be986827c Author: Oliver Gorwits Date: Sat Jun 8 18:17:42 2013 +0100 documentation for all config settings commit 3538e47bcd02db13b8af347352e7e8dc7a5d2c21 Author: Oliver Gorwits Date: Sat Jun 8 16:05:03 2013 +0100 update TODO commit cf9001fccc9334ac4346524f9da3e34b22e532b9 Merge: a43c989 7b98e23 Author: Oliver Gorwits Date: Sat Jun 8 16:03:29 2013 +0100 merge master after new release commit a43c98962ae7b88787f8960090ebbe86d61450f2 Author: Oliver Gorwits Date: Mon Jun 3 20:37:39 2013 +0100 Missing mibdirs causes all MIBs to be loaded (with a warning) commit 09829a25b8d0a60d4c014ac6ebed35f0cf233a56 Author: Oliver Gorwits Date: Mon Jun 3 20:07:31 2013 +0100 local plugins site_plugins dir commit b0e804e558874e0736bbb1264aed7128274a3c79 Author: Oliver Gorwits Date: Mon Jun 3 19:59:04 2013 +0100 use send_error and redirect from Dancer commit 3d1185261ab4cec9aef53afc0d715d7fceeecd90 Author: Oliver Gorwits Date: Mon Jun 3 19:13:40 2013 +0100 support path config option commit 31ca119f84b08bd420d6ef7d7a19b16f9dd19988 Merge: 9a79855 4d2b3a5 Author: Oliver Gorwits Date: Mon Jun 3 00:06:17 2013 +0100 Merge remote-tracking branch 'origin/og-work' into og-work g-work" This reverts commit 9a798553615317d6571a35d32f4e6bf822b5560e, reversing changes made to 6fd61183545716cf13928c4555689d473e9fe898. Conflicts: Netdisco/share/views/plugin/device_port_column/c_observiumsparklines.tt commit 9a798553615317d6571a35d32f4e6bf822b5560e Merge: 6fd6118 c8c3b82 Author: Oliver Gorwits Date: Mon Jun 3 00:03:32 2013 +0100 Merge remote-tracking branch 'origin/master' into og-work commit 6fd61183545716cf13928c4555689d473e9fe898 Author: Oliver Gorwits Date: Sun Jun 2 15:47:45 2013 +0100 extra note about behind proxy commit 798086ca29b879fd0864deddcd9bcd1ee668f882 Author: Oliver Gorwits Date: Sun Jun 2 15:30:26 2013 +0100 complete the observium plugin commit 66b3ced17946ee94fc3ae5760f1eff97e3cfa133 Author: Oliver Gorwits Date: Sun Jun 2 12:48:06 2013 +0100 Plugins can have CSS and Javascript loaded within commit 4d2b3a53072f0c6b69e6e9b36154f83b3966fbc5 Author: Oliver Gorwits Date: Thu May 30 08:50:16 2013 +0100 get device dns to port template commit ed1bfa1ae706858a8301af1e3db6723d477a0f7f Author: Oliver Gorwits Date: Thu May 30 08:17:02 2013 +0100 observium sparklines plugin; support X:: namespace commit 76b7636c748b0408fb46b31b6b3969c884dd798c Author: Oliver Gorwits Date: Thu May 30 06:30:06 2013 +0100 rename private settings keys commit fdac8f6c3351dffb0a0895361e98f2a86e39904f Author: Oliver Gorwits Date: Thu May 30 05:59:53 2013 +0100 add macwalk and arpnip buttons to device details commit 3d688c7d83821ea65cc439488830068e6cd6c3f5 Author: Oliver Gorwits Date: Thu May 30 05:57:20 2013 +0100 Revert "reduce refresh to 5sec" This reverts commit 8ea9ec7dd9422d7cd17a85119b5b46ca0be4d030. commit dc62382112b255e63fce3868812ec386226401e5 Author: Oliver Gorwits Date: Thu May 30 05:50:34 2013 +0100 support for arpwalk and macwalk and all jobs via web commit 8bc7d83c985f03970217d9f00185f83a61ae173d Author: Oliver Gorwits Date: Thu May 30 05:35:41 2013 +0100 simplify discover options to only discoverall and discover commit 8ea9ec7dd9422d7cd17a85119b5b46ca0be4d030 Author: Oliver Gorwits Date: Wed May 29 20:23:08 2013 +0100 reduce refresh to 5sec commit 8c54e6c58b555f624b6bce1716a61ceb1e6e2eaa Author: Oliver Gorwits Date: Wed May 29 20:11:06 2013 +0100 show undiscovered neighbor properly commit e0ee25628febdcecbb93356934286d7bd273023f Author: Oliver Gorwits Date: Wed May 29 19:54:09 2013 +0100 avoid unecessary log for queueing commit d5565423f2635e50cc6f160a8f0d5e6e2da3468f Author: Oliver Gorwits Date: Wed May 29 19:51:37 2013 +0100 avoid warning on undefined remote type commit 5d9b58a6b27f191815040630463d6bdb9bbfddb8 Author: Oliver Gorwits Date: Wed May 29 19:48:22 2013 +0100 avoid explosion when not admin commit 377bb942e0b4088795f43ded29df2a14f2c1979f Author: Oliver Gorwits Date: Wed May 29 19:46:52 2013 +0100 avoid undefined warning commit 08806dcfa24dbb7727c63ff46aedc2ee9eff46cc Author: Oliver Gorwits Date: Wed May 29 19:46:42 2013 +0100 get_db_version will be 0 at first deploy commit 9511c17056e1931c8b2de051dde9f08d0c6cddaf Author: Oliver Gorwits Date: Wed May 29 19:15:55 2013 +0100 fix name of Template module commit eb0288de35fa7fc111d4b6fff19f163fa9b9ffe9 Author: Oliver Gorwits Date: Tue May 28 07:17:07 2013 +0100 initial config settings documentation commit 7f2ea7f8dc4c4a865c26e20bda20184d29ae8df1 Author: Oliver Gorwits Date: Mon May 27 15:18:15 2013 +0100 remove check_mac to own module, use in macsuck too commit b995cf63986888933de70edae22827bab0d17266 Author: Oliver Gorwits Date: Mon May 27 15:01:29 2013 +0100 show probable but undiscovered neighbor is ports display commit dd8d461188aba779aa3f8c3b6c01188d29094cf3 Author: Oliver Gorwits Date: Mon May 27 14:52:41 2013 +0100 new schema version for is_uplink and is_uplink_admin commit 3f6a7b5aa221857ab2a0f35f370a5c515d546351 Author: Oliver Gorwits Date: Mon May 27 14:47:59 2013 +0100 make sure device_port is updated when manual_topo is set commit 33bf9a6599565e3acebc33bcc54aed1b2106d7c7 Author: Oliver Gorwits Date: Sun May 26 19:51:49 2013 +0100 export store_arp and store_node commit 0ed356d5606bb1b5d421609052615ab4dfe1b991 Author: Oliver Gorwits Date: Sat May 25 17:12:31 2013 +0100 use row lock not table lock commit f830bc3a3baee2c885443a15c564a0d53f06147b Author: Oliver Gorwits Date: Sat May 25 16:38:33 2013 +0100 move macsuck/arpnip/discover to ::Core namespace commit be40788987989fe9f052963f8f382416b3dc49b1 Author: Oliver Gorwits Date: Fri May 24 21:10:34 2013 +0100 add maybe_uplink to device_port; more macsuck implementation commit 88371026d5b35d8cee55f073e0456417f94521a8 Author: Oliver Gorwits Date: Fri May 24 14:34:58 2013 +0100 start on macsuck; tweak update locking commit 6f7c87ac07185affe79e3b0b7d8468567c6c1d70 Author: Oliver Gorwits Date: Fri May 24 13:10:58 2013 +0100 ORDER BY ... FOR UPDATE will allow us to avoid table lock commit 7c438e01fc44dbf4a39832cfe0dbaf531e231325 Author: Oliver Gorwits Date: Fri May 24 12:12:46 2013 +0100 yet more efficient arpnip commit c74c56dc02a4e934ecf7245bfd376b94a47cd1c3 Author: Oliver Gorwits Date: Fri May 24 11:34:23 2013 +0100 guard against race with *_or_* DBIC methods commit d50c54972eebf01b75211b7cacc046b20ad42b12 Author: Oliver Gorwits Date: Mon May 20 23:42:41 2013 +0100 more efficient arpnip commit 73c8979130292fa22357d2acdc08497d5afcfcc1 Author: Oliver Gorwits Date: Sun May 19 22:52:15 2013 +0100 fix confusing name commit bf78e824110fec7b7ca9460871525f6f9cde6030 Author: Oliver Gorwits Date: Sun May 19 22:37:22 2013 +0100 fix mistake in DBIx::Class schema commit 6a5af958363271a9311e86421ffcd1c7c35a0fbc Author: Oliver Gorwits Date: Sun May 19 22:06:27 2013 +0100 arpnip implementation commit 594abd3f8243e118c72182528715466da0fb12d9 Author: Oliver Gorwits Date: Thu May 16 00:00:50 2013 +0100 PostgreSQL explicit locking support. Squashed commit of the following: commit 76e15391020dcae7465c2682205b01d643685c78 Author: Oliver Gorwits Date: Wed May 15 23:54:25 2013 +0100 finished explicit locking module commit 369387258b4058bb7d10c591dcfe44845bfcd83e Author: Oliver Gorwits Date: Tue May 14 23:50:42 2013 +0100 initial implementation of locking from schema object commit 55c6d4fe635ed4fb5506733313b3247d9412a046 Author: Oliver Gorwits Date: Tue May 14 21:05:01 2013 +0100 add discover button to device details page commit 11fd8bf964c9ceec1d54924ce3629fd186647e00 Author: Oliver Gorwits Date: Tue May 14 20:43:43 2013 +0100 fix typo and clear port box on autocomplete dropdown commit a00f9b5c2edcc6e0b6ecb716e06706c8ab8f8d2b Author: Oliver Gorwits Date: Tue May 14 20:38:54 2013 +0100 move admin tasks and remove JobControl package commit 74bc0023df4db8beeb6c8550fbc86d1896af493c Author: Oliver Gorwits Date: Sat May 11 18:25:04 2013 +0100 complete job queue delete and kill running timers properly when reloading page commit dd6947f38db8924e0984254a3fb2a716b16f3bf5 Author: Oliver Gorwits Date: Sat May 11 16:51:28 2013 +0100 fix improper use of bootstrap table class commit cd5b83f71eba2eb28eca5181f3fcf23de11e3904 Author: Oliver Gorwits Date: Sat May 11 15:55:45 2013 +0100 fix update view icon in sidebar commit e9349f325d74a0a62e7e1cd75d42d271ea5bc839 Author: Oliver Gorwits Date: Sat May 11 11:57:19 2013 +0100 css audit commit 201470275dd1a188bacd0345137dc53e20dc46c2 Author: Oliver Gorwits Date: Thu May 9 23:48:05 2013 +0100 add job queue to standard plugins list commit a18a3c72a3d19305525b89783ec9ac676ecd39b7 Author: Oliver Gorwits Date: Thu May 9 23:37:43 2013 +0100 fix table headings and improve Action display in Job Queue commit 70f5da8bb65d5fdf5f2ad5a56da70467269a10b9 Author: Oliver Gorwits Date: Thu May 9 23:30:32 2013 +0100 implement "no devices" prompt for admin users to do first discover commit 2e8ac831738ddd45e7976743036699be4358f1f9 Author: Oliver Gorwits Date: Thu May 9 21:53:39 2013 +0100 more js refactoring for report and search commit 479ac0e55df6845304ecfb96e2b06d2ef62970bf Author: Oliver Gorwits Date: Thu May 9 21:50:29 2013 +0100 refactor js for device tabs commit 6a17fe5d6c9ac638cbf129951f864dfb9050871e Author: Oliver Gorwits Date: Thu May 9 21:05:42 2013 +0100 fix crazy races with javasacript by using global delegations commit e94e3cef3bcc36bcad3d4d6dcdcc3a8c74a798d0 Author: Oliver Gorwits Date: Wed May 8 23:06:41 2013 +0100 remove Try::Tiny from web runtime commit c746e68b9b034c6e85b282be1f2599527b0265ee Author: Oliver Gorwits Date: Tue May 7 21:54:11 2013 +0100 make topo autocomplete more responsive commit 24c511786fe99733b1ad7de54bf35ce26ac70be7 Author: Oliver Gorwits Date: Tue May 7 21:52:17 2013 +0100 display name and IP for device typeahead commit 52ab7d12661f640fe5b9c6364a6fed47d547e397 Author: Oliver Gorwits Date: Tue May 7 21:47:05 2013 +0100 add drop-down control for the topo form fields commit 5744b6845f28d11a1b211d53c5d041e2db48dd0f Author: Oliver Gorwits Date: Tue May 7 21:25:30 2013 +0100 complete the topology editor (add/delete) commit b510fbe8c569bbeab19d8540f32c8557093313fc Author: Oliver Gorwits Date: Tue May 7 00:59:11 2013 +0100 add new admin tasks to default plugins list commit 11d55e01295c9f00cd4f3dd0880e4f1b8eb8aa7c Author: Oliver Gorwits Date: Tue May 7 00:56:19 2013 +0100 Manual Device Topology Needed to add the 'autocomplete' jQuery UI component because it can do minLength=0 properly. Used the smoothness UI theme. Added typeahead AJAX calls to support the topology searching. Added new plugin and template for the topology editing page. commit bf7a419d088fb58bda6f962f7e3fc3262571545c Author: Oliver Gorwits Date: Mon May 6 22:16:24 2013 +0100 add a little colour to lone tab titles commit 9690a31f1976582995aae259c35e760d15e32c38 Author: Oliver Gorwits Date: Mon May 6 22:01:13 2013 +0100 complete Manage Pseudo Devices commit 024f4d9a838cbeeec387ca11c9707d4c0a903d49 Author: Oliver Gorwits Date: Mon May 6 00:49:47 2013 +0100 use bootstrap font colour instead of css commit f75f1e5cbf51d024b0588ca9b410b0d0abad517f Author: Oliver Gorwits Date: Mon May 6 00:45:18 2013 +0100 add frontend update/del forms, and display port count commit f0899e16b3cd92df43ed705f1fbace6ae87753a3 Author: Oliver Gorwits Date: Sun May 5 23:53:20 2013 +0100 add frontend pseudo device add form commit 3271c019314554a9fc247f4720870c8dcd578555 Author: Oliver Gorwits Date: Sun May 5 21:45:17 2013 +0100 complete the code for admin tasks page loading commit 38f70624f39736e1cff7f7fc2e90e37ba9ef9a1f Author: Oliver Gorwits Date: Sun May 5 17:04:30 2013 +0100 set up file paths consistently in all scripts commit c761ca839b6f043b92fc753f2774453f371de091 Author: Oliver Gorwits Date: Sun May 5 17:00:30 2013 +0100 Helper script to import the Netdisco 1.x Topology file to the database commit f468b48049f3943e746457c7eba1d5bd7a292f0d Author: Oliver Gorwits Date: Sun May 5 16:20:39 2013 +0100 Handle whitespace ahead of OUI data commit 5c8a5754f6f4aa97711c231abfe175d74c93b340 Author: Oliver Gorwits Date: Sun May 5 16:16:20 2013 +0100 also set neighbor info when discovering device interfaces commit acb988b6afd915b82aae06859ef8e3857543110d Author: Oliver Gorwits Date: Sun May 5 15:34:20 2013 +0100 try to avoid duplicate execution of scheduled jobs commit c6bcaf66c59ab1b2debeed302068bf0db44614f6 Author: Oliver Gorwits Date: Sun May 5 14:16:25 2013 +0100 do not clobber manual topo when discovering neighbors commit d9a6a1882ae4aa47d90adbdbb0cb6a6c23f63f8b Author: Oliver Gorwits Date: Sun May 5 13:02:45 2013 +0100 User icon color indicates port_control/admin ability commit 2cdcb9db7e44c28a6b3836eec21cbaf38d1de4b0 Author: Oliver Gorwits Date: Mon Apr 29 23:34:27 2013 +0100 add support for admin tasks as plugins commit 075a770c9a5822717b30b6988b90b29ffca63aa6 Author: Oliver Gorwits Date: Mon Apr 29 22:23:20 2013 +0100 skip pseudo devices (vendor netdisco) commit 045c022d42f6ea6b0a7daef853256ff8e83bd870 Author: Oliver Gorwits Date: Mon Apr 29 21:58:33 2013 +0100 incorporate manual topo info from the topology db table commit 09285d42b4144501d31e8bb7e2e5306ac4a742c5 Author: Oliver Gorwits Date: Sat Apr 27 18:39:12 2013 +0100 add unique constraints to topology table commit 2780b72e490dbcf9c5a9a79c466fa0510d2d33ae Author: Oliver Gorwits Date: Sat Apr 27 15:38:05 2013 +0100 muted help text in sidebar commit 733d4f83fbff4515dd8929145ec8ef39039f481e Author: Oliver Gorwits Date: Sat Apr 27 14:39:54 2013 +0100 sorry, testing hook changes commit 71e366e3521b94e8e8254e374fdb03611ba09f51 Author: Oliver Gorwits Date: Sat Apr 27 14:34:36 2013 +0100 sorry, testing hook changes commit 7f9eaa99f52e9d610348e8f35dc735e209232453 Author: Oliver Gorwits Date: Sat Apr 27 14:33:44 2013 +0100 sorry, testing hook changes commit 5215fd632da35aeec4469ad204eb3be782b3f201 Author: Oliver Gorwits Date: Sat Apr 27 14:30:07 2013 +0100 sorry, testing hook changes commit be817d60c205d19154e62f650a078563100eb7a2 Author: Oliver Gorwits Date: Sat Apr 27 14:21:45 2013 +0100 sorry, testing hook changes commit 1fd36953587f9db67a242477fa6824e0f22b074b Author: Oliver Gorwits Date: Sat Apr 27 14:18:57 2013 +0100 sorry, testing hook changes commit ac448c4a91b9a5d40316a43912b47913f12bc967 Author: Oliver Gorwits Date: Sat Apr 27 14:13:03 2013 +0100 sorry, testing hook changes commit c563b8d9afe794d80b1efd97fbdbfedb7283e1e6 Author: Oliver Gorwits Date: Sat Apr 27 14:08:54 2013 +0100 sorry, testing hook changes commit 3abcfb01d54ff806241d94dd7cb9cd867e0d64aa Author: Oliver Gorwits Date: Sat Apr 27 14:06:25 2013 +0100 sorry, testing hook changes commit 877a81facf1b192bc3cb9cee7fb5b781f959e922 Author: Oliver Gorwits Date: Sat Apr 27 14:05:25 2013 +0100 sorry, testing hook changes --- Netdisco/Changes | 6 + Netdisco/MANIFEST | 2 +- Netdisco/META.yml | 3 +- Netdisco/Makefile.PL | 3 + Netdisco/bin/nd-dbic-versions | 4 +- Netdisco/bin/nd-import-topology | 6 +- Netdisco/bin/netdisco-daemon | 7 +- Netdisco/bin/netdisco-daemon-fg | 26 +- Netdisco/bin/netdisco-db-deploy | 4 +- Netdisco/bin/netdisco-deploy | 14 +- Netdisco/bin/netdisco-do | 84 +++ Netdisco/bin/netdisco-web | 7 +- Netdisco/lib/App/Netdisco.pm | 73 ++- Netdisco/lib/App/Netdisco/Core/Discover.pm | 16 +- Netdisco/lib/App/Netdisco/Daemon/Queue.pm | 6 +- .../App/Netdisco/Daemon/Worker/Interactive.pm | 2 +- .../Daemon/Worker/Interactive/PortActions.pm | 2 +- .../lib/App/Netdisco/Daemon/Worker/Manager.pm | 2 +- .../lib/App/Netdisco/Daemon/Worker/Poller.pm | 2 +- .../lib/App/Netdisco/Manual/Configuration.pod | 499 +++++++++++++++++- .../lib/App/Netdisco/Manual/Developing.pod | 4 +- .../lib/App/Netdisco/Manual/ReleaseNotes.pod | 17 +- Netdisco/lib/App/Netdisco/Util/Noop.pm | 5 + Netdisco/lib/App/Netdisco/Util/Port.pm | 6 +- Netdisco/lib/App/Netdisco/Util/SNMP.pm | 2 +- Netdisco/lib/App/Netdisco/Web/AuthN.pm | 3 +- Netdisco/lib/App/Netdisco/Web/Plugin.pm | 72 +-- Netdisco/lib/App/Netdisco/Web/PortControl.pm | 2 +- Netdisco/share/config.yml | 163 +++--- Netdisco/share/environments/deployment.yml | 49 +- Netdisco/share/environments/development.yml | 49 -- Netdisco/share/views/ajax/device/ports.tt | 6 +- Netdisco/share/views/js/admintask.js | 19 +- TODO | 14 +- 34 files changed, 876 insertions(+), 303 deletions(-) create mode 100644 Netdisco/lib/App/Netdisco/Util/Noop.pm delete mode 100644 Netdisco/share/environments/development.yml diff --git a/Netdisco/Changes b/Netdisco/Changes index bfba5a8c..4af8e52f 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,3 +1,9 @@ +2.008000 - 2013-06-09 + + [BUG FIXES] + + * localenv discovery in scripts is now more reliable + 2.007000_002 - 2013-06-03 [NEW FEATURES] diff --git a/Netdisco/MANIFEST b/Netdisco/MANIFEST index f6414979..cc9f2479 100644 --- a/Netdisco/MANIFEST +++ b/Netdisco/MANIFEST @@ -108,6 +108,7 @@ lib/App/Netdisco/Manual/ReleaseNotes.pod lib/App/Netdisco/Manual/WritingPlugins.pod lib/App/Netdisco/Util/Device.pm lib/App/Netdisco/Util/DNS.pm +lib/App/Netdisco/Util/Noop.pm lib/App/Netdisco/Util/Port.pm lib/App/Netdisco/Util/PortMAC.pm lib/App/Netdisco/Util/SanityCheck.pm @@ -144,7 +145,6 @@ MANIFEST This list of files META.yml share/config.yml share/environments/deployment.yml -share/environments/development.yml share/public/500.html share/public/css/bootstrap.min.css share/public/css/font-awesome.min.css diff --git a/Netdisco/META.yml b/Netdisco/META.yml index c75e0b37..da6c4e11 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -50,6 +50,7 @@ requires: Starman: 0.3008 Template: 2.24 YAML: 0.84 + YAML::XS: 0.41 namespace::clean: 0.24 perl: 5.10.0 version: 0.9902 @@ -59,4 +60,4 @@ resources: homepage: http://netdisco.org/ license: http://opensource.org/licenses/bsd-license.php repository: git://git.code.sf.net/p/netdisco/netdisco-ng -version: 2.007000_002 +version: 2.008000 diff --git a/Netdisco/Makefile.PL b/Netdisco/Makefile.PL index 8898d0ca..1a58cb1e 100644 --- a/Netdisco/Makefile.PL +++ b/Netdisco/Makefile.PL @@ -35,13 +35,16 @@ requires 'SNMP::Info' => 3.01; requires 'SQL::Translator' => 0.11016; requires 'Template' => 2.24; requires 'YAML' => 0.84; +requires 'YAML::XS' => 0.41; requires 'namespace::clean' => 0.24; requires 'version' => 0.9902; install_share 'share'; +install_script 'bin/nd-import-topology'; install_script 'bin/netdisco-db-deploy'; install_script 'bin/netdisco-deploy'; +install_script 'bin/netdisco-do'; install_script 'bin/netdisco-daemon-fg'; install_script 'bin/netdisco-daemon'; install_script 'bin/netdisco-web-fg'; diff --git a/Netdisco/bin/nd-dbic-versions b/Netdisco/bin/nd-dbic-versions index a41e4e15..92697423 100755 --- a/Netdisco/bin/nd-dbic-versions +++ b/Netdisco/bin/nd-dbic-versions @@ -22,7 +22,7 @@ use Getopt::Long; nd-dbic-versions - Create DB Schema Versions for Netdisco -=head2 USAGE +=head1 USAGE This script creates SQL DDL files of the Netdisco database schema. @@ -33,7 +33,7 @@ If called with the "-p " option, upgrade SQL DDL command files are created between the specified version and the current DBIx::Class specification. -=head2 New Version +=head1 NEW VERSION =over 4 diff --git a/Netdisco/bin/nd-import-topology b/Netdisco/bin/nd-import-topology index 35469c2a..8d6bd182 100755 --- a/Netdisco/bin/nd-import-topology +++ b/Netdisco/bin/nd-import-topology @@ -23,11 +23,11 @@ use Try::Tiny; nd-import-topology - Import a Nedisco 1.x Manual Topology File -=head2 USAGE +=head1 USAGE - ./nd-import-topology /path/to/netdisco-topology.txt + ~/bin/localenv nd-import-topology /path/to/netdisco-topology.txt -=head2 DESCRIPTION +=head1 DESCRIPTION This helper script will read and import the content of a Netdisco 1.x format Manual Topology file into the Netdisco 2.x database's C table. diff --git a/Netdisco/bin/netdisco-daemon b/Netdisco/bin/netdisco-daemon index ed4e1b2b..53b7c3e8 100755 --- a/Netdisco/bin/netdisco-daemon +++ b/Netdisco/bin/netdisco-daemon @@ -3,14 +3,12 @@ use strict; use warnings FATAL => 'all'; -use FindBin; -FindBin::again(); our $home; BEGIN { # try really hard to find a localenv if one isn't already in place. $home = ($ENV{NETDISCO_HOME} || $ENV{HOME}); - eval "use Daemon::Control"; + eval "require App::Netdisco::Util::Noop"; if ($@) { use File::Spec; @@ -22,7 +20,10 @@ BEGIN { } } +use FindBin; +FindBin::again(); use Path::Class; +use Daemon::Control; my $netdisco = file($FindBin::RealBin, 'netdisco-daemon-fg'); my @args = (scalar @ARGV > 1 ? @ARGV[1 .. $#ARGV] : ()); diff --git a/Netdisco/bin/netdisco-daemon-fg b/Netdisco/bin/netdisco-daemon-fg index 523c9f69..e8046468 100755 --- a/Netdisco/bin/netdisco-daemon-fg +++ b/Netdisco/bin/netdisco-daemon-fg @@ -44,15 +44,15 @@ sub build_tasks_list { # NB MCE does not like max_workers => 0 my $tasks = []; - set(daemon_pollers => 2) - if !defined setting('daemon_pollers'); - set(daemon_interactives => 2) - if !defined setting('daemon_interactives'); + setting('workers')->{pollers} = 2 + if !defined setting('workers')->{pollers}; + setting('workers')->{interactives} = 2 + if !defined setting('workers')->{interactives}; push @$tasks, { max_workers => 1, user_begin => worker_factory('Manager'), - } if setting('daemon_pollers') or setting('daemon_interactives'); + } if setting('workers')->{pollers} or setting('workers')->{interactives}; push @$tasks, { max_workers => 1, @@ -60,27 +60,27 @@ sub build_tasks_list { } if setting('housekeeping'); push @$tasks, { - max_workers => setting('daemon_pollers'), + max_workers => setting('workers')->{pollers}, user_begin => worker_factory('Poller'), - } if setting('daemon_pollers'); + } if setting('workers')->{pollers}; push @$tasks, { - max_workers => setting('daemon_interactives'), + max_workers => setting('workers')->{interactives}, user_begin => worker_factory('Interactive'), - } if setting('daemon_interactives'); + } if setting('workers')->{interactives}; info sprintf "MCE will load %s tasks: %s Manager, %s Scheduler, %s Poller, %s Interactive", (scalar @$tasks), - ((setting('daemon_pollers') or setting('daemon_interactives')) ? 1 : 0), + ((setting('workers')->{pollers} or setting('workers')->{interactives}) ? 1 : 0), (setting('housekeeping') ? 1 : 0), - (setting('daemon_pollers') || 0), - (setting('daemon_interactives') || 0); + (setting('workers')->{pollers} || 0), + (setting('workers')->{interactives} || 0); return $tasks; } sub num_workers { - return (setting('daemon_pollers') + setting('daemon_interactives')); + return (setting('workers')->{pollers} + setting('workers')->{interactives}); } sub worker_factory { diff --git a/Netdisco/bin/netdisco-db-deploy b/Netdisco/bin/netdisco-db-deploy index 3a41d017..cfeb3245 100755 --- a/Netdisco/bin/netdisco-db-deploy +++ b/Netdisco/bin/netdisco-db-deploy @@ -21,7 +21,7 @@ use Try::Tiny; netdisco-db-deploy - Database deployment for Netdisco -=head2 USAGE +=head1 USAGE This script upgrades or initialises a Netdisco database schema. @@ -35,7 +35,7 @@ interaction. If there's no Nedisco schema, it is deployed. If there's an unversioned schema then versioning is added, and updates applied. Otherwise only necessary updates are applied to an already versioned schema. -=head2 Versions +=head1 VERSIONS =over 4 diff --git a/Netdisco/bin/netdisco-deploy b/Netdisco/bin/netdisco-deploy index 017f439b..395d7cc2 100755 --- a/Netdisco/bin/netdisco-deploy +++ b/Netdisco/bin/netdisco-deploy @@ -1,13 +1,11 @@ #!/usr/bin/env perl -use FindBin; -FindBin::again(); our $home; BEGIN { # try really hard to find a localenv if one isn't already in place. $home = ($ENV{NETDISCO_HOME} || $ENV{HOME}); - eval "use Daemon::Control"; + eval "require App::Netdisco::Util::Noop"; if ($@) { use File::Spec; @@ -19,11 +17,14 @@ BEGIN { } } +use FindBin; +FindBin::again(); +use Path::Class; + BEGIN { # stuff useful locations into @INC and $PATH my $location = $FindBin::RealBin; - use Path::Class; unshift @INC, dir($location)->parent->subdir('lib')->stringify, dir($location, 'lib')->stringify; @@ -35,6 +36,7 @@ BEGIN { use App::Netdisco; use Dancer ':script'; use Dancer::Plugin::DBIC 'schema'; + info "App::Netdisco version $App::Netdisco::VERSION loaded."; use 5.010_000; @@ -50,7 +52,7 @@ use Try::Tiny; netdisco-deploy - Database, OUI and MIB deployment for Netdisco -=head2 USAGE +=head1 USAGE This script deploys the Netdisco database schema, OUI data, and MIBs. Each of these is an optional service which the user is asked to confirm. @@ -73,11 +75,11 @@ for its use. say 'This is the Netdisco II deployment script.'; say ''; say 'Before we continue, the following prerequisites must be in place:'; -say ' * Internet access'; say ' * Database added to PostgreSQL for Netdisco'; say ' * User added to PostgreSQL with rights to the Netdisco Database'; say ' * "~/environments/deployment.yml" file configured with Database dsn/user/pass'; say ' * A full backup of any existing Netdisco database data'; +say ' * Internet access (for OUIs and MIBs)'; say ''; say 'You will be asked to confirm all changes to your system.'; say ''; diff --git a/Netdisco/bin/netdisco-do b/Netdisco/bin/netdisco-do index 1eac0a46..d8b1019d 100755 --- a/Netdisco/bin/netdisco-do +++ b/Netdisco/bin/netdisco-do @@ -1,5 +1,22 @@ #!/usr/bin/env perl +our $home; + +BEGIN { + # try really hard to find a localenv if one isn't already in place. + $home = ($ENV{NETDISCO_HOME} || $ENV{HOME}); + eval "require App::Netdisco::Util::Noop"; + + if ($@) { + use File::Spec; + my $localenv = File::Spec->catfile($FindBin::RealBin, 'localenv'); + exec($localenv, $0, @ARGV) if -f $localenv; + $localenv = File::Spec->catfile($home, 'perl5', 'bin', 'localenv'); + exec($localenv, $0, @ARGV) if -f $localenv; + die "Sorry, can't find libs required for App::Netdisco.\n"; + } +} + use FindBin; FindBin::again(); use Path::Class 'dir'; @@ -52,6 +69,8 @@ if (!length $action) { with 'App::Netdisco::Daemon::Worker::Poller::Device'; with 'App::Netdisco::Daemon::Worker::Poller::Arpnip'; with 'App::Netdisco::Daemon::Worker::Poller::Macsuck'; + with 'App::Netdisco::Daemon::Worker::Interactive::DeviceActions'; + with 'App::Netdisco::Daemon::Worker::Interactive::PortActions'; } my $worker = MyWorker->new(); @@ -97,3 +116,68 @@ info sprintf '%s: finished at %s', $action, scalar localtime; info sprintf '%s: status %s: %s', $action, $status, $log; exit ($status eq 'done' ? 0 : 1); + +=head1 NAME + +netdisco-do - Run any Netdisco poller job from the command-line. + +=head1 USAGE + + ~/bin/netdisco-do [-D] [-d [-p ] [-e ]] + +Regardless of Netdisco configuration, debug level logging is enabled if the +C<-D> flag is given. + +=head1 DESCRIPTION + +This program allows you to run any Netdisco poller job from the command-line. + +Note that some jobs (C, C, C) simply add +entries to the Netdisco job queue for other jobs, so won't seem to do much +when you trigger them. + +=head1 ACTIONS + +=head2 discover + +Run a discover on the device (specified with C<-d>). + +=head2 macsuck + +Run a macsuck on the device (specified with C<-d>). + +=head2 arpnip + +Run an arpnip on the device (specified with C<-d>). + +=head2 set_location + +Set the SNMP location field on the device (specified with C<-d>). Pass the +location string in the C<-e> extra parameter. + +=head2 set_contact + +Set the SNMP contact field on the device (specified with C<-d>). Pass the +contact name in the C<-e> extra parameter. + +=head2 set_portname + +Set the description on a device port. Requires the C<-d> parameter (device), +C<-p> parameter (port), and C<-e> parameter (description). + +=head2 set_portcontrol + +Set the up/down status on a device port. Requires the C<-d> parameter +(device), C<-p> parameter (port), and C<-e> parameter ("up" or "down"). + +=head2 set_vlan + +Set the native VLAN on a device port. Requires the C<-d> parameter (device), +C<-p> parameter (port), and C<-e> parameter (VLAN number). + +=head2 set_power + +Set the PoE on/off status on a device port. Requires the C<-d> parameter +(device), C<-p> parameter (port), and C<-e> parameter ("true" or "false"). + +=cut diff --git a/Netdisco/bin/netdisco-web b/Netdisco/bin/netdisco-web index ef1b9107..9c86eb78 100755 --- a/Netdisco/bin/netdisco-web +++ b/Netdisco/bin/netdisco-web @@ -3,14 +3,12 @@ use strict; use warnings FATAL => 'all'; -use FindBin; -FindBin::again(); our $home; BEGIN { # try really hard to find a localenv if one isn't already in place. $home = ($ENV{NETDISCO_HOME} || $ENV{HOME}); - eval "use Daemon::Control"; + eval "require App::Netdisco::Util::Noop"; if ($@) { use File::Spec; @@ -22,7 +20,10 @@ BEGIN { } } +use FindBin; +FindBin::again(); use Path::Class; +use Daemon::Control; my $netdisco = file($FindBin::RealBin, 'netdisco-web-fg'); my @args = (scalar @ARGV > 1 ? @ARGV[1 .. $#ARGV] : ()); diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index ac497afe..48a69061 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -7,7 +7,7 @@ use 5.010_000; use File::ShareDir 'dist_dir'; use Path::Class; -our $VERSION = '2.007000_002'; +our $VERSION = '2.008000'; BEGIN { if (not length ($ENV{DANCER_APPDIR} || '') @@ -28,6 +28,15 @@ BEGIN { $ENV{DANCER_PUBLIC} ||= $auto->subdir('public')->stringify; $ENV{DANCER_VIEWS} ||= $auto->subdir('views')->stringify; } + + { + # Dancer 1 uses the broken YAML.pm module + # This is a global sledgehammer - could just apply to Dancer::Config + use YAML; + use YAML::XS; + no warnings 'redefine'; + *YAML::LoadFile = sub { goto \&YAML::XS::LoadFile }; + } } =head1 NAME @@ -41,18 +50,9 @@ network management tool. Pieces are still missing however, so if you're a new user please see L for further information on the project and how to download the current official release. -=over 4 - -=item * - -See the demo at: L - -=back - -L provides a web frontend and a backend daemon to handle -interactive requests such as changing port or device properties. There is not -yet a device poller, so please still use the old Netdisco's discovery, arpnip, -and macsuck. +L provides a web frontend with built-in web server, and a +backend daemon to handle interactive requests such as changing port or device +properties. If you have any trouble getting the frontend running, speak to someone in the C<#netdisco> IRC channel (on freenode). Before installing or upgrading please @@ -139,6 +139,8 @@ take care of all this for you: ~/bin/netdisco-deploy +Answer yes to all questions, if this is a new installation of Netdisco 2. + =head1 Startup Run the following command to start the web-app server as a backgrounded daemon @@ -146,12 +148,17 @@ Run the following command to start the web-app server as a backgrounded daemon ~/bin/netdisco-web start +If the Inventory is empty because this is a new installation, you probably +want to either run some polling jobs from the command-line, or give a web user +some admin rights (see L, below). + Run the following command to start the job control daemon (port control, etc): ~/bin/netdisco-daemon start You should take care not to run this Netdisco daemon and the legacy daemon at -the same time. +the same time. Similarly, if you use the device discovery with Netdisco 2, +disable your system's cron jobs for the Netdisco 1 poller. =head1 Upgrading @@ -161,13 +168,13 @@ Notes|App::Netdisco::Manual::ReleaseNotes>. Then, the process is as follows: # upgrade Netdisco ~/bin/localenv cpanm --notest App::Netdisco - # apply database schema updates (optionally, get latest OIDs/MIBs) + # apply database schema updates ~/bin/netdisco-deploy # restart web service ~/bin/netdisco-web restart - # optionally, restart job daemon if you use it + # restart job daemon (if you use it) ~/bin/netdisco-daemon restart =head1 Tips and Tricks @@ -180,12 +187,30 @@ or MAC addreses, VLAN numbers, and so on. =head2 User Rights -When user authentication is disabled (C) the default username is -"guest", which has no special privilege. To grant port and device control +When user authentication is disabled (C) the default username +is "guest", which has no special privilege. To grant port and device control rights to this user, create a row in the C table of the Netdisco -database with a username of C and the C flag set to true: +database with a username of C and appropriate flags set to true: - netdisco=> insert into users (username, port_control) values ('guest', true); + netdisco=> insert into users (username) values ('guest'); + netdisco=> update users set port_control = true where username = 'guest'; + netdisco=> update users set admin = true where username = 'guest'; + +=head2 Command-Line Device and Port Actions + +To run a device (discover, etc) or port control job from the command-line, use +the bundled L program. For example: + + ~/bin/netdisco-do -D discover -d 192.0.2.1 + +=head2 Import Topology + +Netdisco 1.x had support for a topology information file to fill in device +port relations which could not be discovered. This is now stored in the +database (and edited in the web interface). To import a legacy topology file, +run: + + ~/bin/localenv nd-import-topology /path/to/netdisco-topology.txt =head2 Deployment Scenarios @@ -202,10 +227,8 @@ documentation for further information. =head2 Plugins -App::Netdisco includes a Plugin subsystem for building the web user interface. -Items in the navigation bar and the tabs on pages are loaded as Plugins, and -you have control over their appearance and ordering. See -L for further information. +Netdisco includes a Plugin subsystem for customizing the web user interface. +See L for further information. =head2 Developing @@ -229,7 +252,7 @@ Oliver Gorwits =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2012 by The Netdisco Developer Team. +This software is copyright (c) 2012, 2013 by The Netdisco Developer Team. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/Netdisco/lib/App/Netdisco/Core/Discover.pm b/Netdisco/lib/App/Netdisco/Core/Discover.pm index 590fd8ad..b3448a97 100644 --- a/Netdisco/lib/App/Netdisco/Core/Discover.pm +++ b/Netdisco/lib/App/Netdisco/Core/Discover.pm @@ -198,7 +198,7 @@ sub store_interfaces { next; } - if (scalar grep {$port =~ m/$_/} @{setting('ignore_interfaces') || []}) { + if (scalar grep {$port =~ m/^$_$/} @{setting('ignore_interfaces') || []}) { debug sprintf ' [%s] interfaces - ignoring %s (%s) (config:ignore_interfaces)', $device->ip, $entry, $port; @@ -807,12 +807,14 @@ sub discover_new_neighbors { my $device = get_device($ip); next if $device->in_storage; - my $remote_type_match = setting('discover_no_type'); - if ($remote_type and $remote_type_match - and $remote_type =~ m/$remote_type_match/) { - debug sprintf ' queue - %s, type [%s] excluded by discover_no_type', - $ip, $remote_type; - next; + if ($remote_type) { + if (scalar grep {$remote_type =~ m/$_/} + @{setting('discover_no_type') || []}) { + debug sprintf + ' queue - %s, type [%s] excluded by discover_no_type', + $ip, $remote_type; + next; + } } # could fail if queued job already exists diff --git a/Netdisco/lib/App/Netdisco/Daemon/Queue.pm b/Netdisco/lib/App/Netdisco/Daemon/Queue.pm index bbec8db0..803d7086 100644 --- a/Netdisco/lib/App/Netdisco/Daemon/Queue.pm +++ b/Netdisco/lib/App/Netdisco/Daemon/Queue.pm @@ -43,8 +43,8 @@ sub capacity_for { }; my $setting_map = { - Poller => 'daemon_pollers', - Interactive => 'daemon_interactives', + Poller => 'pollers', + Interactive => 'interactives', }; my $role = $role_map->{$action}; @@ -52,7 +52,7 @@ sub capacity_for { my $current = $queue->search({role => $role})->count; - return ($current < setting($setting)); + return ($current < setting('workers')->{$setting}); } sub take_jobs { diff --git a/Netdisco/lib/App/Netdisco/Daemon/Worker/Interactive.pm b/Netdisco/lib/App/Netdisco/Daemon/Worker/Interactive.pm index a575e83c..9ee8c485 100644 --- a/Netdisco/lib/App/Netdisco/Daemon/Worker/Interactive.pm +++ b/Netdisco/lib/App/Netdisco/Daemon/Worker/Interactive.pm @@ -49,7 +49,7 @@ sub worker_body { } debug "int ($wid): sleeping now..."; - sleep( setting('daemon_sleep_time') || 5 ); + sleep( setting('workers')->{sleep_time} || 5 ); } } diff --git a/Netdisco/lib/App/Netdisco/Daemon/Worker/Interactive/PortActions.pm b/Netdisco/lib/App/Netdisco/Daemon/Worker/Interactive/PortActions.pm index 5d868c22..227cb722 100644 --- a/Netdisco/lib/App/Netdisco/Daemon/Worker/Interactive/PortActions.pm +++ b/Netdisco/lib/App/Netdisco/Daemon/Worker/Interactive/PortActions.pm @@ -101,7 +101,7 @@ sub set_power { my $ip = $job->device; my $pn = $job->port; - (my $data = $job->subaction) =~ s/-\w+//; + (my $data = $job->subaction) =~ s/-\w+//; # remove -other # snmp connect using rw community my $info = snmp_connect_rw($ip) diff --git a/Netdisco/lib/App/Netdisco/Daemon/Worker/Manager.pm b/Netdisco/lib/App/Netdisco/Daemon/Worker/Manager.pm index 075d09c3..b87a2629 100644 --- a/Netdisco/lib/App/Netdisco/Daemon/Worker/Manager.pm +++ b/Netdisco/lib/App/Netdisco/Daemon/Worker/Manager.pm @@ -84,7 +84,7 @@ sub worker_body { # TODO also check for stale jobs in Netdisco DB debug "mgr ($wid): sleeping now..."; - sleep( setting('daemon_sleep_time') || 5 ); + sleep( setting('workers')->{sleep_time} || 5 ); } } diff --git a/Netdisco/lib/App/Netdisco/Daemon/Worker/Poller.pm b/Netdisco/lib/App/Netdisco/Daemon/Worker/Poller.pm index 3eb00346..22f9d71b 100644 --- a/Netdisco/lib/App/Netdisco/Daemon/Worker/Poller.pm +++ b/Netdisco/lib/App/Netdisco/Daemon/Worker/Poller.pm @@ -51,7 +51,7 @@ sub worker_body { } debug "poll ($wid): sleeping now..."; - sleep( setting('daemon_sleep_time') || 5 ); + sleep( setting('workers')->{sleep_time} || 5 ); } } diff --git a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod index 76f13309..2dde3667 100644 --- a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod +++ b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod @@ -58,59 +58,78 @@ the C (DB name, host, port), C and C. =head2 General Settings -=head3 C +=head3 C -Default: C +Value: C. Default: C. The log level used by Netdisco. It's useful to see warning messages from the backend poller, as this can highlight broken topology. -=head3 C +=head3 C -Default: C +Value: C. Default: C. Destination for log messages. Console means standard ouput. When set to C, the default destination is the C<${HOME}/logs> directory. -=head3 C +=head3 C -Default: C<< '[%P] %L @%D> %m' >> +Value: Format String. Default: C<< '[%P] %L @%D> %m' >>. Structure of the log messages. See L for details. =head2 Web Frontend -=head3 C +=head3 C -Default: None +Value: String. Default: None. Set this to your local site's domain name. This is usually removed from node -names in the web interface to make things more readable. +names in the web interface to make things more readable. Make sure to include +the leading dot character. -=head3 C +=head3 C -Default: C +Value: Boolean. Default: C. Enable this to disable login authentication in the web frontend. The username will be set to C so if you want to allow extended permissions (C -or C, create a dummy user with the appropriate flag, in the +or C, create a dummy user with the appropriate flag in the database: - netdisco=> insert into users (username, port_control) values ('guest', true); + netdisco=> insert into users (username) values ('guest'); + netdisco=> update users set port_control = true where username = 'guest'; + netdisco=> update users set admin = true where username = 'guest'; -=head3 C +=head3 C -Default: C<5000> +Value: Number. Default: C<5000>. Port which the web server listens on. Netdisco comes with a good pre-forking web server, so you can change this to C<80> if you want to use it directly. However the default is designed to work well with servers such as Apache in reverse-proxy mode. -=head3 C +=head3 C -Default: List of L names +Value: String. Default: None. + +Mount point for the Netdisco web frontend. This is usually the root of the web +server. Set this to the path under which all pages live, e.g. C. +As an alternative you can use the C<--path> option to C. + +=head3 C + +Value: Boolean. Default: C. + +A hint to the Netdisco web frontend that it's running behind a reverse proxy. +In that case, Netdisco will pay attention to the C, +C, etc settings in HTML headers. + +=head3 C + +Value: List of Modules. Default: List of bundled L names. Netdisco's plugin system allows the user more control over the user interface. Plugins can be distributed independently from Netdisco and are a better @@ -119,24 +138,462 @@ are used in the default Netdisco distribution. You can override this to set your own list. If you only want to add to the default list then use C, which allows the Netdisco -developers to update C in a future release. +developers to update default C in a future release. -=head3 C +Entries in the list will by default omit the leading +C from the name. To override this for one entry, +prefix it with a C<+> sign. You can also prefix with C to signify the +alternate C namepsace. -Default: None +=head3 C + +Value: List of Modules. Default: Empty List. List of additional L names to load. See also the C setting. =head2 Netdisco Core +=head3 C + +Value: Directory. Default: C<${HOME}/netdisco-mibs>. + +Base directory in which to find C. This is where C +will drop MIB files. + +=head3 C + +Value: List of Directories. Default: All subdirectories of C. + +A list of subdirectories of C from which to load MIB files. You +should always include C. For example: + + mibdirs: + - rfc + - cisco + - foundry + +=head3 C + +Value: List of Strings. Default: C. + +A list of read-only SNMP community strings to try on each device. The working +community will be cached in the database. + +=head3 C + +Value: List of Strings. Default: C. + +A list of read-write SNMP community strings to try on each device. The working +community will be cached in the database. + +=head3 C + +Value: C<1|2|3>. Default: 2. + +Version of the SNMP protocol used when connecting to devices. + +=head3 C + +Value: Number. Default: 1000000. + +Micro-seconds before connection retry in L. 1000000 +micro-seconds = 1 second. + +=head3 C + +Value: Number. Default: 2. + +Number of times to retry connecting to a device before giving up. + +=head3 C + +Value: List of Network Identifiers. Default: Empty List. + +IP addresses in the list will not be visited during device discovery. You can +include hostnames, IP addresses and subnets (IPv4 or IPv6) in the list. + +=head3 C + +Value: List of Network Identifiers. Default: Empty List. + +If present, device discovery will be limited to IP addresses matching entries +in this list. You can include hostnames, IP addresses and subnets (IPv4 and +IPv6). + +=head3 C + +Value: List of Strings. Default: None. + +Place regular expression patterns here to exclude the discovery of certain +devices based on the CDP/LLDP device type information. Good for excluding a +whole device class like lightweight access points or IP phones that have CDP +but don't talk SNMP. For example: + + discover_no_type: + - 'cisco\s+AIR-LAP' + - '(?i)Cisco\s+IP\s+Phone' + +=head3 C + +Value: Boolean. Default: C. + +Set to macsuck all VLANs, not just the ones that are being used on ports. +This is a debug option. Set this if you think that the option of not +macsucking VLANs that aren't in use on device ports is some how interfering. + +=head3 C + +Value: Boolean. Default: C. + +Set to true to skip macsuck-ing on VLANs which have no name set. This option +may be useful on Cisco Catalyst family devices where ports are a member of a +VLAN which is not defined in the VLAN database. + +=head3 C + +Value: Boolean. Default: C. + +Set to true will let nodes accumulate on uplink ports without topology +information. This is a debug option to help you figure out your topology and +generally should not be set. + +=head3 C + +Value: Boolean. Default: C. + +Set to false to skip the wireless client information gathering. This is +captured at macsuck time, so if you aren't using the information you can skip +it. + +=head3 C + +Value: List of Strings. Default: + + ignore_interfaces: + - 'EOBC' + - 'unrouted VLAN' + - 'StackPort' + - 'Control Plane Interface' + - 'SPAN (S|R)P Interface' + - 'StackSub' + - 'netflow' + - 'Vlan\d+-mpls layer' + - 'BRI\S+-Bearer Channel' + - 'BRI\S+-Physical' + - 'BRI\S+-Signalling' + - 'Embedded-Service-Engine\d+\/\d+' + - 'Virtual-Template\d+' + - 'Virtual-Access\d+' + - '(E|T)\d \d\/\d\/\d' + +If present, device ports whose names match fully any of the items in this list +will be ignored by the discovery process. + +Note this may have side effects - connected devices and nodes on those ports +will in turn also not be discovered. + +=head3 C + +Value: Boolean. Default: C. + +Set to true to ignore device interfaces that are part of private nets (RFC +1918). + +=head3 C + +Value: Boolean. Default: C. + +Turn this on to have Netdisco do a reverse lookup of the device C +field to use as the management IP address for a device. + +=head3 C + +Value: Boolean. Default: C. + +Set to false to prevent Netdisco from changing the default VLAN on an +interface. + +=head3 C + +Value: Boolean. Default: C. + +Set to true to make sure an IP Phone port never can be turned off/on. + +=head3 C + +Value: Boolean. Default: C. + +Set to true to allow Netdisco to be able to disable VLAN trunk interfaces. + +B: Turning off a VLAN trunk link could take out most +of your network. + +=head3 C + +Value: Boolean. Default: C. + +Set to true to allow Netdisco to be able to disable Uplinks. (Router +Interfaces too) + +B: Turning off uplinks will take out chunks of your +network. + +=head3 C + +Value: Boolean. Default: C. + +Set to true to disable globally support for Port Control. Mainly useful for +development to suppress web frontend job queue callbacks. + =head2 Backend Daemon +=head3 C + +Value: Settings Tree. Default: + + workers: + interactives: 2 + pollers: 2 + sleep_time: 5 + +Control the activity of the backend daemon with this configuration setting. + +C and C sets how many workers are started for +interactive jobs (port control) and polling jobs (discover, macsuck, arpnip) +on this node, respectively. Other nodes can have different settings. + +C is the number of seconds between polling the database to find +new jobs. This is a balance between responsiveness and database load. + +=head3 C + +Value: Settings Tree. Default: None. + +If set, then this node's backend daemon will schedule polling jobs (discover, +macsuck, arpnip, etc) in the central database. It's fine to have multiple +nodes scheduling work for redundancy (but make sure they all have good NTP). + +Note that this is independent of the Pollers configured in C. It's +okay to have this node schedule housekeeping but not do any of the polling +itself (C). + +Work can be scheduled using C style notation, or a simple weekday and +hour fields (which accept same types as C notation). For example: + + housekeeping: + discoverall: + when: '0 9 * * *' + arpwalk: + when: + min: 30 + macwalk: + when: + hour: '*/2' + =head2 Dancer Internal -=head1 UNSUPPORTED SETTINGS +=head3 C + +Value: String. Default: C. + +See L. + +=head3 C + +Value: Boolean. Default: C. + +Should warnings be considered as critical errors? + +=head3 C + +Value: Boolean. Default: C. + +Whether to show a stack trace when an error is caught in the web frontend. + +=head3 C + +Value: Settings Tree. + +Useful for overriding the Template Toolkit settings, if you want. + +=head3 C + +Value: String. Default: C
. + +Don't touch this. + +=head3 C + +Value: Settings Tree. + +Useful for overriding the Database configuration, but only if you know what +you're doing. + +=head3 C + +Value: String. Default: C. + +How to handle web sessions. Default is to store on disk so they can be shared +between multiple web server processes (although it's slower). + +=head3 C