Skip to content

ITL: Network Protocol for all Manubulon SNMP Checks#10791

Open
oxzi wants to merge 1 commit into
masterfrom
itl-check-manubulon-protocol
Open

ITL: Network Protocol for all Manubulon SNMP Checks#10791
oxzi wants to merge 1 commit into
masterfrom
itl-check-manubulon-protocol

Conversation

@oxzi
Copy link
Copy Markdown
Member

@oxzi oxzi commented Apr 14, 2026

Add a new snmp_network_protocol custom var to all Manubulon SNMP checks to configure the underlying network protocols. By default, the snmp-manubulon-command template, used by all Manubulon SNMP checks, sets the protocol to udp and the version of the IP matching the snmp_address.

In the meantime, the upstream moved to GitHub. This was also reflected in the docs and outdated comments, pointing to outdated versions of the checks, were removed.


I have tested these changes with the following four hosts.

template Host "snmp-test" {
  import "generic-host"
  vars.snmp_test = true
}

object Host "snmp-test-v4only" {
  import "snmp-test"
  address = "127.0.0.1"
}

object Host "snmp-test-v6only" {
  import "snmp-test"
  address6 = "::1"
}

object Host "snmp-test-ds-v4" {
  import "snmp-test"
  address = "127.0.0.1"
  address6 = "::1"
  vars.check_ipv4 = true
}

object Host "snmp-test-ds-v6" {
  import "snmp-test"
  address = "127.0.0.1"
  address6 = "::1"
  vars.check_ipv6 = true
}

apply Service "snmp-interface" {
  import "generic-service"

  check_command = "snmp-interface"

  assign where host.vars.snmp_test
}

The --protocol flag of the executed command contained either udp/ipv4 or udp/ipv6, matching the expectation reflected in the host name.


Fixes #10790.

@oxzi oxzi added the area/itl Template Library CheckCommands label Apr 14, 2026
@cla-bot cla-bot Bot added the cla/signed label Apr 14, 2026
@oxzi oxzi mentioned this pull request Apr 14, 2026
@oxzi
Copy link
Copy Markdown
Member Author

oxzi commented Apr 14, 2026

Just saw that the upstream added this flag in two batches:

  1. SteScho/manubulon-snmp@5369da5 in 2013 for only a few plugins, part of release v2.0.0.
  2. SteScho/manubulon-snmp@394ade3 in 2024 for the remaining plugins, part of no official release.

I am unsure if my changes would be breaking, e.g., for users of an older version of the plugin. In general, the project seems to became quite slow in the last decade.

@m4rcu5
Copy link
Copy Markdown
Contributor

m4rcu5 commented Apr 16, 2026

I installed the package nagios-snmp-plugins on Debian;

Package: nagios-snmp-plugins
Version: 2.1.0-5
Priority: optional
Section: net
Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
Installed-Size: 708 kB
Depends: libnet-snmp-perl, monitoring-plugins-common | nagios-plugins-basic (>= 1.4.5-2), ucf, perl:any
Recommends: libcrypt-des-perl, libcrypt-rijndael-perl
Homepage: https://github.com/SteScho/manubulon-snmp
Tag: admin::monitoring, implemented-in::perl, protocol::snmp, role::plugin,
 role::program, use::monitor, works-with::network-traffic
Download-Size: 89.3 kB
APT-Manual-Installed: yes
APT-Sources: http://deb.debian.org/debian trixie/main amd64 Packages

And you triggered me to dig a bit deeper. It seems Debian has patched the --protocol option into all scripts about a year ago with this patch: https://salsa.debian.org/nagios-team/nagios-snmp-plugins/-/blob/master/debian/patches/24_tcp_udp_ipv4_ipv6

I am not sure if there would even be any working IPv6 support without it. And even now, the Debian packages seems to omit the libsocket6-perl dependency.

Add a new snmp_network_protocol custom var to all Manubulon SNMP
checks to configure the underlying network protocols. By default,
the "snmp-manubulon-command" template, used by all Manubulon SNMP
checks, sets the protocol to udp and the version of the IP matching
the "snmp_address".

In the meantime, the upstream moved to GitHub. This was also reflected
in the docs and outdated comments, pointing to outdated versions of the
checks, were removed.
@oxzi oxzi force-pushed the itl-check-manubulon-protocol branch from 0e4bc4b to 33e6e96 Compare April 20, 2026 08:50
@oxzi
Copy link
Copy Markdown
Member Author

oxzi commented Apr 20, 2026

Thanks for the Debian hint.

I have tested an older installation on a Debian 12, where the backport has not landed. Unfortunately, there the --protocol flag resulted in an error.

So, I have added a second snmp_network_protocol_set custom var, guarding if the --protocol flag is being set. I am a bit unhappy about this, but otherwise this would result in breakages.

Furthermore, I have added the defaults to the docs, as you have mentioned in the issue - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/itl Template Library CheckCommands cla/signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

manubulon ipv6 support

2 participants