update docs
This commit is contained in:
@@ -879,15 +879,14 @@ or remove any entries.
|
|||||||
Value: Settings Tree. Default:
|
Value: Settings Tree. Default:
|
||||||
|
|
||||||
workers:
|
workers:
|
||||||
interactives: 2
|
pollers: 'AUTO * 2'
|
||||||
pollers: 10
|
sleep_time: 1
|
||||||
sleep_time: 2
|
|
||||||
|
|
||||||
Control the activity of the backend daemon with this configuration setting.
|
Control the activity of the backend daemon with this configuration setting.
|
||||||
|
|
||||||
C<interactives> and C<pollers> sets how many workers are started for
|
C<pollers> sets how many workers are started for interactive jobs (port
|
||||||
interactive jobs (port control) and polling jobs (discover, macsuck, arpnip)
|
control) and polling jobs (discover, macsuck, arpnip) on this node. Other
|
||||||
on this node, respectively. Other nodes can have different settings.
|
nodes can have different settings. "C<AUTO>" is the number of CPU cores.
|
||||||
|
|
||||||
C<sleep_time> is the number of seconds between polling the database to find
|
C<sleep_time> is the number of seconds between polling the database to find
|
||||||
new jobs. This is a balance between responsiveness and database load.
|
new jobs. This is a balance between responsiveness and database load.
|
||||||
|
|||||||
@@ -54,9 +54,6 @@ For the daemon, it's very similar:
|
|||||||
|
|
||||||
DBIC_TRACE=1 ~/bin/localenv bin/netdisco-daemon-fg
|
DBIC_TRACE=1 ~/bin/localenv bin/netdisco-daemon-fg
|
||||||
|
|
||||||
Don't be alarmed by the high rate of database queries in the daemon - most of
|
|
||||||
them are communicating only with a local in-memory SQLite database.
|
|
||||||
|
|
||||||
Happy hacking!
|
Happy hacking!
|
||||||
|
|
||||||
=head1 Introduction
|
=head1 Introduction
|
||||||
@@ -418,24 +415,12 @@ the central Netdisco database and booking out jobs which it's able to service
|
|||||||
according to the local configuration settings. Jobs are "locked" in the
|
according to the local configuration settings. Jobs are "locked" in the
|
||||||
central queue and then copied to a local job queue within the daemon.
|
central queue and then copied to a local job queue within the daemon.
|
||||||
|
|
||||||
Along with the Manager we start zero or more of two other types of worker.
|
|
||||||
Some jobs such as port control are "interactive" and the user typically wants
|
|
||||||
quick feedback on the results. Others such as polling are background tasks
|
|
||||||
which can take more time and are less schedule sensitive. So as not to starve
|
|
||||||
the "interactive" jobs of workers we have two types of worker.
|
|
||||||
|
|
||||||
The Interactive worker picks jobs from the local job queue relating to device
|
|
||||||
and port reconfiguration only. It submits results directly back to the central
|
|
||||||
Netdisco database. The Poller worker similarly picks job from the local queue,
|
|
||||||
this time relating to device discovery and polling.
|
|
||||||
|
|
||||||
There is support in the daemon for the workers to pick more than one job at a
|
There is support in the daemon for the workers to pick more than one job at a
|
||||||
time from the local queue, in case we decide this is worth doing. However the
|
time from the local queue, in case we decide this is worth doing. However the
|
||||||
Manager won't ever book out more jobs from the central Netdisco job queue than
|
Manager won't ever book out more jobs from the central Netdisco job queue than
|
||||||
it has workers available (so as not to hog jobs for itself against other
|
it has workers available (so as not to hog jobs for itself against other
|
||||||
daemons on other servers). The user is free to configure the number of
|
daemons on other servers). The user is free to configure the number of
|
||||||
Interactive and Poller workers in their C<config.yml> file (zero or more of
|
workers in their C<config.yml> file (zero or more).
|
||||||
each).
|
|
||||||
|
|
||||||
The fourth kind of worker is called the Scheduler and takes care of adding
|
The fourth kind of worker is called the Scheduler and takes care of adding
|
||||||
discover, macsuck, arpnip, and nbtstat jobs to the queue (which are in turn
|
discover, macsuck, arpnip, and nbtstat jobs to the queue (which are in turn
|
||||||
@@ -458,17 +443,6 @@ Configuration for SNMP::Info comes from the YAML files, of course. This means
|
|||||||
that our C<mibhome> and C<mibdirs> settings are now in YAML format. In
|
that our C<mibhome> and C<mibdirs> settings are now in YAML format. In
|
||||||
particular, the C<mibdirs> list is a real list within the configuration.
|
particular, the C<mibdirs> list is a real list within the configuration.
|
||||||
|
|
||||||
=head2 DBIx::Class Layer
|
|
||||||
|
|
||||||
The local job queue for each Job Daemon is actually an SQLite database running
|
|
||||||
in memory. This makes the queue management code a little more elegant. The
|
|
||||||
schema for this is of course DBIx::Class using Dancer connection management,
|
|
||||||
and lives in L<App::Netdisco::Daemon::DB>.
|
|
||||||
|
|
||||||
There is currently only one table, the port control job queue, in
|
|
||||||
L<App::Netdisco::Daemon::DB::Result::Admin>. It's likely this name will change
|
|
||||||
in the future.
|
|
||||||
|
|
||||||
=head1 Other Noteable Technology
|
=head1 Other Noteable Technology
|
||||||
|
|
||||||
=head2 C<local::lib>
|
=head2 C<local::lib>
|
||||||
|
|||||||
@@ -31,11 +31,11 @@ safe_password_store: true
|
|||||||
# SNMP community string(s)
|
# SNMP community string(s)
|
||||||
# ````````````````````````
|
# ````````````````````````
|
||||||
snmp_auth:
|
snmp_auth:
|
||||||
- tag: 'v2default'
|
- tag: 'default_v2_readonly'
|
||||||
community: 'public'
|
community: 'public'
|
||||||
read: true
|
read: true
|
||||||
write: false
|
write: false
|
||||||
# - tag: 'v2default_w'
|
# - tag: 'default_v2_for_write'
|
||||||
# community: 'private'
|
# community: 'private'
|
||||||
# read: false
|
# read: false
|
||||||
# write: true
|
# write: true
|
||||||
@@ -56,16 +56,6 @@ snmp_auth:
|
|||||||
# expire:
|
# expire:
|
||||||
# when: '20 23 * * *'
|
# when: '20 23 * * *'
|
||||||
|
|
||||||
# number of SNMP pollers to run in parallel (in netdisco-daemon)
|
|
||||||
# ``````````````````````````````````````````````````````````````
|
|
||||||
workers:
|
|
||||||
pollers: 10
|
|
||||||
|
|
||||||
# amount parallel DNS resolution for node names
|
|
||||||
# `````````````````````````````````````````````
|
|
||||||
dns:
|
|
||||||
max_outstanding: 50
|
|
||||||
|
|
||||||
# do not discover IP Phones or Wireless Access Points.
|
# do not discover IP Phones or Wireless Access Points.
|
||||||
# usually these are visible as device neighbors but don't support
|
# usually these are visible as device neighbors but don't support
|
||||||
# SNMP, which just clogs up the job queue.
|
# SNMP, which just clogs up the job queue.
|
||||||
@@ -74,6 +64,17 @@ discover_no_type:
|
|||||||
- '(?i)phone'
|
- '(?i)phone'
|
||||||
- '(?i)(?:wap|wireless)'
|
- '(?i)(?:wap|wireless)'
|
||||||
|
|
||||||
|
# number of SNMP pollers to run in parallel (in netdisco-daemon).
|
||||||
|
# the default is twice the number of CPU cores
|
||||||
|
# ```````````````````````````````````````````````````````````````
|
||||||
|
#workers:
|
||||||
|
# pollers: 'AUTO * 2'
|
||||||
|
|
||||||
|
# amount parallel DNS resolution for node names
|
||||||
|
# `````````````````````````````````````````````
|
||||||
|
#dns:
|
||||||
|
# max_outstanding: 50
|
||||||
|
|
||||||
# set to true to globally disable authentication/login.
|
# set to true to globally disable authentication/login.
|
||||||
# create a user called "guest" if you want to assign port/admin rights.
|
# create a user called "guest" if you want to assign port/admin rights.
|
||||||
# `````````````````````````````````````````````````````````````````````
|
# `````````````````````````````````````````````````````````````````````
|
||||||
|
|||||||
Reference in New Issue
Block a user