Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename snmptrapd command line program to navtrapd #2926

Merged
merged 4 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading