Skip to content

Commit adae194

Browse files
Merge pull request #2856 from johannaengland/docs/remove-warnings
Remove warnings when building docs
2 parents 91f71e1 + 00a96e9 commit adae194

File tree

8 files changed

+214
-49
lines changed

8 files changed

+214
-49
lines changed

NOTES.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ Daemon startup privileges
562562

563563
By accident, some of NAV's daemons have been running as the privileged ``root``
564564
user since NAV 4.9.0, due to changes in the process control system. NAV 5.0.4
565-
introduces the :option:`privileged` option in the :file:`daemons.yml` configuration
565+
introduces the ``privileged`` option in the :file:`daemons.yml` configuration
566566
file, to signal which daemons actually need to be started with root privileges.
567567

568568
Only :program:`snmptrapd` and :program:`pping` need root privileges on startup,
@@ -573,7 +573,7 @@ Please ensure your :file:`daemon.yml` configuration file is updated. Also, be
573573
aware that after upgrading to NAV 5.0.4 from any version from 4.9.0 and up, you
574574
may have some NAV log files that are owned by ``root``, which will cause some
575575
of the daemons to fail on startup. Please ensure all NAV log files are writable
576-
for the user defined as :option:`NAV_USER` in :file:`nav.conf`.
576+
for the user defined as ``NAV_USER`` in :file:`nav.conf`.
577577

578578

579579
New features

doc/faq/faq.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,8 @@ example::
140140
* 6 * * * navclean --force --arp --cam --interval '6 months'
141141

142142
See the output of ``navclean --help`` for usage details.
143+
144+
.. toctree::
145+
:hidden:
146+
147+
/faq/graph_gaps

doc/hacking/adding-environment-probe-support.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ temperature sensors of this device into NAV's database. The
391391
:program:`ipdevpoll` ``1minstats`` job will retrieve the sensor readings once
392392
every minute and send them to Graphite.
393393

394-
.. _sensorProbe8: http://www.akcpinc.com/products/base-units/sensorProbe-Series/sensorProbe8/
394+
.. toctree::
395+
:hidden:
396+
397+
/api/sensor
398+
/api/mibretriever
399+
400+
.. _sensorProbe8: https://www.akcp.com/akcp-products/sensorprobe-series/sensorprobe8/
395401
.. _Twisted: https://twistedmatrix.com/
396402
.. _Deferred: http://twistedmatrix.com/documents/current/api/twisted.internet.defer.Deferred.html

doc/reference/alerttypes.rst

Lines changed: 190 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ Tells us whether a link is up or down.
115115

116116
* - Alert type name
117117
- Description
118+
* - ``linkUp``
119+
- Link active
120+
* - ``linkDown``
121+
- Link inactive
118122

119123

120124

@@ -196,13 +200,13 @@ Registers the state of a device
196200
* - Alert type name
197201
- Description
198202
* - ``deviceInIPOperation``
199-
- The device is now in operation with an active IP address.
203+
- The device is now in operation with an active IP address
200204
* - ``deviceInStack``
201-
- The device is now in operation as a chassis module.
205+
- The device is now in operation as a chassis module
202206
* - ``deviceRMA``
203207
- RMA event for device.
204208
* - ``deviceNewModule``
205-
- The device has been found as a module.
209+
- The device has been found as a module.
206210
* - ``deviceNewChassis``
207211
- The device has been found as a chassis.
208212
* - ``deviceNewPsu``
@@ -212,6 +216,7 @@ Registers the state of a device
212216

213217

214218

219+
215220
*deviceNotice* events
216221
---------------------
217222
Registers a notice on a device
@@ -380,3 +385,185 @@ The state of this BGP peering session changed
380385

381386

382387

388+
*juniperYellowAlarmState* events
389+
--------------------------------
390+
Tells us if a Juniper device has any open yellow alarms.
391+
392+
.. list-table:: Alerts associated with juniperYellowAlarmState events
393+
:widths: 25 75
394+
:header-rows: 1
395+
396+
* - Alert type name
397+
- Description
398+
* - ``juniperYellowAlarmOn``
399+
- The Juniper device has some yellow alarms.
400+
* - ``juniperYellowAlarmOff``
401+
- The Juniper device has no yellow alarms.
402+
403+
404+
405+
406+
*juniperRedAlarmState* events
407+
-----------------------------
408+
Tells us if a Juniper device has any open red alarms.
409+
410+
.. list-table:: Alerts associated with juniperRedAlarmState events
411+
:widths: 25 75
412+
:header-rows: 1
413+
414+
* - Alert type name
415+
- Description
416+
* - ``juniperRedAlarmOn``
417+
- The Juniper device has some red alarms.
418+
* - ``juniperRedAlarmOff``
419+
- The Juniper device has no red alarms.
420+
421+
422+
423+
424+
*weathergoose_temperature* events
425+
---------------------------------
426+
427+
428+
.. list-table:: Alerts associated with weathergoose_temperature events
429+
:widths: 25 75
430+
:header-rows: 1
431+
432+
* - Alert type name
433+
- Description
434+
* - ``cmClimateTempCTRAP``
435+
- Climate Temperature Sensor Trap
436+
* - ``cmClimateTempCCLEAR``
437+
- Climate Temperature Sensor Clear Trap
438+
* - ``cmClimateTempCNOTIFY``
439+
- Climate Temperature Sensor Trap
440+
* - ``cmTempSensorTempCNOTIFY``
441+
- Remote Temp Sensor - Temperature Trap
442+
* - ``cmTempSensorTempCCLEAR``
443+
- Remote Temp Sensor - Temperature Clear Trap
444+
* - ``gstClimateTempCNOTIFY``
445+
- Climate Temperature Sensor Trap
446+
* - ``gstTempSensorTempCNOTIFY``
447+
- Remote Temp Sensor - Temperature Trap
448+
* - ``gstClimateTempCCLEAR``
449+
- Climate Temperature Sensor Clear Trap
450+
* - ``gstTempSensorTempCCLEAR``
451+
- Remote Temp Sensor - Temperature Clear Trap
452+
453+
454+
455+
456+
*weathergoose_humidity* events
457+
------------------------------
458+
459+
460+
.. list-table:: Alerts associated with weathergoose_humidity events
461+
:widths: 25 75
462+
:header-rows: 1
463+
464+
* - Alert type name
465+
- Description
466+
* - ``cmClimateHumidityTRAP``
467+
- Climate Humidity Sensor Trap
468+
* - ``cmClimateHumidityCLEAR``
469+
- Climate Humidity Sensor Clear Trap
470+
* - ``cmClimateHumidityNOTIFY``
471+
- Climate Humidity Sensor Trap
472+
* - ``gstClimateHumidityNOTIFY``
473+
- Climate Humidity Sensor Trap
474+
* - ``gstClimateHumidityCLEAR``
475+
- Climate Humidity Sensor Clear Trap
476+
477+
478+
479+
480+
*weathergoose_airflow* events
481+
-----------------------------
482+
483+
484+
.. list-table:: Alerts associated with weathergoose_airflow events
485+
:widths: 25 75
486+
:header-rows: 1
487+
488+
* - Alert type name
489+
- Description
490+
* - ``cmClimateAirflowTRAP``
491+
- Climate Air Flow Sensor Trap
492+
* - ``cmClimateAirflowCLEAR``
493+
- Climate Air Flow Sensor Clear Trap
494+
* - ``cmClimateAirflowNOTIFY``
495+
- Climate Air Flow Sensor Trap
496+
* - ``gstClimateAirflowNOTIFY``
497+
- Climate Air Flow Sensor Trap
498+
* - ``gstClimateAirflowCLEAR``
499+
- Climate Air Flow Sensor Clear Trap
500+
501+
502+
503+
504+
*weathergoose_light* events
505+
---------------------------
506+
507+
508+
.. list-table:: Alerts associated with weathergoose_light events
509+
:widths: 25 75
510+
:header-rows: 1
511+
512+
* - Alert type name
513+
- Description
514+
* - ``cmClimateLightTRAP``
515+
- Climate Light Sensor Trap
516+
* - ``cmClimateLightCLEAR``
517+
- Climate Light Sensor Clear Trap
518+
* - ``cmClimateLightNOTIFY``
519+
- Climate Light Sensor Trap
520+
* - ``gstClimateLightNOTIFY``
521+
- Climate Light Sensor Trap
522+
* - ``gstClimateLightCLEAR``
523+
- Climate Light Sensor Clear Trap
524+
525+
526+
527+
528+
*weathergoose_sound* events
529+
---------------------------
530+
531+
532+
.. list-table:: Alerts associated with weathergoose_sound events
533+
:widths: 25 75
534+
:header-rows: 1
535+
536+
* - Alert type name
537+
- Description
538+
* - ``cmClimateSoundTRAP``
539+
- Climate Sound Sensor Trap
540+
* - ``cmClimateSoundCLEAR``
541+
- Climate Sound Sensor Clear Trap
542+
* - ``cmClimateSoundNOTIFY``
543+
- Climate Sound Sensor Trap
544+
* - ``gstClimateSoundNOTIFY``
545+
- Climate Sound Sensor Trap
546+
* - ``gstClimateSoundCLEAR``
547+
- Climate Sound Sensor Clear Trap
548+
549+
550+
551+
552+
*upsPowerState* events
553+
----------------------
554+
UPS running on battery or utility power
555+
556+
.. list-table:: Alerts associated with upsPowerState events
557+
:widths: 25 75
558+
:header-rows: 1
559+
560+
* - Alert type name
561+
- Description
562+
* - ``upsOnBatteryPower``
563+
- Ups running on battery power
564+
* - ``upsOnUtilityPower``
565+
- Ups running on utility power
566+
567+
568+
569+

doc/reference/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ This section contains reference material for end-users.
2121
ipdevpoll
2222
external_authentication
2323
mailin
24+
models-event
25+
models-manage
2426
navstats
2527
portadmin
2628
radius

doc/reference/ipdevpoll.rst

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,7 @@ intervals. These jobs are fully user-configurable.
99
Usage
1010
=====
1111

12-
::
13-
14-
usage: ipdevpolld [-h] [--version] [-f] [-s] [-j] [-p] [-J JOBNAME]
15-
[-n NETBOX] [-m [WORKERS]] [-M JOBS] [-P] [--capture-vars]
16-
[-c] [--threadpoolsize COUNT] [--worker]
17-
18-
optional arguments:
19-
-h, --help show this help message and exit
20-
--version show program's version number and exit
21-
-f, --foreground run in foreground instead of daemonizing
22-
-s, --log-stderr log to stderr instead of log file
23-
-j, --list-jobs print a list of configured jobs and exit
24-
-p, --list-plugins load and print a list of configured plugins
25-
-J JOBNAME run only JOBNAME jobs in this process
26-
-n NETBOX, --netbox NETBOX
27-
Run JOBNAME once for NETBOX. Also implies -f and -s
28-
options.
29-
-m [WORKERS], --multiprocess [WORKERS]
30-
Run ipdevpoll in a multiprocess setup. If WORKERS is
31-
not set it will default to number of cpus in the
32-
system
33-
-M JOBS, --max-jobs-per-worker JOBS
34-
Restart worker processes after completing JOBS jobs.
35-
(Default: Don't restart)
36-
-P, --pidlog Include process ID in every log line
37-
--capture-vars Capture and print locals and globals in tracebacks
38-
when debug logging
39-
-c, --clean cleans/purges old job log entries from the database
40-
and then exits
41-
--threadpoolsize COUNT
42-
the number of database worker threads, and thus db
43-
connections, to use in this process
44-
--worker Used internally when lauching worker processes
45-
46-
This program runs SNMP polling jobs for IP devices monitored by NAV
12+
.. program-output:: ipdevpolld --help
4713

4814
Manually running a job for a given netbox
4915
-----------------------------------------
@@ -169,7 +135,7 @@ are reserved for synchronous communication with the PostgreSQL database
169135
backend. Even on a multi-core server, this means all of ipdevpoll's work is
170136
limited to a single core. Once ipdevpoll's workload grows beyond what a single
171137
core can handle, ipdevpoll can optionally run in a *multiprocess mode*, using
172-
the :option:`--multiprocess` option.
138+
the ``--multiprocess`` option.
173139

174140
In multiprocess mode, ipdevpoll spawns a number of worker processes, while the
175141
master process becomes a simple job scheduler, distributing the actual jobs to
@@ -179,7 +145,7 @@ the individual workers.
179145

180146
ipdevpoll's default number of workers processes and threads aren't
181147
necessarily sane for multiprocess usage. Unless a number of workers is
182-
supplied to the :option:`--multiprocess` option, it will spawn a number of
148+
supplied to the ``--multiprocess`` option, it will spawn a number of
183149
workers corresponding to the number of cores it detects on your system. The
184150
default number of database threads in ipdevpoll's threadpool is **10** per process,
185151
which means each worker process will create **10 individual connections to
@@ -189,13 +155,13 @@ the individual workers.
189155
default pool of 100 available connections, causing other NAV processes to
190156
be unable to connect to the database. When enabling multiprocess mode, you
191157
should really tune down the threadpool size by adding the
192-
:option:`--threadpoolsize` option.
158+
``--threadpoolsize`` option.
193159

194160

195161
Another good thing about the multiprocess mode is that you can limit the
196162
number of jobs any worker process will run before it is killed and respawned.
197163
This may provide additional protection against unintended resource leaks. See
198-
the :option:`--max-jobs-per-worker` option.
164+
the ``--max-jobs-per-worker`` option.
199165

200166
You can make sure ipdevpoll always runs in multiprocess mode by altering the
201167
``command`` option in the ``ipdevpoll`` entry of the configuration file

python/nav/mibs/mibretriever.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,13 @@ class MibTableResultRow(dict):
219219
220220
Acts as a dictionary. The row index is available through the
221221
integer key 0, or as the member attribute 'index'.
222-
223222
"""
224223

225224
def __init__(self, index, columns=None):
226225
"""Initialize with the row index of this row.
227226
228-
index -- index OID
229-
columns -- optional list of column names to pre-allocate with
230-
None values.
227+
:param index: index OID
228+
:param columns: optional list of column names to pre-allocate with None values.
231229
232230
"""
233231
if columns is None:

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ setenv =
128128
LANG=C.UTF-8
129129
VIRTUALENV_PIP=23.1.0
130130
allowlist_externals = sh
131+
commands_pre =
131132
commands =
132133
sphinx-build doc/ doc/_build/
133134
sh -c "cd doc; python -c 'import conf; print(conf.version)' > {toxinidir}/reports/doc_version"

0 commit comments

Comments
 (0)