Skip to content

Commit

Permalink
Merge pull request #2926 from Uninett/bugfix/rename-snmptrapd
Browse files Browse the repository at this point in the history
Rename `snmptrapd` command line program to `navtrapd`
  • Loading branch information
lunkwill42 authored Jun 3, 2024
2 parents b3e3b01 + e9d0ef7 commit d2852f9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
9 changes: 9 additions & 0 deletions NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ management profiles also for this.
Please read more in :doc:`the ipdevpoll reference documentation
</reference/ipdevpoll>` for configuration details.

Changed names of NAV command line programs
------------------------------------------

NAV 5.9 changed the names of most of NAV's command line programs by removing
their ``.py`` file name extensions. However, the :program:`snmptrapd` program
had a naming conflict with Net-SNMP's trap daemon, if installed. NAV 5.10.1
renames the NAV trap daemon to :program:`navtrapd`. Please ensure your
:file:`daemons.yml` configuration file is up to date after an upgrade.


NAV 5.9
=======
Expand Down
1 change: 1 addition & 0 deletions changelog.d/2926.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`snmptrapd` renamed to `navtrapd` to avoid naming conflicts with Net-SNMP programs
14 changes: 7 additions & 7 deletions doc/reference/snmptrapd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
What is the SNMP trap daemon?
=============================

:program:`snmptrapd` is a NAV backend service program, designed to receive SNMP
trap messages sent to the NAV server. It hands trap messages off to trap
handler plugins, which will process them, and typically translate them into NAV
events as they see fit. Anyone with some knowledge of Python and SNMP should
be able to write a new trap handler plugin.
:program:`snmptrapd` (a.k.a. :program:`navtrapd` to avoid name conflicts with
Net-SNMP's similarly named trap daemon) is a NAV backend service program,
designed to receive SNMP trap messages sent to the NAV server. It hands trap
messages off to trap handler plugins, which will process them, and typically
translate them into NAV events as they see fit. Anyone with some knowledge of
Python and SNMP should be able to write a new trap handler plugin.

snmptrapd uses the :mod:`pynetsnmp-2` library (via NAV's own :py:mod:`nav.Snmp`
adapter module), but is loosely based on this example from the PySNMP library:
Expand All @@ -30,7 +31,7 @@ the port is bound.

::

usage: snmptrapd [-h] [-d] [-c COMMUNITY] [address [address ...]]
usage: navtrapd [-h] [-d] [-c COMMUNITY] [address [address ...]]

NAV SNMP Trap daemon

Expand Down Expand Up @@ -108,4 +109,3 @@ nav.snmptrapd.trap.SNMPTrap
.. autoclass:: nav.snmptrapd.trap.SNMPTrap
:members:
:show-inheritance:

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pping = "nav.bin.pping:main"
radiusparser = "nav.bin.radiusparser:main"
servicemon = "nav.bin.servicemon:main"
smsd = "nav.bin.smsd:main"
snmptrapd = "nav.bin.snmptrapd:main"
navtrapd = "nav.bin.snmptrapd:main"
sortedstats_cacher = "nav.bin.sortedstats_cacher:main"
start_arnold = "nav.bin.start_arnold:main"
t1000 = "nav.bin.t1000:main"
Expand Down
2 changes: 1 addition & 1 deletion python/nav/etc/daemons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ daemons:

snmptrapd:
description: Receives and processes SNMP traps and notifications.
command: snmptrapd
command: navtrapd
privileged: true

0 comments on commit d2852f9

Please sign in to comment.